BALL  1.5.0
colorTable.h
Go to the documentation of this file.
1 #ifndef BALL_VIEW_WIDGETS_COLOR_TABLE_H
2 #define BALL_VIEW_WIDGETS_COLOR_TABLE_H
3 
4 #include <QtWidgets/QTableWidget>
5 
6 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
8 #endif
9 
10 #ifndef BALL_VIEW_KERNEL_COMMON_H
11 # include <BALL/VIEW/KERNEL/common.h>
12 #endif
13 
14 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
16 #endif
17 
18 namespace BALL
19 {
20  namespace VIEW
21  {
26  : public QTableWidget,
28  {
29  Q_OBJECT
30 
31  public:
32  ColorTable(QWidget* parent = 0, const char* name = 0);
33 
34  void setNamesTitle(const String& string);
35 
36  String getNamesTitle() const;
37 
38  void setContent(const vector<String>& names, const vector<ColorRGBA>& colors);
39 
40  void setColors(const vector<ColorRGBA>& colors);
41 
42  const vector<ColorRGBA>& getColors() const
43  { return colors_;}
44 
45  const vector<String>& getNames() const
46  { return names_;}
47 
49  virtual bool getValue(String&) const;
50 
52  virtual bool setValue(const String& value);
53 
54  private Q_SLOTS:
55 
56  void beginEdit(int row, int col);
57 
58  virtual void mousePressEvent(QMouseEvent* event);
59 
60  private:
61  vector<ColorRGBA> colors_;
62  vector<String> names_;
63  bool setting_content_;
64  };
65  }
66 }
67 
68 #endif //BALL_VIEW_WIDGETS_COLOR_TABLE_H
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
const vector< String > & getNames() const
Definition: colorTable.h:45
Definition: constants.h:12
const vector< ColorRGBA > & getColors() const
Definition: colorTable.h:42