summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.cpp19
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.h2
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp20
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h2
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp6
5 files changed, 31 insertions, 18 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
index 822fd88..0b3250c 100644
--- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp
+++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
@@ -29,3 +29,3 @@ using namespace Opie::Core;
-imageinfo::imageinfo(QWidget* parent, const char* name, WFlags fl )
+imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
@@ -33,2 +33,3 @@ imageinfo::imageinfo(QWidget* parent, const char* name, WFlags fl )
m_viewManager = 0;
+ m_cfg = cfg;
init(name);
@@ -41,2 +42,3 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF
m_viewManager = 0;
+ m_cfg = 0;
init(name);
@@ -57,4 +59,8 @@ void imageinfo::initKeys()
odebug << "init imageinfo keys" << oendl;
- m_cfg = new Opie::Core::OConfig("phunkview");
- m_cfg->setGroup("Zecke_view" );
+#if 0
+ if (!m_cfg) {
+ m_cfg = new Opie::Core::OConfig("phunkview");
+ m_cfg->setGroup("imageinfo_keys" );
+ }
+#endif
Opie::Ui::OKeyPair::List lst;
@@ -66,5 +72,5 @@ void imageinfo::initKeys()
- m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "Imageinfo-KeyBoard-Config",
+ m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "imageinfo_keys",
lst, false,this, "keyconfig name" );
- m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "view",
+ m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "infoview",
Resource::loadPixmap("1to1"), ViewItem,
@@ -145,3 +151,2 @@ imageinfo::~imageinfo()
if (m_viewManager) {
- m_viewManager->save();
delete m_viewManager;
@@ -156,4 +161,2 @@ void imageinfo::slot_fullInfo(const QString&_path, const QString&_t)
t.replace(QRegExp("\n"),"<br>");
-/* t.replace(QRegeExp("<qt>","");
- t.replace(QRegeExp("</qt>","");*/
TextView1->setText(t);
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.h b/noncore/graphics/opie-eye/gui/imageinfoui.h
index 0ffa423..c9b83a1 100644
--- a/noncore/graphics/opie-eye/gui/imageinfoui.h
+++ b/noncore/graphics/opie-eye/gui/imageinfoui.h
@@ -31,3 +31,3 @@ class imageinfo : public QWidget
public:
- imageinfo( QWidget* parent = 0, const char* name = 0, WFlags fl =0);
+ imageinfo(Opie::Core::OConfig *cfg, QWidget* parent = 0, const char* name = 0, WFlags fl =0);
imageinfo(const QString&_path, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index 8fc258e..e43bbff 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -10,3 +10,3 @@ using namespace Opie::Core;
-ImageView::ImageView( QWidget* parent, const char* name, WFlags fl )
+ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl )
: ImageScrollView(parent,name,fl)
@@ -14,2 +14,3 @@ ImageView::ImageView( QWidget* parent, const char* name, WFlags fl )
m_viewManager = 0;
+ m_cfg = cfg;
initKeys();
@@ -19,2 +20,5 @@ ImageView::~ImageView()
{
+ if (m_viewManager) {
+ delete m_viewManager;
+ }
}
@@ -32,4 +36,6 @@ void ImageView::initKeys()
odebug << "init imageview keys" << oendl;
- m_cfg = new Opie::Core::OConfig("phunkview");
- m_cfg->setGroup("Zecke_view" );
+ if (!m_cfg) {
+ m_cfg = new Opie::Core::OConfig("phunkview");
+ m_cfg->setGroup("image_view_keys" );
+ }
Opie::Ui::OKeyPair::List lst;
@@ -41,5 +47,5 @@ void ImageView::initKeys()
- m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "Imageview-KeyBoard-Config",
- lst, false,this, "keyconfig name" );
- m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Image Info"), "view",
+ m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "image_view_keys",
+ lst, false,this, "image_view_keys" );
+ m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Image Info"), "imageviewinfo",
Resource::loadPixmap("1to1"), ViewInfo,
@@ -47,4 +53,4 @@ void ImageView::initKeys()
this, SLOT(slotShowImageInfo())));
- m_viewManager->load();
m_viewManager->handleWidget( this );
+ m_viewManager->load();
}
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index 5ee0d7d..f61c93f 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -24,3 +24,3 @@ class ImageView:public ImageScrollView
public:
- ImageView( QWidget* parent, const char* name = 0, WFlags fl = 0 );
+ ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name = 0, WFlags fl = 0 );
virtual ~ImageView();
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
@@ -197,3 +197,7 @@ void PMainWindow::slotConfig() {
keyWid->save();
+ m_disp->manager()->save();
+ m_info->manager()->save();
+ m_view->manager()->save();
}
+ delete keyWid;
}
@@ -212,3 +216,3 @@ void PMainWindow::initT( const char* name, T** ptr, int id) {
}
- *ptr = new T( m_stack, name );
+ *ptr = new T(m_cfg, m_stack, name );
m_stack->addWidget( *ptr, id );