summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditordetails.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeditordetails.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 7c4c382..c0e7bdd 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -1,144 +1,143 @@
/*
This file is part of KOrganizer.
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in thse hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qtooltip.h>
#include <qfiledialog.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qbuttongroup.h>
#include <qvgroupbox.h>
#include <qwidgetstack.h>
#include <qdatetime.h>
#include <qapp.h>
#include <klocale.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#ifndef KORG_NOKABC
#include <kabc/addresseedialog.h>
#endif
#include <libkcal/incidence.h>
#include "koprefs.h"
#include "koeditordetails.h"
-#include "koeditordetails.moc"
template <>
CustomListViewItem<class Attendee *>::~CustomListViewItem()
{
delete mData;
}
template <>
void CustomListViewItem<class Attendee *>::updateItem()
{
setText(0,mData->name());
setText(1,mData->email());
setText(2,mData->roleStr());
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 ( KOPrefs::instance()->mCompactDialogs ) {
//mListView->setFixedHeight(78);
}
connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
SLOT(updateAttendeeInput()));
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:"));
mEmailEdit = new QLineEdit(this);
connect(mEmailEdit,SIGNAL(textChanged(const QString &)),
SLOT(updateAttendeeItem()));
QLabel *attendeeRoleLabel = new QLabel(this);
attendeeRoleLabel->setText(i18n("Role:"));
mRoleCombo = new QComboBox(false,this);
mRoleCombo->insertStringList(Attendee::roleList());
connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
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()));
mRsvpButton = new QCheckBox(this);
mRsvpButton->setText(i18n("Request response"));
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()));
mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
// buttonLayout->addWidget(mAddressBookButton);
connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
//mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
if (qApp->desktop()->width() < 300 ) {
mListView->setFixedHeight(80);
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
topLayout->addMultiCellWidget(mListView,1,1,0,3);
topLayout->addWidget(attendeeLabel,3,0);