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

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

Started documenting the source code in doxygen format.

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