20 #ifndef COLORPICKERITEM_H 21 #define COLORPICKERITEM_H 29 class ScreenSelector :
public QFrame
33 ScreenSelector(QWidget* parent = 0);
36 void startSelection();
39 void screenSelected(QRect);
40 void colorPicked(
const QColor &color);
43 bool onMousePressEvent(QMouseEvent *event);
44 bool onMouseMoveEvent(QMouseEvent *event);
45 bool onMouseReleaseEvent(QMouseEvent *event);
46 bool onKeyPressEvent(QKeyEvent *event);
49 bool m_selectionInProgress;
50 QRect m_selectionRect;
51 EventFilter* m_eventFilter;
59 class ColorPickerItem :
public QObject
63 explicit ColorPickerItem(QObject* parent = 0);
67 void colorPicked(
const QColor &color);
70 ScreenSelector m_selector;
73 #endif // COLORPICKERITEM_H