author | zecke <zecke> | 2003-01-23 08:01:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-01-23 08:01:39 (UTC) |
commit | 197b10539409b5650170879b904b9f781294866e (patch) (unidiff) | |
tree | 5800e0a557386527737f561dd78a6e8d156f9c3d | |
parent | 7c63d26d6c1a4e13a957ab79e58931c551e91eb8 (diff) | |
download | opie-197b10539409b5650170879b904b9f781294866e.zip opie-197b10539409b5650170879b904b9f781294866e.tar.gz opie-197b10539409b5650170879b904b9f781294866e.tar.bz2 |
take the right parent for the MultiLineEdit
-rw-r--r-- | core/pim/todo/taskeditoroverview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/todo/taskeditoroverview.cpp b/core/pim/todo/taskeditoroverview.cpp index 89e553f..5e2b026 100644 --- a/core/pim/todo/taskeditoroverview.cpp +++ b/core/pim/todo/taskeditoroverview.cpp | |||
@@ -56,25 +56,25 @@ TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFla | |||
56 | } | 56 | } |
57 | 57 | ||
58 | QVBoxLayout *vb = new QVBoxLayout( this ); | 58 | QVBoxLayout *vb = new QVBoxLayout( this ); |
59 | 59 | ||
60 | QScrollView *sv = new QScrollView( this ); | 60 | QScrollView *sv = new QScrollView( this ); |
61 | vb->addWidget( sv ); | 61 | vb->addWidget( sv ); |
62 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 62 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
63 | sv->setFrameStyle( QFrame::NoFrame ); | 63 | sv->setFrameStyle( QFrame::NoFrame ); |
64 | 64 | ||
65 | QWidget *container = new QWidget( sv->viewport() ); | 65 | QWidget *container = new QWidget( sv->viewport() ); |
66 | sv->addChild( container ); | 66 | sv->addChild( container ); |
67 | 67 | ||
68 | QGridLayout *layout = new QGridLayout( container, 7, 2, 4, 4 ); | 68 | QGridLayout *layout = new QGridLayout( container, 7, 2, 4, 4 ); |
69 | 69 | ||
70 | // Description | 70 | // Description |
71 | QLabel *label = new QLabel( tr( "Description:" ), container ); | 71 | QLabel *label = new QLabel( tr( "Description:" ), container ); |
72 | layout->addWidget( label, 0, 0 ); | 72 | layout->addWidget( label, 0, 0 ); |
73 | QWhatsThis::add( label, tr( "Enter brief description of the task here." ) ); | 73 | QWhatsThis::add( label, tr( "Enter brief description of the task here." ) ); |
74 | cmbDesc = new QComboBox( TRUE, container ); | 74 | cmbDesc = new QComboBox( TRUE, container ); |
75 | cmbDesc->insertItem( tr( "Complete " ) ); | 75 | cmbDesc->insertItem( tr( "Complete " ) ); |
76 | cmbDesc->insertItem( tr( "Work on " ) ); | 76 | cmbDesc->insertItem( tr( "Work on " ) ); |
77 | cmbDesc->insertItem( tr( "Buy " ) ); | 77 | cmbDesc->insertItem( tr( "Buy " ) ); |
78 | cmbDesc->insertItem( tr( "Organize " ) ); | 78 | cmbDesc->insertItem( tr( "Organize " ) ); |
79 | cmbDesc->insertItem( tr( "Get " ) ); | 79 | cmbDesc->insertItem( tr( "Get " ) ); |
80 | cmbDesc->insertItem( tr( "Update " ) ); | 80 | cmbDesc->insertItem( tr( "Update " ) ); |
@@ -110,25 +110,25 @@ TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFla | |||
110 | QWhatsThis::add( cmbCategory, tr( "Select category to organize this task with." ) ); | 110 | QWhatsThis::add( cmbCategory, tr( "Select category to organize this task with." ) ); |
111 | 111 | ||
112 | // Recurrence | 112 | // Recurrence |
113 | ckbRecurrence = new QCheckBox( tr( "Recurring task" ), container ); | 113 | ckbRecurrence = new QCheckBox( tr( "Recurring task" ), container ); |
114 | layout->addMultiCellWidget( ckbRecurrence, 4, 4, 0, 1 ); | 114 | layout->addMultiCellWidget( ckbRecurrence, 4, 4, 0, 1 ); |
115 | QWhatsThis::add( ckbRecurrence, tr( "Click here if task happens on a regular basis. If selected, frequency can be set on the Recurrence tab." ) ); | 115 | QWhatsThis::add( ckbRecurrence, tr( "Click here if task happens on a regular basis. If selected, frequency can be set on the Recurrence tab." ) ); |
116 | connect( ckbRecurrence, SIGNAL(clicked() ), this, SLOT( slotRecClicked() ) ); | 116 | connect( ckbRecurrence, SIGNAL(clicked() ), this, SLOT( slotRecClicked() ) ); |
117 | 117 | ||
118 | // Notes | 118 | // Notes |
119 | label = new QLabel( tr( "Notes:" ), container ); | 119 | label = new QLabel( tr( "Notes:" ), container ); |
120 | layout->addWidget( label, 5, 0 ); | 120 | layout->addWidget( label, 5, 0 ); |
121 | QWhatsThis::add( label, tr( "Enter any additional information about this task here." ) ); | 121 | QWhatsThis::add( label, tr( "Enter any additional information about this task here." ) ); |
122 | mleNotes = new QMultiLineEdit( this ); | 122 | mleNotes = new QMultiLineEdit( container ); |
123 | mleNotes->setWordWrap( QMultiLineEdit::WidgetWidth ); | 123 | mleNotes->setWordWrap( QMultiLineEdit::WidgetWidth ); |
124 | layout->addMultiCellWidget( mleNotes, 6, 6, 0, 1 ); | 124 | layout->addMultiCellWidget( mleNotes, 6, 6, 0, 1 ); |
125 | QWhatsThis::add( mleNotes, tr( "Enter any additional information about this task here." ) ); | 125 | QWhatsThis::add( mleNotes, tr( "Enter any additional information about this task here." ) ); |
126 | } | 126 | } |
127 | 127 | ||
128 | TaskEditorOverView::~TaskEditorOverView() | 128 | TaskEditorOverView::~TaskEditorOverView() |
129 | { | 129 | { |
130 | } | 130 | } |
131 | 131 | ||
132 | void TaskEditorOverView::load( const OTodo& todo ) | 132 | void TaskEditorOverView::load( const OTodo& todo ) |
133 | { | 133 | { |
134 | // Description | 134 | // Description |
@@ -156,22 +156,22 @@ void TaskEditorOverView::save( OTodo &todo ) | |||
156 | todo.setSummary( cmbDesc->currentText() ); | 156 | todo.setSummary( cmbDesc->currentText() ); |
157 | 157 | ||
158 | // Priority | 158 | // Priority |
159 | todo.setPriority( cmbPriority->currentItem() + 1 ); | 159 | todo.setPriority( cmbPriority->currentItem() + 1 ); |
160 | 160 | ||
161 | // Category | 161 | // Category |
162 | if ( cmbCategory->currentCategory() != -1 ) | 162 | if ( cmbCategory->currentCategory() != -1 ) |
163 | { | 163 | { |
164 | QArray<int> arr = cmbCategory->currentCategories(); | 164 | QArray<int> arr = cmbCategory->currentCategories(); |
165 | todo.setCategories( arr ); | 165 | todo.setCategories( arr ); |
166 | } | 166 | } |
167 | 167 | ||
168 | // Recurrence - don't need to save here... | 168 | // Recurrence - don't need to save here... |
169 | 169 | ||
170 | // Notes | 170 | // Notes |
171 | todo.setDescription( mleNotes->text() ); | 171 | todo.setDescription( mleNotes->text() ); |
172 | } | 172 | } |
173 | 173 | ||
174 | void TaskEditorOverView::slotRecClicked() | 174 | void TaskEditorOverView::slotRecClicked() |
175 | { | 175 | { |
176 | emit recurranceEnabled( ckbRecurrence->isChecked() ); | 176 | emit recurranceEnabled( ckbRecurrence->isChecked() ); |
177 | } | 177 | } |