summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-25 22:44:21 (UTC)
committer zecke <zecke>2002-10-25 22:44:21 (UTC)
commite8ec7351bc460984a3202804e23c351b0d5606bd (patch) (unidiff)
tree0cff4116b01fbda32f317620393b9d1fb8a9528d
parentb682e9d2276c10a5c26773c6797ba1ac176ea4cf (diff)
downloadopie-e8ec7351bc460984a3202804e23c351b0d5606bd.zip
opie-e8ec7351bc460984a3202804e23c351b0d5606bd.tar.gz
opie-e8ec7351bc460984a3202804e23c351b0d5606bd.tar.bz2
widget width
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/otaskeditor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
index 1a68eb5..8b261de 100644
--- a/core/pim/todo/otaskeditor.cpp
+++ b/core/pim/todo/otaskeditor.cpp
@@ -1,90 +1,91 @@
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 "taskeditoroverviewimpl.h" 8#include "taskeditoroverviewimpl.h"
9#include "taskeditoradvanced.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
14OTaskEditor::OTaskEditor(int cur) 14OTaskEditor::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}
19OTaskEditor::OTaskEditor( const OTodo& to) 19OTaskEditor::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}
24OTaskEditor::~OTaskEditor() { 24OTaskEditor::~OTaskEditor() {
25 25
26} 26}
27void OTaskEditor::init( int cur ) { 27void 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}
34void OTaskEditor::init( const OTodo& to ) { 34void OTaskEditor::init( const OTodo& to ) {
35 load( to ); 35 load( to );
36 m_uid = to.uid(); 36 m_uid = to.uid();
37} 37}
38OTodo OTaskEditor::todo()const{ 38OTodo 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 to.setDescription( m_line->text() ); 43 to.setDescription( m_line->text() );
44 44
45 return to; 45 return to;
46} 46}
47void OTaskEditor::load(const OTodo& to) { 47void OTaskEditor::load(const OTodo& to) {
48 m_overView->load( to ); 48 m_overView->load( to );
49 m_line->setText( to.description() ); 49 m_line->setText( to.description() );
50} 50}
51void OTaskEditor::init() { 51void OTaskEditor::init() {
52 QVBoxLayout* lay = new QVBoxLayout(this); 52 QVBoxLayout* lay = new QVBoxLayout(this);
53 setCaption("Task Editor"); 53 setCaption("Task Editor");
54 m_tab = new OTabWidget(this); 54 m_tab = new OTabWidget(this);
55 55
56 /* 56 /*
57 * Add the Widgets 57 * Add the Widgets
58 */ 58 */
59 m_overView = new TaskEditorOverViewImpl(m_tab ); 59 m_overView = new TaskEditorOverViewImpl(m_tab );
60 m_tab->addTab( m_overView, QString::null, tr("Overview") ); 60 m_tab->addTab( m_overView, QString::null, tr("Overview") );
61 61
62 m_adv = new TaskEditorAdvanced( m_tab ); 62 m_adv = new TaskEditorAdvanced( m_tab );
63 m_line = new QMultiLineEdit(m_adv ); 63 m_line = new QMultiLineEdit(m_adv );
64 m_line->setWordWrap( QMultiLineEdit::WidgetWidth );
64 QLabel* label = new QLabel(m_adv ); 65 QLabel* label = new QLabel(m_adv );
65 label->setText( tr("Description") ); 66 label->setText( tr("Description") );
66 ((QGridLayout*) m_adv->layout() )->addWidget( label,3, 0 ); 67 ((QGridLayout*) m_adv->layout() )->addWidget( label,3, 0 );
67 ((QGridLayout*) m_adv->layout())->addWidget( m_line,4,0 ); 68 ((QGridLayout*) m_adv->layout())->addWidget( m_line,4,0 );
68 m_tab->addTab( m_adv, QString::null, tr("Advanced") ); 69 m_tab->addTab( m_adv, QString::null, tr("Advanced") );
69 70
70 m_alarm = new TaskEditorAlarms( m_tab ); 71 m_alarm = new TaskEditorAlarms( m_tab );
71 m_tab->addTab( m_alarm, QString::null, tr("Alarms") ); 72 m_tab->addTab( m_alarm, QString::null, tr("Alarms") );
72 73
73 m_remind = new TaskEditorAlarms( m_tab ); 74 m_remind = new TaskEditorAlarms( m_tab );
74 m_tab->addTab( m_remind, QString::null, tr("Reminders") ); 75 m_tab->addTab( m_remind, QString::null, tr("Reminders") );
75 76
76 QLabel* lbl = new QLabel(m_tab ); 77 QLabel* lbl = new QLabel(m_tab );
77 lbl->setText( tr("X-Ref") ); 78 lbl->setText( tr("X-Ref") );
78 m_tab->addTab( lbl, QString::null, tr("X-Ref") ); 79 m_tab->addTab( lbl, QString::null, tr("X-Ref") );
79 80
80 m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); 81 m_rec = new ORecurranceWidget( true, QDate::currentDate(), this );
81 m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); 82 m_tab->addTab( m_rec, QString::null, tr("Recurrance") );
82 83
83 lay->addWidget(m_tab ); 84 lay->addWidget(m_tab );
84 85
85 /* signal and slots */ 86 /* signal and slots */
86 connect(m_overView, SIGNAL(recurranceEnabled(bool) ), 87 connect(m_overView, SIGNAL(recurranceEnabled(bool) ),
87 m_rec, SLOT(setEnabled(bool) ) ); 88 m_rec, SLOT(setEnabled(bool) ) );
88 89
89 m_tab->setCurrentTab( m_overView ); 90 m_tab->setCurrentTab( m_overView );
90} 91}