00001 00032 #ifndef INC_MIE_UIBASE_H 00033 #define INC_MIE_UIBASE_H 00034 00035 #ifdef USE_MGUI 00036 00037 #ifndef INC_MIE_UIMAIN_H 00038 #include <mie/uimain.h> 00039 #endif 00040 00041 00042 namespace MIE { 00043 00044 class FORMAT; 00045 class SETTINGS; 00046 00047 // ************************************************************************ 00048 00049 // The base class for import/export user interface 00050 class UI_BASE { 00051 public: 00052 UI_BASE ( 00053 const FORMAT& format, 00054 SETTINGS& settings 00055 ); 00056 00057 virtual ~UI_BASE (); 00058 00059 void ActivateExportPane ( 00060 const RVC::OBJITEMLIST& objlist 00061 ); 00062 00063 void ActivateImportPane ( 00064 const MISTRINGLIST& filenamelist 00065 ); 00066 00071 bool CheckOK ( 00072 ); 00073 00076 int CreateExportPane ( 00077 MGUI::LAYOUT_PANE_BASE& pane, 00078 bool testmode = false 00079 ); 00080 00083 int CreateImportPane ( 00084 MGUI::LAYOUT_PANE_BASE& pane, 00085 bool testmode = false 00086 ); 00087 00088 const FORMAT& GetFormat ( 00089 ) const { return m_Format; } 00090 00091 SETTINGS& GetSettings ( 00092 ) { return m_Settings; } 00093 00097 void SetDialog ( 00098 SETTINGSDIALOG* dlg 00099 ) { m_dlg = dlg; } 00100 00101 void GetImportProjection ( 00102 ); 00103 00107 bool ExportCoordPaneCreate ( 00108 MGUI::LAYOUT_PANE_BASE& pane 00109 ); 00110 00113 bool ExportOptionsPaneCreate ( 00114 MGUI::LAYOUT_PANE_BASE& pane 00115 ); 00116 00125 void ExportSetSingleFileAllowed ( 00126 bool bCanDoSingle 00127 ); 00128 00129 00134 void ExtractPaneSetSensitive(bool sensitive); 00135 void SetProjName(const MISTRING& name); 00136 void ProjPBSetSensitive(bool sensitive); 00137 void ImportPBSetSensitive(bool sensitive); 00138 void LinkTBSetSensitive(bool sensitive); 00139 void LinkTBSetState(bool state); 00140 00142 void MultiSingleOMSetSensitive(bool sensitive); 00143 00145 void MultiSingleOMSetValue(int value); 00146 00147 void DataTypeOMSetSensitive(bool sensitive); 00148 void NullValueSetValue(double value); 00149 void LinColRangeSetEditable(bool sensitive); 00150 void LinColRangeClear(); 00151 void LinColRangeSetRange(INT32 maxlin, INT32 maxcol); 00152 void NumBandsSetSensitive(bool sensitive); 00153 void NumLinsSetSensitive(bool sensitive); 00154 void NumColsSetSensitive(bool sensitive); 00155 void NumBandsSetValue(int value); 00156 void NumLinsSetValue(int value); 00157 void NumColsSetValue(int value); 00158 void SetIs3D(bool sensitive); 00159 void SetTopology(int topology); 00160 00161 void SyncExportSettingsFromControls(); 00162 void SyncControlsFromExportSettings(); 00163 void SyncImportSettingsFromControls(); 00164 void SyncControlsFromImportSettings(); 00165 00166 protected: 00170 void CallOnChange ( 00171 ); 00172 00173 MDLGPARENT GetDlgParent ( 00174 ) const { 00175 return (m_dlg ? m_dlg->GetDlgParent() : 0); 00176 } 00177 00181 bool ImportOptionsPaneCreate ( 00182 MGUI::LAYOUT_PANE_BASE& pane 00183 ); 00184 00185 private: 00186 #ifndef GENERATING_DOXYGEN_OUTPUT 00187 class PRIV; 00188 friend class PRIV; 00189 00190 const FORMAT& m_Format; 00191 SETTINGS& m_Settings; 00192 PRIV *m_priv; 00193 SETTINGSDIALOG *m_dlg; 00194 bool m_TestMode; 00195 00196 bool NeedExportCoordPane () const; 00197 bool NeedExportOptionsPane () const; 00198 bool NeedImportCoordPane () const; 00199 bool NeedImportExtractPane () const; 00200 #endif // GENERATING_DOXYGEN_OUTPUT 00201 00204 virtual bool v_CheckExportOK (); 00205 00208 virtual bool v_CheckImportOK (); 00209 00216 virtual int v_CreateFormatSpecificExportPane ( 00217 MGUI::LAYOUT_PANE_BASE& pane 00218 ); 00219 00226 virtual int v_CreateFormatSpecificImportPane ( 00227 MGUI::LAYOUT_PANE_BASE& pane 00228 ); 00229 00238 virtual int v_CreateExportPane ( 00239 MGUI::LAYOUT_PANE_BASE& pane 00240 ); 00241 00246 virtual int v_CreateImportPane ( 00247 MGUI::LAYOUT_PANE_BASE& pane 00248 ); 00249 00251 virtual void v_ActivateExportPane ( 00252 const RVC::OBJITEMLIST& objlist 00253 ); 00254 00256 virtual void v_ActivateImportPane ( 00257 const MISTRINGLIST& filelist 00258 ); 00259 00261 virtual void v_OnChange (); 00262 00264 virtual void v_OnChangeEncoding (); 00265 00268 virtual void v_UpdateExportSettingsFromUI (); 00269 00272 virtual void v_UpdateImportSettingsFromUI (); 00273 00274 }; 00275 00276 00277 } // End namespace MIE 00278 00279 #else // if USE_MGUI is NOT defined 00280 00281 namespace MIE { 00282 class UI_BASE; 00283 } 00284 00285 #endif // ifdef USE_MGUI 00286 #endif // ifndef INC_MIE_UIBASE_H
1.6.1