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 /core/pim/todo/taskeditoradvancedimpl.cpp | |
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.
Diffstat (limited to 'core/pim/todo/taskeditoradvancedimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/taskeditoradvancedimpl.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
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 | } | ||