summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditordetails.cpp
Unidiff
Diffstat (limited to 'korganizer/koeditordetails.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 802261c..bdfc637 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -79,26 +79,28 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
79 topLayout->setSpacing(spacing); 79 topLayout->setSpacing(spacing);
80 80
81 QString organizer = KOPrefs::instance()->email(); 81 QString organizer = KOPrefs::instance()->email();
82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); 82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
83 83
84 mListView = new KListView(this,"mListView"); 84 mListView = new KListView(this,"mListView");
85 mListView->addColumn(i18n("Name"),180); 85 mListView->addColumn(i18n("Name"),180);
86 mListView->addColumn(i18n("Email"),180); 86 mListView->addColumn(i18n("Email"),180);
87 mListView->addColumn(i18n("Role"),60); 87 mListView->addColumn(i18n("Role"),60);
88 mListView->addColumn(i18n("Status"),100); 88 mListView->addColumn(i18n("Status"),100);
89 mListView->addColumn(i18n("RSVP"),35); 89 mListView->addColumn(i18n("RSVP"),35);
90 if ( QApplication::desktop()->width() <= 320 ) { 90 if ( QApplication::desktop()->width() <= 320 ) {
91 //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) ); 91 int hei = 80;
92 mListView->setFixedHeight(80); 92 if ( QApplication::desktop()->height() <= 240 )
93 hei = 60;
94 mListView->setFixedHeight(hei);
93 } 95 }
94 mListView->setAllColumnsShowFocus (true ); 96 mListView->setAllColumnsShowFocus (true );
95 //mListView->setSingleClick( true ); 97 //mListView->setSingleClick( true );
96 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 98 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
97 SLOT(updateAttendeeInput())); 99 SLOT(updateAttendeeInput()));
98 100
99 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 101 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
100 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 102 SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
101 103
102 mRsvpButton = new QCheckBox(this); 104 mRsvpButton = new QCheckBox(this);
103 mRsvpButton->setText(i18n("Request response")); 105 mRsvpButton->setText(i18n("Request response"));
104 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); 106 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
@@ -138,65 +140,83 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
138 140
139 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); 141 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
140 buttonLayout->addWidget(newButton); 142 buttonLayout->addWidget(newButton);
141 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee())); 143 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
142 144
143 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox); 145 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
144 buttonLayout->addWidget(mRemoveButton); 146 buttonLayout->addWidget(mRemoveButton);
145 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee())); 147 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
146 148
147 // buttonLayout->addWidget(mAddressBookButton); 149 // buttonLayout->addWidget(mAddressBookButton);
148 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); 150 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
149 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); 151 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
150 152 if ( QApplication::desktop()->height() <= 240 ) {
153 mRoleCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
154 mStatusCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
155 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
156 topLayout->addMultiCellWidget(mListView,1,1,0,5);
157 topLayout->addWidget(attendeeLabel,3,0);
158 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
159 topLayout->addWidget(emailLabel,4,0);
160 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
161 topLayout->addWidget(attendeeRoleLabel,5,0);
162 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
163 topLayout->addWidget(statusLabel,5,3);
164 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
165 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,5);
166 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
167 topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
168 topLayout->setRowStretch(1,5);
169 topLayout->setColStretch(0,0);
170 } else {
151 if (qApp->desktop()->width() < 640 ) { 171 if (qApp->desktop()->width() < 640 ) {
152 if ( qApp->desktop()->width() < 300 ) 172 if ( qApp->desktop()->width() < 300 )
153 topLayout->setSpacing(1); 173 topLayout->setSpacing(1);
154 ;//mListView->setFixedHeight(80); 174 ;//mListView->setFixedHeight(80);
155 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); 175 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
156 topLayout->addMultiCellWidget(mListView,1,1,0,3); 176 topLayout->addMultiCellWidget(mListView,1,1,0,3);
157 topLayout->addWidget(attendeeLabel,3,0); 177 topLayout->addWidget(attendeeLabel,3,0);
158 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); 178 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
159 topLayout->addWidget(emailLabel,4,0); 179 topLayout->addWidget(emailLabel,4,0);
160 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); 180 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
161 topLayout->addWidget(attendeeRoleLabel,5,0); 181 topLayout->addWidget(attendeeRoleLabel,5,0);
162 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3); 182 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
163 topLayout->addWidget(statusLabel,6,0); 183 topLayout->addWidget(statusLabel,6,0);
164 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3); 184 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
165 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); 185 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
166 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 186 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
167 topLayout->addMultiCellWidget(buttonBox,3,4,3,3); 187 topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
168 topLayout->setRowStretch(1,2); 188 topLayout->setRowStretch(1,2);
169 topLayout->setColStretch(0,0); 189 topLayout->setColStretch(0,0);
170 topLayout->setColStretch(1,2); 190 topLayout->setColStretch(1,2);
171 topLayout->setColStretch(2,1); 191 topLayout->setColStretch(2,1);
172 topLayout->setColStretch(3,1); 192 topLayout->setColStretch(3,1);
173
174 } else { 193 } else {
175 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5); 194 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
176 topLayout->addMultiCellWidget(mListView,1,1,0,5); 195 topLayout->addMultiCellWidget(mListView,1,1,0,5);
177 topLayout->addWidget(attendeeLabel,3,0); 196 topLayout->addWidget(attendeeLabel,3,0);
178 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4); 197 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
179 topLayout->addWidget(emailLabel,4,0); 198 topLayout->addWidget(emailLabel,4,0);
180 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4); 199 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
181 topLayout->addWidget(attendeeRoleLabel,5,0); 200 topLayout->addWidget(attendeeRoleLabel,5,0);
182 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2); 201 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
183 topLayout->addWidget(statusLabel,5,3); 202 topLayout->addWidget(statusLabel,5,3);
184 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5); 203 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
185 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5); 204 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
186 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 205 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
187 topLayout->addMultiCellWidget(buttonBox,3,4,5,5); 206 topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
188 topLayout->setRowStretch(1,5); 207 topLayout->setRowStretch(1,5);
189 topLayout->setColStretch(0,0); 208 topLayout->setColStretch(0,0);
190 } 209 }
210 }
191// #if 0 211// #if 0
192// topLayout->setColStretch(2,1); 212// topLayout->setColStretch(2,1);
193// topLayout->addWidget(statusLabel,3,3); 213// topLayout->addWidget(statusLabel,3,3);
194// topLayout->addWidget(mStatusCombo,3,4); 214// topLayout->addWidget(mStatusCombo,3,4);
195// #else 215// #else
196// topLayout->addWidget(statusLabel,4,3); 216// topLayout->addWidget(statusLabel,4,3);
197// // topLayout->addWidget(mStatusCombo,4,3); 217// // topLayout->addWidget(mStatusCombo,4,3);
198// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5); 218// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
199 219
200// #endif 220// #endif
201// // topLayout->setRowStretch(5,1); 221// // topLayout->setRowStretch(5,1);
202// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1); 222// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);