GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
color-picker.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// This class provides a simple color picker based on tQColorButton
4
// by Harald Jedele, 23.03.01, GPL version 2 or any later version.
5
//
6
// Copyright (C) 2013-2021 The Octave Project Developers
7
//
8
// See the file COPYRIGHT.md in the top-level directory of this
9
// distribution or <https://octave.org/copyright/>.
10
//
11
// This file is part of Octave.
12
//
13
// Octave is free software: you can redistribute it and/or modify it
14
// under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// Octave is distributed in the hope that it will be useful, but
19
// WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU General Public License for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with Octave; see the file COPYING. If not, see
25
// <https://www.gnu.org/licenses/>.
26
//
27
////////////////////////////////////////////////////////////////////////
28
29
#if ! defined (octave_color_picker_h)
30
#define octave_color_picker_h 1
31
32
#include <QColorDialog>
33
#include <QPushButton>
34
35
namespace
octave
36
{
37
class
color_picker
:
public
QPushButton
38
{
39
Q_OBJECT
40
41
public
:
42
43
color_picker
(QColor
color
= QColor (0, 0, 0),
QWidget
*parent =
nullptr
);
44
45
QColor
color
(
void
)
const
{
return
m_color
; }
46
47
private
slots:
48
49
void
select_color
(
void
);
50
51
private
:
52
53
virtual
void
update_button
(
void
);
54
55
QColor
m_color
;
56
};
57
}
58
59
#endif
QPushButton
QWidget
octave::color_picker
Definition:
color-picker.h:38
octave::color_picker::update_button
virtual void update_button(void)
Definition:
color-picker.cc:61
octave::color_picker::color
QColor color(void) const
Definition:
color-picker.h:45
octave::color_picker::m_color
QColor m_color
Definition:
color-picker.h:55
octave::color_picker::select_color
void select_color(void)
Definition:
color-picker.cc:49
octave::color_picker::color_picker
color_picker(QColor color=QColor(0, 0, 0), QWidget *parent=nullptr)
Definition:
color-picker.cc:38
octave
Definition:
aepbalance.cc:41
libgui
src
color-picker.h
Generated on Tue Apr 13 2021 15:27:43 for GNU Octave by
1.9.1