CalendarSupport::IncidenceViewer Class
| Header: | #include <CalendarSupport/IncidenceViewer> |
| CMake: | find_package(KPim6CalendarSupport REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::CalendarSupport) |
Public Functions
| IncidenceViewer(QWidget *parent = nullptr) | |
| virtual | ~IncidenceViewer() override |
| QDate | activeDate() const |
| QAbstractItemModel * | attachmentModel() const |
| Akonadi::Item | incidence() const |
| void | setDefaultMessage(const QString &message) |
| void | setDelayedClear(bool delayed) |
| void | setHeaderText(const QString &text) |
| void | setModel(Akonadi::EntityTreeModel *model) |
Public Slots
| void | setIncidence(const Akonadi::Item &incidence, QDate activeDate = QDate()) |
Protected Functions
| void | init() |
Detailed Description
Creates a new incidence viewer.
*param calendar is a pointer to a Calendar instance. parent it the parent widget.
Member Function Documentation
[explicit] IncidenceViewer::IncidenceViewer(QWidget *parent = nullptr)
Creates a new incidence viewer.
*param parent it the parent widget.
[override virtual noexcept] IncidenceViewer::~IncidenceViewer()
Destroys the incidence viewer.
QDate IncidenceViewer::activeDate() const
Returns the active date used for the currently displayed incidence
QAbstractItemModel *IncidenceViewer::attachmentModel() const
Returns the attachment model for the currently displayed incidence.
Akonadi::Item IncidenceViewer::incidence() const
Returns the incidence that is currently displayed.
See also setIncidence().
[protected] void IncidenceViewer::init()
Initialize the widget settings.
void IncidenceViewer::setDefaultMessage(const QString &message)
Sets the default message that shall be shown if no incidence is set.
void IncidenceViewer::setDelayedClear(bool delayed)
Sets whether the view shall be cleared as soon as an empty incidence is set (default) or delayed when the next valid incidence is set.
void IncidenceViewer::setHeaderText(const QString &text)
Sets an additional text that is shown above the incidence.
[slot] void IncidenceViewer::setIncidence(const Akonadi::Item &incidence, QDate activeDate = QDate())
Sets the incidence that shall be displayed in the viewer.
activeDate The active date is used to calculate the actual date of the selected incidence in case of recurring incidences.
See also incidence().
void IncidenceViewer::setModel(Akonadi::EntityTreeModel *model)
Sets the model for this viewer. model is a pointer to an ETM instance.