-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 1 |
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 | |||
@@ -16,16 +16,17 @@ | |||
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 | ||
@@ -276,8 +277,17 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) { | |||
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 | ||
281 | void PMainWindow::raiseIconView() { | 282 | void PMainWindow::raiseIconView() { |
282 | m_stack->raiseWidget( IconView ); | 283 | m_stack->raiseWidget( IconView ); |
283 | } | 284 | } |
285 | |||
286 | void 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 | |||
@@ -34,16 +34,17 @@ signals: | |||
34 | void configChanged(); | 34 | void configChanged(); |
35 | 35 | ||
36 | public slots: | 36 | public 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 | ||
43 | protected: | 44 | protected: |
44 | void raiseIconView(); | 45 | void raiseIconView(); |
45 | void closeEvent( QCloseEvent* ); | 46 | void closeEvent( QCloseEvent* ); |
46 | 47 | ||
47 | private: | 48 | private: |
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(); |