author | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-13 14:53:58 (UTC) |
commit | b51d88d7b0b517b71ae3b59d8228335f38ca9fc7 (patch) (unidiff) | |
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 | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <qstyle.h> | 33 | #include <qstyle.h> |
34 | 34 | ||
35 | 35 | ||
36 | using Opie::Ui::OKeyConfigItem; | 36 | using Opie::Core::OKeyConfigItem; |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * The Icons, Request Cache and IconViewItem for the IconView | 39 | * The Icons, Request Cache and IconViewItem for the IconView |
@@ -156,7 +156,7 @@ PIconView::~PIconView() { | |||
156 | delete m_viewManager; | 156 | delete m_viewManager; |
157 | } | 157 | } |
158 | 158 | ||
159 | Opie::Ui::OKeyConfigManager* PIconView::manager() { | 159 | Opie::Core::OKeyConfigManager* PIconView::manager() { |
160 | return m_viewManager; | 160 | return m_viewManager; |
161 | } | 161 | } |
162 | 162 | ||
@@ -166,30 +166,30 @@ Opie::Ui::OKeyConfigManager* PIconView::manager() { | |||
166 | * called from the c'tor | 166 | * called from the c'tor |
167 | */ | 167 | */ |
168 | void PIconView::initKeys() { | 168 | void PIconView::initKeys() { |
169 | Opie::Ui::OKeyPair::List lst; | 169 | Opie::Core::OKeyPair::List lst; |
170 | lst.append( Opie::Ui::OKeyPair::upArrowKey() ); | 170 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
171 | lst.append( Opie::Ui::OKeyPair::downArrowKey() ); | 171 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
172 | lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); | 172 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
173 | lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); | 173 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
174 | lst.append( Opie::Ui::OKeyPair::returnKey() ); | 174 | lst.append( Opie::Core::OKeyPair::returnKey() ); |
175 | 175 | ||
176 | m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", | 176 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", |
177 | lst, false,this, "keyconfig name" ); | 177 | lst, false,this, "keyconfig name" ); |
178 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", | 178 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", |
179 | Resource::loadPixmap("beam"), BeamItem, | 179 | Resource::loadPixmap("beam"), BeamItem, |
180 | Opie::Ui::OKeyPair(Qt::Key_B, Qt::ShiftButton), | 180 | Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), |
181 | this, SLOT(slotBeam())) ); | 181 | this, SLOT(slotBeam())) ); |
182 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", | 182 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", |
183 | Resource::loadPixmap("trash"), DeleteItem, | 183 | Resource::loadPixmap("trash"), DeleteItem, |
184 | Opie::Ui::OKeyPair(Qt::Key_D, Qt::ShiftButton), | 184 | Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), |
185 | this, SLOT(slotTrash())) ); | 185 | this, SLOT(slotTrash())) ); |
186 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", | 186 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", |
187 | Resource::loadPixmap("1to1"), ViewItem, | 187 | Resource::loadPixmap("1to1"), ViewItem, |
188 | Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 188 | Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
189 | this, SLOT(slotShowImage()))); | 189 | this, SLOT(slotShowImage()))); |
190 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", | 190 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", |
191 | Resource::loadPixmap("DocumentTypeWord"), InfoItem, | 191 | Resource::loadPixmap("DocumentTypeWord"), InfoItem, |
192 | Opie::Ui::OKeyPair(Qt::Key_I, Qt::ShiftButton ), | 192 | Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), |
193 | this, SLOT(slotImageInfo()) ) ); | 193 | this, SLOT(slotImageInfo()) ) ); |
194 | m_viewManager->load(); | 194 | m_viewManager->load(); |
195 | m_viewManager->handleWidget( m_view ); | 195 | 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 | |||
@@ -19,8 +19,6 @@ class Ir; | |||
19 | namespace Opie { | 19 | namespace Opie { |
20 | namespace Core{ | 20 | namespace Core{ |
21 | class OConfig; | 21 | class OConfig; |
22 | } | ||
23 | namespace Ui { | ||
24 | class OKeyConfigManager; | 22 | class OKeyConfigManager; |
25 | } | 23 | } |
26 | } | 24 | } |
@@ -35,7 +33,7 @@ public: | |||
35 | PIconView( QWidget* wid, Opie::Core::OConfig *cfg ); | 33 | PIconView( QWidget* wid, Opie::Core::OConfig *cfg ); |
36 | ~PIconView(); | 34 | ~PIconView(); |
37 | void resetView(); | 35 | void resetView(); |
38 | Opie::Ui::OKeyConfigManager* manager(); | 36 | Opie::Core::OKeyConfigManager* manager(); |
39 | 37 | ||
40 | signals: | 38 | signals: |
41 | void sig_showInfo( const QString& ); | 39 | void sig_showInfo( const QString& ); |
@@ -73,7 +71,7 @@ private slots: | |||
73 | void slotThumbInfo(const QString&, const QString&); | 71 | void slotThumbInfo(const QString&, const QString&); |
74 | void slotThumbNail(const QString&, const QPixmap&); | 72 | void slotThumbNail(const QString&, const QPixmap&); |
75 | private: | 73 | private: |
76 | Opie::Ui::OKeyConfigManager *m_viewManager; | 74 | Opie::Core::OKeyConfigManager *m_viewManager; |
77 | Opie::Core::OConfig *m_cfg; | 75 | Opie::Core::OConfig *m_cfg; |
78 | QComboBox* m_views; | 76 | QComboBox* m_views; |
79 | QIconView* m_view; | 77 | QIconView* m_view; |
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 | |||
@@ -46,7 +46,7 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF | |||
46 | slotChangeName(_path); | 46 | slotChangeName(_path); |
47 | } | 47 | } |
48 | 48 | ||
49 | Opie::Ui::OKeyConfigManager* imageinfo::manager() | 49 | Opie::Core::OKeyConfigManager* imageinfo::manager() |
50 | { | 50 | { |
51 | if (!m_viewManager) { | 51 | if (!m_viewManager) { |
52 | initKeys(); | 52 | initKeys(); |
@@ -63,19 +63,19 @@ void imageinfo::initKeys() | |||
63 | m_cfg->setGroup("imageinfo_keys" ); | 63 | m_cfg->setGroup("imageinfo_keys" ); |
64 | } | 64 | } |
65 | #endif | 65 | #endif |
66 | Opie::Ui::OKeyPair::List lst; | 66 | Opie::Core::OKeyPair::List lst; |
67 | lst.append( Opie::Ui::OKeyPair::upArrowKey() ); | 67 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
68 | lst.append( Opie::Ui::OKeyPair::downArrowKey() ); | 68 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
69 | lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); | 69 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
70 | lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); | 70 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
71 | lst.append( Opie::Ui::OKeyPair::returnKey() ); | 71 | lst.append( Opie::Core::OKeyPair::returnKey() ); |
72 | 72 | ||
73 | m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "imageinfo_keys", | 73 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", |
74 | lst, false,this, "keyconfig name" ); | 74 | lst, false,this, "keyconfig name" ); |
75 | m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "infoview", | 75 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", |
76 | Resource::loadPixmap("1to1"), ViewItem, | 76 | Resource::loadPixmap("1to1"), ViewItem, |
77 | Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 77 | Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
78 | this, SLOT(slotShowImage()))); | 78 | this, SLOT(slotShowImage()))); |
79 | m_viewManager->load(); | 79 | m_viewManager->load(); |
80 | m_viewManager->handleWidget( this ); | 80 | m_viewManager->handleWidget( this ); |
81 | m_viewManager->handleWidget( TextView1 ); | 81 | m_viewManager->handleWidget( TextView1 ); |
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 | |||
@@ -15,8 +15,6 @@ class QTextView; | |||
15 | namespace Opie { | 15 | namespace Opie { |
16 | namespace Core { | 16 | namespace Core { |
17 | class OConfig; | 17 | class OConfig; |
18 | } | ||
19 | namespace Ui { | ||
20 | class OKeyConfigManager; | 18 | class OKeyConfigManager; |
21 | } | 19 | } |
22 | } | 20 | } |
@@ -34,7 +32,7 @@ public: | |||
34 | virtual ~imageinfo(); | 32 | virtual ~imageinfo(); |
35 | 33 | ||
36 | void setDestructiveClose(); | 34 | void setDestructiveClose(); |
37 | Opie::Ui::OKeyConfigManager* manager(); | 35 | Opie::Core::OKeyConfigManager* manager(); |
38 | 36 | ||
39 | signals: | 37 | signals: |
40 | void dispImage(const QString&); | 38 | void dispImage(const QString&); |
@@ -56,7 +54,7 @@ protected: | |||
56 | QString currentFile; | 54 | QString currentFile; |
57 | 55 | ||
58 | Opie::Core::OConfig * m_cfg; | 56 | Opie::Core::OConfig * m_cfg; |
59 | Opie::Ui::OKeyConfigManager*m_viewManager; | 57 | Opie::Core::OKeyConfigManager*m_viewManager; |
60 | void initKeys(); | 58 | void initKeys(); |
61 | 59 | ||
62 | protected slots: | 60 | protected slots: |
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 | |||
@@ -23,7 +23,7 @@ ImageView::~ImageView() | |||
23 | } | 23 | } |
24 | } | 24 | } |
25 | 25 | ||
26 | Opie::Ui::OKeyConfigManager* ImageView::manager() | 26 | Opie::Core::OKeyConfigManager* ImageView::manager() |
27 | { | 27 | { |
28 | if (!m_viewManager) { | 28 | if (!m_viewManager) { |
29 | initKeys(); | 29 | initKeys(); |
@@ -38,18 +38,18 @@ void ImageView::initKeys() | |||
38 | m_cfg = new Opie::Core::OConfig("phunkview"); | 38 | m_cfg = new Opie::Core::OConfig("phunkview"); |
39 | m_cfg->setGroup("image_view_keys" ); | 39 | m_cfg->setGroup("image_view_keys" ); |
40 | } | 40 | } |
41 | Opie::Ui::OKeyPair::List lst; | 41 | Opie::Core::OKeyPair::List lst; |
42 | lst.append( Opie::Ui::OKeyPair::upArrowKey() ); | 42 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
43 | lst.append( Opie::Ui::OKeyPair::downArrowKey() ); | 43 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
44 | lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); | 44 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
45 | lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); | 45 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
46 | lst.append( Opie::Ui::OKeyPair::returnKey() ); | 46 | lst.append( Opie::Core::OKeyPair::returnKey() ); |
47 | 47 | ||
48 | m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "image_view_keys", | 48 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", |
49 | lst, false,this, "image_view_keys" ); | 49 | lst, false,this, "image_view_keys" ); |
50 | m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", | 50 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", |
51 | Resource::loadPixmap("1to1"), ViewInfo, | 51 | Resource::loadPixmap("1to1"), ViewInfo, |
52 | Opie::Ui::OKeyPair(Qt::Key_I,Qt::ShiftButton), | 52 | Opie::Core::OKeyPair(Qt::Key_I,Qt::ShiftButton), |
53 | this, SLOT(slotShowImageInfo()))); | 53 | this, SLOT(slotShowImageInfo()))); |
54 | m_viewManager->handleWidget( this ); | 54 | m_viewManager->handleWidget( this ); |
55 | m_viewManager->load(); | 55 | m_viewManager->load(); |
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 | |||
@@ -7,8 +7,6 @@ | |||
7 | namespace Opie { | 7 | namespace Opie { |
8 | namespace Core { | 8 | namespace Core { |
9 | class OConfig; | 9 | class OConfig; |
10 | } | ||
11 | namespace Ui { | ||
12 | class OKeyConfigManager; | 10 | class OKeyConfigManager; |
13 | } | 11 | } |
14 | } | 12 | } |
@@ -24,7 +22,7 @@ class ImageView:public ImageScrollView | |||
24 | public: | 22 | public: |
25 | ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name = 0, WFlags fl = 0 ); | 23 | ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name = 0, WFlags fl = 0 ); |
26 | virtual ~ImageView(); | 24 | virtual ~ImageView(); |
27 | Opie::Ui::OKeyConfigManager* manager(); | 25 | Opie::Core::OKeyConfigManager* manager(); |
28 | 26 | ||
29 | signals: | 27 | signals: |
30 | void dispImageInfo(const QString&); | 28 | void dispImageInfo(const QString&); |
@@ -32,7 +30,7 @@ signals: | |||
32 | 30 | ||
33 | protected: | 31 | protected: |
34 | Opie::Core::OConfig * m_cfg; | 32 | Opie::Core::OConfig * m_cfg; |
35 | Opie::Ui::OKeyConfigManager*m_viewManager; | 33 | Opie::Core::OKeyConfigManager*m_viewManager; |
36 | void initKeys(); | 34 | void initKeys(); |
37 | protected slots: | 35 | protected slots: |
38 | virtual void slotShowImageInfo(); | 36 | virtual void slotShowImageInfo(); |
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 | |||
@@ -14,9 +14,11 @@ | |||
14 | 14 | ||
15 | namespace Opie { | 15 | namespace Opie { |
16 | namespace Ui{ | 16 | namespace Ui{ |
17 | class OKeyConfigManager; | ||
18 | class OWidgetStack; | 17 | class OWidgetStack; |
19 | } | 18 | } |
19 | namespace Core{ | ||
20 | class OKeyConfigManager; | ||
21 | } | ||
20 | } | 22 | } |
21 | 23 | ||
22 | class PIconView; | 24 | class PIconView; |