src/guiutilities.h

Mon, 19 Mar 2018 12:24:59 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 19 Mar 2018 12:24:59 +0200
changeset 1305
31627acdd4b5
parent 1298
dbc8bb2a4d84
child 1326
69a90bd2dba2
permissions
-rw-r--r--

Bfc red/green view almost completely fixed

974
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
1072
9ce9496427f2 Happy new year 2017!
Teemu Piippo <teemu@hecknology.net>
parents: 1043
diff changeset
3 * Copyright (C) 2013 - 2017 Teemu Piippo
974
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #pragma once
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #include "hierarchyelement.h"
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 #include "main.h"
1017
fc1c13db9618 Renamed ConfigurationValueBag to Configuration and added a pointer to it into HierarchyElement. This helps with the fight against global variables.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 1014
diff changeset
22 #include "mainwindow.h"
974
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23
1043
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
24 /*
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
25 * GuiUtilities
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
26 *
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
27 * Contains generic state-aware GUI functions.
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
28 */
974
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 class GuiUtilities : public QObject, public HierarchyElement
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 {
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 Q_OBJECT
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32 public:
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 explicit GuiUtilities (QObject* parent);
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 void fillUsedColorsToComboBox (class QComboBox* box);
986
525921eae58c Refactor GLRenderer and GLCompiler
Teemu Piippo <crimsondusk64@gmail.com>
parents: 974
diff changeset
36 QColor mainColorRepresentation();
1043
0091a761daf2 Refactor GuiUtilities
Teemu Piippo <teemu@hecknology.net>
parents: 1017
diff changeset
37 QVector<ColorToolbarItem> loadQuickColorList();
974
b2fa5f89798a Added a GuiUtilities class to contain useful non-MainWindow-related GUI functions
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 };
1252
db1d4917626f refactor
Santeri Piippo
parents: 1072
diff changeset
39
db1d4917626f refactor
Santeri Piippo
parents: 1072
diff changeset
40 QIcon makeColorIcon(LDColor color, int size);
1297
389516787a4c added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents: 1252
diff changeset
41 void setColorButton(class QPushButton* button, LDColor color);
1298
dbc8bb2a4d84 fixed infinite recursion and integrated the subfilereference editor
Teemu Piippo <teemu@hecknology.net>
parents: 1297
diff changeset
42 void editObject(MainWindow* parent, LDObject* object);

mercurial