4 #include <QtGui/QImage> 5 #include <QtWidgets/QDialog> 6 #include <QtWidgets/QLabel> 7 #include <QtWidgets/QPushButton> 8 #include <QtWidgets/QSpinBox> 9 #include <QtWidgets/QSlider> 10 #include <QtWidgets/QProgressBar> 11 #include <QtWidgets/QGridLayout> 12 #include <QtWidgets/QFileDialog> 14 #include <QtWidgets/QDesktopWidget> 15 #include <QtWidgets/QApplication> 23 #define COEF_TAILLE_MAX_FORET 1.9 24 #define LargeurMaximaleMenusDroite 300 25 #define HauteurMaximaleBarresFenetre 45 27 enum DialogCode{Rejected, Accepted, Load, Restore, RestoreSeed};
38 int Max_larg = (QApplication::desktop()->screenGeometry().width()
39 -LargeurMaximaleMenusDroite -20)*COEF_TAILLE_MAX_FORET;
41 int Max_haut = (QApplication::desktop()->screenGeometry().height()
42 -HauteurMaximaleBarresFenetre -25)*COEF_TAILLE_MAX_FORET;
44 QGridLayout* gridLayButtons;
48 QPushButton* max_width_btn ;
49 QPushButton* min_width_btn ;
50 QPushButton* max_height_btn ;
51 QPushButton* min_height_btn ;
56 QPushButton* valid_btn;
57 QPushButton* cancel_btn;
58 QPushButton* loadFromImgBtn;
59 QPushButton* restoreBtn;
62 QImage* pictureForest;
64 QFileDialog* fileDialog;
65 QDir picturesBrowserLocation;
78 Fwelcome(QWidget* parent,
int _largeur,
int _hauteur);
127 int getHaut()
const {
return haut_spin->value(); }
128 int getLarg()
const {
return larg_spin->value(); }
129 float getProba()
const {
return proba; }
130 float getCoef()
const {
return burningCoef; }
131 float getSeed()
const {
return seed; }
133 std::ifstream* getFile() {
return file; }
134 QImage* getImage() {
return pictureForest; }
161 void restore(QString filename);
178 void giveMinWidth() {larg_spin->setValue(100);}
179 void giveMaxWidth() {larg_spin->setValue(Max_larg);}
180 void giveMinHeight() {haut_spin->setValue(100);}
181 void giveMaxHeight() {haut_spin->setValue(Max_haut);}
void initEvents()
Definition: fwelcome.cpp:206
void loadSizes()
Definition: fwelcome.cpp:261
void addCancel() const
Definition: fwelcome.cpp:220
void checkInitFileDialog(QString windows_name)
Definition: fwelcome.cpp:279
void restore(QString filename)
Definition: fwelcome.cpp:287
Fwelcome(QWidget *parent)
Definition: fwelcome.cpp:18
void popSeedDialog()
Definition: fwelcome.cpp:374
virtual void closeEvent(QCloseEvent *e)
Definition: fwelcome.cpp:228
void setCoef(int x)
Definition: fwelcome.cpp:245
void setProba(int x)
Definition: fwelcome.cpp:239
void popImageDIalog()
Definition: fwelcome.cpp:343
void popSaveDialog()
Definition: fwelcome.cpp:360
Definition: fwelcome.h:34
void openFile(QString filename)
Definition: fwelcome.cpp:255
void loadFromImg(QString filename)
Definition: fwelcome.cpp:301
void createComponents()
Definition: fwelcome.cpp:66
void loadSeed(QString filename)
Definition: fwelcome.cpp:326
void initComponents()
Definition: fwelcome.cpp:95