author | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
commit | ecdd2845abeb5f3d00f58540e9b222799d6610e8 (patch) (unidiff) | |
tree | 7199007b1dc296bb4572f2c96178d47d2f36bc02 /noncore/graphics/opie-eye/gui/iconview.cpp | |
parent | cb3097d5249b6bd576d0212394ab57e885f9e9da (diff) | |
download | opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.zip opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.gz opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.bz2 |
Make use of OWidgetStack
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 61 |
1 files changed, 41 insertions, 20 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index de2cdf0..4ced52d 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -37,5 +37,8 @@ using Opie::Ui::OKeyConfigItem; | |||
37 | 37 | ||
38 | /* | ||
39 | * The Icons, Request Cache and IconViewItem for the IconView | ||
40 | */ | ||
38 | namespace { | 41 | namespace { |
39 | QPixmap* _dirPix = 0; | 42 | static QPixmap* _dirPix = 0; |
40 | QPixmap* _unkPix = 0; | 43 | static QPixmap* _unkPix = 0; |
41 | class IconViewItem : public QIconViewItem { | 44 | class IconViewItem : public QIconViewItem { |
@@ -61,4 +64,4 @@ namespace { | |||
61 | */ | 64 | */ |
62 | QMap<QString, IconViewItem*> g_stringInf; | 65 | static QMap<QString, IconViewItem*> g_stringInf; |
63 | QMap<QString, IconViewItem*> g_stringPix; | 66 | static QMap<QString, IconViewItem*> g_stringPix; |
64 | 67 | ||
@@ -103,2 +106,6 @@ namespace { | |||
103 | 106 | ||
107 | /* | ||
108 | * Set up the GUI.. initialize the slave set up gui | ||
109 | * and also load a dir | ||
110 | */ | ||
104 | PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | 111 | PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) |
@@ -138,2 +145,5 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | |||
138 | 145 | ||
146 | /* | ||
147 | * Unref the slave and save the keyboard manager | ||
148 | */ | ||
139 | PIconView::~PIconView() { | 149 | PIconView::~PIconView() { |
@@ -150,2 +160,7 @@ Opie::Ui::OKeyConfigManager* PIconView::manager() { | |||
150 | 160 | ||
161 | |||
162 | /* | ||
163 | * init the KeyBoard Shortcuts | ||
164 | * called from the c'tor | ||
165 | */ | ||
151 | void PIconView::initKeys() { | 166 | void PIconView::initKeys() { |
@@ -180,2 +195,6 @@ void PIconView::initKeys() { | |||
180 | 195 | ||
196 | |||
197 | /* | ||
198 | * change one dir up | ||
199 | */ | ||
181 | void PIconView::slotDirUp() { | 200 | void PIconView::slotDirUp() { |
@@ -187,2 +206,5 @@ void PIconView::slotDirUp() { | |||
187 | 206 | ||
207 | /* | ||
208 | * change the dir | ||
209 | */ | ||
188 | void PIconView::slotChangeDir(const QString& path) { | 210 | void PIconView::slotChangeDir(const QString& path) { |
@@ -286,5 +308,5 @@ void PIconView::addFolders( const QStringList& lst) { | |||
286 | 308 | ||
287 | for(it=lst.begin(); it != lst.end(); ++it ) { | 309 | for(it=lst.begin(); it != lst.end(); ++it ) |
288 | (void)new IconViewItem( m_view, m_path+"/"+(*it), (*it), true ); | 310 | (void)new IconViewItem( m_view, m_path+"/"+(*it), (*it), true ); |
289 | } | 311 | |
290 | 312 | ||
@@ -307,3 +329,3 @@ void PIconView::slotClicked(QIconViewItem* _it) { | |||
307 | else // view image | 329 | else // view image |
308 | ; | 330 | slotShowImage(); |
309 | } | 331 | } |
@@ -362,3 +384,2 @@ void PIconView::slotStart() { | |||
362 | m_view->viewport()->setUpdatesEnabled( false ); | 384 | m_view->viewport()->setUpdatesEnabled( false ); |
363 | qWarning( "Sig Start" ); | ||
364 | } | 385 | } |
@@ -366,3 +387,2 @@ void PIconView::slotStart() { | |||
366 | void PIconView::slotEnd() { | 387 | void PIconView::slotEnd() { |
367 | qWarning( "SLot End" ); | ||
368 | if ( m_updatet ) | 388 | if ( m_updatet ) |
@@ -373,4 +393,5 @@ void PIconView::slotEnd() { | |||
373 | 393 | ||
374 | void PIconView::slotShowImage() { | 394 | void PIconView::slotShowImage() |
375 | qDebug("image show"); | 395 | { |
396 | qWarning( "SLotShowImage" ); | ||
376 | bool isDir = false; | 397 | bool isDir = false; |
@@ -378,10 +399,10 @@ void PIconView::slotShowImage() { | |||
378 | if (isDir) return; | 399 | if (isDir) return; |
379 | ImageDlg dlg(name); | ||
380 | QPEApplication::execDialog(&dlg); | ||
381 | } | ||
382 | void PIconView::slotShowImage( const QString& ) { | ||
383 | 400 | ||
401 | slotShowImage( name ); | ||
402 | } | ||
403 | void PIconView::slotShowImage( const QString& name) { | ||
404 | emit sig_display( name ); | ||
384 | } | 405 | } |
385 | void PIconView::slotImageInfo() { | 406 | void PIconView::slotImageInfo() { |
386 | qDebug("image info"); | 407 | qWarning( "SlotImageInfo" ); |
387 | bool isDir = false; | 408 | bool isDir = false; |
@@ -389,8 +410,8 @@ void PIconView::slotImageInfo() { | |||
389 | if (isDir) return; | 410 | if (isDir) return; |
390 | infoDlg dlg(name); | 411 | |
391 | QPEApplication::execDialog(&dlg); | 412 | slotImageInfo( name ); |
392 | } | 413 | } |
393 | 414 | ||
394 | void PIconView::slotImageInfo( const QString& ) { | 415 | void PIconView::slotImageInfo( const QString& name) { |
395 | 416 | emit sig_showInfo( name ); | |
396 | } | 417 | } |