summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (show 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
@@ -174,64 +174,68 @@ void PMainWindow::slotConfig() {
keyWid->insert( tr("Imageview Keyboard Actions"), m_disp->manager() );
keyWid->load();
wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") );
bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted );
/*
* clean up
*apply changes
*/
QMap<PDirView*, QWidget*>::Iterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
if ( act )
it.key()->interfaceInfo()->writeConfig(it.data(), *m_cfg);
delete it.key();
}
if ( act ) {
m_view->resetView();
keyWid->save();
+ m_disp->manager()->save();
+ m_info->manager()->save();
+ m_view->manager()->save();
}
+ delete keyWid;
}
/*
* create a new image info component
* and detach the current one
* we will make the other delete on exit
*/
template<class T>
void PMainWindow::initT( const char* name, T** ptr, int id) {
if ( *ptr ) {
(*ptr)->disconnect(this, SLOT(slotReturn()));
(*ptr)->setDestructiveClose();
m_stack->removeWidget( *ptr );
}
- *ptr = new T( m_stack, name );
+ *ptr = new T(m_cfg, m_stack, name );
m_stack->addWidget( *ptr, id );
connect(*ptr, SIGNAL(sig_return()),
this,SLOT(slotReturn()));
}
void PMainWindow::initInfo() {
initT<imageinfo>( "Image Info", &m_info, ImageInfo );
connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
}
void PMainWindow::initDisp() {
initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
if (m_disp) {
m_disp->setAutoScale(autoScale);
m_disp->setAutoRotate(autoRotate);
connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
}
}
/**
* With big Screen the plan could be to 'detach' the image
* window if visible and to create a ne wone
* init* already supports it but I make no use of it for
* now. We set filename and raise