src/platform/qt/ColorPicker.h (view raw)
1/* Copyright (c) 2013-2015 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef QGBA_COLOR_PICKER
7#define QGBA_COLOR_PICKER
8
9#include <QObject>
10
11class QColor;
12class QWidget;
13
14namespace QGBA {
15
16class ColorPicker : public QObject {
17Q_OBJECT
18
19public:
20 ColorPicker();
21 ColorPicker(QWidget* parent, const QColor& defaultColor);
22
23 ColorPicker& operator=(const ColorPicker&);
24
25signals:
26 void colorChanged(const QColor&);
27
28protected:
29 bool eventFilter(QObject* obj, QEvent* event) override;
30
31private:
32 QWidget* m_parent = nullptr;
33};
34
35}
36
37#endif