MPSolve 3.2.1
Loading...
Searching...
No Matches
polfileeditorwindow.h
1#ifndef POLFILEEDITORWINDOW_H
2#define POLFILEEDITORWINDOW_H
3
4#include <QMainWindow>
5#include <QList>
6#include "polfileeditor.h"
7
8namespace Ui {
9class PolFileEditorWindow;
10}
11
12namespace xmpsolve {
13
14class PolFileEditorWindow : public QMainWindow
15{
16 Q_OBJECT
17
18public:
19 explicit PolFileEditorWindow(QWidget *parent = 0);
21
28 void loadPolFile(QString path = QString());
29
33 void savePolFile();
34
39 void closePolFile(QString path);
40
44 void closeEditor(PolFileEditor* editor);
45
52 QString currentPolFile();
53
60
61signals:
66 void solvePoly(QString content);
67
68public slots:
73 void onEditorFilenameChanged(QString);
74
79
80private slots:
81 void on_actionOpen_pol_file_triggered();
82
83 void on_actionSave_triggered();
84
85 void on_actionSolve_triggered();
86
87 void on_actionClose_triggered();
88
89 void on_actionClose_editor_triggered();
90
91 void on_actionNew_triggered();
92
93private:
94 Ui::PolFileEditorWindow *ui;
95
102 QMap<QString, PolFileEditor*> m_polFileEditors;
103
108 void closeEvent(QCloseEvent *);
109
113 void closeOpenedTabs();
114
115 void showEvent(QShowEvent *event);
116
120 void setupIcons();
121};
122
123} // End of namespace xmpsolve
124
125#endif // POLFILEEDITORWINDOW_H
Definition: polfileeditorwindow.h:15
void solvePoly(QString content)
solvePoly is emitted when the user asks to solve a .pol file.
void closeEditor(PolFileEditor *editor)
Close the given editor.
Definition: polfileeditorwindow.cpp:82
QString currentPolFile()
currentPolFile returns the path to the currently focused .pol file.
Definition: polfileeditorwindow.cpp:167
PolFileEditor * currentEditor()
currentEditor can be used to access the current PolFileEditor focused in the tabWidget.
Definition: polfileeditorwindow.cpp:161
void savePolFile()
savePolFile save the pol file in the currently selected tab.
Definition: polfileeditorwindow.cpp:66
void onEditorStateChanged(PolFileEditor::State)
onEditorStateChanged handle the state changed of the editor tab.
Definition: polfileeditorwindow.cpp:137
void loadPolFile(QString path=QString())
loadPolFile loads the file specified by path or simply focus the tab containing it if it's already lo...
Definition: polfileeditorwindow.cpp:29
void closePolFile(QString path)
closePolFile closes the tab of the given .pol file
Definition: polfileeditorwindow.cpp:73
void onEditorFilenameChanged(QString)
onEditorFilenameChanged handle the change of filename inside and editor tab.
Definition: polfileeditorwindow.cpp:121
Definition: polfileeditor.h:14
State
State of the document.
Definition: polfileeditor.h:22