78 void buildObjectList(); |
78 void buildObjectList(); |
79 void changeDocument(LDDocument* f); |
79 void changeDocument(LDDocument* f); |
80 void closeInitialDocument(); |
80 void closeInitialDocument(); |
81 void createBlankDocument(); |
81 void createBlankDocument(); |
82 LDDocument* currentDocument(); |
82 LDDocument* currentDocument(); |
83 void currentDocumentClosed(); |
|
84 QKeySequence defaultShortcut(QAction* act); |
83 QKeySequence defaultShortcut(QAction* act); |
85 void deleteByColor(LDColor color); |
84 void deleteByColor(LDColor color); |
86 int deleteSelection(); |
85 int deleteSelection(); |
87 DocumentManager* documents() { return m_documents; } |
86 DocumentManager* documents() { return m_documents; } |
88 void doFullRefresh(); |
87 void doFullRefresh(); |
93 class QSettings* getSettings() { return m_settings; } |
92 class QSettings* getSettings() { return m_settings; } |
94 LDColor getUniformSelectedColor(); |
93 LDColor getUniformSelectedColor(); |
95 class GuiUtilities* guiUtilities(); |
94 class GuiUtilities* guiUtilities(); |
96 void loadShortcuts(); |
95 void loadShortcuts(); |
97 LDDocument* newDocument(bool cache = false); |
96 LDDocument* newDocument(bool cache = false); |
98 GLRenderer* renderer(); |
97 GLRenderer* currentRenderer(); |
99 void refresh(); |
98 void refresh(); |
100 void refreshObjectList(); |
99 void refreshObjectList(); |
101 int ringToolDivisions() const; |
100 int ringToolDivisions() const; |
102 int ringToolSegments() const; |
101 int ringToolSegments() const; |
103 bool save(LDDocument* doc, bool saveAs); |
102 bool save(LDDocument* doc, bool saveAs); |
132 |
131 |
133 private: |
132 private: |
134 struct ToolInfo { QMetaMethod method; Toolset* object; }; |
133 struct ToolInfo { QMetaMethod method; Toolset* object; }; |
135 |
134 |
136 class GuiUtilities* m_guiUtilities; |
135 class GuiUtilities* m_guiUtilities; |
|
136 QMap<LDDocument*, GLRenderer*> m_renderers; |
137 GLRenderer* m_renderer; |
137 GLRenderer* m_renderer; |
138 LDObjectList m_sel; |
138 LDObjectList m_sel; |
139 QList<ColorToolbarItem> m_quickColors; |
139 QList<ColorToolbarItem> m_quickColors; |
140 QList<QToolButton*> m_colorButtons; |
140 QList<QToolButton*> m_colorButtons; |
141 QList<QAction*> m_recentFiles; |
141 QList<QAction*> m_recentFiles; |
155 |
155 |
156 private slots: |
156 private slots: |
157 void selectionChanged(); |
157 void selectionChanged(); |
158 void recentFileClicked(); |
158 void recentFileClicked(); |
159 void quickColorClicked(); |
159 void quickColorClicked(); |
160 void doLastSecondCleanup(); |
|
161 void objectListDoubleClicked(QListWidgetItem* listitem); |
160 void objectListDoubleClicked(QListWidgetItem* listitem); |
|
161 void documentClosed(); |
162 }; |
162 }; |
163 |
163 |
164 // Pointer to the instance of MainWindow. |
164 // Pointer to the instance of MainWindow. |
165 // TODO: it's going out, slowly but surely. |
165 // TODO: it's going out, slowly but surely. |
166 extern MainWindow* g_win; |
166 extern MainWindow* g_win; |