summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-30 07:32:03 (UTC)
committer zautrix <zautrix>2005-04-30 07:32:03 (UTC)
commit7c31102a00920834ab8e3778f0f459b96b2fb309 (patch) (unidiff)
tree9f238caaaab4ba150e4f14708d85162af0ea5092 /korganizer
parentbdaded2da25b0ccef80d6e638fa12f92a4f8744d (diff)
downloadkdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.zip
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.gz
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp28
-rw-r--r--korganizer/koeditorgeneral.cpp10
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/kotodoeditor.cpp2
-rw-r--r--korganizer/searchdialog.cpp4
5 files changed, 42 insertions, 6 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 802261c..bdfc637 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -67,50 +67,52 @@ void CustomListViewItem<class Attendee *>::updateItem()
67 setText(3,mData->statusStr()); 67 setText(3,mData->statusStr());
68 if (mData->RSVP() && !mData->email().isEmpty()) 68 if (mData->RSVP() && !mData->email().isEmpty())
69 setPixmap(4,SmallIcon("mailappt")); 69 setPixmap(4,SmallIcon("mailappt"));
70 else 70 else
71 setPixmap(4,SmallIcon("nomailappt")); 71 setPixmap(4,SmallIcon("nomailappt"));
72} 72}
73 73
74 74
75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
76 : QWidget( parent, name), mDisableItemUpdate( false ) 76 : QWidget( parent, name), mDisableItemUpdate( false )
77{ 77{
78 QGridLayout *topLayout = new QGridLayout(this); 78 QGridLayout *topLayout = new QGridLayout(this);
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);
105 QLabel *attendeeLabel = new QLabel(this); 107 QLabel *attendeeLabel = new QLabel(this);
106 attendeeLabel->setText(i18n("Name:")); 108 attendeeLabel->setText(i18n("Name:"));
107 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); 109 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
108 mNameEdit = new QLineEdit(this); 110 mNameEdit = new QLineEdit(this);
109 connect(mNameEdit,SIGNAL(textChanged(const QString &)), 111 connect(mNameEdit,SIGNAL(textChanged(const QString &)),
110 SLOT(updateAttendeeItem())); 112 SLOT(updateAttendeeItem()));
111 113
112 mUidEdit = new QLineEdit(0); 114 mUidEdit = new QLineEdit(0);
113 mUidEdit->setText(""); 115 mUidEdit->setText("");
114 116
115 QLabel *emailLabel = new QLabel(this); 117 QLabel *emailLabel = new QLabel(this);
116 emailLabel->setText(i18n("Email:")); 118 emailLabel->setText(i18n("Email:"));
@@ -126,89 +128,107 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
126 128
127 QLabel *statusLabel = new QLabel(this); 129 QLabel *statusLabel = new QLabel(this);
128 statusLabel->setText( i18n("Status:") ); 130 statusLabel->setText( i18n("Status:") );
129 131
130 mStatusCombo = new QComboBox(false,this); 132 mStatusCombo = new QComboBox(false,this);
131 mStatusCombo->insertStringList(Attendee::statusList()); 133 mStatusCombo->insertStringList(Attendee::statusList());
132 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 134 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
133 135
134 136
135 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 137 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
136 QWidget *buttonBox = new QWidget(this); 138 QWidget *buttonBox = new QWidget(this);
137 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); 139 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
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);
203// topLayout->addMultiCellWidget(buttonBox,2,3,5,5); 223// topLayout->addMultiCellWidget(buttonBox,2,3,5,5);
204// topLayout->setRowStretch(1,5); 224// topLayout->setRowStretch(1,5);
205// topLayout->setColStretch(0,0); 225// topLayout->setColStretch(0,0);
206 226
207#ifdef KORG_NOKABC 227#ifdef KORG_NOKABC
208 mAddressBookButton->hide(); 228 mAddressBookButton->hide();
209#endif 229#endif
210 230
211 updateAttendeeInput(); 231 updateAttendeeInput();
212#ifndef DESKTOP_VERSION 232#ifndef DESKTOP_VERSION
213//US listen for arriving address resultsets 233//US listen for arriving address resultsets
214 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 234 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 0045b7f..bfe0aec 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -72,60 +72,70 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
72 QGridLayout *headerLayout = new QGridLayout(topLayout); 72 QGridLayout *headerLayout = new QGridLayout(topLayout);
73 73
74#if 0 74#if 0
75 mOwnerLabel = new QLabel(i18n("Owner:"),parent); 75 mOwnerLabel = new QLabel(i18n("Owner:"),parent);
76 headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); 76 headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1);
77#endif 77#endif
78 78
79 QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); 79 QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent);
80 headerLayout->addWidget(summaryLabel,1,0); 80 headerLayout->addWidget(summaryLabel,1,0);
81 81
82 mSummaryEdit = new KOLocationBox(TRUE,parent, 10); 82 mSummaryEdit = new KOLocationBox(TRUE,parent, 10);
83 mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 83 mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
84 //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); 84 //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) );
85 //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); 85 //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() );
86 int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; 86 int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2;
87 if ( QApplication::desktop()->width() > 320 ) 87 if ( QApplication::desktop()->width() > 320 )
88 mSummaryEdit->setMaximumHeight( hei +6 ); 88 mSummaryEdit->setMaximumHeight( hei +6 );
89 //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); 89 //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding );
90 // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } 90 // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink }
91 // mSummaryEdit = new QLineEdit(parent); 91 // mSummaryEdit = new QLineEdit(parent);
92 headerLayout->addWidget(mSummaryEdit,1,1); 92 headerLayout->addWidget(mSummaryEdit,1,1);
93 connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); 93 connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
94 94
95 QLabel *locationLabel = new QLabel(i18n("Location:"),parent); 95 QLabel *locationLabel = new QLabel(i18n("Location:"),parent);
96 if ( QApplication::desktop()->height() < 320 )
97 headerLayout->addWidget(locationLabel,1,2);
98 else
96 headerLayout->addWidget(locationLabel,2,0); 99 headerLayout->addWidget(locationLabel,2,0);
97 100
98 mLocationEdit = new KOLocationBox(TRUE,parent,10); 101 mLocationEdit = new KOLocationBox(TRUE,parent,10);
99 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 102 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
100 if ( QApplication::desktop()->width() > 320 ) 103 if ( QApplication::desktop()->width() > 320 )
101 mLocationEdit->setMaximumHeight( hei + 6); 104 mLocationEdit->setMaximumHeight( hei + 6);
102 105
103 // mLocationEdit = new QLineEdit(parent); 106 // mLocationEdit = new QLineEdit(parent);
104 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); 107 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
108 if ( QApplication::desktop()->height() < 320 ) {
109 headerLayout->addWidget(mLocationEdit,1,3);
110 headerLayout->setColStretch( 1, 10);
111 headerLayout->setColStretch( 3, 10);
112 }
113 else {
105 headerLayout->addWidget(mLocationEdit,2,1); 114 headerLayout->addWidget(mLocationEdit,2,1);
106 headerLayout->setColStretch( 1, 10); 115 headerLayout->setColStretch( 1, 10);
107} 116}
117}
108void KOEditorGeneral::setFocusOn( int i ) 118void KOEditorGeneral::setFocusOn( int i )
109{ 119{
110 mNextFocus = i; 120 mNextFocus = i;
111 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); 121 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
112} 122}
113void KOEditorGeneral::slotSetFocusOn() 123void KOEditorGeneral::slotSetFocusOn()
114{ 124{
115 mNextFocus; 125 mNextFocus;
116 if ( mNextFocus == 1 ) { 126 if ( mNextFocus == 1 ) {
117 mDescriptionEdit->setFocus(); 127 mDescriptionEdit->setFocus();
118 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); 128 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
119 } 129 }
120 if ( mNextFocus == 2 ) { 130 if ( mNextFocus == 2 ) {
121 mSummaryEdit->setFocus(); 131 mSummaryEdit->setFocus();
122 } 132 }
123} 133}
124void KOEditorGeneral::editCategories() 134void KOEditorGeneral::editCategories()
125{ 135{
126 // qDebug("KOEditorGeneral::editCategories() "); 136 // qDebug("KOEditorGeneral::editCategories() ");
127 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); 137 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
128 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); 138 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
129 //KOGlobals::fitDialogToScreen( csd ); 139 //KOGlobals::fitDialogToScreen( csd );
130 csd->setColorEnabled(); 140 csd->setColorEnabled();
131 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); 141 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index e23e680..02d4a78 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -33,48 +33,50 @@
33#include <kiconloader.h> 33#include <kiconloader.h>
34#include <kstandarddirs.h> 34#include <kstandarddirs.h>
35#include <kdebug.h> 35#include <kdebug.h>
36#include <klocale.h> 36#include <klocale.h>
37#include <kfiledialog.h> 37#include <kfiledialog.h>
38#include <kmessagebox.h> 38#include <kmessagebox.h>
39#include <libkcal/calendarresources.h> 39#include <libkcal/calendarresources.h>
40#include <libkcal/resourcecalendar.h> 40#include <libkcal/resourcecalendar.h>
41#include <kresources/resourceselectdialog.h> 41#include <kresources/resourceselectdialog.h>
42 42
43#include <libkdepim/categoryselectdialog.h> 43#include <libkdepim/categoryselectdialog.h>
44#include <libkcal/calendarlocal.h> 44#include <libkcal/calendarlocal.h>
45#include <libkcal/icalformat.h> 45#include <libkcal/icalformat.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48 48
49#include "koeventeditor.h" 49#include "koeventeditor.h"
50extern int globalFlagBlockAgenda; 50extern int globalFlagBlockAgenda;
51 51
52KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) : 52KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) :
53 KOIncidenceEditor( i18n("Edit Event"), calendar, parent ) 53 KOIncidenceEditor( i18n("Edit Event"), calendar, parent )
54{ 54{
55 mEvent = 0; 55 mEvent = 0;
56 init(); 56 init();
57 if ( QApplication::desktop()->height() <= 240 )
58 hideButtons();
57} 59}
58 60
59KOEventEditor::~KOEventEditor() 61KOEventEditor::~KOEventEditor()
60{ 62{
61 //emit dialogClose( mEvent ); 63 //emit dialogClose( mEvent );
62} 64}
63 65
64void KOEventEditor::init() 66void KOEventEditor::init()
65{ 67{
66 68
67 setupGeneral(); 69 setupGeneral();
68 setupAttendeesTab(); 70 setupAttendeesTab();
69 setupRecurrence(); 71 setupRecurrence();
70 72
71 // Propagate date time settings to recurrence tab 73 // Propagate date time settings to recurrence tab
72 connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), 74 connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
73 mRecurrence,SLOT(setDateTimes(QDateTime,QDateTime))); 75 mRecurrence,SLOT(setDateTimes(QDateTime,QDateTime)));
74 connect(mGeneral,SIGNAL(dateTimeStrChanged(const QString &)), 76 connect(mGeneral,SIGNAL(dateTimeStrChanged(const QString &)),
75 mRecurrence,SLOT(setDateTimeStr(const QString &))); 77 mRecurrence,SLOT(setDateTimeStr(const QString &)));
76 78
77 // Category dialog 79 // Category dialog
78 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); 80 // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
79 //connect(mCategoryDialog,SIGNAL(categoriesSelected(const QString &)), 81 //connect(mCategoryDialog,SIGNAL(categoriesSelected(const QString &)),
80 // mGeneral,SLOT(setCategories(const QString &))); 82 // mGeneral,SLOT(setCategories(const QString &)));
@@ -92,49 +94,49 @@ void KOEventEditor::setSecrecy( int sec )
92 mGeneral->setSecrecy( sec ); 94 mGeneral->setSecrecy( sec );
93} 95}
94void KOEventEditor::setCategories( QString s ) 96void KOEventEditor::setCategories( QString s )
95{ 97{
96 mGeneral->setCategories(s); 98 mGeneral->setCategories(s);
97 99
98} 100}
99void KOEventEditor::setupGeneral() 101void KOEventEditor::setupGeneral()
100{ 102{
101 mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" ); 103 mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" );
102 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 104 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
103 105
104 if( KOPrefs::instance()->mCompactDialogs ) { 106 if( KOPrefs::instance()->mCompactDialogs ) {
105 QFrame *topFrame = addPage(i18n("General")); 107 QFrame *topFrame = addPage(i18n("General"));
106 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 108 QBoxLayout *topLayout = new QVBoxLayout(topFrame);
107 topLayout->setSpacing(spacingHint()-1); 109 topLayout->setSpacing(spacingHint()-1);
108 topLayout->setMargin(marginHint()-1); 110 topLayout->setMargin(marginHint()-1);
109 mGeneral->initHeader(topFrame,topLayout); 111 mGeneral->initHeader(topFrame,topLayout);
110 mGeneral->initTime(topFrame,topLayout); 112 mGeneral->initTime(topFrame,topLayout);
111// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 113// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
112 mGeneral->initAlarm(topFrame,topLayout); 114 mGeneral->initAlarm(topFrame,topLayout);
113 mGeneral->enableAlarm( false ); 115 mGeneral->enableAlarm( false );
114 116
115 QBoxLayout *buttonLayout; 117 QBoxLayout *buttonLayout;
116 if ( QApplication::desktop()->width() < 500 ) 118 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
117 buttonLayout = new QVBoxLayout( topLayout ); 119 buttonLayout = new QVBoxLayout( topLayout );
118 else 120 else
119 buttonLayout = new QHBoxLayout( topLayout ); 121 buttonLayout = new QHBoxLayout( topLayout );
120 QHBox* buttonWidget = new QHBox (topFrame); 122 QHBox* buttonWidget = new QHBox (topFrame);
121 QIconSet icon; 123 QIconSet icon;
122 if ( QApplication::desktop()->width() < 321 ) 124 if ( QApplication::desktop()->width() < 321 )
123 icon = SmallIcon("fileexport16"); 125 icon = SmallIcon("fileexport16");
124 else 126 else
125 icon = SmallIcon("fileexport"); 127 icon = SmallIcon("fileexport");
126 QPushButton * loadTemplate = new QPushButton( buttonWidget); 128 QPushButton * loadTemplate = new QPushButton( buttonWidget);
127 QPushButton * saveTemplate = new QPushButton( buttonWidget); 129 QPushButton * saveTemplate = new QPushButton( buttonWidget);
128 saveTemplate->setIconSet (icon ) ; 130 saveTemplate->setIconSet (icon ) ;
129 int size = saveTemplate->sizeHint().height(); 131 int size = saveTemplate->sizeHint().height();
130 saveTemplate->setFixedSize( size, size ); 132 saveTemplate->setFixedSize( size, size );
131 if ( QApplication::desktop()->width() < 321 ) 133 if ( QApplication::desktop()->width() < 321 )
132 icon = SmallIcon("fileimport16"); 134 icon = SmallIcon("fileimport16");
133 else 135 else
134 icon = SmallIcon("fileimport"); 136 icon = SmallIcon("fileimport");
135 loadTemplate->setIconSet (icon ) ; 137 loadTemplate->setIconSet (icon ) ;
136 loadTemplate->setFixedSize( size, size ); 138 loadTemplate->setFixedSize( size, size );
137 buttonLayout->addWidget( buttonWidget ); 139 buttonLayout->addWidget( buttonWidget );
138 mGeneral->initCategories( topFrame, buttonLayout ); 140 mGeneral->initCategories( topFrame, buttonLayout );
139 141
140 topLayout->addStretch( 1 ); 142 topLayout->addStretch( 1 );
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 5513e8b..9073bca 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -38,48 +38,50 @@
38#include <kstandarddirs.h> 38#include <kstandarddirs.h>
39#include <kmessagebox.h> 39#include <kmessagebox.h>
40 40
41#include <libkdepim/categoryselectdialog.h> 41#include <libkdepim/categoryselectdialog.h>
42#include <libkcal/calendarlocal.h> 42#include <libkcal/calendarlocal.h>
43#include <libkcal/calendarresources.h> 43#include <libkcal/calendarresources.h>
44#include <libkcal/resourcecalendar.h> 44#include <libkcal/resourcecalendar.h>
45#include <libkcal/icalformat.h> 45#include <libkcal/icalformat.h>
46#include <kresources/resourceselectdialog.h> 46#include <kresources/resourceselectdialog.h>
47#include <libkdepim/kdateedit.h> 47#include <libkdepim/kdateedit.h>
48 48
49#include "koprefs.h" 49#include "koprefs.h"
50#include "kolocationbox.h" 50#include "kolocationbox.h"
51 51
52#include "kotodoeditor.h" 52#include "kotodoeditor.h"
53extern int globalFlagBlockAgenda; 53extern int globalFlagBlockAgenda;
54 54
55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : 55KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) 56 KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent )
57{ 57{
58 mTodo = 0; 58 mTodo = 0;
59 mRelatedTodo = 0; 59 mRelatedTodo = 0;
60 findButton(User1)->hide(); 60 findButton(User1)->hide();
61 init(); 61 init();
62 if ( QApplication::desktop()->height() <= 240 )
63 hideButtons();
62} 64}
63 65
64KOTodoEditor::~KOTodoEditor() 66KOTodoEditor::~KOTodoEditor()
65{ 67{
66 emit dialogClose( mTodo ); 68 emit dialogClose( mTodo );
67} 69}
68 70
69void KOTodoEditor::init() 71void KOTodoEditor::init()
70{ 72{
71 setupGeneral(); 73 setupGeneral();
72 setupAttendeesTab(); 74 setupAttendeesTab();
73 setupRecurrence(); 75 setupRecurrence();
74 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); 76 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
75 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); 77 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
76} 78}
77void KOTodoEditor::setupRecurrence() 79void KOTodoEditor::setupRecurrence()
78{ 80{
79 QFrame *topFrame = addPage( i18n("Recurrence") ); 81 QFrame *topFrame = addPage( i18n("Recurrence") );
80 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 82 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
81 83
82 mRecurrence = new KOEditorRecurrence( topFrame ); 84 mRecurrence = new KOEditorRecurrence( topFrame );
83 topLayout->addWidget( mRecurrence ); 85 topLayout->addWidget( mRecurrence );
84} 86}
85 87
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 007d1f3..59bf1a2 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -93,49 +93,51 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
93 layout->addWidget(attendeeGroup ); 93 layout->addWidget(attendeeGroup );
94 new QLabel( i18n("Attendee:"),attendeeGroup ); 94 new QLabel( i18n("Attendee:"),attendeeGroup );
95 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 95 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
96 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); 96 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
97 // Date range 97 // Date range
98 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), 98 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
99 // topFrame); 99 // topFrame);
100 // layout->addWidget(rangeGroup); 100 // layout->addWidget(rangeGroup);
101 101
102 QWidget *rangeWidget = new QWidget(topFrame); 102 QWidget *rangeWidget = new QWidget(topFrame);
103 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); 103 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint());
104 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 104 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
105 mStartDate = new KDateEdit(rangeWidget); 105 mStartDate = new KDateEdit(rangeWidget);
106 rangeLayout->addWidget(mStartDate); 106 rangeLayout->addWidget(mStartDate);
107 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); 107 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
108 mEndDate = new KDateEdit(rangeWidget); 108 mEndDate = new KDateEdit(rangeWidget);
109 mEndDate->setDate(QDate::currentDate().addDays(365)); 109 mEndDate->setDate(QDate::currentDate().addDays(365));
110 rangeLayout->addWidget(mEndDate); 110 rangeLayout->addWidget(mEndDate);
111 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); 111 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
112 rangeLayout->addWidget( (QWidget*)wt ); 112 rangeLayout->addWidget( (QWidget*)wt );
113 layout->addWidget(rangeWidget); 113 layout->addWidget(rangeWidget);
114 // Results list view 114 // Results list view
115 listView = new KOListView(mCalendar,topFrame); 115 listView = new KOListView(mCalendar,topFrame);
116 layout->addWidget(listView); 116 layout->addWidget(listView);
117 117 //layout->setStretchFactor( listView, 333 );
118 //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) );
119 //listView->setMaximumHeight( 50 );
118 listView->readSettings(KOGlobals::config(),"SearchListView Layout"); 120 listView->readSettings(KOGlobals::config(),"SearchListView Layout");
119 connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); 121 connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList()));
120 122
121 setCaption( i18n("KO/Pi Find: ")); 123 setCaption( i18n("KO/Pi Find: "));
122#ifdef DESKTOP_VERSION 124#ifdef DESKTOP_VERSION
123 OkButton = new QPushButton( i18n("Close"), this ); 125 OkButton = new QPushButton( i18n("Close"), this );
124 connect(OkButton,SIGNAL(clicked()),SLOT(hide())); 126 connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
125#endif 127#endif
126} 128}
127 129
128SearchDialog::~SearchDialog() 130SearchDialog::~SearchDialog()
129{ 131{
130 132
131} 133}
132void SearchDialog::raiseAndSelect() 134void SearchDialog::raiseAndSelect()
133{ 135{
134 136
135 static int currentState = 0; 137 static int currentState = 0;
136 138
137 if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() ) 139 if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() )
138 currentState = 0; 140 currentState = 0;
139 int newState = 0; 141 int newState = 0;
140 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 142 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
141 newState = VIEW_J_VIEW; 143 newState = VIEW_J_VIEW;