00001 #include "configdlg.h" 00002 00003 ConfigDlg::ConfigDlg( QWidget *parent ) : 00004 QTabWidget( parent ) { 00005 setCaption( "Configuration" ); 00006 resize( 400, 250 ); 00007 connectDlgs(); 00008 } 00009 00010 00011 /* 00012 * 00013 * 00014 * CONSTRUCTOR: 00015 * ConfigDlg 00016 * 00017 * PARAMS: 00018 * lt PTR to the parent calling LineTool 00019 * 00020 * PURPOSE: 00021 * Creates and loads the child dialogs that this widget 00022 * holds. 00023 * 00024 * 00025 * 00026 */ 00027 ConfigDlg::ConfigDlg( QWidget *parent, 00028 GLIMSDataset &gds ) : 00029 QTabWidget( parent, NULL, false ) { 00030 // mTabDlg->show(); 00031 00032 // LABEL WINDOW 00033 setCaption( "Configuration" ); 00034 loadTabs( gds ); 00035 resize( 400, 500 ); 00036 connectDlgs(); 00037 } 00038 00039 void ConfigDlg::connectDlgs( ) { 00040 connect( mLSD, 00041 SIGNAL( repaintViews() ), 00042 this, 00043 SLOT( emitRepaintViews() ) ); 00044 00045 connect( mGCD, 00046 SIGNAL( repaintViews() ), 00047 this, 00048 SLOT( emitRepaintViews() ) ); 00049 00050 } 00051 00052 /* 00053 * 00054 * 00055 * DESTRUCTOR: 00056 * ~ConfigDlg 00057 * 00058 * PARAMS: 00059 * 00060 * PURPOSE: 00061 * None 00062 * 00063 * 00064 * 00065 */ 00066 ConfigDlg::~ConfigDlg( ) { 00067 00068 } 00069 00070 void ConfigDlg::loadTabs( GLIMSDataset &gds ) { 00071 00072 // CREATE CHILD DIALOGS 00073 mLSD = new LineSelectorDlg( gds.getLineData() ); 00074 mGCD = new GlacierConfigDlg( gds.getGIDData(), 00075 gds.getLineData() ); 00076 00077 mSDG = new SessionDlg( gds.getSession() ); 00078 mIID = new ImageInfDlg( gds.getImageInf() ); 00079 00080 00081 // CREATE TABS FOR EACH CHILD DIALOG AND ADD THEM 00082 addTab( mLSD, "Line Config" ); 00083 addTab( mGCD, "Glacier Config" ); 00084 addTab( mSDG, "Session" ); 00085 addTab( mIID, "Image Info" ); 00086 00087 /* 00088 connect( &gds, 00089 SIGNAL( datasetChanged() ), 00090 this, 00091 SLOT( resetAll() ) ); 00092 00093 connect( mGCD, 00094 SIGNAL( repaintViews( bool ) ), 00095 this, 00096 SLOT( emitRepaintViews( bool ) ) ); 00097 */ 00098 00099 } 00100 00101 void ConfigDlg::resetAll( ) { 00102 mLSD->loadList(); 00103 mGCD->loadList(); 00104 mSDG->loadData(); 00105 mIID->loadData(); 00106 } 00107 00108 void ConfigDlg::refreshAll( ) { 00109 resetAll () ; 00110 mGCD->updateListSelection(); 00111 } 00112 00113 00114 void ConfigDlg::emitRepaintViews( ) { 00115 mGCD->updateListSelection() ; 00116 emit repaintViews( ) ; 00117 } 00118 00119 00120
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |