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
3
Pencil2D - Traditional Animation Software
4
Copyright (C) 2012-2020 Matthew Chiawen Chang
5
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License
8
as published by the Free Software Foundation; version 2 of the License.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU 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
22
namespace
Ui {
23
class
ColorInspector
;
24
}
25
26
class
ColorInspector
:
public
BaseDockWidget
27
{
28
Q_OBJECT
29
30
friend
class
ColorSliders;
31
32
public
:
33
explicit
ColorInspector
(
QWidget
*
parent
=
nullptr
);
34
~ColorInspector
()
override
;
35
QColor
color();
36
37
void
initUI()
override
;
38
void
updateUI()
override
;
39
40
signals:
41
void
colorChanged(
const
QColor
& c);
42
void
colorSpecChanged(
const
bool
& isRgb);
43
44
public
slots:
45
void
setColor(
QColor
newColor);
46
47
private
slots:
48
void
onColorSpecChanged();
49
void
onColorChanged();
50
void
onColorChanged(
const
QColor
& color);
51
52
private
:
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