18 #ifndef COLORPICKERITEM_H 19 #define COLORPICKERITEM_H 27 class ScreenSelector :
public QFrame
31 ScreenSelector(QWidget* parent = 0);
34 void startSelection();
37 void screenSelected(QRect);
38 void colorPicked(
const QColor &color);
42 bool onMousePressEvent(QMouseEvent *event);
43 bool onMouseMoveEvent(QMouseEvent *event);
44 bool onMouseReleaseEvent(QMouseEvent *event);
45 bool onKeyPressEvent(QKeyEvent *event);
48 bool m_selectionInProgress;
49 QRect m_selectionRect;
50 EventFilter* m_eventFilter;
58 class ColorPickerItem :
public QObject
62 explicit ColorPickerItem(QObject* parent = 0);
66 void colorPicked(
const QColor &color);
70 ScreenSelector m_selector;
73 #endif // COLORPICKERITEM_H