IncidenceEditorNG::IncidenceDialog Class
The IncidenceDialog class. More...
| Header: | #include <IncidenceEditor/IncidenceDialog> |
| CMake: | find_package(KPim6IncidenceEditor REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::IncidenceEditor) |
Public Functions
| IncidenceDialog(Akonadi::IncidenceChanger *changer = nullptr, QWidget *parent = nullptr, Qt::WindowFlags flags = {}) | |
| virtual | ~IncidenceDialog() override |
| Akonadi::Item | item() const |
| virtual void | load(const Akonadi::Item &item, const QDate &activeDate = QDate()) |
| virtual void | selectCollection(const Akonadi::Collection &collection) |
| void | setInitiallyDirty(bool initiallyDirty) |
| virtual void | setIsCounterProposal(bool isCounterProposal) |
| KCalendarCore::IncidenceBase::IncidenceType | type() |
| QObject * | typeAheadReceiver() const |
Signals
| void | incidenceCreated(const Akonadi::Item &) |
| void | invalidCollection() const |
Reimplemented Protected Functions
| virtual void | closeEvent(QCloseEvent *event) override |
Protected Slots
| void | handleSelectedCollectionChange(const Akonadi::Collection &collection) |
| virtual void | reject() override |
| void | slotButtonClicked(QAbstractButton *button) |
Detailed Description
Member Function Documentation
[explicit] IncidenceDialog::IncidenceDialog(Akonadi::IncidenceChanger *changer = nullptr, QWidget *parent = nullptr, Qt::WindowFlags flags = {})
Creates a new IncidenceDialog. changer The IncidenceChanger to use for modifications (optional). parent The parent widget. flags The window flags.
[override virtual noexcept] IncidenceDialog::~IncidenceDialog()
Destroys the IncidenceDialog.
[override virtual protected] void IncidenceDialog::closeEvent(QCloseEvent *event)
Handles the close event of the dialog.
[protected slot] void IncidenceDialog::handleSelectedCollectionChange(const Akonadi::Collection &collection)
Handles changes to the selected collection. collection The newly selected collection.
[signal] void IncidenceDialog::incidenceCreated(const Akonadi::Item &)
This signal is emitted when an incidence is created. item The Akonadi item that was created.
[signal] void IncidenceDialog::invalidCollection() const
This signal is emitted when an invalid collection is selected.
Akonadi::Item IncidenceDialog::item() const
Returns the Akonadi item currently being edited.
[virtual] void IncidenceDialog::load(const Akonadi::Item &item, const QDate &activeDate = QDate())
Loads the item into the dialog.
To create a new Incidence pass an invalid item with either an KCalendarCore::Event:Ptr or a KCalendarCore::Todo:Ptr set as payload. Note When the item is invalid, i.e. it has an invalid id, a valid payload <em>must</em> be set.
When the item has is valid this method will fetch the payload when this is not already set. item The Akonadi item to load. activeDate The date to use as the active date (optional).
[override virtual protected slot] void IncidenceDialog::reject()
Rejects and closes the dialog.
[virtual] void IncidenceDialog::selectCollection(const Akonadi::Collection &collection)
Sets the Collection combobox to collection. collection The collection to select.
void IncidenceDialog::setInitiallyDirty(bool initiallyDirty)
By default, if you load an incidence into the editor ( load(item) ), then press [OK] without changing anything, the dialog is dismissed, and the incidence isn't saved to akonadi.
Call this method with initiallyDirty = true if you want the incidence to be saved, It's useful if you're creating a dialog with an already crafted content, like in kmail's "Create Todo/Reminder Feature". initiallyDirty True if the dialog should be initially marked as modified.
[virtual] void IncidenceDialog::setIsCounterProposal(bool isCounterProposal)
Sets whether this dialog is displaying a counter proposal. isCounterProposal True if this is a counter proposal.
[protected slot] void IncidenceDialog::slotButtonClicked(QAbstractButton *button)
Handles button clicks in the dialog. button The button that was clicked.
KCalendarCore::IncidenceBase::IncidenceType IncidenceDialog::type()
Returns the dialog type (event, todo, journal, etc)
QObject *IncidenceDialog::typeAheadReceiver() const
Returns the object that will receive all key events.