author | alwin <alwin> | 2004-04-06 23:53:34 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-06 23:53:34 (UTC) |
commit | 5cab9e2717383faaebb44cbb57df5badc3056206 (patch) (unidiff) | |
tree | 6a46f26ec6c522c7fb77b1adecc6007750908f4b | |
parent | ec7b97a772173992aa2f781eba3fbcd76fd71789 (diff) | |
download | opie-5cab9e2717383faaebb44cbb57df5badc3056206.zip opie-5cab9e2717383faaebb44cbb57df5badc3056206.tar.gz opie-5cab9e2717383faaebb44cbb57df5badc3056206.tar.bz2 |
made methods virtual, implement a sig_return signal
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 039dfa3..d56d65a 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -42,49 +42,49 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF | |||
42 | m_viewManager = 0; | 42 | m_viewManager = 0; |
43 | init(name); | 43 | init(name); |
44 | initKeys(); | 44 | initKeys(); |
45 | slotChangeName(_path); | 45 | slotChangeName(_path); |
46 | } | 46 | } |
47 | 47 | ||
48 | Opie::Ui::OKeyConfigManager* imageinfo::manager() | 48 | Opie::Ui::OKeyConfigManager* imageinfo::manager() |
49 | { | 49 | { |
50 | if (!m_viewManager) { | 50 | if (!m_viewManager) { |
51 | initKeys(); | 51 | initKeys(); |
52 | } | 52 | } |
53 | return m_viewManager; | 53 | return m_viewManager; |
54 | } | 54 | } |
55 | 55 | ||
56 | void imageinfo::initKeys() | 56 | void imageinfo::initKeys() |
57 | { | 57 | { |
58 | odebug << "init imageinfo keys" << oendl; | 58 | odebug << "init imageinfo keys" << oendl; |
59 | m_cfg = new Opie::Core::OConfig("phunkview"); | 59 | m_cfg = new Opie::Core::OConfig("phunkview"); |
60 | m_cfg->setGroup("Zecke_view" ); | 60 | m_cfg->setGroup("Zecke_view" ); |
61 | Opie::Ui::OKeyPair::List lst; | 61 | Opie::Ui::OKeyPair::List lst; |
62 | lst.append( Opie::Ui::OKeyPair::upArrowKey() ); | 62 | lst.append( Opie::Ui::OKeyPair::upArrowKey() ); |
63 | lst.append( Opie::Ui::OKeyPair::downArrowKey() ); | 63 | lst.append( Opie::Ui::OKeyPair::downArrowKey() ); |
64 | lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); | 64 | lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); |
65 | lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); | 65 | lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); |
66 | // lst.append( Opie::Ui::OKeyPair::returnKey() ); | 66 | lst.append( Opie::Ui::OKeyPair::returnKey() ); |
67 | 67 | ||
68 | m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "Imageinfo-KeyBoard-Config", | 68 | m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "Imageinfo-KeyBoard-Config", |
69 | lst, false,this, "keyconfig name" ); | 69 | lst, false,this, "keyconfig name" ); |
70 | m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "view", | 70 | m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "view", |
71 | Resource::loadPixmap("1to1"), ViewItem, | 71 | Resource::loadPixmap("1to1"), ViewItem, |
72 | Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 72 | Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
73 | this, SLOT(slotShowImage()))); | 73 | this, SLOT(slotShowImage()))); |
74 | m_viewManager->load(); | 74 | m_viewManager->load(); |
75 | m_viewManager->handleWidget( this ); | 75 | m_viewManager->handleWidget( this ); |
76 | m_viewManager->handleWidget( TextView1 ); | 76 | m_viewManager->handleWidget( TextView1 ); |
77 | } | 77 | } |
78 | 78 | ||
79 | void imageinfo::slotShowImage() | 79 | void imageinfo::slotShowImage() |
80 | { | 80 | { |
81 | emit dispImage(currentFile); | 81 | emit dispImage(currentFile); |
82 | } | 82 | } |
83 | 83 | ||
84 | void imageinfo::init(const char* name) { | 84 | void imageinfo::init(const char* name) { |
85 | { | 85 | { |
86 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 86 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
87 | } | 87 | } |
88 | if ( !name ) | 88 | if ( !name ) |
89 | setName( "imageinfo" ); | 89 | setName( "imageinfo" ); |
90 | resize( 289, 335 ); | 90 | resize( 289, 335 ); |
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.h b/noncore/graphics/opie-eye/gui/imageinfoui.h index 0a5e183..0ffa423 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.h +++ b/noncore/graphics/opie-eye/gui/imageinfoui.h | |||
@@ -10,59 +10,60 @@ class QHBoxLayout; | |||
10 | class QGridLayout; | 10 | class QGridLayout; |
11 | class QFrame; | 11 | class QFrame; |
12 | class QLabel; | 12 | class QLabel; |
13 | class QTextView; | 13 | class QTextView; |
14 | 14 | ||
15 | namespace Opie { | 15 | namespace Opie { |
16 | namespace Core { | 16 | namespace Core { |
17 | class OConfig; | 17 | class OConfig; |
18 | } | 18 | } |
19 | namespace Ui { | 19 | namespace Ui { |
20 | class OKeyConfigManager; | 20 | class OKeyConfigManager; |
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | class imageinfo : public QWidget | 24 | class imageinfo : public QWidget |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | enum ActionIds { | 27 | enum ActionIds { |
28 | ViewItem | 28 | ViewItem |
29 | }; | 29 | }; |
30 | 30 | ||
31 | public: | 31 | public: |
32 | imageinfo( QWidget* parent = 0, const char* name = 0, WFlags fl =0); | 32 | imageinfo( QWidget* parent = 0, const char* name = 0, WFlags fl =0); |
33 | imageinfo(const QString&_path, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 33 | imageinfo(const QString&_path, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
34 | ~imageinfo(); | 34 | virtual ~imageinfo(); |
35 | 35 | ||
36 | void setDestructiveClose(); | 36 | void setDestructiveClose(); |
37 | Opie::Ui::OKeyConfigManager* manager(); | 37 | Opie::Ui::OKeyConfigManager* manager(); |
38 | 38 | ||
39 | signals: | 39 | signals: |
40 | void dispImage(const QString&); | 40 | void dispImage(const QString&); |
41 | void sig_return(); | ||
41 | 42 | ||
42 | public slots: | 43 | public slots: |
43 | void setPath( const QString& path ); | 44 | virtual void setPath( const QString& path ); |
44 | void slotShowImage(); | 45 | virtual void slotShowImage(); |
45 | 46 | ||
46 | private: | 47 | private: |
47 | void init(const char* name); | 48 | void init(const char* name); |
48 | 49 | ||
49 | protected: | 50 | protected: |
50 | QLabel* PixmapLabel1; | 51 | QLabel* PixmapLabel1; |
51 | QLabel* fnameLabel; | 52 | QLabel* fnameLabel; |
52 | QFrame* Line1; | 53 | QFrame* Line1; |
53 | QTextView* TextView1; | 54 | QTextView* TextView1; |
54 | QVBoxLayout* imageinfoLayout; | 55 | QVBoxLayout* imageinfoLayout; |
55 | QString currentFile; | 56 | QString currentFile; |
56 | 57 | ||
57 | Opie::Core::OConfig * m_cfg; | 58 | Opie::Core::OConfig * m_cfg; |
58 | Opie::Ui::OKeyConfigManager*m_viewManager; | 59 | Opie::Ui::OKeyConfigManager*m_viewManager; |
59 | void initKeys(); | 60 | void initKeys(); |
60 | 61 | ||
61 | protected slots: | 62 | protected slots: |
62 | virtual void slot_fullInfo(const QString&, const QString&); | 63 | virtual void slot_fullInfo(const QString&, const QString&); |
63 | virtual void slotThumbNail(const QString&, const QPixmap&); | 64 | virtual void slotThumbNail(const QString&, const QPixmap&); |
64 | 65 | ||
65 | virtual void slotChangeName(const QString&); | 66 | virtual void slotChangeName(const QString&); |
66 | }; | 67 | }; |
67 | 68 | ||
68 | /* for testing purpose */ | 69 | /* for testing purpose */ |