summaryrefslogtreecommitdiff
path: root/noncore/applets/notesapplet/notes.cpp
Unidiff
Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/notesapplet/notes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index d06672a..13f297e 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -1,51 +1,51 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org> 2** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org>
3 3
4** All rights reserved. 4** All rights reserved.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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/* OPIE */ 18/* OPIE */
19#include <opie2/odebug.h> 19#include <opie2/odebug.h>
20#include <opie2/otaskbarapplet.h> 20#include <opie2/otaskbarapplet.h>
21#include <opie2/oresource.h>
21#include <qpe/filemanager.h> 22#include <qpe/filemanager.h>
22#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
23#include <qpe/timestring.h> 24#include <qpe/timestring.h>
24#include <qpe/applnk.h> 25#include <qpe/applnk.h>
25#include <qpe/ir.h> 26#include <qpe/ir.h>
26#include <qpe/config.h> 27#include <qpe/config.h>
27#include <qpe/resource.h>
28using namespace Opie::Core; 28using namespace Opie::Core;
29using namespace Opie::Ui; 29using namespace Opie::Ui;
30 30
31/* QT */ 31/* QT */
32#include <qmultilineedit.h> 32#include <qmultilineedit.h>
33#include <qlistbox.h> 33#include <qlistbox.h>
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qapplication.h> 36#include <qapplication.h>
37#include <qdir.h> 37#include <qdir.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qpoint.h> 39#include <qpoint.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qpainter.h> 41#include <qpainter.h>
42#include <qlayout.h> 42#include <qlayout.h>
43#include <qframe.h> 43#include <qframe.h>
44#include <qpixmap.h> 44#include <qpixmap.h>
45#include <qstring.h> 45#include <qstring.h>
46#include <qstringlist.h> 46#include <qstringlist.h>
47#include <qtimer.h> 47#include <qtimer.h>
48 48
49/* STD */ 49/* STD */
50#include <stdlib.h> 50#include <stdlib.h>
51 51
@@ -411,49 +411,49 @@ void NotesControl::slotSearch() {
411// QString text; 411// QString text;
412 412
413// // Copy text from the clipboard (paste) 413// // Copy text from the clipboard (paste)
414// text = cb->text(); 414// text = cb->text();
415// } 415// }
416// if(e->key() == Key_X) { //cut 416// if(e->key() == Key_X) { //cut
417// } 417// }
418// if(e->key() == Key_V) { //paste 418// if(e->key() == Key_V) { //paste
419// QClipboard *cb = QApplication::clipboard(); 419// QClipboard *cb = QApplication::clipboard();
420// QString text; 420// QString text;
421// //view 421// //view
422// cb->setText(); 422// cb->setText();
423// } 423// }
424// break; 424// break;
425// }; 425// };
426// QWidget::keyReleaseEvent(e); 426// QWidget::keyReleaseEvent(e);
427// } 427// }
428 428
429//=========================================================================== 429//===========================================================================
430 430
431NotesApplet::NotesApplet( QWidget *parent, const char *name ) 431NotesApplet::NotesApplet( QWidget *parent, const char *name )
432 : QWidget( parent, name ) { 432 : QWidget( parent, name ) {
433 setFixedHeight( AppLnk::smallIconSize() ); 433 setFixedHeight( AppLnk::smallIconSize() );
434 setFixedWidth( AppLnk::smallIconSize() ); 434 setFixedWidth( AppLnk::smallIconSize() );
435 notesPixmap.convertFromImage( Resource::loadImage( "edit" ).smoothScale( height(), width() ) ); 435 notesPixmap = Opie::Core::OResource::loadImage( "edit", Opie::Core::OResource::SmallIcon );
436 vc = new NotesControl; 436 vc = new NotesControl;
437} 437}
438 438
439NotesApplet::~NotesApplet() { 439NotesApplet::~NotesApplet() {
440 delete vc; 440 delete vc;
441} 441}
442 442
443int NotesApplet::position() 443int NotesApplet::position()
444{ 444{
445 return 6; 445 return 6;
446} 446}
447 447
448void NotesApplet::mousePressEvent( QMouseEvent *) { 448void NotesApplet::mousePressEvent( QMouseEvent *) {
449 if( !vc->isHidden()) { 449 if( !vc->isHidden()) {
450 vc->doPopulate=false; 450 vc->doPopulate=false;
451 vc->save(); 451 vc->save();
452 vc->close(); 452 vc->close();
453 } else { 453 } else {
454// vc = new NotesControl; 454// vc = new NotesControl;
455// QPoint curPos = mapToGlobal( rect().topLeft() ); 455// QPoint curPos = mapToGlobal( rect().topLeft() );
456 if(vc->showMax) { 456 if(vc->showMax) {
457 odebug << "show max" << oendl; 457 odebug << "show max" << oendl;
458 vc->showMaximized(); 458 vc->showMaximized();
459 } else { 459 } else {