GNU Octave
8.1.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-2023 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
OCTAVE_BEGIN_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
void
set_color (QColor new_color);
48
49
private
slots:
50
51
void
select_color (
void
);
52
53
private
:
54
55
virtual
void
update_button (
void
);
56
57
QColor
m_color
;
58
};
59
60
OCTAVE_END_NAMESPACE
(
octave
)
61
62
#endif
OCTAVE_END_NAMESPACE
OCTAVE_END_NAMESPACE(octave)
QPushButton
QWidget
color_picker
Definition:
color-picker.h:38
color_picker::color
QColor color(void) const
Definition:
color-picker.h:45
color_picker::m_color
QColor m_color
Definition:
color-picker.h:57
OCTAVE_BEGIN_NAMESPACE
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
octave
Definition:
QTerminal.h:41
libgui
src
color-picker.h
Generated on Sun Mar 12 2023 22:37:13 for GNU Octave by
1.9.1