diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-10-23 16:35:21 +0200 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-10-23 16:35:21 +0200 |
commit | 30dcb0a5460c0d364907fdcc10beeb8aabc78106 (patch) | |
tree | 49feb8753359b41a83e4bbde424ab09f4799838e /src/gui/mainwindow.h | |
parent | c220b6e1264822c6f8d97ab216a319261106e614 (diff) | |
parent | 43233c4f76c5a96c08dcb033372294fbafbaf663 (diff) |
Merge tag 'v2.0' into debian/sid
Diffstat (limited to 'src/gui/mainwindow.h')
-rw-r--r-- | src/gui/mainwindow.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h new file mode 100644 index 0000000..21fbd5a --- /dev/null +++ b/src/gui/mainwindow.h @@ -0,0 +1,64 @@ +/*! + * A top-level window, which contains a single TikzDocument. + */ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "tikzscene.h" +#include "tikzview.h" +#include "graph.h" +#include "tikzdocument.h" +#include "mainmenu.h" +#include "toolpalette.h" +#include "stylepalette.h" + +#include <QMainWindow> +#include <QGraphicsView> +#include <QSplitter> + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + + void open(QString fileName); + int windowId() const; + TikzView *tikzView() const; + TikzScene *tikzScene() const; + TikzDocument *tikzDocument() const; + ToolPalette *toolPalette() const; + StylePalette *stylePalette() const; + QSplitter *splitter() const; + QString tikzSource(); + void setSourceLine(int line); + + MainMenu *menu() const; + +public slots: + void on_tikzSource_textChanged(); + void updateFileName(); + void refreshTikz(); +protected: + void closeEvent(QCloseEvent *event) override; + void changeEvent(QEvent *event) override; + +private: + TikzScene *_tikzScene; + TikzDocument *_tikzDocument; + MainMenu *_menu; + ToolPalette *_toolPalette; + StylePalette *_stylePalette; + Ui::MainWindow *ui; + int _windowId; + static int _numWindows; +}; + +#endif // MAINWINDOW_H |