Changeset 149 in tspsg-svn for trunk/src/mainwindow.h
- Timestamp:
- Dec 20, 2010, 9:53:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.h
r142 r149 37 37 38 38 #ifdef Q_WS_WIN32 39 40 39 // Forward declaration. A real one is in shobjidl.h 40 struct ITaskbarList3; 41 41 #endif 42 42 … … 49 49 class MainWindow: public QMainWindow, Ui::MainWindow 50 50 { 51 51 Q_OBJECT 52 52 53 53 public: 54 55 54 MainWindow(QWidget *parent = 0); 55 ~MainWindow(); 56 56 57 57 private slots: 58 58 // Actions 59 60 61 62 63 59 void actionFileNewTriggered(); 60 void actionFileOpenTriggered(); 61 bool actionFileSaveTriggered(); 62 void actionFileSaveAsTaskTriggered(); 63 void actionFileSaveAsSolutionTriggered(); 64 64 #ifndef QT_NO_PRINTER 65 66 65 void actionFilePrintPreviewTriggered(); 66 void actionFilePrintTriggered(); 67 67 #endif // QT_NO_PRINTER 68 69 70 71 72 68 void actionSettingsPreferencesTriggered(); 69 void actionSettingsLanguageAutodetectTriggered(bool checked); 70 void groupSettingsLanguageListTriggered(QAction *action); 71 void actionSettingsStyleSystemTriggered(bool checked); 72 void groupSettingsStyleListTriggered(QAction *action); 73 73 #ifndef HANDHELD 74 74 void actionSettingsToolbarsConfigureTriggered(); 75 75 #endif // HANDHELD 76 77 78 79 76 void actionHelpOnlineSupportTriggered(); 77 void actionHelpReportBugTriggered(); 78 void actionHelpCheck4UpdatesTriggered(); 79 void actionHelpAboutTriggered(); 80 80 // Buttons 81 82 83 81 void buttonBackToTaskClicked(); 82 void buttonRandomClicked(); 83 void buttonSolveClicked(); 84 84 85 86 85 void dataChanged(); 86 void dataChanged(const QModelIndex &tl, const QModelIndex &br); 87 87 #ifdef Q_WS_WINCE_WM 88 89 88 void changeEvent(QEvent *ev); 89 void desktopResized(int screen); 90 90 #endif // Q_WS_WINCE_WM 91 91 void numCitiesChanged(int nCities); 92 92 #ifndef QT_NO_PRINTER 93 93 void printPreview(QPrinter *printer); 94 94 #endif // QT_NO_PRINTER 95 95 #ifdef Q_WS_WIN32 96 96 void solverRoutePartFound(int n); 97 97 #endif // Q_WS_WIN32 98 98 void spinCitiesValueChanged(int nCities); 99 99 100 100 private: 101 102 103 101 QString fileName; 102 QActionGroup *groupSettingsLanguageList; 103 QActionGroup *groupSettingsStyleList; 104 104 #ifndef HANDHELD 105 106 105 QAction *actionSettingsToolbarsConfigure; 106 QtToolBarManager *toolBarManager; 107 107 #endif // HANDHELD 108 108 #ifndef QT_NO_PRINTER 109 110 111 109 QPrinter *printer; 110 QAction *actionFilePrintPreview; 111 QAction *actionFilePrint; 112 112 #endif // QT_NO_PRINTER 113 114 115 113 QAction *actionHelpCheck4Updates; 114 QSettings *settings; 115 CTSPModel *tspmodel; 116 116 #ifdef Q_WS_WINCE_WM 117 117 QRect currentGeometry; 118 118 #endif // Q_WS_WINCE_WM 119 119 120 120 #ifdef Q_WS_WIN32 121 121 ITaskbarList3 *tl; 122 122 #endif // Q_WS_WIN32 123 123 124 125 124 // The solution graph SVG 125 QPicture graph; 126 126 127 128 129 130 131 132 133 134 127 // Formats 128 QTextTableFormat fmt_table; 129 QTextBlockFormat fmt_paragraph, 130 fmt_cell; 131 QTextCharFormat fmt_default, 132 fmt_selected, 133 fmt_alternate, 134 fmt_altlist; 135 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 136 void check4Updates(bool silent = false); 137 void closeEvent(QCloseEvent *ev); 138 void dragEnterEvent(QDragEnterEvent *ev); 139 void drawNode(QPainter &pic, int nstep, bool left = false, SStep *step = NULL); 140 void dropEvent(QDropEvent *ev); 141 void initDocStyleSheet(); 142 void loadLangList(); 143 bool loadLanguage(const QString &lang = QString()); 144 void loadStyleList(); 145 void loadToolbarList(); 146 bool maybeSave(); 147 void outputMatrix(QTextCursor &cur, const TMatrix &matrix); 148 void outputMatrix(QTextCursor &cur, const SStep &step); 149 void retranslateUi(bool all = true); 150 bool saveTask(); 151 void setFileName(const QString &fileName = tr("Untitled") + ".tspt"); 152 void setupUi(); 153 void toggleSolutionActions(bool enable = true); 154 void toggleTranclucency(bool enable); 155 155 }; 156 156
Note: See TracChangeset
for help on using the changeset viewer.