Mercurial > octave
annotate libgui/src/color-picker.h @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | bed2fd5b8263 |
children | c6d54dd31a7e |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 // This class provides a simple color picker based on tQColorButton |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // by Harald Jedele, 23.03.01, GPL version 2 or any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29484
diff
changeset
|
6 // Copyright (C) 2013-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
25 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
26 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
27 //////////////////////////////////////////////////////////////////////// |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
28 |
21203
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
29 #if ! defined (octave_color_picker_h) |
710e700cdd7f
maint: Clean up naming and indentation of #ifdef blocks in libgui
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
30 #define octave_color_picker_h 1 |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
31 |
27412
da1f59fe04b3
try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
32 #include <QColorDialog> |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
33 #include <QPushButton> |
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
34 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
35 namespace octave |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
36 { |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
37 class color_picker : public QPushButton |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
38 { |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
39 Q_OBJECT |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
40 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
41 public: |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
42 |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
43 color_picker (QColor color = QColor (0, 0, 0), QWidget *parent = nullptr); |
24011
9107bae20480
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
44 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
45 QColor color (void) const { return m_color; } |
24011
9107bae20480
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
46 |
29484
bed2fd5b8263
allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29358
diff
changeset
|
47 void set_color (QColor new_color); |
bed2fd5b8263
allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29358
diff
changeset
|
48 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 private slots: |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
50 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 void select_color (void); |
24011
9107bae20480
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
52 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
53 private: |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
54 |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
55 virtual void update_button (void); |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
56 |
24718
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
57 QColor m_color; |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
58 }; |
ea1c88bd4430
move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
59 } |
24011
9107bae20480
style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
60 |
16402
7fa90eb41240
gui: individually configurable styles of the editor lexers
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
61 #endif |