tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
color_delegate.hpp
Go to the documentation of this file.
1 
27 #ifndef COLOR_DELEGATE_HPP
28 #define COLOR_DELEGATE_HPP
29 
30 #include "colorpicker_global.hpp"
31 
32 #include <QStyledItemDelegate>
33 
37 class QCP_EXPORT Color_Delegate : public QStyledItemDelegate
38 {
39  Q_OBJECT
40 public:
41  explicit Color_Delegate(QWidget *parent = 0);
42 
43  void paint(QPainter *painter, const QStyleOptionViewItem &option,
44  const QModelIndex &index) const;
45 
46  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
47  const QModelIndex &index) const;
48 
49  void setEditorData(QWidget *editor, const QModelIndex &index) const;
50 
51  void setModelData(QWidget *editor, QAbstractItemModel *model,
52  const QModelIndex &index) const;
53 
54  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
55 
56 private slots:
57  void color_changed();
58  void close_editor();
59 };
60 
61 #endif // COLOR_DELEGATE_HPP
#define QCP_EXPORT
Definition: colorpicker_global.hpp:9
Definition: color_delegate.hpp:37