-rw-r--r-- | core/pim/todo/quickedit.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/pim/todo/quickedit.h b/core/pim/todo/quickedit.h index 0c0c204..a479d9e 100644 --- a/core/pim/todo/quickedit.h +++ b/core/pim/todo/quickedit.h | |||
@@ -1,47 +1,77 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_QUICK_EDIT_H | 31 | #ifndef OPIE_QUICK_EDIT_H |
2 | #define OPIE_QUICK_EDIT_H | 32 | #define OPIE_QUICK_EDIT_H |
3 | 33 | ||
4 | #include <qsignal.h> | 34 | #include <qsignal.h> |
5 | #include <qwidget.h> | 35 | #include <qwidget.h> |
6 | 36 | ||
7 | #include <opie2/opimtodo.h> | 37 | #include <opie2/opimtodo.h> |
8 | 38 | ||
9 | using Opie::OPimTodo; | 39 | using Opie::OPimTodo; |
10 | 40 | ||
11 | namespace Todo{ | 41 | namespace Todo{ |
12 | class MainWindow; | 42 | class MainWindow; |
13 | struct QuickEditBase { | 43 | struct QuickEditBase { |
14 | virtual OPimTodo todo()const = 0l; | 44 | virtual OPimTodo todo()const = 0l; |
15 | virtual QSignal* signal() = 0l; | 45 | virtual QSignal* signal() = 0l; |
16 | virtual QWidget* widget() = 0l; | 46 | virtual QWidget* widget() = 0l; |
17 | }; | 47 | }; |
18 | /* | 48 | /* |
19 | * this is my second try | 49 | * this is my second try |
20 | * of signal and slots with namespaces | 50 | * of signal and slots with namespaces |
21 | * and templates | 51 | * and templates |
22 | * I use a different approach now | 52 | * I use a different approach now |
23 | * I give a QSignal away | 53 | * I give a QSignal away |
24 | * and have a protected method called emit | 54 | * and have a protected method called emit |
25 | */ | 55 | */ |
26 | /** | 56 | /** |
27 | * Quick edit is meant to quickly enter | 57 | * Quick edit is meant to quickly enter |
28 | * OPimTodos in a fast way | 58 | * OPimTodos in a fast way |
29 | */ | 59 | */ |
30 | class QuickEdit : public QuickEditBase{ | 60 | class QuickEdit : public QuickEditBase{ |
31 | public: | 61 | public: |
32 | QuickEdit(MainWindow* main ); | 62 | QuickEdit(MainWindow* main ); |
33 | virtual ~QuickEdit(); | 63 | virtual ~QuickEdit(); |
34 | //OPimTodo todo()const; | 64 | //OPimTodo todo()const; |
35 | QSignal* signal(); | 65 | QSignal* signal(); |
36 | //QWidget* widget(); | 66 | //QWidget* widget(); |
37 | protected: | 67 | protected: |
38 | MainWindow* mainWindow(); | 68 | MainWindow* mainWindow(); |
39 | void commit(); | 69 | void commit(); |
40 | private: | 70 | private: |
41 | MainWindow* m_main; | 71 | MainWindow* m_main; |
42 | QSignal* m_sig; | 72 | QSignal* m_sig; |
43 | }; | 73 | }; |
44 | }; | 74 | }; |
45 | 75 | ||
46 | 76 | ||
47 | #endif | 77 | #endif |