ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
colorbutton.h
Go to the documentation of this file.
1
#ifndef COLORBUTTON_H
2
#define COLORBUTTON_H
3
4
#include <QPushButton>
5
6
class
ColorButton
:
public
QPushButton
7
{
8
Q_OBJECT
9
public
:
10
explicit
ColorButton
(
QWidget
* parent = 0,
bool
allowAlpha
=
false
);
11
12
// Current color
13
inline
const
QColor&
color
()
const
{
return
_color
; }
14
void
color
(
const
QColor& newColor);
15
16
// Enable alpha channel?
17
inline
bool
allowAlpha
()
const
{
return
_alpha
; }
18
void
allowAlpha
(
bool
newAllowAlpha);
19
// Whether or not to set the label based on the current color
20
inline
bool
setLabel
()
const
{
return
_setLabel
; }
21
inline
void
setLabel
(
bool
newSetLabel) {
_setLabel
= newSetLabel; }
22
// Whether to use big icons (24x24) or small icons (24x12)
23
inline
bool
bigIcons
()
const
{
return
_bigIcons
; }
24
void
bigIcons
(
bool
newBigIcons);
25
26
signals:
27
void
colorChanged
(QColor newColor);
28
29
private
slots:
30
void
pickColor
();
31
32
private
:
33
QColor
_color
;
34
bool
_alpha
,
_setLabel
,
_bigIcons
;
35
36
void
updateImage
();
37
};
38
39
#endif // COLORBUTTON_H
ColorButton::setLabel
void setLabel(bool newSetLabel)
Definition:
colorbutton.h:21
ColorButton::color
const QColor & color() const
Definition:
colorbutton.h:13
ColorButton::_color
QColor _color
Definition:
colorbutton.h:33
QWidget
QPushButton
ColorButton
Definition:
colorbutton.h:6
ColorButton::pickColor
void pickColor()
Definition:
colorbutton.cpp:60
ColorButton::_alpha
bool _alpha
Definition:
colorbutton.h:34
ColorButton::colorChanged
void colorChanged(QColor newColor)
Definition:
moc_colorbutton.cpp:132
ColorButton::allowAlpha
bool allowAlpha() const
Definition:
colorbutton.h:17
ColorButton::_bigIcons
bool _bigIcons
Definition:
colorbutton.h:34
ColorButton::updateImage
void updateImage()
Definition:
colorbutton.cpp:32
ColorButton::_setLabel
bool _setLabel
Definition:
colorbutton.h:34
ColorButton::ColorButton
ColorButton(QWidget *parent=0, bool allowAlpha=false)
Definition:
colorbutton.cpp:5
ColorButton::bigIcons
bool bigIcons() const
Definition:
colorbutton.h:23
ColorButton::setLabel
bool setLabel() const
Definition:
colorbutton.h:20
src
ckb
colorbutton.h
Generated on Sat Jan 20 2018 16:59:28 for ckb-next by
1.8.6