summaryrefslogtreecommitdiff
authorzecke <zecke>2003-01-23 08:01:39 (UTC)
committer zecke <zecke>2003-01-23 08:01:39 (UTC)
commit197b10539409b5650170879b904b9f781294866e (patch) (unidiff)
tree5800e0a557386527737f561dd78a6e8d156f9c3d
parent7c63d26d6c1a4e13a957ab79e58931c551e91eb8 (diff)
downloadopie-197b10539409b5650170879b904b9f781294866e.zip
opie-197b10539409b5650170879b904b9f781294866e.tar.gz
opie-197b10539409b5650170879b904b9f781294866e.tar.bz2
take the right parent for the MultiLineEdit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/taskeditoroverview.cpp6
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
@@ -52,33 +52,33 @@ TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFla
52 for ( unsigned int i = 1; i < 6; i++ ) { 52 for ( unsigned int i = 1; i < 6; i++ ) {
53 namestr = "todo/priority"; 53 namestr = "todo/priority";
54 namestr.append( QString::number( i ) ); 54 namestr.append( QString::number( i ) );
55 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); 55 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr );
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 " ) );
81 cmbDesc->insertItem( tr( "Create " ) ); 81 cmbDesc->insertItem( tr( "Create " ) );
82 cmbDesc->insertItem( tr( "Plan " ) ); 82 cmbDesc->insertItem( tr( "Plan " ) );
83 cmbDesc->insertItem( tr( "Call " ) ); 83 cmbDesc->insertItem( tr( "Call " ) );
84 cmbDesc->insertItem( tr( "Mail " ) ); 84 cmbDesc->insertItem( tr( "Mail " ) );
@@ -106,33 +106,33 @@ TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFla
106 layout->addWidget( label, 3, 0 ); 106 layout->addWidget( label, 3, 0 );
107 QWhatsThis::add( label, tr( "Select category to organize this task with." ) ); 107 QWhatsThis::add( label, tr( "Select category to organize this task with." ) );
108 cmbCategory = new CategorySelect( container ); 108 cmbCategory = new CategorySelect( container );
109 layout->addWidget( cmbCategory, 3, 1 ); 109 layout->addWidget( cmbCategory, 3, 1 );
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
128TaskEditorOverView::~TaskEditorOverView() 128TaskEditorOverView::~TaskEditorOverView()
129{ 129{
130} 130}
131 131
132void TaskEditorOverView::load( const OTodo& todo ) 132void TaskEditorOverView::load( const OTodo& todo )
133{ 133{
134 // Description 134 // Description
135 cmbDesc->insertItem( todo.summary(), 0 ); 135 cmbDesc->insertItem( todo.summary(), 0 );
136 cmbDesc->setCurrentItem( 0 ); 136 cmbDesc->setCurrentItem( 0 );
137 137
138 // Priority 138 // Priority
@@ -152,26 +152,26 @@ void TaskEditorOverView::load( const OTodo& todo )
152 152
153void TaskEditorOverView::save( OTodo &todo ) 153void TaskEditorOverView::save( OTodo &todo )
154{ 154{
155 // Description 155 // Description
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
174void TaskEditorOverView::slotRecClicked() 174void TaskEditorOverView::slotRecClicked()
175{ 175{
176 emit recurranceEnabled( ckbRecurrence->isChecked() ); 176 emit recurranceEnabled( ckbRecurrence->isChecked() );
177} 177}