Commit 8c2f5491 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

coding style

parent 4dd8a26f
......@@ -31,12 +31,16 @@
using namespace IncidenceEditorNG;
AlarmDialog::AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType, QWidget *parent)
: QDialog(parent), mUi(new Ui::AlarmDialog), mIncidenceType(incidenceType),
mAllowBeginReminders(true), mAllowEndReminders(true)
: QDialog(parent)
, mUi(new Ui::AlarmDialog)
, mIncidenceType(incidenceType)
, mAllowBeginReminders(true)
, mAllowEndReminders(true)
{
setWindowTitle(i18n("Create a new reminder"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......@@ -132,13 +136,14 @@ void AlarmDialog::load(const KCalCore::Alarm::Ptr &alarm)
mUi->mAppArguments->setText(alarm->programArguments());
id = 2;
break;
case KCalCore::Alarm::Email: {
case KCalCore::Alarm::Email:
{
mUi->mTypeCombo->setCurrentIndex(3);
KCalCore::Person::List addresses = alarm->mailAddresses();
QStringList add;
add.reserve(addresses.count());
for (KCalCore::Person::List::ConstIterator it = addresses.constBegin();
it != addresses.constEnd(); ++it) {
it != addresses.constEnd(); ++it) {
add << (*it)->fullName();
}
mUi->mEmailAddress->setText(add.join(QStringLiteral(", ")));
......@@ -155,8 +160,8 @@ void AlarmDialog::load(const KCalCore::Alarm::Ptr &alarm)
}
mUi->mTypeStack->setCurrentIndex(id);
if (alarm->audioFile().isEmpty() &&
IncidenceEditorNG::EditorConfig::instance()->defaultAudioFileReminders()) {
if (alarm->audioFile().isEmpty()
&& IncidenceEditorNG::EditorConfig::instance()->defaultAudioFileReminders()) {
mUi->mSoundFile->setUrl(IncidenceEditorNG::EditorConfig::instance()->audioFilePath());
}
}
......
......@@ -25,15 +25,12 @@
#include <QDialog>
namespace Ui
{
namespace Ui {
class AlarmDialog;
}
namespace IncidenceEditorNG
{
class AlarmDialog : public QDialog
namespace IncidenceEditorNG {
class AlarmDialog : public QDialog
{
Q_OBJECT
public:
......@@ -55,7 +52,8 @@ public:
Constructs a new alarm dialog.
@p incidenceType will influence i18n strings, that will be different for to-dos.
*/
explicit AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType, QWidget *parent = nullptr);
explicit AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType,
QWidget *parent = nullptr);
~AlarmDialog();
void load(const KCalCore::Alarm::Ptr &alarm);
void save(const KCalCore::Alarm::Ptr &alarm) const;
......@@ -74,7 +72,6 @@ private:
bool mAllowBeginReminders;
bool mAllowEndReminders;
};
}
#endif // INCIDENCEEDITOR_ALARMDIALOG_H
......@@ -31,12 +31,8 @@
using namespace CalendarSupport;
using namespace KCalCore;
namespace IncidenceEditorNG
{
namespace AlarmPresets
{
namespace IncidenceEditorNG {
namespace AlarmPresets {
// Don't use a map, because order matters
Q_GLOBAL_STATIC(QStringList, sBeforeStartPresetNames)
Q_GLOBAL_STATIC(QStringList, sBeforeEndPresetNames)
......@@ -55,9 +51,9 @@ int configuredReminderTimeInMinutes()
const int unitsToUse = configuredUnits >= 0 && configuredUnits <= 2 ? configuredUnits : 0;
const int configuredReminderTime = KCalPrefs::instance()->reminderTime();
const int reminderTimeToUse = configuredReminderTime >= 0 ?
configuredReminderTime :
DEFAULT_REMINDER_OFFSET;
const int reminderTimeToUse = configuredReminderTime >= 0
? configuredReminderTime
: DEFAULT_REMINDER_OFFSET;
return reminderTimeToUse * units[unitsToUse];
}
......@@ -116,7 +112,8 @@ void initPresets(AlarmPresets::When when)
} else {
sBeforeStartPresetNames->append(i18ncp("@item:inlistbox",
"%1 day before start",
"%1 days before start", minutes / (24 * 60)));
"%1 days before start",
minutes / (24 * 60)));
}
sBeforeStartPresets->append(alarm);
}
......@@ -194,28 +191,28 @@ KCalCore::Alarm::Ptr preset(When when, const QString &name)
checkInitNeeded(when);
switch (when) {
case AlarmPresets::BeforeStart: {
case AlarmPresets::BeforeStart:
// The name should exists and only once
if (sBeforeStartPresetNames->count(name) != 1) {
// print some debug info before crashing
qCDebug(INCIDENCEEDITOR_LOG) << " name = " << name << "; when = " << when
<< "; count for name = " << sBeforeStartPresetNames->count(name)
<< "; global count = " << sBeforeStartPresetNames->count();
<< "; count for name = " << sBeforeStartPresetNames->count(
name)
<< "; global count = "
<< sBeforeStartPresetNames->count();
Q_ASSERT_X(false, "preset", "Number of presets should be one");
}
return KCalCore::Alarm::Ptr(
new KCalCore::Alarm(*sBeforeStartPresets->at(sBeforeStartPresetNames->indexOf(name))));
}
case AlarmPresets::BeforeEnd: {
new KCalCore::Alarm(*sBeforeStartPresets->at(sBeforeStartPresetNames->indexOf(name))));
case AlarmPresets::BeforeEnd:
Q_ASSERT(sBeforeEndPresetNames->count(name) == 1); // The name should exists and only once
return KCalCore::Alarm::Ptr(
new KCalCore::Alarm(*sBeforeEndPresets->at(sBeforeEndPresetNames->indexOf(name))));
}
new KCalCore::Alarm(*sBeforeEndPresets->at(sBeforeEndPresetNames->indexOf(name))));
default:
return KCalCore::Alarm::Ptr();
};
}
}
KCalCore::Alarm::Ptr defaultAlarm(When when)
......@@ -229,7 +226,7 @@ KCalCore::Alarm::Ptr defaultAlarm(When when)
return Alarm::Ptr(new Alarm(*sBeforeEndPresets->at(sDefaultPresetIndex)));
default:
return Alarm::Ptr();
};
}
}
int presetIndex(When when, const KCalCore::Alarm::Ptr &alarm)
......@@ -253,7 +250,5 @@ int defaultPresetIndex()
checkInitNeeded(AlarmPresets::BeforeStart);
return sDefaultPresetIndex;
}
} // AlarmPresets
} // IncidenceEditorNG
......@@ -25,17 +25,13 @@
class QStringList;
namespace IncidenceEditorNG
{
namespace IncidenceEditorNG {
enum {
// Fallback in case config is invalid
DEFAULT_REMINDER_OFFSET = 15 // minutes
};
namespace AlarmPresets
{
namespace AlarmPresets {
enum When {
BeforeStart,
BeforeEnd
......@@ -71,9 +67,7 @@ int presetIndex(When when, const KCalCore::Alarm::Ptr &alarm);
Returns the index of the default preset. ( Comes from KCalPrefs ).
*/
int defaultPresetIndex();
}
}
#endif // INCIDENCEEDITOR_ALARMPRESETS_H
......@@ -37,25 +37,27 @@
using namespace IncidenceEditorNG;
AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item,
QWidget *parent,
bool modal)
: QDialog(parent),
AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item, QWidget *parent, bool modal)
: QDialog(parent)
,
#ifdef KDEPIM_ENTERPRISE_BUILD
mAttachment(new KCalCore::Attachment('\0')), //use the non-uri constructor
// as we want inline by default
mAttachment(new KCalCore::Attachment('\0'))
, //use the non-uri constructor
// as we want inline by default
#else
mAttachment(new KCalCore::Attachment(QString())),
mAttachment(new KCalCore::Attachment(QString()))
,
#endif
mItem(item),
mUi(new Ui::AttachmentEditDialog)
mItem(item)
, mUi(new Ui::AttachmentEditDialog)
{
setWindowTitle(i18n("Edit Attachment"));
QMimeDatabase db;
mMimeType = db.mimeTypeForName(item->mimeType());
QWidget *page = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......@@ -69,9 +71,9 @@ AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item,
mUi->mIcon->setPixmap(item->icon());
mUi->mInlineCheck->setChecked(item->isBinary());
const QString typecomment = item->mimeType().isEmpty() ?
i18nc("@label unknown mimetype", "Unknown") :
mMimeType.comment();
const QString typecomment = item->mimeType().isEmpty()
? i18nc("@label unknown mimetype", "Unknown")
: mMimeType.comment();
mUi->mTypeLabel->setText(typecomment);
setModal(modal);
......@@ -90,11 +92,17 @@ AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item,
QLocale().toString(item->attachment()->size())));
}
connect(mUi->mInlineCheck, &QCheckBox::stateChanged, this, &AttachmentEditDialog::inlineChanged);
connect(mUi->mURLRequester, static_cast<void (KUrlRequester::*)(const QUrl &)>(&KUrlRequester::urlSelected),
this, static_cast<void (AttachmentEditDialog::*)(const QUrl &)>(&AttachmentEditDialog::urlChanged));
connect(mUi->mInlineCheck, &QCheckBox::stateChanged, this,
&AttachmentEditDialog::inlineChanged);
connect(mUi->mURLRequester,
static_cast<void (KUrlRequester::*)(const QUrl &)>(&KUrlRequester::urlSelected),
this,
static_cast<void (AttachmentEditDialog::*)(const QUrl &)>(&AttachmentEditDialog::
urlChanged));
connect(mUi->mURLRequester, &KUrlRequester::textChanged,
this, static_cast<void (AttachmentEditDialog::*)(const QString &)>(&AttachmentEditDialog::urlChanged));
this,
static_cast<void (AttachmentEditDialog::*)(const QString &)>(&AttachmentEditDialog::
urlChanged));
}
AttachmentEditDialog::~AttachmentEditDialog()
......@@ -148,7 +156,7 @@ void AttachmentEditDialog::slotApply()
auto job = KIO::storedGet(url);
KJobWidgets::setWindow(job, nullptr);
if (job->exec()) {
QByteArray data = job->data();
QByteArray data = job->data();
mItem->setData(data);
}
} else {
......@@ -159,8 +167,8 @@ void AttachmentEditDialog::slotApply()
void AttachmentEditDialog::inlineChanged(int state)
{
mOkButton->setEnabled(!mUi->mURLRequester->url().toDisplayString().trimmed().isEmpty() ||
mUi->mStackedWidget->currentIndex() == 1);
mOkButton->setEnabled(!mUi->mURLRequester->url().toDisplayString().trimmed().isEmpty()
|| mUi->mStackedWidget->currentIndex() == 1);
if (state == Qt::Unchecked && mUi->mStackedWidget->currentIndex() == 1) {
mUi->mStackedWidget->setCurrentIndex(0);
if (!mItem->savedUri().isEmpty()) {
......@@ -175,8 +183,8 @@ void AttachmentEditDialog::urlChanged(const QString &url)
{
const bool urlIsNotEmpty = !url.trimmed().isEmpty();
mOkButton->setEnabled(urlIsNotEmpty);
mUi->mInlineCheck->setEnabled(urlIsNotEmpty ||
mUi->mStackedWidget->currentIndex() == 1);
mUi->mInlineCheck->setEnabled(urlIsNotEmpty
|| mUi->mStackedWidget->currentIndex() == 1);
}
void AttachmentEditDialog::urlChanged(const QUrl &url)
......@@ -186,4 +194,3 @@ void AttachmentEditDialog::urlChanged(const QUrl &url)
mUi->mTypeLabel->setText(mMimeType.comment());
mUi->mIcon->setPixmap(AttachmentIconItem::icon(mMimeType, url.path()));
}
......@@ -34,14 +34,11 @@
class QPushButton;
namespace Ui
{
namespace Ui {
class AttachmentEditDialog;
}
namespace IncidenceEditorNG
{
namespace IncidenceEditorNG {
class AttachmentIconItem;
class AttachmentEditDialog : public QDialog
......@@ -65,7 +62,6 @@ private:
Ui::AttachmentEditDialog *mUi;
QPushButton *mOkButton;
};
}
#endif // INCIDENCEEDITOR_ATTACHMENTEDITDIALOG_H
......@@ -54,9 +54,9 @@ AttachmentIconItem::AttachmentIconItem(const KCalCore::Attachment::Ptr &att, QLi
} else {
// for the enteprise, inline attachments are the default
#ifdef KDEPIM_ENTERPRISE_BUILD
mAttachment =
KCalCore::Attachment::Ptr(
new KCalCore::Attachment(QByteArray())); // use the non-uri constructor
mAttachment
= KCalCore::Attachment::Ptr(
new KCalCore::Attachment(QByteArray())); // use the non-uri constructor
// as we want inline by default
#else
mAttachment = KCalCore::Attachment::Ptr(new KCalCore::Attachment(QString()));
......@@ -135,16 +135,15 @@ QPixmap AttachmentIconItem::icon() const
mAttachment->uri(), mAttachment->isBinary());
}
QPixmap AttachmentIconItem::icon(const QMimeType &mimeType,
const QString &uri,
bool binary)
QPixmap AttachmentIconItem::icon(const QMimeType &mimeType, const QString &uri, bool binary)
{
QString iconStr = mimeType.iconName();
QStringList overlays;
if (!uri.isEmpty() && !binary) {
overlays << QStringLiteral("emblem-link");
}
return QIcon(new KIconEngine(iconStr, KIconLoader::global(), overlays)).pixmap(KIconLoader::SizeSmallMedium, KIconLoader::SizeSmallMedium);
return QIcon(new KIconEngine(iconStr, KIconLoader::global(), overlays)).pixmap(
KIconLoader::SizeSmallMedium, KIconLoader::SizeSmallMedium);
}
void AttachmentIconItem::readAttachment()
......@@ -153,7 +152,8 @@ void AttachmentIconItem::readAttachment()
setFlags(flags() | Qt::ItemIsEditable);
QMimeDatabase db;
if (mAttachment->mimeType().isEmpty() || !(db.mimeTypeForName(mAttachment->mimeType()).isDefault())) {
if (mAttachment->mimeType().isEmpty()
|| !(db.mimeTypeForName(mAttachment->mimeType()).isDefault())) {
QMimeType mimeType;
if (mAttachment->isUri()) {
mimeType = db.mimeTypeForUrl(QUrl(mAttachment->uri()));
......@@ -196,7 +196,9 @@ QUrl AttachmentIconView::tempFileForAttachment(const KCalCore::Attachment::Ptr &
QStringList patterns = db.mimeTypeForName(attachment->mimeType()).globPatterns();
if (!patterns.empty()) {
file = new QTemporaryFile(QDir::tempPath() + QLatin1String("/attachementview_XXXXX") + patterns.first().remove(QLatin1Char('*')));
file = new QTemporaryFile(QDir::tempPath() + QLatin1String(
"/attachementview_XXXXX")
+ patterns.first().remove(QLatin1Char('*')));
} else {
file = new QTemporaryFile();
}
......@@ -256,7 +258,8 @@ void AttachmentIconView::startDrag(Qt::DropActions supportedActions)
#ifndef QT_NO_DRAGANDDROP
QPixmap pixmap;
if (selectedItems().size() > 1) {
pixmap = KIconLoader::global()->loadIcon(QStringLiteral("mail-attachment"), KIconLoader::Desktop);
pixmap = KIconLoader::global()->loadIcon(QStringLiteral(
"mail-attachment"), KIconLoader::Desktop);
}
if (pixmap.isNull()) {
pixmap = static_cast<AttachmentIconItem *>(currentItem())->icon();
......@@ -275,11 +278,10 @@ void AttachmentIconView::startDrag(Qt::DropActions supportedActions)
void AttachmentIconView::keyPressEvent(QKeyEvent *event)
{
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) &&
currentItem() && state() != EditingState) {
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
&& currentItem() && state() != EditingState) {
Q_EMIT itemDoubleClicked(currentItem()); // ugly, but itemActivated() also includes single click
return;
}
QListWidget::keyPressEvent(event);
}
......@@ -37,9 +37,7 @@
#include <QListWidget>
namespace IncidenceEditorNG
{
namespace IncidenceEditorNG {
class AttachmentIconView : public QListWidget
{
Q_OBJECT
......@@ -91,7 +89,6 @@ private:
KCalCore::Attachment::Ptr mAttachment;
QString mSaveUri;
};
}
#endif // INCIDENCEEDITOR_ATTACHMENTICONVIEW_H
......@@ -37,7 +37,8 @@ AttendeeComboBoxDelegate::AttendeeComboBoxDelegate(QObject *parent)
: QStyledItemDelegate(parent)
, mStandardIndex(0)
{
connect(this, &AttendeeComboBoxDelegate::closeEditor, this, &AttendeeComboBoxDelegate::doCloseEditor);
connect(this, &AttendeeComboBoxDelegate::closeEditor, this,
&AttendeeComboBoxDelegate::doCloseEditor);
}
void AttendeeComboBoxDelegate::addItem(const QIcon &icon, const QString &text)
......@@ -68,7 +69,9 @@ void AttendeeComboBoxDelegate::setStandardIndex(int index)
mStandardIndex = index;
}
QWidget *AttendeeComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &/* index */) const
QWidget *AttendeeComboBoxDelegate::createEditor(QWidget *parent,
const QStyleOptionViewItem & /* option */,
const QModelIndex & /* index */) const
{
AttendeeComboBox *editor = new AttendeeComboBox(parent);
......@@ -95,21 +98,25 @@ void AttendeeComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex
comboBox->setCurrentIndex(value);
}
void AttendeeComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
void AttendeeComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
AttendeeComboBox *comboBox = static_cast<AttendeeComboBox *>(editor);
model->setData(index, comboBox->currentIndex(), Qt::EditRole);
comboBox->menu()->close();
}
void AttendeeComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
void AttendeeComboBoxDelegate::updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex & /* index */) const
{
editor->setGeometry(option.rect);
}
void AttendeeComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
void AttendeeComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
QStyleOptionButton myOption;;
QStyleOptionButton myOption;
int value = index.model()->data(index).toUInt();
if (value >= mEntries.count()) {
......@@ -142,23 +149,27 @@ void AttendeeComboBoxDelegate::doCloseEditor(QWidget *editor)
void AttendeeComboBoxDelegate::leftPressed()
{
Q_EMIT closeEditor(static_cast<QWidget *>(QObject::sender()), QAbstractItemDelegate::EditPreviousItem);
Q_EMIT closeEditor(
static_cast<QWidget *>(QObject::sender()), QAbstractItemDelegate::EditPreviousItem);
}
void AttendeeComboBoxDelegate::rightPressed()
{
Q_EMIT closeEditor(static_cast<QWidget *>(QObject::sender()), QAbstractItemDelegate::EditNextItem);
Q_EMIT closeEditor(
static_cast<QWidget *>(QObject::sender()), QAbstractItemDelegate::EditNextItem);
}
bool AttendeeComboBoxDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view,
const QStyleOptionViewItem &option, const QModelIndex &index)
const QStyleOptionViewItem &option,
const QModelIndex &index)
{
if (!event || !view) {
return false;
}
switch (event->type()) {
#ifndef QT_NO_TOOLTIP
case QEvent::ToolTip: {
case QEvent::ToolTip:
{
QHelpEvent *he = static_cast<QHelpEvent *>(event);
QToolTip::showText(he->globalPos(), mToolTip, view);
return true;
......@@ -167,7 +178,8 @@ bool AttendeeComboBoxDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *v
#ifndef QT_NO_WHATSTHIS
case QEvent::QueryWhatsThis:
return true;
case QEvent::WhatsThis: {
case QEvent::WhatsThis:
{
QHelpEvent *he = static_cast<QHelpEvent *>(event);
QWhatsThis::showText(he->globalPos(), mWhatsThis, view);
return true;
......
......@@ -28,9 +28,7 @@
#include <QIcon>
#include <QString>
namespace IncidenceEditorNG
{
namespace IncidenceEditorNG {
/**
* class to show a Icon and Text for an Attendee
* you have to set the Items via addItem to have a list to choose from.
......@@ -42,11 +40,15 @@ class AttendeeComboBoxDelegate : public QStyledItemDelegate
public:
explicit AttendeeComboBoxDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
bool eventFilter(QObject *editor, QEvent *event) override;
......@@ -61,7 +63,8 @@ public:
void setStandardIndex(int);
public Q_SLOTS:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option,
const QModelIndex &index) override;
private Q_SLOTS:
void doCloseEditor(QWidget *editor);
......@@ -76,7 +79,6 @@ private:
/**fallback index */
int mStandardIndex;
};
}
#endif
......@@ -41,4 +41,3 @@ KCalCore::Attendee::Ptr AttendeeData::attendee() const
{
return KCalCore::Attendee::Ptr(new KCalCore::Attendee(*this));
}
......@@ -25,22 +25,23 @@
#include <KCalCore/Attendee>
namespace IncidenceEditorNG
{
class AttendeeData
: public KPIM::MultiplyingLineData, public KCalCore::Attendee
namespace IncidenceEditorNG {
class AttendeeData : public KPIM::MultiplyingLineData, public KCalCore::Attendee
{
public:
typedef QSharedPointer<AttendeeData> Ptr;
typedef QList<AttendeeData::Ptr> List;
AttendeeData(const QString &name, const QString &email,
bool rsvp = false, Attendee::PartStat status = Attendee::None,
AttendeeData(const QString &name, const QString &email, bool rsvp = false,
Attendee::PartStat status = Attendee::None,
Attendee::Role role = Attendee::ReqParticipant, const QString &uid = QString())
: KCalCore::Attendee(name, email, rsvp, status, role, uid) {}
: KCalCore::Attendee(name, email, rsvp, status, role, uid)
{
}
explicit AttendeeData(const KCalCore::Attendee::Ptr &attendee) : KCalCore::Attendee(*attendee) {}
explicit AttendeeData(const KCalCore::Attendee::Ptr &attendee) : KCalCore::Attendee(*attendee)