Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
colorinspector.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2012-2020 Matthew Chiawen Chang
5
6This program is free software; you can redistribute it and/or
7modify it under the terms of the GNU General Public License
8as published by the Free Software Foundation; version 2 of the License.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15*/
16#ifndef COLORSPINBOXGROUP_H
17#define COLORSPINBOXGROUP_H
18
19#include <QPaintEvent>
20#include "basedockwidget.h"
21
22namespace Ui {
23class ColorInspector;
24}
25
26class ColorInspector : public BaseDockWidget
27{
28 Q_OBJECT
29
30 friend class ColorSliders;
31
32public:
33 explicit ColorInspector(QWidget *parent = nullptr);
34 ~ColorInspector() override;
35 QColor color();
36
37 void initUI() override;
38 void updateUI() override;
39
40signals:
41 void colorChanged(const QColor& c);
42 void colorSpecChanged(const bool& isRgb);
43
44public slots:
45 void setColor(QColor newColor);
46
47private slots:
48 void onColorSpecChanged();
49 void onColorChanged();
50 void onColorChanged(const QColor& color);
51
52private:
53 void updateControls();
54
55 Ui::ColorInspector* ui = nullptr;
56 bool isRgbColors = true;
57 QColor mCurrentColor;
58};
59
60#endif // COLORSPINBOXGROUP_H
BaseDockWidget
Definition: basedockwidget.h:27
ColorInspector
Definition: colorinspector.h:27
QColor
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QWidget
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39