-rw-r--r-- | core/pim/todo/.cvsignore | 2 | ||||
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 8 | ||||
-rw-r--r-- | core/pim/todo/otaskeditor.h | 4 | ||||
-rw-r--r-- | core/pim/todo/taskeditoradvanced.cpp | 132 | ||||
-rw-r--r-- | core/pim/todo/taskeditoradvanced.h | 73 | ||||
-rw-r--r-- | core/pim/todo/taskeditoradvanced.ui | 224 | ||||
-rw-r--r-- | core/pim/todo/taskeditoradvancedimpl.cpp | 63 | ||||
-rw-r--r-- | core/pim/todo/taskeditoradvancedimpl.h | 37 | ||||
-rw-r--r-- | core/pim/todo/taskeditoroverview.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/todo.pro | 5 |
10 files changed, 213 insertions, 338 deletions
diff --git a/core/pim/todo/.cvsignore b/core/pim/todo/.cvsignore index c212d11..77e97da 100644 --- a/core/pim/todo/.cvsignore +++ b/core/pim/todo/.cvsignore | |||
@@ -1,6 +1,4 @@ | |||
1 | Makefile* | 1 | Makefile* |
2 | moc_* | 2 | moc_* |
3 | taskeditoradvanced.cpp | ||
4 | taskeditoradvanced.h | ||
5 | todoentry.cpp | 3 | todoentry.cpp |
6 | todoentry.h | 4 | todoentry.h |
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index e6ebf60..bde25ef 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,17 +1,17 @@ | |||
1 | #include <qdatetime.h> | 1 | #include <qdatetime.h> |
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | 5 | ||
6 | #include <opie/orecurrancewidget.h> | 6 | #include <opie/orecurrancewidget.h> |
7 | 7 | ||
8 | #include "taskeditoroverview.h" | 8 | #include "taskeditoroverview.h" |
9 | #include "taskeditoradvancedimpl.h" | 9 | #include "taskeditoradvanced.h" |
10 | #include "taskeditoralarms.h" | 10 | #include "taskeditoralarms.h" |
11 | 11 | ||
12 | #include "otaskeditor.h" | 12 | #include "otaskeditor.h" |
13 | 13 | ||
14 | OTaskEditor::OTaskEditor(int cur) | 14 | OTaskEditor::OTaskEditor(int cur) |
15 | : QDialog(0, 0, TRUE ) { | 15 | : QDialog(0, 0, TRUE ) { |
16 | init(); | 16 | init(); |
17 | init( cur ); | 17 | init( cur ); |
@@ -35,40 +35,40 @@ void OTaskEditor::init( const OTodo& to ) { | |||
35 | load( to ); | 35 | load( to ); |
36 | m_uid = to.uid(); | 36 | m_uid = to.uid(); |
37 | } | 37 | } |
38 | OTodo OTaskEditor::todo()const{ | 38 | OTodo OTaskEditor::todo()const{ |
39 | qWarning("saving!"); | 39 | qWarning("saving!"); |
40 | OTodo to; | 40 | OTodo to; |
41 | to.setUid(m_uid ); | 41 | to.setUid(m_uid ); |
42 | m_overView->save( to ); | 42 | m_overView->save( to ); |
43 | //m_adv->save( to ); | 43 | m_adv->save( to ); |
44 | to.setRecurrence( m_rec->recurrence() ); | 44 | to.setRecurrence( m_rec->recurrence() ); |
45 | 45 | ||
46 | return to; | 46 | return to; |
47 | } | 47 | } |
48 | void OTaskEditor::load(const OTodo& to) { | 48 | void OTaskEditor::load(const OTodo& to) { |
49 | m_overView->load( to ); | 49 | m_overView->load( to ); |
50 | //m_adv->load( to ); | 50 | m_adv->load( to ); |
51 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); | 51 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); |
52 | } | 52 | } |
53 | void OTaskEditor::init() { | 53 | void OTaskEditor::init() { |
54 | setCaption("Task Editor"); | 54 | setCaption("Task Editor"); |
55 | 55 | ||
56 | QVBoxLayout* layo = new QVBoxLayout( this ); | 56 | QVBoxLayout* layo = new QVBoxLayout( this ); |
57 | m_tab = new OTabWidget( this ); | 57 | m_tab = new OTabWidget( this ); |
58 | layo->addWidget( m_tab ); | 58 | layo->addWidget( m_tab ); |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Add the Widgets | 61 | * Add the Widgets |
62 | */ | 62 | */ |
63 | m_overView = new TaskEditorOverView( m_tab ); | 63 | m_overView = new TaskEditorOverView( m_tab ); |
64 | m_tab->addTab( m_overView, "TodoList", tr("Overview") ); | 64 | m_tab->addTab( m_overView, "TodoList", tr("Overview") ); |
65 | 65 | ||
66 | m_adv = new TaskEditorAdvancedImpl( m_tab ); | 66 | m_adv = new TaskEditorAdvanced( m_tab ); |
67 | m_tab->addTab( m_adv, "todo/advanced", tr("Advanced") ); | 67 | m_tab->addTab( m_adv, "todo/advanced", tr("Advanced") ); |
68 | 68 | ||
69 | m_alarm = new TaskEditorAlarms( m_tab ); | 69 | m_alarm = new TaskEditorAlarms( m_tab ); |
70 | m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); | 70 | m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); |
71 | 71 | ||
72 | m_remind = new TaskEditorAlarms( m_tab ); | 72 | m_remind = new TaskEditorAlarms( m_tab ); |
73 | m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); | 73 | m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); |
74 | 74 | ||
diff --git a/core/pim/todo/otaskeditor.h b/core/pim/todo/otaskeditor.h index d13e157..8232886 100644 --- a/core/pim/todo/otaskeditor.h +++ b/core/pim/todo/otaskeditor.h | |||
@@ -2,17 +2,17 @@ | |||
2 | #define OPIE_TASK_EDITOR_H | 2 | #define OPIE_TASK_EDITOR_H |
3 | 3 | ||
4 | #include <qdialog.h> | 4 | #include <qdialog.h> |
5 | 5 | ||
6 | #include <opie/otodo.h> | 6 | #include <opie/otodo.h> |
7 | #include <opie/otabwidget.h> | 7 | #include <opie/otabwidget.h> |
8 | 8 | ||
9 | class TaskEditorOverView; | 9 | class TaskEditorOverView; |
10 | class TaskEditorAdvancedImpl; | 10 | class TaskEditorAdvanced; |
11 | class TaskEditorAlarms; | 11 | class TaskEditorAlarms; |
12 | class ORecurranceWidget; | 12 | class ORecurranceWidget; |
13 | class QMultiLineEdit; | 13 | class QMultiLineEdit; |
14 | 14 | ||
15 | class OTaskEditor : public QDialog { | 15 | class OTaskEditor : public QDialog { |
16 | Q_OBJECT | 16 | Q_OBJECT |
17 | public: | 17 | public: |
18 | OTaskEditor(int cur); | 18 | OTaskEditor(int cur); |
@@ -28,17 +28,17 @@ public: | |||
28 | 28 | ||
29 | OTodo todo()const; | 29 | OTodo todo()const; |
30 | private: | 30 | private: |
31 | void load( const OTodo& ); | 31 | void load( const OTodo& ); |
32 | void init(); | 32 | void init(); |
33 | 33 | ||
34 | OTabWidget *m_tab; | 34 | OTabWidget *m_tab; |
35 | TaskEditorOverView *m_overView; | 35 | TaskEditorOverView *m_overView; |
36 | TaskEditorAdvancedImpl *m_adv; | 36 | TaskEditorAdvanced *m_adv; |
37 | TaskEditorAlarms *m_alarm; | 37 | TaskEditorAlarms *m_alarm; |
38 | TaskEditorAlarms *m_remind; | 38 | TaskEditorAlarms *m_remind; |
39 | ORecurranceWidget *m_rec; | 39 | ORecurranceWidget *m_rec; |
40 | int m_uid; | 40 | int m_uid; |
41 | 41 | ||
42 | }; | 42 | }; |
43 | 43 | ||
44 | #endif | 44 | #endif |
diff --git a/core/pim/todo/taskeditoradvanced.cpp b/core/pim/todo/taskeditoradvanced.cpp new file mode 100644 index 0000000..a431d47 --- a/dev/null +++ b/core/pim/todo/taskeditoradvanced.cpp | |||
@@ -0,0 +1,132 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 <> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This program is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This program is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #include "taskeditoradvanced.h" | ||
30 | |||
31 | #include <opie/otodo.h> | ||
32 | #include <opie/opimmaintainer.h> | ||
33 | #include <opie/opimstate.h> | ||
34 | |||
35 | #include <qpe/resource.h> | ||
36 | |||
37 | #include <qcombobox.h> | ||
38 | #include <qlabel.h> | ||
39 | #include <qlayout.h> | ||
40 | #include <qmultilineedit.h> | ||
41 | #include <qscrollview.h> | ||
42 | #include <qtoolbutton.h> | ||
43 | #include <qwhatsthis.h> | ||
44 | |||
45 | TaskEditorAdvanced::TaskEditorAdvanced( QWidget* parent, const char* name, WFlags fl ) | ||
46 | : QWidget( parent, name, fl ) | ||
47 | { | ||
48 | QVBoxLayout *vb = new QVBoxLayout( this ); | ||
49 | |||
50 | QScrollView *sv = new QScrollView( this ); | ||
51 | vb->addWidget( sv ); | ||
52 | sv->setResizePolicy( QScrollView::AutoOneFit ); | ||
53 | sv->setFrameStyle( QFrame::NoFrame ); | ||
54 | |||
55 | QWidget *container = new QWidget( sv->viewport() ); | ||
56 | sv->addChild( container ); | ||
57 | |||
58 | QGridLayout *layout = new QGridLayout( container, 5, 3, 4, 4 ); | ||
59 | |||
60 | QLabel *label = new QLabel( tr( "State:" ), container ); | ||
61 | layout->addWidget( label, 0, 0 ); | ||
62 | |||
63 | cmbState = new QComboBox( FALSE, container ); | ||
64 | cmbState->insertItem( tr( "Started" ) ); | ||
65 | cmbState->insertItem( tr( "Postponed" ) ); | ||
66 | cmbState->insertItem( tr( "Finished" ) ); | ||
67 | cmbState->insertItem( tr( "Not started" ) ); | ||
68 | layout->addMultiCellWidget( cmbState, 0, 0, 1, 2 ); | ||
69 | |||
70 | label = new QLabel( tr( "Maintain Mode:" ), container ); | ||
71 | layout->addWidget( label, 1, 0 ); | ||
72 | |||
73 | cmbMode = new QComboBox( FALSE, container ); | ||
74 | cmbMode->insertItem( tr( "Nothing" ) ); | ||
75 | cmbMode->insertItem( tr( "Responsible" ) ); | ||
76 | cmbMode->insertItem( tr( "Done By" ) ); | ||
77 | cmbMode->insertItem( tr( "Coordinating" ) ); | ||
78 | layout->addMultiCellWidget( cmbMode, 1, 1, 1, 2 ); | ||
79 | |||
80 | label = new QLabel( tr( "Maintainer:" ), container ); | ||
81 | layout->addWidget( label, 2, 0 ); | ||
82 | |||
83 | txtMaintainer = new QLabel( tr( "test" ), container ); | ||
84 | txtMaintainer->setTextFormat( QLabel::RichText ); | ||
85 | layout->addWidget( txtMaintainer, 2, 1 ); | ||
86 | |||
87 | tbtMaintainer = new QToolButton( container ); | ||
88 | tbtMaintainer->setPixmap( Resource::loadPixmap( "todo/more" ) ); | ||
89 | layout->addWidget( tbtMaintainer, 2, 2 ); | ||
90 | |||
91 | label = new QLabel( tr( "Description:" ), container ); | ||
92 | layout->addWidget( label, 3, 0 ); | ||
93 | |||
94 | m_edit = new QMultiLineEdit( this ); | ||
95 | m_edit->setWordWrap( QMultiLineEdit::WidgetWidth ); | ||
96 | layout->addMultiCellWidget( m_edit, 4, 4, 0, 2 ); | ||
97 | } | ||
98 | |||
99 | TaskEditorAdvanced::~TaskEditorAdvanced() | ||
100 | { | ||
101 | } | ||
102 | |||
103 | void TaskEditorAdvanced::load( const OTodo &todo ) | ||
104 | { | ||
105 | m_edit->setText( todo.description() ); | ||
106 | |||
107 | /* OPimState */ | ||
108 | int state = todo.state().state(); | ||
109 | |||
110 | /* defualt to not started */ | ||
111 | if ( state == OPimState::Undefined ) | ||
112 | state = OPimState::NotStarted; | ||
113 | |||
114 | cmbState->setCurrentItem( state ); | ||
115 | |||
116 | /* Maintainer Mode */ | ||
117 | state = todo.maintainer().mode(); | ||
118 | if ( state == OPimMaintainer::Undefined ) | ||
119 | state = OPimMaintainer::Nothing; | ||
120 | |||
121 | cmbMode->setCurrentItem( state ); | ||
122 | } | ||
123 | |||
124 | void TaskEditorAdvanced::save( OTodo &todo ) | ||
125 | { | ||
126 | todo.setDescription( m_edit->text() ); | ||
127 | todo.setState( OPimState( cmbState->currentItem() ) ); | ||
128 | |||
129 | /* Fix me resolve name to uid.....*/ | ||
130 | todo.setMaintainer( OPimMaintainer( cmbMode->currentItem(), -10 ) ); | ||
131 | qWarning("save"); | ||
132 | } | ||
diff --git a/core/pim/todo/taskeditoradvanced.h b/core/pim/todo/taskeditoradvanced.h new file mode 100644 index 0000000..65359e9 --- a/dev/null +++ b/core/pim/todo/taskeditoradvanced.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 <> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This program is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This program is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef TASKEDITORADVANCED_H | ||
30 | #define TASKEDITORADVANCED_H | ||
31 | |||
32 | #include <qwidget.h> | ||
33 | |||
34 | class OTodo; | ||
35 | class QComboBox; | ||
36 | class QLabel; | ||
37 | class QMultiLineEdit; | ||
38 | class QToolButton; | ||
39 | |||
40 | /** | ||
41 | * This is the implementation of the Opie Task Editor Advanced tab | ||
42 | * it features the State! | ||
43 | * MaintainerMode | ||
44 | * Description | ||
45 | */ | ||
46 | class TaskEditorAdvanced : public QWidget | ||
47 | { | ||
48 | Q_OBJECT | ||
49 | |||
50 | public: | ||
51 | TaskEditorAdvanced( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
52 | ~TaskEditorAdvanced(); | ||
53 | |||
54 | /* | ||
55 | * I could have a struct which returns a QWidget* | ||
56 | * load and save to a OTodo | ||
57 | * and use multiple inheretence with all other widgets | ||
58 | * and then simply iterate over the list of structs | ||
59 | * this way I could easily have plugins for the whole editor.... | ||
60 | * but I do not do it -zecke | ||
61 | */ | ||
62 | void load( const OTodo& ); | ||
63 | void save( OTodo& ); | ||
64 | |||
65 | QComboBox *cmbState; | ||
66 | QLabel *txtMaintainer; | ||
67 | QToolButton *tbtMaintainer; | ||
68 | QComboBox *cmbMode; | ||
69 | QMultiLineEdit *m_edit; | ||
70 | |||
71 | }; | ||
72 | |||
73 | #endif // TASKEDITORADVANCED_H | ||
diff --git a/core/pim/todo/taskeditoradvanced.ui b/core/pim/todo/taskeditoradvanced.ui deleted file mode 100644 index 3aac216..0000000 --- a/core/pim/todo/taskeditoradvanced.ui +++ b/dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>TaskEditorAdvanced</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>TaskEditorAdvanced</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>232</width> | ||
15 | <height>307</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property> | ||
19 | <name>layoutMargin</name> | ||
20 | </property> | ||
21 | <property> | ||
22 | <name>layoutSpacing</name> | ||
23 | </property> | ||
24 | <grid> | ||
25 | <property stdset="1"> | ||
26 | <name>margin</name> | ||
27 | <number>8</number> | ||
28 | </property> | ||
29 | <property stdset="1"> | ||
30 | <name>spacing</name> | ||
31 | <number>6</number> | ||
32 | </property> | ||
33 | <widget row="0" column="0" > | ||
34 | <class>QLayoutWidget</class> | ||
35 | <property stdset="1"> | ||
36 | <name>name</name> | ||
37 | <cstring>Layout13</cstring> | ||
38 | </property> | ||
39 | <hbox> | ||
40 | <property stdset="1"> | ||
41 | <name>margin</name> | ||
42 | <number>0</number> | ||
43 | </property> | ||
44 | <property stdset="1"> | ||
45 | <name>spacing</name> | ||
46 | <number>6</number> | ||
47 | </property> | ||
48 | <widget> | ||
49 | <class>QLabel</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>lblState</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>text</name> | ||
56 | <string>State:</string> | ||
57 | </property> | ||
58 | </widget> | ||
59 | <widget> | ||
60 | <class>QComboBox</class> | ||
61 | <item> | ||
62 | <property> | ||
63 | <name>text</name> | ||
64 | <string>Started</string> | ||
65 | </property> | ||
66 | </item> | ||
67 | <item> | ||
68 | <property> | ||
69 | <name>text</name> | ||
70 | <string>Postponed</string> | ||
71 | </property> | ||
72 | </item> | ||
73 | <item> | ||
74 | <property> | ||
75 | <name>text</name> | ||
76 | <string>Finished</string> | ||
77 | </property> | ||
78 | </item> | ||
79 | <item> | ||
80 | <property> | ||
81 | <name>text</name> | ||
82 | <string>Not started</string> | ||
83 | </property> | ||
84 | </item> | ||
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>cmbState</cstring> | ||
88 | </property> | ||
89 | </widget> | ||
90 | </hbox> | ||
91 | </widget> | ||
92 | <widget row="2" column="0" > | ||
93 | <class>QLayoutWidget</class> | ||
94 | <property stdset="1"> | ||
95 | <name>name</name> | ||
96 | <cstring>Layout17</cstring> | ||
97 | </property> | ||
98 | <hbox> | ||
99 | <property stdset="1"> | ||
100 | <name>margin</name> | ||
101 | <number>0</number> | ||
102 | </property> | ||
103 | <property stdset="1"> | ||
104 | <name>spacing</name> | ||
105 | <number>6</number> | ||
106 | </property> | ||
107 | <widget> | ||
108 | <class>QLabel</class> | ||
109 | <property stdset="1"> | ||
110 | <name>name</name> | ||
111 | <cstring>lblMaintainer</cstring> | ||
112 | </property> | ||
113 | <property stdset="1"> | ||
114 | <name>text</name> | ||
115 | <string>Maintainer</string> | ||
116 | </property> | ||
117 | </widget> | ||
118 | <widget> | ||
119 | <class>QLabel</class> | ||
120 | <property stdset="1"> | ||
121 | <name>name</name> | ||
122 | <cstring>txtMaintainer</cstring> | ||
123 | </property> | ||
124 | <property stdset="1"> | ||
125 | <name>text</name> | ||
126 | <string>test</string> | ||
127 | </property> | ||
128 | <property stdset="1"> | ||
129 | <name>textFormat</name> | ||
130 | <enum>RichText</enum> | ||
131 | </property> | ||
132 | </widget> | ||
133 | <widget> | ||
134 | <class>QLayoutWidget</class> | ||
135 | <property stdset="1"> | ||
136 | <name>name</name> | ||
137 | <cstring>Layout16</cstring> | ||
138 | </property> | ||
139 | <vbox> | ||
140 | <property stdset="1"> | ||
141 | <name>margin</name> | ||
142 | <number>0</number> | ||
143 | </property> | ||
144 | <property stdset="1"> | ||
145 | <name>spacing</name> | ||
146 | <number>6</number> | ||
147 | </property> | ||
148 | <widget> | ||
149 | <class>QToolButton</class> | ||
150 | <property stdset="1"> | ||
151 | <name>name</name> | ||
152 | <cstring>tbtMaintainer</cstring> | ||
153 | </property> | ||
154 | <property stdset="1"> | ||
155 | <name>text</name> | ||
156 | <string>...</string> | ||
157 | </property> | ||
158 | </widget> | ||
159 | </vbox> | ||
160 | </widget> | ||
161 | </hbox> | ||
162 | </widget> | ||
163 | <widget row="1" column="0" > | ||
164 | <class>QLayoutWidget</class> | ||
165 | <property stdset="1"> | ||
166 | <name>name</name> | ||
167 | <cstring>Layout4</cstring> | ||
168 | </property> | ||
169 | <hbox> | ||
170 | <property stdset="1"> | ||
171 | <name>margin</name> | ||
172 | <number>0</number> | ||
173 | </property> | ||
174 | <property stdset="1"> | ||
175 | <name>spacing</name> | ||
176 | <number>6</number> | ||
177 | </property> | ||
178 | <widget> | ||
179 | <class>QLabel</class> | ||
180 | <property stdset="1"> | ||
181 | <name>name</name> | ||
182 | <cstring>txtMode</cstring> | ||
183 | </property> | ||
184 | <property stdset="1"> | ||
185 | <name>text</name> | ||
186 | <string>Maintain Mode:</string> | ||
187 | </property> | ||
188 | </widget> | ||
189 | <widget> | ||
190 | <class>QComboBox</class> | ||
191 | <item> | ||
192 | <property> | ||
193 | <name>text</name> | ||
194 | <string>Nothing</string> | ||
195 | </property> | ||
196 | </item> | ||
197 | <item> | ||
198 | <property> | ||
199 | <name>text</name> | ||
200 | <string>Responsible</string> | ||
201 | </property> | ||
202 | </item> | ||
203 | <item> | ||
204 | <property> | ||
205 | <name>text</name> | ||
206 | <string>Done By</string> | ||
207 | </property> | ||
208 | </item> | ||
209 | <item> | ||
210 | <property> | ||
211 | <name>text</name> | ||
212 | <string>Coordinating</string> | ||
213 | </property> | ||
214 | </item> | ||
215 | <property stdset="1"> | ||
216 | <name>name</name> | ||
217 | <cstring>cmbMode</cstring> | ||
218 | </property> | ||
219 | </widget> | ||
220 | </hbox> | ||
221 | </widget> | ||
222 | </grid> | ||
223 | </widget> | ||
224 | </UI> | ||
diff --git a/core/pim/todo/taskeditoradvancedimpl.cpp b/core/pim/todo/taskeditoradvancedimpl.cpp deleted file mode 100644 index 89f672c..0000000 --- a/core/pim/todo/taskeditoradvancedimpl.cpp +++ b/dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | #include <qmultilineedit.h> | ||
2 | #include <qcombobox.h> | ||
3 | #include <qlabel.h> | ||
4 | #include <qlayout.h> | ||
5 | |||
6 | |||
7 | #include <opie/otodo.h> | ||
8 | #include <opie/opimmaintainer.h> | ||
9 | #include <opie/opimstate.h> | ||
10 | |||
11 | #include "taskeditoradvancedimpl.h" | ||
12 | |||
13 | |||
14 | TaskEditorAdvancedImpl::TaskEditorAdvancedImpl( QWidget* parent, const char* name ) | ||
15 | : TaskEditorAdvanced( parent, name ) { | ||
16 | initUI(); | ||
17 | } | ||
18 | TaskEditorAdvancedImpl::~TaskEditorAdvancedImpl() { | ||
19 | } | ||
20 | void TaskEditorAdvancedImpl::load( const OTodo& todo) { | ||
21 | m_edit->setText( todo.description() ); | ||
22 | |||
23 | /* OPimState */ | ||
24 | int state = todo.state().state(); | ||
25 | |||
26 | /* defualt to not started */ | ||
27 | if ( state == OPimState::Undefined ) | ||
28 | state = OPimState::NotStarted; | ||
29 | |||
30 | cmbState->setCurrentItem( state ); | ||
31 | |||
32 | /* Maintainer Mode */ | ||
33 | state = todo.maintainer().mode(); | ||
34 | if ( state == OPimMaintainer::Undefined ) | ||
35 | state = OPimMaintainer::Nothing; | ||
36 | |||
37 | cmbMode->setCurrentItem( state ); | ||
38 | |||
39 | } | ||
40 | void TaskEditorAdvancedImpl::save( OTodo& todo) { | ||
41 | todo.setDescription( m_edit->text() ); | ||
42 | todo.setState( OPimState( cmbState->currentItem() ) ); | ||
43 | |||
44 | /* Fix me resolve name to uid.....*/ | ||
45 | todo.setMaintainer( OPimMaintainer( cmbMode->currentItem(), -10 ) ); | ||
46 | qWarning("save"); | ||
47 | } | ||
48 | /* | ||
49 | * int the damn UI | ||
50 | */ | ||
51 | void TaskEditorAdvancedImpl::initUI() { | ||
52 | /* a MultiLineEdit */ | ||
53 | m_edit = new QMultiLineEdit( this ); | ||
54 | m_edit->setWordWrap( QMultiLineEdit::WidgetWidth ); | ||
55 | |||
56 | /* a Label */ | ||
57 | QLabel* lbl = new QLabel(this ); | ||
58 | lbl->setText( tr("Description") ); | ||
59 | |||
60 | /* add it to the QGridLayout of our base class */ | ||
61 | static_cast<QGridLayout*>(layout() )->addWidget( lbl , 3, 0 ); | ||
62 | static_cast<QGridLayout*>(layout() )->addWidget( m_edit, 4, 0 ); | ||
63 | } | ||
diff --git a/core/pim/todo/taskeditoradvancedimpl.h b/core/pim/todo/taskeditoradvancedimpl.h deleted file mode 100644 index 215d8cb..0000000 --- a/core/pim/todo/taskeditoradvancedimpl.h +++ b/dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #ifndef OPIE_TASK_EDITOR_ADVANCED_IMPL_H | ||
2 | #define OPIE_TASK_EDITOR_ADVANCED_IMPL_H | ||
3 | |||
4 | #include "taskeditoradvanced.h" | ||
5 | |||
6 | /** | ||
7 | * This is the implementation of the Opie Task Editor Advanced tab | ||
8 | * it features the State! | ||
9 | * MaintainerMode | ||
10 | * Description | ||
11 | */ | ||
12 | class QMultiLineEdit; | ||
13 | class OTodo; | ||
14 | class TaskEditorAdvancedImpl : public TaskEditorAdvanced { | ||
15 | Q_OBJECT | ||
16 | public: | ||
17 | TaskEditorAdvancedImpl( QWidget* parent = 0, const char* name = 0 ); | ||
18 | ~TaskEditorAdvancedImpl(); | ||
19 | |||
20 | /* | ||
21 | * I could have a struct which returns a QWidget* | ||
22 | * load and save to a OTodo | ||
23 | * and use multiple inheretence with all other widgets | ||
24 | * and then simply iterate over the list of structs | ||
25 | * this way I could easily have plugins for the whole editor.... | ||
26 | * but I do not do it -zecke | ||
27 | */ | ||
28 | void load( const OTodo& ); | ||
29 | void save( OTodo& ); | ||
30 | |||
31 | private: | ||
32 | void initUI(); | ||
33 | QMultiLineEdit* m_edit; | ||
34 | }; | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/core/pim/todo/taskeditoroverview.cpp b/core/pim/todo/taskeditoroverview.cpp index 9aab76a..6906c26 100644 --- a/core/pim/todo/taskeditoroverview.cpp +++ b/core/pim/todo/taskeditoroverview.cpp | |||
@@ -35,18 +35,16 @@ | |||
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | #include <qpe/timestring.h> | 36 | #include <qpe/timestring.h> |
37 | 37 | ||
38 | #include <qcheckbox.h> | 38 | #include <qcheckbox.h> |
39 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
40 | #include <qlabel.h> | 40 | #include <qlabel.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
43 | #include <qtooltip.h> | ||
44 | #include <qvariant.h> | ||
45 | #include <qwhatsthis.h> | 43 | #include <qwhatsthis.h> |
46 | 44 | ||
47 | TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFlags fl ) | 45 | TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFlags fl ) |
48 | : QWidget( parent, name, fl ) | 46 | : QWidget( parent, name, fl ) |
49 | { | 47 | { |
50 | // Load icons | 48 | // Load icons |
51 | // TODO - probably should be done globally somewhere else, | 49 | // TODO - probably should be done globally somewhere else, |
52 | // see also quickeditimpl.cpp/h, tableview.cpp/h | 50 | // see also quickeditimpl.cpp/h, tableview.cpp/h |
@@ -56,17 +54,16 @@ TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFla | |||
56 | namestr.append( QString::number( i ) ); | 54 | namestr.append( QString::number( i ) ); |
57 | m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); | 55 | m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); |
58 | } | 56 | } |
59 | 57 | ||
60 | QDate curDate = QDate::currentDate(); | 58 | QDate curDate = QDate::currentDate(); |
61 | m_start = m_comp = m_due = curDate; | 59 | m_start = m_comp = m_due = curDate; |
62 | QString curDateStr = TimeString::longDateString( curDate ); | 60 | QString curDateStr = TimeString::longDateString( curDate ); |
63 | 61 | ||
64 | // TODO - add QScrollView for contents | ||
65 | QVBoxLayout *vb = new QVBoxLayout( this ); | 62 | QVBoxLayout *vb = new QVBoxLayout( this ); |
66 | 63 | ||
67 | QScrollView *sv = new QScrollView( this ); | 64 | QScrollView *sv = new QScrollView( this ); |
68 | vb->addWidget( sv ); | 65 | vb->addWidget( sv ); |
69 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 66 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
70 | sv->setFrameStyle( QFrame::NoFrame ); | 67 | sv->setFrameStyle( QFrame::NoFrame ); |
71 | 68 | ||
72 | QWidget *container = new QWidget( sv->viewport() ); | 69 | QWidget *container = new QWidget( sv->viewport() ); |
diff --git a/core/pim/todo/todo.pro b/core/pim/todo/todo.pro index 9960c65..697c005 100644 --- a/core/pim/todo/todo.pro +++ b/core/pim/todo/todo.pro | |||
@@ -13,17 +13,17 @@ HEADERS = smalltodo.h \ | |||
13 | textviewshow.h \ | 13 | textviewshow.h \ |
14 | templateeditor.h \ | 14 | templateeditor.h \ |
15 | templatedialog.h \ | 15 | templatedialog.h \ |
16 | templatedialogimpl.h \ | 16 | templatedialogimpl.h \ |
17 | quickedit.h \ | 17 | quickedit.h \ |
18 | quickeditimpl.h \ | 18 | quickeditimpl.h \ |
19 | otaskeditor.h \ | 19 | otaskeditor.h \ |
20 | taskeditoroverview.h \ | 20 | taskeditoroverview.h \ |
21 | taskeditoradvancedimpl.h \ | 21 | taskeditoradvanced.h \ |
22 | taskeditoralarms.h | 22 | taskeditoralarms.h |
23 | 23 | ||
24 | SOURCES= smalltodo.cpp \ | 24 | SOURCES= smalltodo.cpp \ |
25 | todomanager.cpp \ | 25 | todomanager.cpp \ |
26 | mainwindow.cpp \ | 26 | mainwindow.cpp \ |
27 | main.cpp \ | 27 | main.cpp \ |
28 | tableview.cpp \ | 28 | tableview.cpp \ |
29 | todoview.cpp \ | 29 | todoview.cpp \ |
@@ -33,20 +33,19 @@ SOURCES = smalltodo.cpp \ | |||
33 | textviewshow.cpp \ | 33 | textviewshow.cpp \ |
34 | templateeditor.cpp \ | 34 | templateeditor.cpp \ |
35 | templatedialog.cpp \ | 35 | templatedialog.cpp \ |
36 | templatedialogimpl.cpp \ | 36 | templatedialogimpl.cpp \ |
37 | quickeditimpl.cpp \ | 37 | quickeditimpl.cpp \ |
38 | quickedit.cpp \ | 38 | quickedit.cpp \ |
39 | otaskeditor.cpp \ | 39 | otaskeditor.cpp \ |
40 | taskeditoroverview.cpp \ | 40 | taskeditoroverview.cpp \ |
41 | taskeditoradvancedimpl.cpp \ | 41 | taskeditoradvanced.cpp \ |
42 | taskeditoralarms.cpp | 42 | taskeditoralarms.cpp |
43 | 43 | ||
44 | INTERFACES= taskeditoradvanced.ui | ||
45 | TARGET = todolist | 44 | TARGET = todolist |
46 | INCLUDEPATH += $(OPIEDIR)/include | 45 | INCLUDEPATH += $(OPIEDIR)/include |
47 | DEPENDPATH+= $(OPIEDIR)/include | 46 | DEPENDPATH+= $(OPIEDIR)/include |
48 | LIBS += -lqpe -lopie | 47 | LIBS += -lqpe -lopie |
49 | 48 | ||
50 | TRANSLATIONS = ../../../i18n/de/todolist.ts \ | 49 | TRANSLATIONS = ../../../i18n/de/todolist.ts \ |
51 | ../../../i18n/da/todolist.ts \ | 50 | ../../../i18n/da/todolist.ts \ |
52 | ../../../i18n/xx/todolist.ts \ | 51 | ../../../i18n/xx/todolist.ts \ |