author | alwin <alwin> | 2004-10-30 02:18:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-30 02:18:52 (UTC) |
commit | 3fcdb4e6f576f5e3eec072efe87a44bf58fdbf25 (patch) (unidiff) | |
tree | 087361e8ec23fcae50ab146d6d2e2d366a54fe74 /noncore/graphics/opie-eye/gui/imageview.cpp | |
parent | dca4423e3b0966fe26ba4183e5b6ad4666c61e86 (diff) | |
download | opie-3fcdb4e6f576f5e3eec072efe87a44bf58fdbf25.zip opie-3fcdb4e6f576f5e3eec072efe87a44bf58fdbf25.tar.gz opie-3fcdb4e6f576f5e3eec072efe87a44bf58fdbf25.tar.bz2 |
slide show implemented
on next/previous images: if end/begin of list is reached it starts
again on begin/end (it was required for slideshow so what ;)
zecke: so we have a feature for OPIE 1.1.7 ;)
Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index 5522131..b699aa1 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -8,4 +8,5 @@ | |||
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | #include <qpopupmenu.h> | 9 | #include <qpopupmenu.h> |
10 | #include <qtimer.h> | ||
10 | 11 | ||
11 | using namespace Opie::Core; | 12 | using namespace Opie::Core; |
@@ -19,6 +20,8 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
19 | m_isFullScreen = false; | 20 | m_isFullScreen = false; |
20 | m_ignore_next_in = false; | 21 | m_ignore_next_in = false; |
22 | m_slideTimer = 0; | ||
21 | QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); | 23 | QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); |
22 | initKeys(); | 24 | initKeys(); |
25 | m_slideValue = 5; | ||
23 | } | 26 | } |
24 | 27 | ||
@@ -37,4 +40,27 @@ Opie::Core::OKeyConfigManager* ImageView::manager() | |||
37 | } | 40 | } |
38 | 41 | ||
42 | void ImageView::startSlide(int value) | ||
43 | { | ||
44 | if (!m_slideTimer) { | ||
45 | m_slideTimer = new QTimer(this); | ||
46 | } | ||
47 | m_slideValue=value; | ||
48 | connect(m_slideTimer,SIGNAL(timeout()),SLOT(nextSlide())); | ||
49 | m_slideTimer->start(m_slideValue*1000,true); | ||
50 | } | ||
51 | |||
52 | void ImageView::nextSlide() | ||
53 | { | ||
54 | if (!m_slideTimer) { | ||
55 | return; | ||
56 | } | ||
57 | if (isHidden()) { | ||
58 | delete m_slideTimer; | ||
59 | m_slideTimer = 0; | ||
60 | return; | ||
61 | } | ||
62 | emit dispNext(); | ||
63 | m_slideTimer->start(m_slideValue*1000,true); | ||
64 | } | ||
39 | void ImageView::initKeys() | 65 | void ImageView::initKeys() |
40 | { | 66 | { |
@@ -140,5 +166,5 @@ void ImageView::setFullScreen(bool how) | |||
140 | showFullScreen(); | 166 | showFullScreen(); |
141 | } else { | 167 | } else { |
142 | setMinimumSize(10,10); | 168 | setMinimumSize(10,10); |
143 | } | 169 | } |
144 | } | 170 | } |