Developer documentation
Version 3.0.3-105-gd3941f44
color_button.h
Go to the documentation of this file.
1
/* Copyright (c) 2008-2022 the MRtrix3 contributors.
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
*
7
* Covered Software is provided under this License on an "as is"
8
* basis, without warranty of any kind, either expressed, implied, or
9
* statutory, including, without limitation, warranties that the
10
* Covered Software is free of defects, merchantable, fit for a
11
* particular purpose or non-infringing.
12
* See the Mozilla Public License v. 2.0 for more details.
13
*
14
* For more details, see http://www.mrtrix.org/.
15
*/
16
17
#ifndef __gui_color_button_h__
18
#define __gui_color_button_h__
19
20
#include "
gui/opengl/gl.h
"
21
22
class
QColorButton
:
public
QPushButton
23
{
NOMEMALIGN
24
Q_OBJECT
25
Q_PROPERTY (QColor
color
READ
color
WRITE
setColor
)
26
27
public
:
28
QColorButton
(QWidget *parent = NULL,
const
char
*
name
= NULL);
29
QColorButton
(
const
QColor &c, QWidget *parent = NULL,
const
char
*
name
= NULL);
30
virtual
~QColorButton
() {}
31
32
QColor
color
()
const
{
return
(col); }
33
void
setColor
(
const
QColor &c);
34
QSize
sizeHint
()
const
;
35
36
signals:
37
void
changed
(
const
QColor &newColor);
38
39
protected
slots:
40
void
chooseColor
();
41
42
protected
:
43
virtual
void
paintEvent
(QPaintEvent *p);
44
45
private
:
46
QColor col;
47
QPoint mPos;
48
};
49
50
#endif
QColorButton
Definition:
color_button.h:23
QColorButton::color
NOMEMALIGN QColor color
Definition:
color_button.h:25
QColorButton::setColor
void setColor(const QColor &c)
QColorButton::~QColorButton
virtual ~QColorButton()
Definition:
color_button.h:30
QColorButton::QColorButton
QColorButton(const QColor &c, QWidget *parent=NULL, const char *name=NULL)
QColorButton::sizeHint
QSize sizeHint() const
QColorButton::changed
void changed(const QColor &newColor)
QColorButton::color
QColor color() const
Definition:
color_button.h:32
QColorButton::paintEvent
virtual void paintEvent(QPaintEvent *p)
QColorButton::chooseColor
void chooseColor()
QColorButton::QColorButton
QColorButton(QWidget *parent=NULL, const char *name=NULL)
gl.h
NOMEMALIGN
#define NOMEMALIGN
Definition:
memory.h:22
name
const std::string name
Definition:
thread.h:108
src
gui
color_button.h
Generated on Mon Jul 4 2022 08:00:07 for MRtrix by
1.9.3