00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef MAINWINDOW_H
00015 #define MAINWINDOW_H
00016
00017 #include <QMainWindow>
00018 #include <QtGui/QHBoxLayout>
00019 #include <QtGui/QToolBox>
00020 #include <QtGui/QMenuBar>
00021 #include <QtGui/QMenu>
00022 #include <QtGui/QStatusBar>
00023 #include <QtGui/QProgressBar>
00024 #include <QtGui/QPushButton>
00025
00026 #include "brotdisplay.h"
00027 #include "gradient.h"
00028
00029 namespace Ui {
00030 class MainWindow;
00031 }
00032
00034 class MainWindow : public QMainWindow
00035 {
00036 Q_OBJECT
00037 public:
00038 MainWindow(QWidget *parent = 0);
00039 ~MainWindow();
00040 public slots:
00041 void OnProgress( float );
00042 void TranslateUI();
00043 void SetFractal(int fractal);
00044 void SetRenderWidth(int width);
00045 void SetRenderHeight(int height);
00046 void SetAnimatedRender(int animated);
00047 void SetSmoothColors(int smooth);
00048
00049 void Cancel(bool);
00050
00051 void SaveImage(void);
00052
00053 void colorsChanged(void);
00054
00055 void LanguageChanged(int);
00056 void LanguageFrench();
00057 void LanguageEnglish();
00058 protected:
00059 void changeEvent(QEvent *e);
00060
00061 private:
00062 QTranslator m_Translator;
00063 QHBoxLayout* m_pMainLayout;
00064 QToolBox* m_pToolBox;
00065 QWidget* m_pParametersBox;
00066 QFormLayout* m_pParametersLayout;
00067 QLabel* m_pZoomLabel;
00068 QDoubleSpinBox* m_pZoomSpin;
00069 QLabel* m_pPosXLabel;
00070 QDoubleSpinBox* m_pPosXSpin;
00071 QLabel* m_pPosYLabel;
00072 QDoubleSpinBox* m_pPosYSpin;
00073 QLabel* m_pIterationLabel;
00074 QSpinBox* m_pIterationSpin;
00075 QLabel* m_pFractalLabel;
00076 QComboBox* m_pFractalComboBox;
00077
00078 QWidget* m_pBuddhaBrotParameters;
00079 QFormLayout* m_pBuddhaBrotParametersLayout;
00080 QLabel* m_pPrecisionLabel;
00081 QDoubleSpinBox* m_pPrecisionSpin;
00082 QLabel* m_pMinIterationLabel;
00083 QSpinBox* m_pMinIterationSpin;
00084
00085 QWidget* m_pJuliaParameters;
00086 QFormLayout* m_pJuliaParametersLayout;
00087 QLabel* m_pRealLabel;
00088 QDoubleSpinBox* m_pRealSpin;
00089 QLabel* m_pImagLabel;
00090 QDoubleSpinBox* m_pImagSpin;
00091
00092 QWidget* m_pColorsBox;
00093 QFormLayout* m_pColorsLayout;
00094 ShadeWidget* m_pRedShade;
00095 ShadeWidget* m_pGreenShade;
00096 ShadeWidget* m_pBlueShade;
00097 ShadeWidget* m_pRGBShade;
00098 QLabel* m_pDilatationLabel;
00099 QDoubleSpinBox* m_pDilatationSpin;
00100
00101 QWidget* m_pRenderBox;
00102 QFormLayout* m_pRendersLayout;
00103 QLabel* m_pThreadCountLabel;
00104 QSpinBox* m_pThreadCountSpin;
00105 QLabel* m_pWidthLabel;
00106 QSpinBox* m_pWidthSpin;
00107 QLabel* m_pHeightLabel;
00108 QSpinBox* m_pHeightSpin;
00109 QLabel* m_pSmoothLabel;
00110 QCheckBox* m_pSmoothCheckBox;
00111 QLabel* m_pAnimatedLabel;
00112 QCheckBox* m_pAnimatedCheckBox;
00113
00114 QScrollArea* m_pDisplayScroll;
00115 BrotDisplay* m_pDisplay;
00116
00117 QMenuBar* m_pMenuBar;
00118 QMenu* m_pMenuFile;
00119 QAction* m_pActionSave;
00120 QAction* m_pActionExit;
00121 QMenu* m_pMenuOptions;
00122 QMenu* m_pMenuLanguage;
00123 QAction* m_pActionLanguageFrench;
00124 QAction* m_pActionLanguageEnglish;
00125 QAction* m_pActionAbout;
00126
00127 QPushButton* m_pRenderButton;
00128 QProgressBar* m_pProgressBar;
00129 QLabel* m_pProgressLabel;
00130 QPushButton* m_pCancelButton;
00131
00132 QGradientStops m_Gradient;
00133 };
00134
00135 #endif // MAINWINDOW_H