Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageinfoui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index e70d6a6..7afb62d 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -11,97 +11,96 @@ | |||
11 | #include <qimage.h> | 11 | #include <qimage.h> |
12 | #include <qpixmap.h> | 12 | #include <qpixmap.h> |
13 | #include <qstring.h> | 13 | #include <qstring.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | 15 | ||
16 | #include "lib/slavemaster.h" | 16 | #include "lib/slavemaster.h" |
17 | #include "lib/imagecache.h" | 17 | #include "lib/imagecache.h" |
18 | 18 | ||
19 | #include <opie2/oconfig.h> | 19 | #include <opie2/oconfig.h> |
20 | #include <opie2/okeyconfigwidget.h> | 20 | #include <opie2/okeyconfigwidget.h> |
21 | #include <opie2/odebug.h> | 21 | #include <opie2/odebug.h> |
22 | 22 | ||
23 | #include <qpe/qcopenvelope_qws.h> | 23 | #include <qpe/qcopenvelope_qws.h> |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | 25 | ||
26 | static const int THUMBSIZE = 128; | 26 | static const int THUMBSIZE = 128; |
27 | 27 | ||
28 | using namespace Opie::Core; | 28 | using namespace Opie::Core; |
29 | 29 | ||
30 | imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, WFlags fl ) | 30 | imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, WFlags fl ) |
31 | : QWidget( parent, name, fl ) | 31 | : QWidget( parent, name, fl ) |
32 | { | 32 | { |
33 | m_viewManager = 0; | 33 | m_viewManager = 0; |
34 | m_cfg = cfg; | 34 | m_cfg = cfg; |
35 | init(name); | 35 | init(name); |
36 | initKeys(); | 36 | initKeys(); |
37 | } | 37 | } |
38 | 38 | ||
39 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) | 39 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) |
40 | : QWidget( parent, name, fl ),currentFile(_path) | 40 | : QWidget( parent, name, fl ),currentFile(_path) |
41 | { | 41 | { |
42 | m_viewManager = 0; | 42 | m_viewManager = 0; |
43 | m_cfg = 0; | 43 | m_cfg = 0; |
44 | init(name); | 44 | init(name); |
45 | initKeys(); | 45 | initKeys(); |
46 | slotChangeName(_path); | 46 | slotChangeName(_path); |
47 | } | 47 | } |
48 | 48 | ||
49 | Opie::Core::OKeyConfigManager* imageinfo::manager() | 49 | Opie::Core::OKeyConfigManager* imageinfo::manager() |
50 | { | 50 | { |
51 | if (!m_viewManager) { | 51 | if (!m_viewManager) { |
52 | initKeys(); | 52 | initKeys(); |
53 | } | 53 | } |
54 | return m_viewManager; | 54 | return m_viewManager; |
55 | } | 55 | } |
56 | 56 | ||
57 | void imageinfo::initKeys() | 57 | void imageinfo::initKeys() |
58 | { | 58 | { |
59 | odebug << "init imageinfo keys" << oendl; | ||
60 | #if 0 | 59 | #if 0 |
61 | if (!m_cfg) { | 60 | if (!m_cfg) { |
62 | m_cfg = new Opie::Core::OConfig("phunkview"); | 61 | m_cfg = new Opie::Core::OConfig("phunkview"); |
63 | m_cfg->setGroup("imageinfo_keys" ); | 62 | m_cfg->setGroup("imageinfo_keys" ); |
64 | } | 63 | } |
65 | #endif | 64 | #endif |
66 | Opie::Core::OKeyPair::List lst; | 65 | Opie::Core::OKeyPair::List lst; |
67 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | 66 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
68 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | 67 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
69 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | 68 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
70 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | 69 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
71 | lst.append( Opie::Core::OKeyPair::returnKey() ); | 70 | lst.append( Opie::Core::OKeyPair::returnKey() ); |
72 | 71 | ||
73 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", | 72 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", |
74 | lst, false,this, "keyconfig name" ); | 73 | lst, false,this, "keyconfig name" ); |
75 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", | 74 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", |
76 | Resource::loadPixmap("1to1"), ViewItem, | 75 | Resource::loadPixmap("1to1"), ViewItem, |
77 | Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 76 | Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
78 | this, SLOT(slotShowImage()))); | 77 | this, SLOT(slotShowImage()))); |
79 | m_viewManager->load(); | 78 | m_viewManager->load(); |
80 | m_viewManager->handleWidget( this ); | 79 | m_viewManager->handleWidget( this ); |
81 | m_viewManager->handleWidget( TextView1 ); | 80 | m_viewManager->handleWidget( TextView1 ); |
82 | } | 81 | } |
83 | 82 | ||
84 | void imageinfo::slotShowImage() | 83 | void imageinfo::slotShowImage() |
85 | { | 84 | { |
86 | emit dispImage(currentFile); | 85 | emit dispImage(currentFile); |
87 | } | 86 | } |
88 | 87 | ||
89 | void imageinfo::init(const char* name) { | 88 | void imageinfo::init(const char* name) { |
90 | { | 89 | { |
91 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 90 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
92 | } | 91 | } |
93 | if ( !name ) | 92 | if ( !name ) |
94 | setName( "imageinfo" ); | 93 | setName( "imageinfo" ); |
95 | resize( 289, 335 ); | 94 | resize( 289, 335 ); |
96 | setCaption( tr( "Image info" ) ); | 95 | setCaption( tr( "Image info" ) ); |
97 | imageinfoLayout = new QVBoxLayout( this ); | 96 | imageinfoLayout = new QVBoxLayout( this ); |
98 | imageinfoLayout->setSpacing(2); | 97 | imageinfoLayout->setSpacing(2); |
99 | imageinfoLayout->setMargin(4); | 98 | imageinfoLayout->setMargin(4); |
100 | 99 | ||
101 | PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); | 100 | PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); |
102 | PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, PixmapLabel1->sizePolicy().hasHeightForWidth() ) ); | 101 | PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, PixmapLabel1->sizePolicy().hasHeightForWidth() ) ); |
103 | QWhatsThis::add( PixmapLabel1, tr("Displays an thumbnail of the image") ); | 102 | QWhatsThis::add( PixmapLabel1, tr("Displays an thumbnail of the image") ); |
104 | 103 | ||
105 | imageinfoLayout->addWidget( PixmapLabel1 ); | 104 | imageinfoLayout->addWidget( PixmapLabel1 ); |
106 | 105 | ||
107 | Line1 = new QFrame( this, "Line1" ); | 106 | Line1 = new QFrame( this, "Line1" ); |