GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
color-picker.h
Go to the documentation of this file.
1 //
2 // This class provides a simple color picker based on tQColorButton
3 // by Harald Jedele, 23.03.01, GPL version 2 or any later version.
4 //
5 // Copyright (C) FZI Forschungszentrum Informatik Karlsruhe
6 // Copyright (C) 2013-2015 Torsten
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software; you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by the
12 // Free Software Foundation; either version 3 of the License, or (at your
13 // option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but WITHOUT
16 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 // for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <http://www.gnu.org/licenses/>.
23 //
24 
25 // Author: Torsten <[email protected]>
26 
27 #ifndef COLORPICKER_H
28 #define COLORPICKER_H
29 
30 #include <QPushButton>
31 #include <QColorDialog>
32 
34 {
35  Q_OBJECT
36 
37 public:
38  color_picker (QColor color = QColor (0,0,0), QWidget *parent = 0);
39  QColor color () const { return _color; }
40 
41 private slots:
42  void select_color ();
43 
44 private:
45  virtual void update_button ();
46  QColor _color;
47 };
48 
49 #endif
void select_color()
Definition: color-picker.cc:45
virtual void update_button()
Definition: color-picker.cc:56
QColor _color
Definition: color-picker.h:46
QColor color() const
Definition: color-picker.h:39
color_picker(QColor color=QColor(0, 0, 0), QWidget *parent=0)
Definition: color-picker.cc:34