Changeset 67 in tspsg-svn for trunk/src/mainwindow.h
- Timestamp:
- Oct 24, 2009, 3:37:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.h
r66 r67 1 1 /*! 2 * \class MainWindow 3 * \brief Class for handling Main Window UI and logic. 2 * \file mainwindow.h 4 3 * \author Copyright © 2007-2009 Lёppa <contacts[at]oleksii[dot]name> 5 4 * 6 5 * $Id$ 7 6 * $URL$ 7 * 8 * \brief Defines MainWindow class. 8 9 * 9 10 * <b>TSPSG: TSP Solver and Generator</b> … … 28 29 #define MAINWINDOW_H 29 30 30 /*!31 * \file mainwindow.h32 * \brief Defines MainWindow class.33 */34 35 31 #include "globals.h" 36 32 … … 41 37 #include "tspmodel.h" 42 38 39 /*! 40 * \brief Class for handling Main Window UI and logic. 41 * \author Copyright © 2007-2009 Lёppa <contacts[at]oleksii[dot]name> 42 */ 43 43 class MainWindow: public QMainWindow, Ui::MainWindow 44 44 { … … 50 50 51 51 private slots: 52 // Actions 52 53 void actionFileNewTriggered(); 53 54 void actionFileOpenTriggered(); … … 55 56 void actionFileSaveAsTaskTriggered(); 56 57 void actionFileSaveAsSolutionTriggered(); 58 #ifndef QT_NO_PRINTER 59 void actionFilePrintPreviewTriggered(); 60 void actionFilePrintTriggered(); 61 #endif // QT_NO_PRINTER 57 62 void actionSettingsPreferencesTriggered(); 58 63 void actionSettingsLanguageAutodetectTriggered(bool); 59 64 void groupSettingsLanguageListTriggered(QAction *); 60 65 void actionHelpAboutTriggered(); 66 // Buttons 67 void buttonBackToTaskClicked(); 68 void buttonRandomClicked(); 69 void buttonSolveClicked(); 70 61 71 void dataChanged(); 62 72 void dataChanged(const QModelIndex &, const QModelIndex &); 73 void numCitiesChanged(int); 63 74 #ifndef QT_NO_PRINTER 64 75 void printPreview(QPrinter *printer); 65 void actionFilePrintPreviewTriggered();66 void actionFilePrintTriggered();67 76 #endif // QT_NO_PRINTER 68 void buttonSolveClicked();69 void buttonRandomClicked();70 void buttonBackToTaskClicked();71 77 void spinCitiesValueChanged(int); 72 void numCitiesChanged(int);73 78 74 79 private: 75 QSettings *settings; 80 QString fileName; 81 QActionGroup *groupSettingsLanguageList; 82 QStringList output; 76 83 #ifndef QT_NO_PRINTER 77 84 QPrinter *printer; 78 85 #endif // QT_NO_PRINTER 86 QSettings *settings; 79 87 CTSPModel *tspmodel; 80 QString fileName; 81 QActionGroup *groupSettingsLanguageList; 82 QStringList output; 88 83 89 void enableSolutionActions(bool enable = true); 84 90 void initDocStyleSheet(); 91 void loadLangList(); 85 92 bool loadLanguage(QString lang = ""); 86 void loadLangList();87 93 bool maybeSave(); 88 94 void outputMatrix(tMatrix, QStringList &, int nRow = -1, int nCol = -1); 95 bool saveTask(); 89 96 void setFileName(QString fileName = trUtf8("Untitled") + ".tspt"); 90 bool saveTask();91 97 }; 92 98
Note: See TracChangeset
for help on using the changeset viewer.