00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00047 #ifndef APP
00048 #define APP
00049
00050 #include "../inc/Ogr.h"
00051 #include "../inc/Inf.h"
00052
00053 #include <string>
00054
00055 using std::string;
00056
00057 #include <qtextedit.h>
00058
00059 QT_BEGIN_NAMESPACE
00060
00066 class App : public QMainWindow
00067 {
00068 Q_OBJECT
00069
00070 private:
00071
00072
00073 Ogr *ogr;
00074
00075
00076 Inf *inf;
00077
00078
00079 QString parameters;
00080
00081
00082 const static int formatsCount = 13;
00083 QString **formats;
00084
00085
00086 const static int formatsOutput = 9;
00087
00088
00089 const static int databasesCount = 5;
00090 QString **databases;
00091
00092
00093 const static int databasesOutput = 3;
00094
00095
00096 const static int projectionsCount = 3578;
00097 QString **projections;
00098
00099
00100 QMenuBar *theMenu;
00101 QMenu *fileMenu;
00102 QMenu *helpMenu;
00103
00104 QMenu *mnuLanguage;
00105 QAction *mnuEnglish;
00106 QAction *mnuFrench;
00107 QAction *mnuGerman;
00108 QAction *mnuItalian;
00109 QAction *mnuSpanish;
00110 QAction *mnuChinese;
00111 QAction *mnuRussian;
00112 QAction *mnuArabic;
00113
00114 QAction *mnuQuit;
00115 QAction *mnuOgrHelp;
00116 QAction *mnuGuiHelp;
00117 QAction *mnuAbout;
00118
00119 QStatusBar *statusbar;
00120
00121 QProgressBar *theProgress;
00122
00123 QStringList fileList;
00124
00125 QWidget *thePanel;
00126 QVBoxLayout *theLayout;
00127 QGroupBox *grpSource;
00128 QGridLayout *lytSource;
00129
00130 QLabel *lblSourceFormat;
00131 QComboBox *cmbSourceFormat;
00132
00133 QHBoxLayout *lytSourceInput;
00134 QRadioButton *radSourceFile;
00135 QRadioButton *radSourceFolder;
00136 QRadioButton *radSourceDatabase;
00137
00138 QLabel *lblSourceName;
00139 QHBoxLayout *lytSourceName;
00140 QLineEdit *txtSourceName;
00141 QPushButton *btnSourceName;
00142
00143 QLabel *lblSourceProj;
00144 QLineEdit *txtSourceProj;
00145
00146 QLabel *lblSourceQuery;
00147 QLineEdit *txtSourceQuery;
00148
00149
00150 QGroupBox *grpTarget;
00151 QGridLayout *lytTarget;
00152
00153 QHBoxLayout *lytTargetOutput;
00154 QButtonGroup *grpTargetOutput;
00155 QRadioButton *radTargetFile;
00156 QRadioButton *radTargetFolder;
00157 QRadioButton *radTargetDatabase;
00158
00159 QLabel *lblTargetFormat;
00160 QComboBox *cmbTargetFormat;
00161
00162 QLabel *lblTargetName;
00163 QHBoxLayout *lytTargetName;
00164 QLineEdit *txtTargetName;
00165 QPushButton *btnTargetName;
00166
00167 QLabel *lblTargetProj;
00168 QHBoxLayout *lytTargetProj;
00169 QLineEdit *txtTargetProj;
00170 QComboBox *cmbTargetProj;
00171
00172 QHBoxLayout *lytTargetOptions;
00173 QButtonGroup *grpTargetOptions;
00174 QRadioButton *radTargetAppend;
00175 QRadioButton *radTargetOverwrite;
00176 QRadioButton *radTargetUpdate;
00177
00178 QTextEdit *txtOutput;
00179
00180 QHBoxLayout *lytExecute;
00181 QPushButton *btnExecute;
00182 QPushButton *btnQuit;
00183
00184
00189 void InitData( void );
00190
00195 void InitProjections( void );
00196
00201 void InitInterface( void );
00202
00207 void InitMenu( void );
00208
00213 void InitLayout( void );
00214
00219 void InitSlots( void );
00220
00225 void TranslateInterface( void );
00226
00231 void UpdateParameters( void );
00232
00233
00234 private slots :
00235
00236 void evtMnuOgrHelp( void );
00237
00238 void evtMnuGuiHelp( void );
00239
00240 void evtMnuAbout( void );
00241
00242
00243 void evtRadSourceFile( void );
00244
00245 void evtRadSourceFolder( void );
00246
00247 void evtRadSourceDatabase( void );
00248
00249
00250 void evtCmbSourceFormat( int );
00251
00252
00253 void evtTxtSourceName( void );
00254
00255 void evtBtnSourceName( void );
00256
00257 void evtTxtSourceQuery( void );
00258
00259
00260 void evtRadTargetFile( void );
00261
00262 void evtRadTargetFolder( void );
00263
00264 void evtRadTargetDatabase( void );
00265
00266
00267 void evtCmbTargetFormat( void );
00268
00269 void evtTxtTargetName( void );
00270
00271 void evtBtnTargetName( void );
00272
00273 void evtTxtTargetProj( void );
00274
00275 void evtCmbTargetProj( void );
00276
00277
00278 void evtRadTargetAppend( void );
00279
00280 void evtRadTargetOverwrite( void );
00281
00282 void evtRadTargetUpdate( void );
00283
00284
00285 void evtBtnExecute( void );
00286
00287 void evtBtnQuit( void );
00288
00289
00290 public:
00291
00296 App( QWidget * = 0 );
00297
00302 ~App( void );
00303 };
00304
00305 QT_END_NAMESPACE
00306
00307 #endif