akonadi
22 #include "tagselectiondialog.h"
25 #include "tageditwidget.h"
26 #include <KLocalizedString>
27 #include <KSharedConfig>
29 using namespace Akonadi;
31 struct TagSelectionDialog::Private {
32 Private(KDialog *parent)
43 void TagSelectionDialog::Private::writeConfig()
45 KConfigGroup group(KGlobal::config(),
"TagSelectionDialog");
46 group.writeEntry(
"Size", d->size());
49 void TagSelectionDialog::Private::readConfig()
51 KConfigGroup group(KGlobal::config(),
"TagSelectionDialog");
52 const QSize sizeDialog = group.readEntry(
"Size",
QSize(500, 400));
54 d->resize(sizeDialog);
58 TagSelectionDialog::TagSelectionDialog(
QWidget *parent)
60 , d(new Private(this))
62 setCaption(i18nc(
"@title:window",
"Manage Tags"));
63 setButtons(KDialog::Ok | KDialog::Cancel);
64 setDefaultButton(KDialog::Ok);
69 Akonadi::TagModel *model =
new Akonadi::TagModel(monitor,
this);
71 setMainWidget(d->mTagWidget);
76 TagSelectionDialog::~TagSelectionDialog()
81 Tag::List TagSelectionDialog::selection()
const
83 return d->mTagWidget->selection();
86 void TagSelectionDialog::setSelection(
const Tag::List &tags)
88 d->mTagWidget->setSelection(tags);
void setTypeMonitored(Type type, bool monitored=true)
Sets whether given type (Collection, Item, Tag should be monitored).
Monitors an item or collection for changes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.