Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
mainwindow.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
23 #ifndef MAINWINDOW_H
24 #define MAINWINDOW_H
25 
26 #include <QMainWindow>
27 #include "mainwidget.h"
28 
29 namespace Ui {
30 class MainWindow;
31 }
32 
33 class MainWindow : public QMainWindow
34 {
35  Q_OBJECT
36 
37 public:
38  explicit MainWindow(QString const &nameFile,
39  QWidget *parent = nullptr);
40  explicit MainWindow(QWidget *parent = nullptr);
41  ~MainWindow() override;
42 
43 public slots:
44 
45  void setDiagramMode();
46  void setSessionMode();
47  void newDiagram();
48  void newSession();
49  void open();
50  void save();
51  void saveAs();
52  void exportPNG();
53 
54  void latexSource();
55  void latexSourceToClipboard();
56  void latexExportPNG();
57  void latexExportPDF();
58 
59  void normalMode();
60  void selectMode();
61  void insertMode();
62 
63  void keyPressEvent(QKeyEvent *event) override;
64  bool eventFilter(QObject *, QEvent *) override;
65  void closeEvent(QCloseEvent *event) override;
66 
67  void isSaved();
68  void isChanged();
69 
70 private:
71  Ui::MainWindow *m_ui;
72  MainWidget *mainWidget;
73  bool saved;
74 };
75 
76 #endif // MAINWINDOW_H
Definition: diagramrenderer.h:34
Definition: mainwindow.h:33
Definition: mainwidget.h:34