summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 529bee4..21a668a 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -186,40 +186,44 @@ void PMainWindow::slotConfig() {
186 186
187 QMap<PDirView*, QWidget*>::Iterator it; 187 QMap<PDirView*, QWidget*>::Iterator it;
188 for ( it = lst.begin(); it != lst.end(); ++it ) { 188 for ( it = lst.begin(); it != lst.end(); ++it ) {
189 if ( act ) 189 if ( act )
190 it.key()->interfaceInfo()->writeConfig(it.data(), *m_cfg); 190 it.key()->interfaceInfo()->writeConfig(it.data(), *m_cfg);
191 delete it.key(); 191 delete it.key();
192 } 192 }
193 193
194 194
195 if ( act ) { 195 if ( act ) {
196 m_view->resetView(); 196 m_view->resetView();
197 keyWid->save(); 197 keyWid->save();
198 m_disp->manager()->save();
199 m_info->manager()->save();
200 m_view->manager()->save();
198 } 201 }
202 delete keyWid;
199} 203}
200 204
201/* 205/*
202 * create a new image info component 206 * create a new image info component
203 * and detach the current one 207 * and detach the current one
204 * we will make the other delete on exit 208 * we will make the other delete on exit
205 */ 209 */
206template<class T> 210template<class T>
207void PMainWindow::initT( const char* name, T** ptr, int id) { 211void PMainWindow::initT( const char* name, T** ptr, int id) {
208 if ( *ptr ) { 212 if ( *ptr ) {
209 (*ptr)->disconnect(this, SLOT(slotReturn())); 213 (*ptr)->disconnect(this, SLOT(slotReturn()));
210 (*ptr)->setDestructiveClose(); 214 (*ptr)->setDestructiveClose();
211 m_stack->removeWidget( *ptr ); 215 m_stack->removeWidget( *ptr );
212 } 216 }
213 *ptr = new T( m_stack, name ); 217 *ptr = new T(m_cfg, m_stack, name );
214 m_stack->addWidget( *ptr, id ); 218 m_stack->addWidget( *ptr, id );
215 219
216 connect(*ptr, SIGNAL(sig_return()), 220 connect(*ptr, SIGNAL(sig_return()),
217 this,SLOT(slotReturn())); 221 this,SLOT(slotReturn()));
218 222
219} 223}
220void PMainWindow::initInfo() { 224void PMainWindow::initInfo() {
221 initT<imageinfo>( "Image Info", &m_info, ImageInfo ); 225 initT<imageinfo>( "Image Info", &m_info, ImageInfo );
222 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); 226 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
223} 227}
224void PMainWindow::initDisp() { 228void PMainWindow::initDisp() {
225 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); 229 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );