author | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
commit | b51d88d7b0b517b71ae3b59d8228335f38ca9fc7 (patch) (side-by-side diff) | |
tree | 302377973a897934c944c7a126e5e0a510694979 /noncore/graphics/opie-eye/gui | |
parent | c4c842558e1457f64d43b237f24f6ea1a4f9d76b (diff) | |
download | opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.zip opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.tar.gz opie-b51d88d7b0b517b71ae3b59d8228335f38ca9fc7.tar.bz2 |
Split the KeyConfig Manager and Widget into Ui and Core parts
Adjust the only user...
Don't add a 2nd example to core but mention the one for the classes
in opieui/okeyconfigwidget
Diffstat (limited to 'noncore/graphics/opie-eye/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 28 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.h | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 26 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.h | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 22 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.h | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 4 |
7 files changed, 47 insertions, 51 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 7e4164b..2a49786 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -34,5 +34,5 @@ -using Opie::Ui::OKeyConfigItem; +using Opie::Core::OKeyConfigItem; /* @@ -157,5 +157,5 @@ PIconView::~PIconView() { } -Opie::Ui::OKeyConfigManager* PIconView::manager() { +Opie::Core::OKeyConfigManager* PIconView::manager() { return m_viewManager; } @@ -167,28 +167,28 @@ Opie::Ui::OKeyConfigManager* PIconView::manager() { */ void PIconView::initKeys() { - Opie::Ui::OKeyPair::List lst; - lst.append( Opie::Ui::OKeyPair::upArrowKey() ); - lst.append( Opie::Ui::OKeyPair::downArrowKey() ); - lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); - lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); - lst.append( Opie::Ui::OKeyPair::returnKey() ); - - m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", + Opie::Core::OKeyPair::List lst; + lst.append( Opie::Core::OKeyPair::upArrowKey() ); + lst.append( Opie::Core::OKeyPair::downArrowKey() ); + lst.append( Opie::Core::OKeyPair::leftArrowKey() ); + lst.append( Opie::Core::OKeyPair::rightArrowKey() ); + lst.append( Opie::Core::OKeyPair::returnKey() ); + + m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", lst, false,this, "keyconfig name" ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", Resource::loadPixmap("beam"), BeamItem, - Opie::Ui::OKeyPair(Qt::Key_B, Qt::ShiftButton), + Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), this, SLOT(slotBeam())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", Resource::loadPixmap("trash"), DeleteItem, - Opie::Ui::OKeyPair(Qt::Key_D, Qt::ShiftButton), + Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), this, SLOT(slotTrash())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", Resource::loadPixmap("1to1"), ViewItem, - Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), + Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), this, SLOT(slotShowImage()))); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", Resource::loadPixmap("DocumentTypeWord"), InfoItem, - Opie::Ui::OKeyPair(Qt::Key_I, Qt::ShiftButton ), + Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), this, SLOT(slotImageInfo()) ) ); m_viewManager->load(); diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h index a4ca0bc..9cf7b3e 100644 --- a/noncore/graphics/opie-eye/gui/iconview.h +++ b/noncore/graphics/opie-eye/gui/iconview.h @@ -20,6 +20,4 @@ namespace Opie { namespace Core{ class OConfig; -} -namespace Ui { class OKeyConfigManager; } @@ -36,5 +34,5 @@ public: ~PIconView(); void resetView(); - Opie::Ui::OKeyConfigManager* manager(); + Opie::Core::OKeyConfigManager* manager(); signals: @@ -74,5 +72,5 @@ private slots: void slotThumbNail(const QString&, const QPixmap&); private: - Opie::Ui::OKeyConfigManager *m_viewManager; + Opie::Core::OKeyConfigManager *m_viewManager; Opie::Core::OConfig *m_cfg; QComboBox* m_views; diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 0b3250c..27a67a6 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp @@ -47,5 +47,5 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF } -Opie::Ui::OKeyConfigManager* imageinfo::manager() +Opie::Core::OKeyConfigManager* imageinfo::manager() { if (!m_viewManager) { @@ -64,17 +64,17 @@ void imageinfo::initKeys() } #endif - Opie::Ui::OKeyPair::List lst; - lst.append( Opie::Ui::OKeyPair::upArrowKey() ); - lst.append( Opie::Ui::OKeyPair::downArrowKey() ); - lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); - lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); - lst.append( Opie::Ui::OKeyPair::returnKey() ); - - m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "imageinfo_keys", + Opie::Core::OKeyPair::List lst; + lst.append( Opie::Core::OKeyPair::upArrowKey() ); + lst.append( Opie::Core::OKeyPair::downArrowKey() ); + lst.append( Opie::Core::OKeyPair::leftArrowKey() ); + lst.append( Opie::Core::OKeyPair::rightArrowKey() ); + lst.append( Opie::Core::OKeyPair::returnKey() ); + + m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", lst, false,this, "keyconfig name" ); - m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "infoview", - Resource::loadPixmap("1to1"), ViewItem, - Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), - this, SLOT(slotShowImage()))); + m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", + Resource::loadPixmap("1to1"), ViewItem, + Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), + this, SLOT(slotShowImage()))); m_viewManager->load(); m_viewManager->handleWidget( this ); diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.h b/noncore/graphics/opie-eye/gui/imageinfoui.h index c9b83a1..bc99bf9 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.h +++ b/noncore/graphics/opie-eye/gui/imageinfoui.h @@ -16,6 +16,4 @@ namespace Opie { namespace Core { class OConfig; - } - namespace Ui { class OKeyConfigManager; } @@ -35,5 +33,5 @@ public: void setDestructiveClose(); - Opie::Ui::OKeyConfigManager* manager(); + Opie::Core::OKeyConfigManager* manager(); signals: @@ -57,5 +55,5 @@ protected: Opie::Core::OConfig * m_cfg; - Opie::Ui::OKeyConfigManager*m_viewManager; + Opie::Core::OKeyConfigManager*m_viewManager; void initKeys(); diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index e43bbff..2078b19 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp @@ -24,5 +24,5 @@ ImageView::~ImageView() } -Opie::Ui::OKeyConfigManager* ImageView::manager() +Opie::Core::OKeyConfigManager* ImageView::manager() { if (!m_viewManager) { @@ -39,16 +39,16 @@ void ImageView::initKeys() m_cfg->setGroup("image_view_keys" ); } - Opie::Ui::OKeyPair::List lst; - lst.append( Opie::Ui::OKeyPair::upArrowKey() ); - lst.append( Opie::Ui::OKeyPair::downArrowKey() ); - lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); - lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); - lst.append( Opie::Ui::OKeyPair::returnKey() ); - - m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "image_view_keys", + Opie::Core::OKeyPair::List lst; + lst.append( Opie::Core::OKeyPair::upArrowKey() ); + lst.append( Opie::Core::OKeyPair::downArrowKey() ); + lst.append( Opie::Core::OKeyPair::leftArrowKey() ); + lst.append( Opie::Core::OKeyPair::rightArrowKey() ); + lst.append( Opie::Core::OKeyPair::returnKey() ); + + m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", lst, false,this, "image_view_keys" ); - m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", + m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", Resource::loadPixmap("1to1"), ViewInfo, - Opie::Ui::OKeyPair(Qt::Key_I,Qt::ShiftButton), + Opie::Core::OKeyPair(Qt::Key_I,Qt::ShiftButton), this, SLOT(slotShowImageInfo()))); m_viewManager->handleWidget( this ); diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h index f61c93f..87e2b32 100644 --- a/noncore/graphics/opie-eye/gui/imageview.h +++ b/noncore/graphics/opie-eye/gui/imageview.h @@ -8,6 +8,4 @@ namespace Opie { namespace Core { class OConfig; - } - namespace Ui { class OKeyConfigManager; } @@ -25,5 +23,5 @@ public: ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name = 0, WFlags fl = 0 ); virtual ~ImageView(); - Opie::Ui::OKeyConfigManager* manager(); + Opie::Core::OKeyConfigManager* manager(); signals: @@ -33,5 +31,5 @@ signals: protected: Opie::Core::OConfig * m_cfg; - Opie::Ui::OKeyConfigManager*m_viewManager; + Opie::Core::OKeyConfigManager*m_viewManager; void initKeys(); protected slots: diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h index 042d568..59dba30 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.h +++ b/noncore/graphics/opie-eye/gui/mainwindow.h @@ -15,7 +15,9 @@ namespace Opie { namespace Ui{ - class OKeyConfigManager; class OWidgetStack; } +namespace Core{ + class OKeyConfigManager; +} } |