00001 #ifndef __MAINWINDOW_HPP__
00002 #define __MAINWINDOW_HPP__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <QMainWindow>
00027
00028 #include <QString>
00029 #include <QList>
00030
00031 #include <QVector>
00032 #include <QColor>
00033
00034 #include "global.hpp"
00035
00036 class QWidget;
00037 class QTabWidget;
00038 class QAction;
00039 class QTime;
00040
00041 class Generation;
00042 class Curve;
00043
00047 class MainWindow : public QMainWindow
00048 {
00049 Q_OBJECT
00050
00051 private:
00052
00053
00054
00055 QList < QAction* > actions;
00057 QMenu* pFileMenu;
00058 QMenu* pGenerationMenu;
00059 QMenu* pImageMenu;
00061 QAction* pSaveAction;
00062 QAction* pGammaCorrectionAction;
00063 QAction* pRandomColoursAction;
00066 QVector < Generation* > generationThreads;
00067 QVector < Curve* > curveThreads;
00069 QVector < QTime* > timesGeneration;
00070 QVector < QTime* > timesCurve;
00072 QTabWidget* tabImage;
00074
00075
00094 QAction* addAction( QMenu* parentMenu,
00095 const QString& entryName,
00096 const QString& keySequence,
00097 const QString& statusTipMessage,
00098 const QObject* object,
00099 const char* slot,
00100 const bool enabled = true,
00101 const bool checkable = false);
00102
00106 void createMenus(void);
00107
00111 void activateImageMenu(void);
00112
00116 void desactivateImageMenu(void);
00117
00118 public slots:
00119
00123 void savePicture(void);
00124
00128 void startGeneration(void);
00129
00133 void startCurve(void);
00134
00138 void settingsBox(void);
00139
00143 void gammaCorrection(void);
00144
00148 void changeColours(void);
00149
00153 void deleteThreadGeneration(void);
00154
00158 void deleteThreadCurve(void);
00159
00163 void closeTab(int index);
00164
00168 void renderZoom(QPoint start, QPoint end, Params params, QVector<QRgb> table);
00169
00173 void renderZoom(QPoint start, QPoint end, ParamsCurve params, QVector<QRgb> table);
00174
00178 void renderUnZoom(Params params, QVector<QRgb> table);
00179
00183 void renderUnZoom(ParamsCurve params, QVector<QRgb> table);
00184
00185 public:
00186
00195 MainWindow(const QString& windowName, const unsigned int width, const unsigned int height, QWidget* parent=0);
00196
00200 ~MainWindow(void);
00201 };
00202
00203 #endif