author | drw <drw> | 2002-12-27 15:13:20 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-27 15:13:20 (UTC) |
commit | e6aaae74f39e3aed4dc3c186c56f92cef8c7da09 (patch) (unidiff) | |
tree | ce7245011b8613521759f44a03f692b1cfa69719 | |
parent | c1dcf67a3c213aa062107c5c3de8413b66ac4b29 (diff) | |
download | opie-e6aaae74f39e3aed4dc3c186c56f92cef8c7da09.zip opie-e6aaae74f39e3aed4dc3c186c56f92cef8c7da09.tar.gz opie-e6aaae74f39e3aed4dc3c186c56f92cef8c7da09.tar.bz2 |
Clean-up of advanced tab in edit task dialog. Next is QWhatsThis for everything.
-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,93 +1,93 @@ | |||
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 ); |
18 | } | 18 | } |
19 | OTaskEditor::OTaskEditor( const OTodo& to) | 19 | OTaskEditor::OTaskEditor( const OTodo& to) |
20 | : QDialog(0, 0, TRUE ) { | 20 | : QDialog(0, 0, TRUE ) { |
21 | init(); | 21 | init(); |
22 | init( to ); | 22 | init( to ); |
23 | } | 23 | } |
24 | OTaskEditor::~OTaskEditor() { | 24 | OTaskEditor::~OTaskEditor() { |
25 | 25 | ||
26 | } | 26 | } |
27 | void OTaskEditor::init( int cur ) { | 27 | void OTaskEditor::init( int cur ) { |
28 | OTodo to; | 28 | OTodo to; |
29 | if ( cur != 0 ) | 29 | if ( cur != 0 ) |
30 | to.setCategories( cur ); | 30 | to.setCategories( cur ); |
31 | load(to); | 31 | load(to); |
32 | m_uid = 1; // generate a new one | 32 | m_uid = 1; // generate a new one |
33 | } | 33 | } |
34 | void OTaskEditor::init( const OTodo& to ) { | 34 | 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 | ||
75 | QLabel* lbl = new QLabel( m_tab ); | 75 | QLabel* lbl = new QLabel( m_tab ); |
76 | lbl->setText( tr("X-Ref") ); | 76 | lbl->setText( tr("X-Ref") ); |
77 | m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); | 77 | m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); |
78 | 78 | ||
79 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); | 79 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); |
80 | m_tab->addTab( m_rec, "repeat", tr("Recurrance") ); | 80 | m_tab->addTab( m_rec, "repeat", tr("Recurrance") ); |
81 | 81 | ||
82 | 82 | ||
83 | /* signal and slots */ | 83 | /* signal and slots */ |
84 | connect(m_overView, SIGNAL(recurranceEnabled(bool) ), | 84 | connect(m_overView, SIGNAL(recurranceEnabled(bool) ), |
85 | m_rec, SLOT(setEnabled(bool) ) ); | 85 | m_rec, SLOT(setEnabled(bool) ) ); |
86 | 86 | ||
87 | /* connect due date changed to the recurrence tab */ | 87 | /* connect due date changed to the recurrence tab */ |
88 | connect(m_overView, SIGNAL(dueDateChanged(const QDate&) ), | 88 | connect(m_overView, SIGNAL(dueDateChanged(const QDate&) ), |
89 | m_rec, SLOT(setStartDate(const QDate& ) ) ); | 89 | m_rec, SLOT(setStartDate(const QDate& ) ) ); |
90 | 90 | ||
91 | 91 | ||
92 | m_tab->setCurrentTab( m_overView ); | 92 | m_tab->setCurrentTab( m_overView ); |
93 | } | 93 | } |
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 | |||
@@ -1,44 +1,44 @@ | |||
1 | #ifndef OPIE_TASK_EDITOR_H | 1 | #ifndef OPIE_TASK_EDITOR_H |
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); |
19 | OTaskEditor( const OTodo& todo ); | 19 | OTaskEditor( const OTodo& todo ); |
20 | ~OTaskEditor(); | 20 | ~OTaskEditor(); |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * same as the c'tor but this gives us the | 23 | * same as the c'tor but this gives us the |
24 | * power to 'preload' the dialog | 24 | * power to 'preload' the dialog |
25 | */ | 25 | */ |
26 | void init( int cur ); | 26 | void init( int cur ); |
27 | void init( const OTodo& todo ); | 27 | void init( const OTodo& todo ); |
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 | |||
@@ -1,160 +1,157 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 <> | 3 | .=l. Copyright (c) 2002 <> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This program is free software; you can | 5 | _;:, .> :=|. This program is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | .i_,=:_. -<s. This program is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
17 | ..}^=.= = ; Library General Public License for more | 17 | ..}^=.= = ; Library General Public License for more |
18 | ++= -. .` .: details. | 18 | ++= -. .` .: details. |
19 | : = ...= . :.=- | 19 | : = ...= . :.=- |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | -. .:....=;==+<; You should have received a copy of the GNU |
21 | -_. . . )=. = General Public License along with | 21 | -_. . . )=. = General Public License along with |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | If not, write to the Free Software Foundation, | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "taskeditoroverview.h" | 29 | #include "taskeditoroverview.h" |
30 | 30 | ||
31 | #include <opie/orecur.h> | 31 | #include <opie/orecur.h> |
32 | 32 | ||
33 | #include <qpe/categoryselect.h> | 33 | #include <qpe/categoryselect.h> |
34 | #include <qpe/datebookmonth.h> | 34 | #include <qpe/datebookmonth.h> |
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 |
53 | QString namestr; | 51 | QString namestr; |
54 | for ( unsigned int i = 1; i < 6; i++ ) { | 52 | for ( unsigned int i = 1; i < 6; i++ ) { |
55 | namestr = "todo/priority"; | 53 | namestr = "todo/priority"; |
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() ); |
73 | sv->addChild( container ); | 70 | sv->addChild( container ); |
74 | 71 | ||
75 | QGridLayout *layout = new QGridLayout( container, 10, 2, 4, 4 ); | 72 | QGridLayout *layout = new QGridLayout( container, 10, 2, 4, 4 ); |
76 | 73 | ||
77 | // Summary | 74 | // Summary |
78 | QLabel *label = new QLabel( tr( "Summary:" ), container ); | 75 | QLabel *label = new QLabel( tr( "Summary:" ), container ); |
79 | layout->addWidget( label, 0, 0 ); | 76 | layout->addWidget( label, 0, 0 ); |
80 | cmbSum = new QComboBox( TRUE, container ); | 77 | cmbSum = new QComboBox( TRUE, container ); |
81 | cmbSum->insertItem( tr( "Complete " ) ); | 78 | cmbSum->insertItem( tr( "Complete " ) ); |
82 | cmbSum->insertItem( tr( "Work on " ) ); | 79 | cmbSum->insertItem( tr( "Work on " ) ); |
83 | cmbSum->insertItem( tr( "Buy " ) ); | 80 | cmbSum->insertItem( tr( "Buy " ) ); |
84 | cmbSum->insertItem( tr( "Organize " ) ); | 81 | cmbSum->insertItem( tr( "Organize " ) ); |
85 | cmbSum->insertItem( tr( "Get " ) ); | 82 | cmbSum->insertItem( tr( "Get " ) ); |
86 | cmbSum->insertItem( tr( "Update " ) ); | 83 | cmbSum->insertItem( tr( "Update " ) ); |
87 | cmbSum->insertItem( tr( "Create " ) ); | 84 | cmbSum->insertItem( tr( "Create " ) ); |
88 | cmbSum->insertItem( tr( "Plan " ) ); | 85 | cmbSum->insertItem( tr( "Plan " ) ); |
89 | cmbSum->insertItem( tr( "Call " ) ); | 86 | cmbSum->insertItem( tr( "Call " ) ); |
90 | cmbSum->insertItem( tr( "Mail " ) ); | 87 | cmbSum->insertItem( tr( "Mail " ) ); |
91 | cmbSum->clearEdit(); | 88 | cmbSum->clearEdit(); |
92 | layout->addMultiCellWidget( cmbSum, 1, 1, 0, 1 ); | 89 | layout->addMultiCellWidget( cmbSum, 1, 1, 0, 1 ); |
93 | 90 | ||
94 | // Priority | 91 | // Priority |
95 | label = new QLabel( tr( "Priority:" ), container ); | 92 | label = new QLabel( tr( "Priority:" ), container ); |
96 | layout->addWidget( label, 2, 0 ); | 93 | layout->addWidget( label, 2, 0 ); |
97 | cmbPrio = new QComboBox( FALSE, container ); | 94 | cmbPrio = new QComboBox( FALSE, container ); |
98 | cmbPrio->setMinimumHeight( 26 ); | 95 | cmbPrio->setMinimumHeight( 26 ); |
99 | cmbPrio->insertItem( m_pic_priority[ 0 ], tr( "Very High" ) ); | 96 | cmbPrio->insertItem( m_pic_priority[ 0 ], tr( "Very High" ) ); |
100 | cmbPrio->insertItem( m_pic_priority[ 1 ], tr( "High" ) ); | 97 | cmbPrio->insertItem( m_pic_priority[ 1 ], tr( "High" ) ); |
101 | cmbPrio->insertItem( m_pic_priority[ 2 ], tr( "Normal" ) ); | 98 | cmbPrio->insertItem( m_pic_priority[ 2 ], tr( "Normal" ) ); |
102 | cmbPrio->insertItem( m_pic_priority[ 3 ], tr( "Low" ) ); | 99 | cmbPrio->insertItem( m_pic_priority[ 3 ], tr( "Low" ) ); |
103 | cmbPrio->insertItem( m_pic_priority[ 4 ], tr( "Very Low" ) ); | 100 | cmbPrio->insertItem( m_pic_priority[ 4 ], tr( "Very Low" ) ); |
104 | cmbPrio->setCurrentItem( 2 ); | 101 | cmbPrio->setCurrentItem( 2 ); |
105 | layout->addWidget( cmbPrio, 2, 1 ); | 102 | layout->addWidget( cmbPrio, 2, 1 ); |
106 | 103 | ||
107 | // Category | 104 | // Category |
108 | label = new QLabel( tr( "Category:" ), container ); | 105 | label = new QLabel( tr( "Category:" ), container ); |
109 | layout->addWidget( label, 3, 0 ); | 106 | layout->addWidget( label, 3, 0 ); |
110 | comboCategory = new CategorySelect( container ); | 107 | comboCategory = new CategorySelect( container ); |
111 | layout->addWidget( comboCategory, 3, 1 ); | 108 | layout->addWidget( comboCategory, 3, 1 ); |
112 | 109 | ||
113 | // Recurrance | 110 | // Recurrance |
114 | CheckBox7 = new QCheckBox( tr( "Recurring task" ), container ); | 111 | CheckBox7 = new QCheckBox( tr( "Recurring task" ), container ); |
115 | layout->addMultiCellWidget( CheckBox7, 4, 4, 0, 1 ); | 112 | layout->addMultiCellWidget( CheckBox7, 4, 4, 0, 1 ); |
116 | connect( CheckBox7, SIGNAL(clicked() ), this, SLOT( slotRecClicked() ) ); | 113 | connect( CheckBox7, SIGNAL(clicked() ), this, SLOT( slotRecClicked() ) ); |
117 | 114 | ||
118 | QSpacerItem *spacer = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ); | 115 | QSpacerItem *spacer = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ); |
119 | layout->addItem( spacer, 5, 0 ); | 116 | layout->addItem( spacer, 5, 0 ); |
120 | 117 | ||
121 | // Start date | 118 | // Start date |
122 | ckbStart = new QCheckBox( tr( "Start Date:" ), container ); | 119 | ckbStart = new QCheckBox( tr( "Start Date:" ), container ); |
123 | layout->addWidget( ckbStart, 6, 0 ); | 120 | layout->addWidget( ckbStart, 6, 0 ); |
124 | connect( ckbStart, SIGNAL( clicked() ), this, SLOT( slotStartChecked() ) ); | 121 | connect( ckbStart, SIGNAL( clicked() ), this, SLOT( slotStartChecked() ) ); |
125 | btnStart = new QPushButton( curDateStr, container ); | 122 | btnStart = new QPushButton( curDateStr, container ); |
126 | btnStart->setEnabled( FALSE ); | 123 | btnStart->setEnabled( FALSE ); |
127 | layout->addWidget( btnStart, 6, 1 ); | 124 | layout->addWidget( btnStart, 6, 1 ); |
128 | 125 | ||
129 | QPopupMenu *popup = new QPopupMenu( this ); | 126 | QPopupMenu *popup = new QPopupMenu( this ); |
130 | m_startBook = new DateBookMonth( popup, 0, TRUE ); | 127 | m_startBook = new DateBookMonth( popup, 0, TRUE ); |
131 | popup->insertItem( m_startBook ); | 128 | popup->insertItem( m_startBook ); |
132 | btnStart->setPopup( popup ); | 129 | btnStart->setPopup( popup ); |
133 | connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ), | 130 | connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ), |
134 | this, SLOT( slotStartChanged( int, int, int ) ) ); | 131 | this, SLOT( slotStartChanged( int, int, int ) ) ); |
135 | 132 | ||
136 | // Due date | 133 | // Due date |
137 | ckbDue = new QCheckBox( tr( "Due Date:" ), container ); | 134 | ckbDue = new QCheckBox( tr( "Due Date:" ), container ); |
138 | layout->addWidget( ckbDue, 7, 0 ); | 135 | layout->addWidget( ckbDue, 7, 0 ); |
139 | connect( ckbDue, SIGNAL( clicked() ), this, SLOT( slotDueChecked() ) ); | 136 | connect( ckbDue, SIGNAL( clicked() ), this, SLOT( slotDueChecked() ) ); |
140 | btnDue = new QPushButton( curDateStr, container ); | 137 | btnDue = new QPushButton( curDateStr, container ); |
141 | btnDue->setEnabled( FALSE ); | 138 | btnDue->setEnabled( FALSE ); |
142 | layout->addWidget( btnDue, 7, 1 ); | 139 | layout->addWidget( btnDue, 7, 1 ); |
143 | 140 | ||
144 | popup = new QPopupMenu( this ); | 141 | popup = new QPopupMenu( this ); |
145 | m_dueBook = new DateBookMonth( popup, 0, TRUE ); | 142 | m_dueBook = new DateBookMonth( popup, 0, TRUE ); |
146 | popup->insertItem( m_dueBook ); | 143 | popup->insertItem( m_dueBook ); |
147 | btnDue->setPopup( popup ); | 144 | btnDue->setPopup( popup ); |
148 | connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ), | 145 | connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ), |
149 | this, SLOT( slotDueChanged( int, int, int ) ) ); | 146 | this, SLOT( slotDueChanged( int, int, int ) ) ); |
150 | 147 | ||
151 | // Progress | 148 | // Progress |
152 | label = new QLabel( tr( "Progress:" ), container ); | 149 | label = new QLabel( tr( "Progress:" ), container ); |
153 | layout->addWidget( label, 8, 0 ); | 150 | layout->addWidget( label, 8, 0 ); |
154 | cmbProgress = new QComboBox( FALSE, container ); | 151 | cmbProgress = new QComboBox( FALSE, container ); |
155 | cmbProgress->insertItem( tr( "0 %" ) ); | 152 | cmbProgress->insertItem( tr( "0 %" ) ); |
156 | cmbProgress->insertItem( tr( "20 %" ) ); | 153 | cmbProgress->insertItem( tr( "20 %" ) ); |
157 | cmbProgress->insertItem( tr( "40 %" ) ); | 154 | cmbProgress->insertItem( tr( "40 %" ) ); |
158 | cmbProgress->insertItem( tr( "60 %" ) ); | 155 | cmbProgress->insertItem( tr( "60 %" ) ); |
159 | cmbProgress->insertItem( tr( "80 %" ) ); | 156 | cmbProgress->insertItem( tr( "80 %" ) ); |
160 | cmbProgress->insertItem( tr( "100 %" ) ); | 157 | cmbProgress->insertItem( tr( "100 %" ) ); |
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 | |||
@@ -1,65 +1,64 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | 4 | ||
5 | HEADERS= smalltodo.h \ | 5 | HEADERS= smalltodo.h \ |
6 | todomanager.h \ | 6 | todomanager.h \ |
7 | mainwindow.h \ | 7 | mainwindow.h \ |
8 | todoview.h \ | 8 | todoview.h \ |
9 | tableview.h \ | 9 | tableview.h \ |
10 | todotemplatemanager.h \ | 10 | todotemplatemanager.h \ |
11 | todoeditor.h \ | 11 | todoeditor.h \ |
12 | todoshow.h \ | 12 | todoshow.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 \ |
30 | todotemplatemanager.cpp \ | 30 | todotemplatemanager.cpp \ |
31 | todoeditor.cpp \ | 31 | todoeditor.cpp \ |
32 | todoshow.cpp \ | 32 | todoshow.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 \ |
53 | ../../../i18n/en/todolist.ts \ | 52 | ../../../i18n/en/todolist.ts \ |
54 | ../../../i18n/es/todolist.ts \ | 53 | ../../../i18n/es/todolist.ts \ |
55 | ../../../i18n/fr/todolist.ts \ | 54 | ../../../i18n/fr/todolist.ts \ |
56 | ../../../i18n/hu/todolist.ts \ | 55 | ../../../i18n/hu/todolist.ts \ |
57 | ../../../i18n/ja/todolist.ts \ | 56 | ../../../i18n/ja/todolist.ts \ |
58 | ../../../i18n/ko/todolist.ts \ | 57 | ../../../i18n/ko/todolist.ts \ |
59 | ../../../i18n/no/todolist.ts \ | 58 | ../../../i18n/no/todolist.ts \ |
60 | ../../../i18n/pl/todolist.ts \ | 59 | ../../../i18n/pl/todolist.ts \ |
61 | ../../../i18n/pt/todolist.ts \ | 60 | ../../../i18n/pt/todolist.ts \ |
62 | ../../../i18n/pt_BR/todolist.ts \ | 61 | ../../../i18n/pt_BR/todolist.ts \ |
63 | ../../../i18n/sl/todolist.ts \ | 62 | ../../../i18n/sl/todolist.ts \ |
64 | ../../../i18n/zh_CN/todolist.ts \ | 63 | ../../../i18n/zh_CN/todolist.ts \ |
65 | ../../../i18n/zh_TW/todolist.ts | 64 | ../../../i18n/zh_TW/todolist.ts |