source: tspsg-svn/trunk/src/mainwindow.h @ 66

Last change on this file since 66 was 66, checked in by laleppa, 15 years ago

Some documentation updates.

  • Property svn:keywords set to Id URL
File size: 2.6 KB
RevLine 
[65]1/*!
2 * \class MainWindow
3 * \brief Class for handling Main Window UI and logic.
4 * \author Copyright &copy; 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
[1]5 *
[6]6 *  $Id: mainwindow.h 66 2009-10-21 12:48:49Z laleppa $
7 *  $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/src/mainwindow.h $
[4]8 *
[65]9 *  <b>TSPSG: TSP Solver and Generator</b>
10 *
[6]11 *  This file is part of TSPSG.
[1]12 *
[6]13 *  TSPSG is free software: you can redistribute it and/or modify
14 *  it under the terms of the GNU General Public License as published by
15 *  the Free Software Foundation, either version 3 of the License, or
16 *  (at your option) any later version.
[1]17 *
[6]18 *  TSPSG is distributed in the hope that it will be useful,
19 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 *  GNU General Public License for more details.
[1]22 *
[6]23 *  You should have received a copy of the GNU General Public License
24 *  along with TSPSG.  If not, see <http://www.gnu.org/licenses/>.
[1]25 */
26
27#ifndef MAINWINDOW_H
28#define MAINWINDOW_H
29
[66]30/*!
31 * \file mainwindow.h
32 * \brief Defines MainWindow class.
33 */
34
[31]35#include "globals.h"
[64]36
[54]37#include "ui_mainwindow.h"
[1]38#include "settingsdialog.h"
[64]39
[12]40#include "tspsolver.h"
[15]41#include "tspmodel.h"
[1]42
43class MainWindow: public QMainWindow, Ui::MainWindow
44{
45        Q_OBJECT
[47]46
[1]47public:
48        MainWindow(QWidget *parent = 0);
[31]49        void closeEvent(QCloseEvent *);
[47]50
[1]51private slots:
[29]52        void actionFileNewTriggered();
[31]53        void actionFileOpenTriggered();
[50]54        void actionFileSaveTriggered();
[42]55        void actionFileSaveAsTaskTriggered();
56        void actionFileSaveAsSolutionTriggered();
[29]57        void actionSettingsPreferencesTriggered();
[31]58        void actionSettingsLanguageAutodetectTriggered(bool);
59        void groupSettingsLanguageListTriggered(QAction *);
[29]60        void actionHelpAboutTriggered();
[37]61        void dataChanged();
[57]62        void dataChanged(const QModelIndex &, const QModelIndex &);
[54]63#ifndef QT_NO_PRINTER
[65]64        void printPreview(QPrinter *printer);
[52]65        void actionFilePrintPreviewTriggered();
66        void actionFilePrintTriggered();
[54]67#endif // QT_NO_PRINTER
[29]68        void buttonSolveClicked();
69        void buttonRandomClicked();
[50]70        void buttonBackToTaskClicked();
[31]71        void spinCitiesValueChanged(int);
72        void numCitiesChanged(int);
[47]73
[6]74private:
[23]75        QSettings *settings;
[54]76#ifndef QT_NO_PRINTER
[29]77        QPrinter *printer;
[54]78#endif // QT_NO_PRINTER
[15]79        CTSPModel *tspmodel;
[47]80        QString fileName;
[29]81        QActionGroup *groupSettingsLanguageList;
[42]82        QStringList output;
[47]83        void enableSolutionActions(bool enable = true);
84        void initDocStyleSheet();
[30]85        bool loadLanguage(QString lang = "");
[29]86        void loadLangList();
[47]87        bool maybeSave();
88        void outputMatrix(tMatrix, QStringList &, int nRow = -1, int nCol = -1);
89        void setFileName(QString fileName = trUtf8("Untitled") + ".tspt");
[37]90        bool saveTask();
[1]91};
92
93#endif // MAINWINDOW_H
Note: See TracBrowser for help on using the repository browser.