Akonadi
9 #include "tagselectiondialog.h"
10 #include "controlgui.h"
13 #include "ui_tagselectiondialog.h"
15 #include <KConfigGroup>
16 #include <KSharedConfig>
20 class Akonadi::TagSelectionDialogPrivate
23 explicit TagSelectionDialogPrivate(
QDialog *parent)
28 void writeConfig()
const;
32 Ui::TagSelectionDialog ui;
35 void TagSelectionDialogPrivate::writeConfig()
const
38 group.writeEntry(
"Size", q->size());
41 void TagSelectionDialogPrivate::readConfig()
const
44 const QSize sizeDialog = group.readEntry(
"Size",
QSize(500, 400));
46 q->resize(sizeDialog);
50 TagSelectionDialog::TagSelectionDialog(
QWidget *parent)
52 , d(new TagSelectionDialogPrivate(this))
56 auto monitor =
new Monitor(
this);
57 monitor->setObjectName(QStringLiteral(
"TagSelectionDialogMonitor"));
58 monitor->setTypeMonitored(Monitor::Tags);
60 d->ui.tagWidget->setModel(
new TagModel(monitor,
this));
61 d->ui.tagWidget->setSelectionEnabled(
true);
68 TagSelectionDialog::TagSelectionDialog(TagModel *model,
QWidget *parent)
70 , d(new TagSelectionDialogPrivate(this))
74 d->ui.tagWidget->setModel(
model);
75 d->ui.tagWidget->setSelectionEnabled(
true);
82 TagSelectionDialog::~TagSelectionDialog()
89 return d->ui.buttonBox;
92 Tag::List TagSelectionDialog::selection()
const
94 return d->ui.tagWidget->selection();
97 void TagSelectionDialog::setSelection(
const Tag::List &tags)
99 d->ui.tagWidget->setSelection(tags);
static void widgetNeedsAkonadi(QWidget *widget)
Disable the given widget when Akonadi is not operational and show an error overlay (given enough spac...
bool isValid() const const
QAbstractItemModel * model() const const
Monitors an item or collection for changes.
static KSharedConfig::Ptr openStateConfig(const QString &fileName=QString())
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:49 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.