00001 #ifndef __MAIN_H 00002 #define __MAIN_H 00003 00004 #include <qapplication.h> 00005 #include <qmainwindow.h> 00006 #include <qworkspace.h> 00007 #include <qmenubar.h> 00008 #include <qaction.h> 00009 #include <qtoolbar.h> 00010 #include <qevent.h> 00011 #include <qstatusbar.h> 00012 #include <qfiledialog.h> 00013 #include <qmessagebox.h> 00014 #include <qlabel.h> 00015 #include <qtooltip.h> 00016 #include <qtextbrowser.h> 00017 #include <qmime.h> 00018 00019 #include <vector> 00020 #include <fstream> 00021 #include <cstdlib> 00022 00023 // #include "view.h" 00024 #include "glimsproject.h" 00025 #include "bandchooserdlg.h" 00026 #include "vectorlayerset.h" 00027 //#include "VectorLayerDlg.h" 00028 #include "viewset.h" 00029 #include "histogramdlg.h" 00030 #include "xmlserializeable.h" 00031 #include "pluginset.h" 00032 #include "aboutdlg.h" 00033 #include "extensions/SpreadsheetDialog.h" 00034 #include "extensions/ImageCalculatorDialog.h" 00035 00064 class MainToolbar : public QMainWindow, XMLSerializeable { 00065 Q_OBJECT 00066 protected: 00067 static const char* VIEW_FILE; 00068 00069 GLIMSProject *mProject; 00070 00071 bool mInit; 00072 00073 QWorkspace* mWorkspace; 00074 QToolBar* mFileToolbar; 00075 QToolBar* mNavToolbar; 00076 QToolBar* mEditToolbar; 00077 QToolBar* mToolToolbar; 00078 QActionGroup* mActGrp; 00079 QActionGroup* mViewActGroup; 00080 00081 QAction* mBreakAction; 00082 QAction* mJoinAction; 00083 QAction* mOpenConfigAction; 00084 QAction* mOpenVectorLayerAction; 00085 QAction* mValidateProject ; 00086 QAction* mMemBufAction; 00087 00088 QStatusBar* mStatBar; 00089 00090 ImageCalculatorDialog* imgCalcDlg ; // image polygon calculator tool dialog 00091 00092 BandChooserDlg* mBandChooser; 00093 HistogramDlg* mHistDlg; 00094 ViewSet mViewSet; 00095 00096 QLabel* mLblLL; 00097 QLabel* mLblXY; 00098 QLabel* mLblProjFile; 00099 00100 PluginSet* mPlugSet; 00101 00106 void buildMenu( ); 00107 void buildToolbar( ); 00108 void buildViews( ); 00109 void buildDefaultViews( ); 00110 void loadProject( GLIMSProject * ); 00111 void setupProj( GLIMSProject * ); 00112 00113 bool fromXML( QDomElement &elem ); 00114 bool toXML( QDomDocument &doc, 00115 QDomElement &elem, 00116 std::string id = "" ); 00117 00118 void closeEvent( QCloseEvent * ) { 00119 if ( mProject ) { 00120 if (mProject->close()) { 00121 toXMLFile( "gvstate.xml", "GVState" ); 00122 exit( 0 ); 00123 } 00124 else return ; 00125 } 00126 else exit( 0 ); 00127 } 00128 00129 public: 00130 MainToolbar( ); 00131 virtual ~MainToolbar( ); 00132 00133 public slots: 00134 void newProject( ); 00135 void openProject( ); 00136 void saveProject( ); 00137 void saveProjectAs( ); 00138 void importGLIMSIngest( ); 00139 void exportGLIMSIngest( ); 00145 void importSegmentsFromShapefile( ); 00151 void importGIDsFromShapefile( ); 00152 void openConfigDlg( ); 00153 void openGtoSDlg(); //added by EL 00154 void openImgCalcDlg(); //added by EL 00155 void closeApp( ); 00156 void closeProject( ); 00157 void print( ); 00158 void openBandSel( ); 00159 void openHistDlg( ); 00160 void repaintViews( bool ); 00161 void setMemBuf( ); 00162 void setNN( ); 00163 void setBI( ); 00164 void setBC( ); 00165 void openAbout( ); 00166 void openManual( ); 00167 00168 void setFocusWidget( QWidget * ); 00169 void setPanHand( ); 00170 void setZoomInInc( ); 00171 void setZoomOutInc( ); 00172 void setLineTool( ); 00173 void setSelTool( ); 00174 void setGIDTool( ); 00175 00176 void setCoordLbls( View::MousePos ll, View::MousePos xy ); 00177 void setProjectFileName (QString fn) ; 00178 00179 void imgCalcEnd() ; 00180 void ingestEnd () ; 00181 00182 }; 00183 00184 #endif 00185 00186 00187 00188
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |