Mon, 02 Apr 2018 10:59:38 +0300
reworked bounding box
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 |
1326 | 3 | * Copyright (C) 2013 - 2018 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 | 24 | /* |
25 | * GuiUtilities | |
26 | * | |
27 | * Contains generic state-aware GUI functions. | |
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 | 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 | 39 | |
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); |