Warning, file /education/step/step/mainwindow.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*. 0002 SPDX-FileCopyrightText: 2007 Vladimir Kuznetsov <ks.vladimir@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef STEP_MAINWINDOW_H 0008 #define STEP_MAINWINDOW_H 0009 0010 #include <QUrl> 0011 0012 #include <KXmlGuiWindow> 0013 0014 class WorldModel; 0015 class WorldBrowser; 0016 class WorldScene; 0017 class WorldGraphicsView; 0018 class PropertiesBrowser; 0019 class InfoBrowser; 0020 class UndoBrowser; 0021 class ItemPalette; 0022 0023 class KRecentFilesAction; 0024 0025 class QAction; 0026 class QActionGroup; 0027 0028 class MainWindow : public KXmlGuiWindow 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 MainWindow(); 0034 ~MainWindow(); 0035 0036 public slots: 0037 bool newFile(); 0038 bool openFile(const QUrl& url = QUrl(), const QUrl& startUrl = QUrl()); 0039 bool saveFileAs(const QUrl& url = QUrl(), const QUrl& startUrl = QUrl()); 0040 bool saveFile(); 0041 0042 void openTutorial(); 0043 void openExample(); 0044 void openLocalExample(); 0045 void uploadExample(); 0046 0047 void configureStep(); 0048 0049 void simulationStartStop(); 0050 void simulationStart(); 0051 void simulationStop(); 0052 void simulationStopped(int result); 0053 0054 void setRunSpeed(int); 0055 0056 void setFullSpeed() { setRunSpeed(0); } 0057 void setSlowSpeed() { setRunSpeed(1); } 0058 void setSlowerSpeed() { setRunSpeed(2); } 0059 void setSlowestSpeed() { setRunSpeed(3); } 0060 void setStepSpeed() { setRunSpeed(4); } 0061 0062 0063 protected slots: 0064 void updateCaption(); 0065 void undoTextChanged(const QString& undoText); 0066 void redoTextChanged(const QString& redoText); 0067 void worldSelectionChanged(); 0068 0069 /* 0070 protected slots: 0071 void on_actionNew_triggered(bool checked); 0072 void on_actionOpen_triggered(bool checked); 0073 void on_actionSave_triggered(bool checked); 0074 void on_actionSaveAs_triggered(bool checked); 0075 0076 void on_actionStep_triggered(bool checked); 0077 void on_actionSimulation_triggered(bool checked); 0078 0079 void on_actionAboutStep_triggered(bool checked); 0080 0081 void on_simulationTimer_timeout(); 0082 */ 0083 0084 protected: 0085 void setupActions(); 0086 bool queryClose() override; 0087 bool maybeSave(); 0088 0089 protected: 0090 WorldModel* worldModel; 0091 WorldBrowser* worldBrowser; 0092 PropertiesBrowser* propertiesBrowser; 0093 InfoBrowser* infoBrowser; 0094 UndoBrowser* undoBrowser; 0095 ItemPalette* itemPalette; 0096 WorldScene* worldScene; 0097 WorldGraphicsView* worldGraphicsView; 0098 0099 QAction* actionUndo; 0100 QAction* actionRedo; 0101 QAction* actionDelete; 0102 QAction* actionCut; 0103 QAction* actionCopy; 0104 QAction* actionPaste; 0105 0106 KRecentFilesAction* actionRecentFiles; 0107 0108 QUrl currentFileUrl; 0109 0110 //The following members are needed for the setting of the timeScale 0111 int runSpeed; 0112 QAction *runSpeedAction; 0113 QAction *fullSpeedAct; 0114 QAction *slowSpeedAct; 0115 QAction *slowerSpeedAct; 0116 QAction *slowestSpeedAct; 0117 QAction *stepSpeedAct; 0118 QActionGroup *runSpeedGroup; 0119 0120 }; 0121 0122 #endif 0123