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