Diffstat (limited to 'core/applets/clipboardapplet/clipboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/clipboardapplet/clipboard.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp index bb0db9b..34d151e 100644 --- a/core/applets/clipboardapplet/clipboard.cpp +++ b/core/applets/clipboardapplet/clipboard.cpp | |||
@@ -11,24 +11,25 @@ | |||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "clipboard.h" | 21 | #include "clipboard.h" |
22 | 22 | ||
23 | #include <opie2/otaskbarapplet.h> | ||
23 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
24 | #include <qpe/applnk.h> | 25 | #include <qpe/applnk.h> |
25 | 26 | ||
26 | #include <qpainter.h> | 27 | #include <qpainter.h> |
27 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
28 | #include <qwindowsystem_qws.h> | 29 | #include <qwindowsystem_qws.h> |
29 | #include <qapplication.h> | 30 | #include <qapplication.h> |
30 | #include <qclipboard.h> | 31 | #include <qclipboard.h> |
31 | #include <qtimer.h> | 32 | #include <qtimer.h> |
32 | 33 | ||
33 | //=========================================================================== | 34 | //=========================================================================== |
34 | 35 | ||
@@ -51,24 +52,29 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( | |||
51 | 52 | ||
52 | m_menu = 0; | 53 | m_menu = 0; |
53 | m_dirty = true; | 54 | m_dirty = true; |
54 | m_lasttext = QString::null; | 55 | m_lasttext = QString::null; |
55 | 56 | ||
56 | m_timer-> start ( 0, true ); | 57 | m_timer-> start ( 0, true ); |
57 | } | 58 | } |
58 | 59 | ||
59 | ClipboardApplet::~ClipboardApplet ( ) | 60 | ClipboardApplet::~ClipboardApplet ( ) |
60 | { | 61 | { |
61 | } | 62 | } |
62 | 63 | ||
64 | int ClipboardApplet::position() | ||
65 | { | ||
66 | return 6; | ||
67 | } | ||
68 | |||
63 | void ClipboardApplet::shutdown ( ) | 69 | void ClipboardApplet::shutdown ( ) |
64 | { | 70 | { |
65 | // the timer has to be stopped, or Qt/E will hang on quit() | 71 | // the timer has to be stopped, or Qt/E will hang on quit() |
66 | // see launcher/desktop.cpp | 72 | // see launcher/desktop.cpp |
67 | 73 | ||
68 | m_timer-> stop ( ); | 74 | m_timer-> stop ( ); |
69 | } | 75 | } |
70 | 76 | ||
71 | void ClipboardApplet::mousePressEvent ( QMouseEvent *) | 77 | void ClipboardApplet::mousePressEvent ( QMouseEvent *) |
72 | { | 78 | { |
73 | if ( m_dirty ) { | 79 | if ( m_dirty ) { |
74 | delete m_menu; | 80 | delete m_menu; |
@@ -167,12 +173,17 @@ void ClipboardApplet::newData ( ) | |||
167 | m_history. append ( txt ); | 173 | m_history. append ( txt ); |
168 | 174 | ||
169 | if ( m_history. count ( ) > 5 ) | 175 | if ( m_history. count ( ) > 5 ) |
170 | m_history. remove ( m_history. begin ( )); | 176 | m_history. remove ( m_history. begin ( )); |
171 | 177 | ||
172 | m_dirty = true; | 178 | m_dirty = true; |
173 | } | 179 | } |
174 | 180 | ||
175 | m_timer-> start ( 1500, true ); | 181 | m_timer-> start ( 1500, true ); |
176 | 182 | ||
177 | excllock = false; | 183 | excllock = false; |
178 | } | 184 | } |
185 | |||
186 | Q_EXPORT_INTERFACE() | ||
187 | { | ||
188 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ClipboardApplet> ); | ||
189 | } | ||