blob: 748ad581aa8f48c9b5472778b59e1f4fe4e359f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef COLORPICKERTOOL_H
#define COLORPICKERTOOL_H
#include "abstractformeditortool.h"
#include <QColor>
QT_FORWARD_DECLARE_CLASS(QPoint);
namespace QmlJSDebugger {
class ColorPickerTool : public AbstractFormEditorTool
{
Q_OBJECT
public:
explicit ColorPickerTool(QDeclarativeViewObserver *view);
virtual ~ColorPickerTool();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void hoverMoveEvent(QMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *keyEvent);
void wheelEvent(QWheelEvent *event);
void itemsAboutToRemoved(const QList<QGraphicsItem*> &itemList);
void clear();
signals:
void selectedColorChanged(const QColor &color);
protected:
void selectedItemsChanged(const QList<QGraphicsItem*> &itemList);
private:
void pickColor(const QPoint &pos);
private:
QColor m_selectedColor;
};
} // namespace QmlJSDebugger
#endif // COLORPICKERTOOL_H
|