summaryrefslogtreecommitdiff
path: root/noncore/applets/notesapplet/notes.cpp
Unidiff
Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index 7b8bdd9..1142028 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -10,24 +10,25 @@
10** 10**
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**********************************************************************/ 14**********************************************************************/
15 15
16#include "notes.h" 16#include "notes.h"
17 17
18#include <qapplication.h> 18#include <qapplication.h>
19#include <stdlib.h> 19#include <stdlib.h>
20#include <qstringlist.h> 20#include <qstringlist.h>
21 21
22#include <opie2/otaskbarapplet.h>
22#include <qpe/filemanager.h> 23#include <qpe/filemanager.h>
23#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
24#include <qpe/timestring.h> 25#include <qpe/timestring.h>
25#include <qpe/applnk.h> 26#include <qpe/applnk.h>
26#include <qpe/ir.h> 27#include <qpe/ir.h>
27#include <qpe/config.h> 28#include <qpe/config.h>
28 29
29// #include <qsocket.h> 30// #include <qsocket.h>
30// #include <qclipboard.h> 31// #include <qclipboard.h>
31#include <qmultilineedit.h> 32#include <qmultilineedit.h>
32#include <qlistbox.h> 33#include <qlistbox.h>
33#include <qpopupmenu.h> 34#include <qpopupmenu.h>
@@ -457,24 +458,29 @@ void NotesControl::slotSearch() {
457 458
458NotesApplet::NotesApplet( QWidget *parent, const char *name ) 459NotesApplet::NotesApplet( QWidget *parent, const char *name )
459 : QWidget( parent, name ) { 460 : QWidget( parent, name ) {
460 setFixedHeight( 18 ); 461 setFixedHeight( 18 );
461 setFixedWidth( 14 ); 462 setFixedWidth( 14 );
462 vc = new NotesControl; 463 vc = new NotesControl;
463} 464}
464 465
465NotesApplet::~NotesApplet() { 466NotesApplet::~NotesApplet() {
466 delete vc; 467 delete vc;
467} 468}
468 469
470int NotesApplet::position()
471{
472 return 6;
473}
474
469void NotesApplet::mousePressEvent( QMouseEvent *) { 475void NotesApplet::mousePressEvent( QMouseEvent *) {
470 if( !vc->isHidden()) { 476 if( !vc->isHidden()) {
471 vc->doPopulate=false; 477 vc->doPopulate=false;
472 vc->save(); 478 vc->save();
473 vc->close(); 479 vc->close();
474 } else { 480 } else {
475// vc = new NotesControl; 481// vc = new NotesControl;
476// QPoint curPos = mapToGlobal( rect().topLeft() ); 482// QPoint curPos = mapToGlobal( rect().topLeft() );
477 if(vc->showMax) { 483 if(vc->showMax) {
478 qDebug("show max"); 484 qDebug("show max");
479 vc->showMaximized(); 485 vc->showMaximized();
480 } else { 486 } else {
@@ -493,12 +499,16 @@ void NotesApplet::mousePressEvent( QMouseEvent *) {
493 499
494 vc->load(); 500 vc->load();
495// this->setFocus(); 501// this->setFocus();
496 vc->view->setFocus(); 502 vc->view->setFocus();
497 } 503 }
498} 504}
499 505
500void NotesApplet::paintEvent( QPaintEvent* ) { 506void NotesApplet::paintEvent( QPaintEvent* ) {
501 QPainter p(this); 507 QPainter p(this);
502 p.drawPixmap( 0, 1, ( const char** ) notes_xpm ); 508 p.drawPixmap( 0, 1, ( const char** ) notes_xpm );
503} 509}
504 510
511Q_EXPORT_INTERFACE()
512{
513 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<NotesApplet> );
514}