Diffstat (limited to 'noncore/applets/notesapplet/notes.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/notesapplet/notes.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/noncore/applets/notesapplet/notes.h b/noncore/applets/notesapplet/notes.h new file mode 100644 index 0000000..2172d5a --- a/dev/null +++ b/noncore/applets/notesapplet/notes.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com | ||
3 | ** All rights reserved. | ||
4 | ** | ||
5 | ** This file may be distributed and/or modified under the terms of the | ||
6 | ** GNU General Public License version 2 as published by the Free Software | ||
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
8 | ** packaging of this file. | ||
9 | ** | ||
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | ** | ||
13 | **********************************************************************/ | ||
14 | |||
15 | #ifndef __NOTES_APPLET_H__ | ||
16 | #define __NOTES_APPLET_H__ | ||
17 | |||
18 | #include <qwidget.h> | ||
19 | #include <qframe.h> | ||
20 | #include <qpixmap.h> | ||
21 | #include <qguardedptr.h> | ||
22 | #include <qtimer.h> | ||
23 | #include <qpe/filemanager.h> | ||
24 | #include <qstring.h> | ||
25 | |||
26 | class QComboBox; | ||
27 | class QCheckBox; | ||
28 | class QSpinBox; | ||
29 | class QPushButton; | ||
30 | class QMultiLineEdit; | ||
31 | class QListBox; | ||
32 | class QListBoxItem; | ||
33 | class NotesControl : public QFrame { | ||
34 | Q_OBJECT | ||
35 | public: | ||
36 | NotesControl( QWidget *parent=0, const char *name=0 ); | ||
37 | void performGrab(); | ||
38 | |||
39 | QPixmap notes; | ||
40 | QMultiLineEdit *view; | ||
41 | QListBox *box; | ||
42 | QPushButton *saveButton, *deleteButton, *newButton; | ||
43 | QString FileNamePath; | ||
44 | bool doPopulate; | ||
45 | void save(); | ||
46 | void populateBox(); | ||
47 | void load(); | ||
48 | |||
49 | private: | ||
50 | QTimer menuTimer; | ||
51 | DocLnk *doc; | ||
52 | bool loaded, edited; | ||
53 | QString oldDocName; | ||
54 | void focusOutEvent( QFocusEvent * ); | ||
55 | void load(const QString&); | ||
56 | private slots: | ||
57 | void slotDeleteButton(); | ||
58 | void slotNewButton(); | ||
59 | void boxPressed(int, QListBoxItem *, const QPoint&); | ||
60 | void showMenu(); | ||
61 | void loadDoc( const DocLnk &); | ||
62 | void slotViewEdited(); | ||
63 | void slotBoxSelected(const QString &); | ||
64 | }; | ||
65 | |||
66 | class NotesApplet : public QWidget { | ||
67 | Q_OBJECT | ||
68 | public: | ||
69 | NotesApplet( QWidget *parent = 0, const char *name=0 ); | ||
70 | ~NotesApplet(); | ||
71 | NotesControl *vc; | ||
72 | public slots: | ||
73 | private: | ||
74 | void mousePressEvent( QMouseEvent * ); | ||
75 | void paintEvent( QPaintEvent* ); | ||
76 | |||
77 | private: | ||
78 | QPixmap notesPixmap; | ||
79 | private slots: | ||
80 | |||
81 | |||
82 | }; | ||
83 | |||
84 | #endif // __NOTES_APPLET_H__ | ||
85 | |||