src/mainwindow.h

changeset 1012
413ecd6b9801
parent 1010
969b48eddd6b
child 1014
f0a8ecb6a357
child 1217
314e12e23c3a
equal deleted inserted replaced
1011:4fdd74a04790 1012:413ecd6b9801
24 #include <QRadioButton> 24 #include <QRadioButton>
25 #include <QTreeWidget> 25 #include <QTreeWidget>
26 #include <QMetaMethod> 26 #include <QMetaMethod>
27 #include "ldObject.h" 27 #include "ldObject.h"
28 #include "colors.h" 28 #include "colors.h"
29 #include "configurationvaluebag.h"
30 #include "doublemap.h" 29 #include "doublemap.h"
31 30
32 class MessageManager; 31 class MessageManager;
33 class MainWindow; 32 class MainWindow;
34 class QToolButton; 33 class QToolButton;
77 void addMessage (QString msg); 76 void addMessage (QString msg);
78 void applyToActions (std::function<void(QAction*)> function); 77 void applyToActions (std::function<void(QAction*)> function);
79 void buildObjectList(); 78 void buildObjectList();
80 void changeDocument (LDDocument* f); 79 void changeDocument (LDDocument* f);
81 void closeInitialDocument(); 80 void closeInitialDocument();
82 ConfigurationValueBag* configBag() { return &m_configOptions; }
83 void createBlankDocument(); 81 void createBlankDocument();
84 LDDocument* currentDocument(); 82 LDDocument* currentDocument();
85 void currentDocumentClosed(); 83 void currentDocumentClosed();
86 QKeySequence defaultShortcut (QAction* act); 84 QKeySequence defaultShortcut (QAction* act);
87 void deleteByColor (LDColor color); 85 void deleteByColor (LDColor color);
94 QTreeWidget* getPrimitivesTree() const; 92 QTreeWidget* getPrimitivesTree() const;
95 class QSettings* getSettings() { return m_settings; } 93 class QSettings* getSettings() { return m_settings; }
96 LDColor getUniformSelectedColor(); 94 LDColor getUniformSelectedColor();
97 class GuiUtilities* guiUtilities(); 95 class GuiUtilities* guiUtilities();
98 void loadShortcuts(); 96 void loadShortcuts();
99 class QSettings* makeSettings (QObject* parent = nullptr);
100 LDDocument* newDocument (bool cache = false); 97 LDDocument* newDocument (bool cache = false);
101 GLRenderer* renderer(); 98 GLRenderer* renderer();
102 void refresh(); 99 void refresh();
103 void refreshObjectList(); 100 void refreshObjectList();
104 bool ringToolHiRes() const; 101 bool ringToolHiRes() const;
134 void closeEvent (QCloseEvent* ev); 131 void closeEvent (QCloseEvent* ev);
135 132
136 private: 133 private:
137 struct ToolInfo { QMetaMethod method; Toolset* object; }; 134 struct ToolInfo { QMetaMethod method; Toolset* object; };
138 135
139 ConfigurationValueBag m_configOptions;
140 class GuiUtilities* m_guiUtilities; 136 class GuiUtilities* m_guiUtilities;
141 GLRenderer* m_renderer; 137 GLRenderer* m_renderer;
142 LDObjectList m_sel; 138 LDObjectList m_sel;
143 QList<ColorToolbarItem> m_quickColors; 139 QList<ColorToolbarItem> m_quickColors;
144 QList<QToolButton*> m_colorButtons; 140 QList<QToolButton*> m_colorButtons;
224 private: 220 private:
225 Primitive* m_primitive; 221 Primitive* m_primitive;
226 }; 222 };
227 223
228 void populatePrimitivesTree (QTreeWidget* tw, const QString& selectByDefault = QString()); 224 void populatePrimitivesTree (QTreeWidget* tw, const QString& selectByDefault = QString());
225 QSettings* makeSettings (QObject* parent = nullptr);

mercurial