all repos — mgba @ 60577e83948647d36a2e6a8b4ec8f8556df3f72f

mGBA Game Boy Advance Emulator

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#pragma once
 7
 8#include <QColor>
 9#include <QObject>
10
11class QWidget;
12
13namespace QGBA {
14
15class ColorPicker : public QObject {
16Q_OBJECT
17
18public:
19	ColorPicker();
20	ColorPicker(QWidget* parent, const QColor& defaultColor);
21
22	ColorPicker& operator=(const ColorPicker&);
23
24signals:
25	void colorChanged(const QColor&);
26
27protected:
28	bool eventFilter(QObject* obj, QEvent* event) override;
29
30private:
31	QWidget* m_parent = nullptr;
32	QColor m_defaultColor;
33};
34
35}