summaryrefslogtreecommitdiff
path: root/src/MainWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWindow.h')
-rw-r--r--src/MainWindow.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/MainWindow.h b/src/MainWindow.h
index 43ab273..a44644a 100644
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -7,7 +7,9 @@
#include "context.h"
#include "module.h"
#include "polyset.h"
+#include "Tree.h"
#include <QPointer>
+#include <vector>
class MainWindow : public QMainWindow, public Ui::MainWindow
{
@@ -32,6 +34,7 @@ public:
ModuleInstantiation root_inst; // Top level instance
AbstractNode *absolute_root_node; // Result of tree evaluation
AbstractNode *root_node; // Root if the root modifier (!) is used
+ Tree tree;
class CSGTerm *root_raw_term; // Result of CSG term rendering
CSGTerm *root_norm_term; // Normalized CSG products
@@ -43,9 +46,9 @@ public:
PolySet *cgal_ogl_ps;
#endif
- QVector<CSGTerm*> highlight_terms;
+ std::vector<CSGTerm*> highlight_terms;
CSGChain *highlights_chain;
- QVector<CSGTerm*> background_terms;
+ std::vector<CSGTerm*> background_terms;
CSGChain *background_chain;
QString last_compiled_doc;
bool enableOpenCSG;
@@ -76,6 +79,7 @@ private:
void compileCSG(bool procevents);
bool maybeSave();
bool checkModified();
+ QString dumpCSGTree(AbstractNode *root);
static void consoleOutput(const QString &msg, void *userdata) {
static_cast<MainWindow*>(userdata)->console->append(msg);
}
@@ -156,4 +160,19 @@ public slots:
void autoReloadSet(bool);
};
+class GuiLocker
+{
+public:
+ GuiLocker() {
+ gui_locked++;
+ }
+ ~GuiLocker() {
+ gui_locked--;
+ }
+ static bool isLocked() { return gui_locked > 0; }
+
+private:
+ static unsigned int gui_locked;
+};
+
#endif
contact: Jan Huwald // Impressum