60 |
60 |
61 public: |
61 public: |
62 explicit MainWindow(QWidget* parent = nullptr, Qt::WindowFlags flags = 0); |
62 explicit MainWindow(QWidget* parent = nullptr, Qt::WindowFlags flags = 0); |
63 ~MainWindow(); |
63 ~MainWindow(); |
64 |
64 |
65 void addMessage (QString msg); |
|
66 void applyToActions(function<void(QAction*)> function); |
65 void applyToActions(function<void(QAction*)> function); |
67 void changeDocument (LDDocument* f); |
66 void changeDocument (LDDocument* f); |
68 void clearSelection(); |
67 void clearSelection(); |
69 void createBlankDocument(); |
68 void createBlankDocument(); |
70 LDDocument* currentDocument(); |
69 LDDocument* currentDocument(); |
107 void updateGridToolBar(); |
106 void updateGridToolBar(); |
108 void updateRecentFilesMenu(); |
107 void updateRecentFilesMenu(); |
109 |
108 |
110 static QPixmap getIcon(QString iconName); |
109 static QPixmap getIcon(QString iconName); |
111 |
110 |
112 template<typename... Args> |
|
113 void print(QString formatString, Args... args) |
|
114 { |
|
115 formatHelper(formatString, args...); |
|
116 addMessage(formatString); |
|
117 } |
|
118 |
|
119 signals: |
111 signals: |
120 void gridChanged(); |
112 void gridChanged(); |
121 |
113 |
122 public slots: |
114 public slots: |
123 void actionTriggered(); |
115 void actionTriggered(); |