00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OMGSURVEYWIZARD_H
00022 #define OMGSURVEYWIZARD_H
00023
00024 #include <QWizard>
00025 #include <QLabel>
00026 #include <QPixmap>
00027 #include <QRadioButton>
00028 #include <QLineEdit>
00029 #include <QCheckBox>
00030 #include <QGroupBox>
00031 #include <QVBoxLayout>
00032 class OmgSurveyIntroPage : public QWizardPage
00033 {
00034 Q_OBJECT;
00035 public:
00036 OmgSurveyIntroPage(QWidget *parent)
00037 : QWizardPage(parent)
00038 {
00039 setTitle(tr("Introduction"));
00040
00041
00042 QLabel * label = new QLabel(tr("Congratulations for installing openModellerDesktop! "
00043 "Would you mind participating in our user survey? It will just "
00044 "take a few minutes and is completely optional. \n\n"
00045 "The data we gather "
00046 "from this survey will help us understand the needs of our users. "
00047 "We will also use the results of the survey as to help secure and "
00048 "justify funding for the openModeller project.\n\n"
00049 "No personal information will be shared beyond the project "
00050 "and your contact details (if you choose to supply them) will only "
00051 "be used to contact you with low frequency openModeller related "
00052 "announcements."
00053 ));
00054 label->setWordWrap(true);
00055
00056 QVBoxLayout *layout = new QVBoxLayout;
00057 layout->addWidget(label);
00058 setLayout(layout);
00059 };
00060 };
00061 class OmgWizardPersonalInfoPage : public QWizardPage
00062 {
00063 public:
00064 OmgWizardPersonalInfoPage(QWidget *parent) : QWizardPage(parent)
00065 {
00066 setTitle(tr("About yourself..."));
00067 setSubTitle(tr("We are interested to know who you are and where you work"));
00068
00069
00070 QLabel * mypPersonNameLabel = new QLabel(tr("&Your name:"));
00071 QLineEdit * mypPersonNameLineEdit = new QLineEdit;
00072 mypPersonNameLabel->setBuddy(mypPersonNameLineEdit);
00073
00074 QLabel * mypPersonOrganisationLabel = new QLabel(tr("Your organisation:"));
00075 QLineEdit * mypPersonOrganisationLineEdit = new QLineEdit;
00076 mypPersonOrganisationLabel->setBuddy(mypPersonOrganisationLineEdit);
00077
00078 QLabel * mypPersonEmailLabel = new QLabel(tr("Your email address (optional):"));
00079 QLineEdit * mypPersonEmailLineEdit = new QLineEdit;
00080 mypPersonEmailLabel->setBuddy(mypPersonEmailLineEdit);
00081
00082
00083
00084 QGroupBox * groupBox = new QGroupBox(tr("Job Description"));
00085
00086 QRadioButton * mypAcademicRadioButton = new QRadioButton(tr("Academic staff / researcher"));
00087 QRadioButton * mypPhdStudentRadioButton = new QRadioButton(tr("Student - phd"));
00088 QRadioButton * mypMastersStudentRadioButton = new QRadioButton(tr("Student - masters"));
00089 QRadioButton * mypUndergradStudentRadioButton = new QRadioButton(tr("Student - undergraduate"));
00090 QRadioButton * mypDeveloperRadioButton = new QRadioButton(tr("Developer"));
00091 QRadioButton * mypGISPractitionerRadioButton = new QRadioButton(tr("GIS practitioner"));
00092 QRadioButton * mypOtherProfessionRadioButton = new QRadioButton(tr("Other profession:"));
00093 QLineEdit * mypOtherProfessionLineEdit = new QLineEdit;
00094
00095
00096 connect(mypOtherProfessionRadioButton, SIGNAL(toggled(bool)),
00097 mypOtherProfessionLineEdit, SLOT(setEnabled(bool)));
00098
00099 registerField("mypPersonName*", mypPersonNameLineEdit);
00100 registerField("mypPersonOrganisation", mypPersonOrganisationLineEdit);
00101 registerField("mypPersonEmail", mypPersonEmailLineEdit);
00102 registerField("mypAcademicRadioButton", mypAcademicRadioButton);
00103 registerField("mypPhdStudentRadioButton", mypPhdStudentRadioButton);
00104 registerField("mypMastersStudentRadioButton", mypMastersStudentRadioButton);
00105 registerField("mypUndergradStudentRadioButton", mypUndergradStudentRadioButton);
00106 registerField("mypDeveloperRadioButton", mypDeveloperRadioButton);
00107 registerField("mypGISPractitionerRadioButton", mypGISPractitionerRadioButton);
00108 registerField("mypOtherProfessionRadioButton", mypOtherProfessionRadioButton);
00109 registerField("mypOtherProfessionLineEdit",mypOtherProfessionLineEdit);
00110
00111 QVBoxLayout *groupBoxLayout = new QVBoxLayout;
00112 groupBoxLayout->addWidget(mypAcademicRadioButton);
00113 groupBoxLayout->addWidget(mypPhdStudentRadioButton);
00114 groupBoxLayout->addWidget(mypMastersStudentRadioButton);
00115 groupBoxLayout->addWidget(mypUndergradStudentRadioButton);
00116 groupBoxLayout->addWidget(mypDeveloperRadioButton);
00117 groupBoxLayout->addWidget(mypGISPractitionerRadioButton);
00118 groupBoxLayout->addWidget(mypAcademicRadioButton);
00119 groupBoxLayout->addWidget(mypOtherProfessionRadioButton);
00120 groupBoxLayout->addWidget(mypOtherProfessionLineEdit);
00121 groupBox->setLayout(groupBoxLayout);
00122
00123 QGridLayout *layout = new QGridLayout;
00124 layout->addWidget(mypPersonNameLabel, 0, 0);
00125 layout->addWidget(mypPersonNameLineEdit, 0, 1);
00126 layout->addWidget(mypPersonOrganisationLabel, 1, 0);
00127 layout->addWidget(mypPersonOrganisationLineEdit, 1, 1);
00128 layout->addWidget(mypPersonEmailLabel, 2, 0);
00129 layout->addWidget(mypPersonEmailLineEdit, 2, 1);
00130 layout->addWidget(groupBox, 3, 0, 1, 2);
00131 setLayout(layout);
00132 }
00133 };
00137 class OmgSurveyWizard : public QWizard
00138 {
00139 Q_OBJECT;
00140
00141 public:
00142 OmgSurveyWizard(QWidget* parent = 0, Qt::WFlags fl = 0 )
00143 {
00144 addPage(new OmgSurveyIntroPage(this));
00145 addPage(new OmgWizardPersonalInfoPage(this));
00146 setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png"));
00147 setPixmap(QWizard::BackgroundPixmap, QPixmap(":/images/background.png"));
00148
00149 setWindowTitle(tr("openModeller Desktop User Survey"));
00150 }
00151 ~OmgSurveyWizard(){};
00152
00153
00154 };
00155
00156
00157 #endif //omgsurveywizaard_h
00158
00159