-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 @@ -30,13 +30,13 @@ #include <qapplication.h> #include <qmainwindow.h> #include <qtimer.h> #include <qstyle.h> -using Opie::Ui::OKeyConfigItem; +using Opie::Core::OKeyConfigItem; /* * The Icons, Request Cache and IconViewItem for the IconView */ namespace { static QPixmap* _dirPix = 0; @@ -153,46 +153,46 @@ PIconView::~PIconView() { QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); } m_viewManager->save(); delete m_viewManager; } -Opie::Ui::OKeyConfigManager* PIconView::manager() { +Opie::Core::OKeyConfigManager* PIconView::manager() { return m_viewManager; } /* * init the KeyBoard Shortcuts * called from the c'tor */ 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(); m_viewManager->handleWidget( m_view ); } 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 @@ -16,14 +16,12 @@ class PIconViewItem; class PDirLister; class Ir; namespace Opie { namespace Core{ class OConfig; -} -namespace Ui { class OKeyConfigManager; } } class PIconView : public QVBox { Q_OBJECT @@ -32,13 +30,13 @@ class PIconView : public QVBox { BeamItem, DeleteItem, ViewItem, InfoItem }; public: PIconView( QWidget* wid, Opie::Core::OConfig *cfg ); ~PIconView(); void resetView(); - Opie::Ui::OKeyConfigManager* manager(); + Opie::Core::OKeyConfigManager* manager(); signals: void sig_showInfo( const QString& ); void sig_display( const QString& ); private: @@ -70,13 +68,13 @@ private slots: void slotClicked(QIconViewItem* ); /**/ void slotThumbInfo(const QString&, const QString&); 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; QIconView* m_view; QString m_path; bool m_updatet : 1; }; 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 @@ -43,13 +43,13 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF m_cfg = 0; init(name); initKeys(); slotChangeName(_path); } -Opie::Ui::OKeyConfigManager* imageinfo::manager() +Opie::Core::OKeyConfigManager* imageinfo::manager() { if (!m_viewManager) { initKeys(); } return m_viewManager; } @@ -60,25 +60,25 @@ void imageinfo::initKeys() #if 0 if (!m_cfg) { m_cfg = new Opie::Core::OConfig("phunkview"); m_cfg->setGroup("imageinfo_keys" ); } #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 ); m_viewManager->handleWidget( TextView1 ); } void imageinfo::slotShowImage() 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 @@ -12,14 +12,12 @@ class QFrame; class QLabel; class QTextView; namespace Opie { namespace Core { class OConfig; - } - namespace Ui { class OKeyConfigManager; } } class imageinfo : public QWidget { @@ -31,13 +29,13 @@ class imageinfo : public QWidget public: 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 ); virtual ~imageinfo(); void setDestructiveClose(); - Opie::Ui::OKeyConfigManager* manager(); + Opie::Core::OKeyConfigManager* manager(); signals: void dispImage(const QString&); void sig_return(); public slots: @@ -53,13 +51,13 @@ protected: QFrame* Line1; QTextView* TextView1; QVBoxLayout* imageinfoLayout; QString currentFile; Opie::Core::OConfig * m_cfg; - Opie::Ui::OKeyConfigManager*m_viewManager; + Opie::Core::OKeyConfigManager*m_viewManager; void initKeys(); protected slots: virtual void slot_fullInfo(const QString&, const QString&); virtual void slotThumbNail(const QString&, const QPixmap&); 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 @@ -20,13 +20,13 @@ ImageView::~ImageView() { if (m_viewManager) { delete m_viewManager; } } -Opie::Ui::OKeyConfigManager* ImageView::manager() +Opie::Core::OKeyConfigManager* ImageView::manager() { if (!m_viewManager) { initKeys(); } return m_viewManager; } @@ -35,24 +35,24 @@ void ImageView::initKeys() { odebug << "init imageview keys" << oendl; if (!m_cfg) { m_cfg = new Opie::Core::OConfig("phunkview"); 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 ); m_viewManager->load(); } void ImageView::slotShowImageInfo() 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 @@ -4,14 +4,12 @@ /* must be changed when it will moved to Opie::MM */ #include "imagescrollview.h" namespace Opie { namespace Core { class OConfig; - } - namespace Ui { class OKeyConfigManager; } } class ImageView:public ImageScrollView { @@ -21,20 +19,20 @@ class ImageView:public ImageScrollView ViewInfo }; 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: void dispImageInfo(const QString&); void sig_return(); protected: Opie::Core::OConfig * m_cfg; - Opie::Ui::OKeyConfigManager*m_viewManager; + Opie::Core::OKeyConfigManager*m_viewManager; void initKeys(); protected slots: virtual void slotShowImageInfo(); }; #endif 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 @@ -11,15 +11,17 @@ #include <qmainwindow.h> namespace Opie { namespace Ui{ - class OKeyConfigManager; class OWidgetStack; } +namespace Core{ + class OKeyConfigManager; +} } class PIconView; class imageinfo; class ImageView; class PMainWindow : public QMainWindow { |