summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp10
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 21a668a..3650493 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -12,24 +12,25 @@
12#include <iface/ifaceinfo.h> 12#include <iface/ifaceinfo.h>
13#include <iface/dirview.h> 13#include <iface/dirview.h>
14 14
15#include <opie2/odebug.h> 15#include <opie2/odebug.h>
16#include <opie2/owidgetstack.h> 16#include <opie2/owidgetstack.h>
17#include <opie2/oapplicationfactory.h> 17#include <opie2/oapplicationfactory.h>
18#include <opie2/otabwidget.h> 18#include <opie2/otabwidget.h>
19#include <opie2/okeyconfigwidget.h> 19#include <opie2/okeyconfigwidget.h>
20 20
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22#include <qpe/config.h> 22#include <qpe/config.h>
23#include <qpe/ir.h> 23#include <qpe/ir.h>
24#include <qpe/applnk.h>
24 25
25#include <qtoolbar.h> 26#include <qtoolbar.h>
26#include <qtoolbutton.h> 27#include <qtoolbutton.h>
27#include <qlayout.h> 28#include <qlayout.h>
28#include <qdialog.h> 29#include <qdialog.h>
29#include <qmap.h> 30#include <qmap.h>
30#include <qtimer.h> 31#include <qtimer.h>
31 32
32 33
33 34
34 35
35OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) 36OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" )
@@ -272,12 +273,21 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
272 m_stack->visibleWidget() == m_disp ) { 273 m_stack->visibleWidget() == m_disp ) {
273 raiseIconView(); 274 raiseIconView();
274 ev->ignore(); 275 ev->ignore();
275 return; 276 return;
276 } 277 }
277 ev->accept(); 278 ev->accept();
278 QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); 279 QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
279} 280}
280 281
281void PMainWindow::raiseIconView() { 282void PMainWindow::raiseIconView() {
282 m_stack->raiseWidget( IconView ); 283 m_stack->raiseWidget( IconView );
283} 284}
285
286void PMainWindow::setDocument( const QString& showImg ) {
287 QString file = showImg;
288 DocLnk lnk(showImg);
289 if (lnk.isValid() )
290 file = lnk.file();
291
292 slotDisplay( file );
293}
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 5de2f42..042d568 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -30,24 +30,25 @@ public:
30 PMainWindow(QWidget*, const char*, WFlags ); 30 PMainWindow(QWidget*, const char*, WFlags );
31 ~PMainWindow(); 31 ~PMainWindow();
32 32
33signals: 33signals:
34 void configChanged(); 34 void configChanged();
35 35
36public slots: 36public slots:
37 void slotShowInfo( const QString& inf ); 37 void slotShowInfo( const QString& inf );
38 void slotDisplay( const QString& inf ); 38 void slotDisplay( const QString& inf );
39 void slotReturn(); 39 void slotReturn();
40 void slotRotateToggled(bool); 40 void slotRotateToggled(bool);
41 void slotScaleToggled(bool); 41 void slotScaleToggled(bool);
42 void setDocument( const QString& );
42 43
43protected: 44protected:
44 void raiseIconView(); 45 void raiseIconView();
45 void closeEvent( QCloseEvent* ); 46 void closeEvent( QCloseEvent* );
46 47
47private: 48private:
48 template<class T> void initT( const char* name, T**, int ); 49 template<class T> void initT( const char* name, T**, int );
49 void initInfo(); 50 void initInfo();
50 void initDisp(); 51 void initDisp();
51 52
52private: 53private:
53 Opie::Core::OConfig *m_cfg; 54 Opie::Core::OConfig *m_cfg;