kalarm
resourceselector.cpp
Go to the documentation of this file.
119 mAlarmType->setWhatsThis(i18nc("@info:whatsthis", "Choose which type of data to show alarm calendars for"));
132 connect(mListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged()));
134 connect(mListView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(contextMenuRequested(QPoint)));
153 mDeleteButton->setWhatsThis(i18nc("@info:whatsthis", "<para>Remove the highlighted calendar from the list.</para>"
154 "<para>The calendar itself is left intact, and may subsequently be reinstated in the list if desired.</para>"));
165 connect(mCalendar, SIGNAL(resourceStatusChanged(AlarmResource*,AlarmResources::Change)), SLOT(slotStatusChanged(AlarmResource*,AlarmResources::Change)));
171 Preferences::connect(SIGNAL(archivedKeepDaysChanged(int)), this, SLOT(archiveDaysChanged(int)));
257 KAMessageBox::error(this, i18nc("@info", "Unable to create calendar of type <resource>%1</resource>.", type));
262 resource->setActive(false); // prevent setReadOnly() declaring it as unwritable before we've tried to load it
374 KAMessageBox::sorry(this, i18nc("@info", "You cannot make your default active alarm calendar read-only."));
381 KAMessageBox::sorry(this, i18nc("@info", "You cannot make your default archived alarm calendar "
385 else if (KAMessageBox::warningContinueCancel(this, i18nc("@info", "Do you really want to make your default calendar read-only?"))
438 KAMessageBox::sorry(this, i18nc("@info", "You cannot remove your default active alarm calendar."));
445 KAMessageBox::sorry(this, i18nc("@info", "You cannot remove your default archived alarm calendar "
461 otherTypes = i18nc("@info", "<para>It also contains:%1</para>", CollectionControlModel::typeListForDisplay(nonStandardTypes));
463 "<para>Do you really want to remove it from all calendar lists?</para>", name, stdTypes, otherTypes);
466 text = i18nc("@info", "Do you really want to remove your default calendar (<resource>%1</resource>) from the list?", name);
469 text = i18nc("@info", "<para><resource>%1</resource> contains:%2</para><para>Do you really want to remove it from all calendar lists?</para>",
472 text = i18nc("@info", "Do you really want to remove the calendar <resource>%1</resource> from the list?", name);
474 QString text = std ? i18nc("@info", "Do you really want to remove your default calendar (<resource>%1</resource>) from the list?", name)
475 : i18nc("@info", "Do you really want to remove the calendar <resource>%1</resource> from the list?", name);
477 if (KAMessageBox::warningContinueCancel(this, text, QString(), KStandardGuiItem::remove()) == KMessageBox::Cancel)
512 mActionReload = new KAction(KIcon(QLatin1String("view-refresh")), i18nc("@action Reload calendar", "Re&load"), this);
516 mActionSave = new KAction(KIcon(QLatin1String("document-save")), i18nc("@action", "&Save"), this);
520 mActionShowDetails = new KAction(KIcon(QLatin1String("help-about")), i18nc("@action", "Show &Details"), this);
523 mActionSetColour = new KAction(KIcon(QLatin1String("color-picker")), i18nc("@action", "Set &Color..."), this);
529 mActionEdit = new KAction(KIcon(QLatin1String("document-properties")), i18nc("@action", "&Edit..."), this);
537 mActionRemove = new KAction(KIcon(QLatin1String("edit-delete")), i18nc("@action", "&Remove"), this);
543 QAction* action = new KAction(KIcon(QLatin1String("document-new")), i18nc("@action", "&Add..."), this);
617 mActionClearColour->setVisible(AkonadiModel::instance()->backgroundColor(collection).isValid());
641 bool standard = (resource && resource == mCalendar->getStandardResource(static_cast<CalEvent::Type>(type)) && resource->standardResource());
743 void ResourceSelector::slotStatusChanged(AlarmResource* resource, AlarmResources::Change change)
762 KAMessageBox::sorry(this, i18nc("@info", "<para>Calendar <resource>%1</resource> has been disabled:</para><para>%2</para>", resource->resourceName(), text));
Akonadi::AgentInstance agentInstance() const
Definition: akonadiresourcecreator.h:43
static Akonadi::Collection getStandard(CalEvent::Type, bool useDefault=false)
Return the standard collection for a specified mime type.
Definition: collectionmodel.cpp:993
static QString readOnlyTooltip(const Akonadi::Collection &)
Return the read-only status tooltip for a collection.
Definition: akonadimodel.cpp:963
static bool importAlarms(QWidget *, AlarmResource *=0)
Definition: alarmcalendar.cpp:875
virtual void resizeEvent(QResizeEvent *)
Definition: resourceselector.cpp:933
static void setStandard(Akonadi::Collection &, CalEvent::Type, bool standard)
Set or clear a collection as the standard collection for a specified mime type.
Definition: collectionmodel.cpp:1066
static int isWritableEnabled(const Akonadi::Collection &, CalEvent::Type)
Return whether a collection is both enabled and fully writable for a given alarm type, i.e.
Definition: collectionmodel.cpp:968
void removeResource(AlarmResource *)
Definition: resourcemodelview.cpp:246
virtual QByteArray text(quint32 serialNumber) const =0
void loadResource(AlarmResource *, QWidget *parent)
Definition: alarmcalendar.cpp:536
const QColor & color(ColorGroup group, ColorRole role) const
static void updateToCurrentFormat(const Akonadi::Collection &, bool ignoreKeepFormat, QWidget *parent)
Definition: calendarmigrator.cpp:375
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
static bool isStandard(Akonadi::Collection &, CalEvent::Type)
Return whether a collection is the standard collection for a specified mime type. ...
Definition: collectionmodel.cpp:1018
bool refresh(Akonadi::Collection &) const
Refresh the specified collection instance with up to date data.
Definition: akonadimodel.cpp:1807
QString join(const QString &separator) const
void addSpacing(int size)
Definition: resourcemodelview.h:89
QString storageType(const Akonadi::Collection &) const
Return the storage type (file/directory/URL etc.) for a collection.
Definition: akonadimodel.cpp:918
static bool isEnabled(const Akonadi::Collection &, CalEvent::Type)
Return whether a collection is enabled (and valid).
Definition: collectionmodel.cpp:715
static QString typeListForDisplay(CalEvent::Types)
Return a bulleted list of alarm types for inclusion in an i18n message.
Definition: collectionmodel.cpp:946
the KAlarm application object
bool isValid() const
Definition: resourceconfigdialog.h:37
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
static ResourceModel * instance(QObject *parent=0)
Definition: resourcemodelview.cpp:41
const QSize & oldSize() const
bool isEmpty() const
bool isEmpty() const
static CalEvent::Types standardTypes(const Akonadi::Collection &, bool useDefault=false)
Return the alarm type(s) for which a collection is the standard collection.
Definition: collectionmodel.cpp:1032
QPalette palette()
void setMargin(int margin)
void addWidget(QWidget *w)
bool removeCollection(const Akonadi::Collection &)
Remove a collection from Akonadi.
Definition: akonadimodel.cpp:1081
bool reloadCollection(const Akonadi::Collection &)
Reload a collection's data from Akonadi storage (not from the backend).
Definition: akonadimodel.cpp:1139
const QSize & size() const
static void connect(const char *signal, const QObject *receiver, const char *member)
Definition: preferences.cpp:369
static Akonadi::Collection::List enabledCollections(CalEvent::Type, bool writable)
Return the enabled collections which contain a specified mime type.
Definition: collectionmodel.cpp:1229
ResourceSelector(AlarmResources *, QWidget *parent=0)
Definition: resourceselector.cpp:86
static CalEvent::Types types(const Akonadi::Collection &)
Definition: akonadimodel.cpp:1926
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
void initActions(KActionCollection *)
Definition: resourceselector.cpp:510
void setBackgroundColor(Akonadi::Collection &, const QColor &)
Set the background color for a collection and its alarms.
Definition: akonadimodel.cpp:874
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
void setSpacing(int)
Definition: resourcemodelview.h:38
int indexOf(const QRegExp &rx, int from) const
Definition: resourcemodelview.h:70
void removeResource(AlarmResource *)
Definition: eventlistmodel.cpp:640
static bool exportAlarms(const KAEvent::List &, QWidget *parent)
Definition: alarmcalendar.cpp:1074
Definition: collectionmodel.h:141
QColor backgroundColor(Akonadi::Collection &) const
Get the background color for a collection and its alarms.
Definition: akonadimodel.cpp:885
void createResource()
Definition: akonadiresourcecreator.cpp:53
bool isValid() const
void addLayout(QLayout *layout, int stretch)
singleShot
static void information(QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Options(Notify|WindowModal))
static CalEvent::Types setEnabled(const Akonadi::Collection &, CalEvent::Types, bool enabled)
Enable or disable a collection (if it is valid) for specified alarm types.
Definition: collectionmodel.cpp:736
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.