summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditordetails.cpp
authorzautrix <zautrix>2005-04-30 07:32:03 (UTC)
committer zautrix <zautrix>2005-04-30 07:32:03 (UTC)
commit7c31102a00920834ab8e3778f0f459b96b2fb309 (patch) (side-by-side diff)
tree9f238caaaab4ba150e4f14708d85162af0ea5092 /korganizer/koeditordetails.cpp
parentbdaded2da25b0ccef80d6e638fa12f92a4f8744d (diff)
downloadkdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.zip
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.gz
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.bz2
fixes
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
@@ -67,50 +67,52 @@ void CustomListViewItem<class Attendee *>::updateItem()
setText(3,mData->statusStr());
if (mData->RSVP() && !mData->email().isEmpty())
setPixmap(4,SmallIcon("mailappt"));
else
setPixmap(4,SmallIcon("nomailappt"));
}
KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
: QWidget( parent, name), mDisableItemUpdate( false )
{
QGridLayout *topLayout = new QGridLayout(this);
topLayout->setSpacing(spacing);
QString organizer = KOPrefs::instance()->email();
mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
mListView = new KListView(this,"mListView");
mListView->addColumn(i18n("Name"),180);
mListView->addColumn(i18n("Email"),180);
mListView->addColumn(i18n("Role"),60);
mListView->addColumn(i18n("Status"),100);
mListView->addColumn(i18n("RSVP"),35);
if ( QApplication::desktop()->width() <= 320 ) {
- //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
- mListView->setFixedHeight(80);
+ int hei = 80;
+ if ( QApplication::desktop()->height() <= 240 )
+ hei = 60;
+ mListView->setFixedHeight(hei);
}
mListView->setAllColumnsShowFocus (true );
//mListView->setSingleClick( true );
connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
SLOT(updateAttendeeInput()));
connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
mRsvpButton = new QCheckBox(this);
mRsvpButton->setText(i18n("Request response"));
mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
QLabel *attendeeLabel = new QLabel(this);
attendeeLabel->setText(i18n("Name:"));
attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
mNameEdit = new QLineEdit(this);
connect(mNameEdit,SIGNAL(textChanged(const QString &)),
SLOT(updateAttendeeItem()));
mUidEdit = new QLineEdit(0);
mUidEdit->setText("");
QLabel *emailLabel = new QLabel(this);
emailLabel->setText(i18n("Email:"));
@@ -126,89 +128,107 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
QLabel *statusLabel = new QLabel(this);
statusLabel->setText( i18n("Status:") );
mStatusCombo = new QComboBox(false,this);
mStatusCombo->insertStringList(Attendee::statusList());
connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
QWidget *buttonBox = new QWidget(this);
QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
buttonLayout->addWidget(newButton);
connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
buttonLayout->addWidget(mRemoveButton);
connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
// buttonLayout->addWidget(mAddressBookButton);
connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
//mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
-
+ if ( QApplication::desktop()->height() <= 240 ) {
+ mRoleCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
+ mStatusCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
+ topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
+ topLayout->addMultiCellWidget(mListView,1,1,0,5);
+ topLayout->addWidget(attendeeLabel,3,0);
+ topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
+ topLayout->addWidget(emailLabel,4,0);
+ topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
+ topLayout->addWidget(attendeeRoleLabel,5,0);
+ topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
+ topLayout->addWidget(statusLabel,5,3);
+ topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
+ topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,5);
+ topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
+ topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
+ topLayout->setRowStretch(1,5);
+ topLayout->setColStretch(0,0);
+ } else {
if (qApp->desktop()->width() < 640 ) {
if ( qApp->desktop()->width() < 300 )
topLayout->setSpacing(1);
;//mListView->setFixedHeight(80);
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
topLayout->addMultiCellWidget(mListView,1,1,0,3);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
topLayout->addWidget(emailLabel,4,0);
topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
topLayout->addWidget(attendeeRoleLabel,5,0);
topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
topLayout->addWidget(statusLabel,6,0);
topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
topLayout->setRowStretch(1,2);
topLayout->setColStretch(0,0);
topLayout->setColStretch(1,2);
topLayout->setColStretch(2,1);
topLayout->setColStretch(3,1);
-
} else {
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
topLayout->addMultiCellWidget(mListView,1,1,0,5);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
topLayout->addWidget(emailLabel,4,0);
topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
topLayout->addWidget(attendeeRoleLabel,5,0);
topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
topLayout->addWidget(statusLabel,5,3);
topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
topLayout->setRowStretch(1,5);
topLayout->setColStretch(0,0);
}
+ }
// #if 0
// topLayout->setColStretch(2,1);
// topLayout->addWidget(statusLabel,3,3);
// topLayout->addWidget(mStatusCombo,3,4);
// #else
// topLayout->addWidget(statusLabel,4,3);
// // topLayout->addWidget(mStatusCombo,4,3);
// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
// #endif
// // topLayout->setRowStretch(5,1);
// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);
// topLayout->addMultiCellWidget(buttonBox,2,3,5,5);
// topLayout->setRowStretch(1,5);
// topLayout->setColStretch(0,0);
#ifdef KORG_NOKABC
mAddressBookButton->hide();
#endif
updateAttendeeInput();
#ifndef DESKTOP_VERSION
//US listen for arriving address resultsets
connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),