Eventviews
timelineview.cpp
147 void paintGanttItem(QPainter *painter, const KGantt::StyleOptionGanttItem &opt, const QModelIndex &idx) override
153 const KGantt::ItemType type = static_cast<KGantt::ItemType>(idx.model()->data(idx, KGantt::ItemTypeRole).toInt());
240 const auto h = d->mLeftView->style()->sizeFromContents(QStyle::CT_ItemViewItem, &opt, QSize(), d->mLeftView).height();
260 connect(d->mGantt, &KGantt::GraphicsView::activated, d.get(), &TimelineViewPrivate::itemSelected);
262 connect(d->mGantt, &QWidget::customContextMenuRequested, d.get(), &TimelineViewPrivate::contextMenuRequested);
305 auto item = new TimelineItem(calendar, index++, static_cast<QStandardItemModel *>(d->mGantt->model()), d->mGantt);
306 const auto name = Akonadi::CalendarUtils::displayName(calendar->model(), calendar->collection());
329 const auto events = calendar->events(day, QTimeZone::systemTimeZone(), KCalendarCore::EventSortStartDate, KCalendarCore::SortDirectionAscending);
417 auto timelineItem = dynamic_cast<TimelineSubItem *>(itemModel->item(itemIndex.row(), itemIndex.column()));
EventView is the abstract base class from which all other calendar views for event data are derived.
Definition eventview.h:69
This class provides a view showing which blocks of time are occupied by events in the user's calendar...
Definition timelineview.h:27
int currentDateCount() const override
Returns the number of currently shown dates.
Definition timelineview.cpp:280
void showDates(const QDate &, const QDate &, const QDate &preferredMonth=QDate()) override
Definition timelineview.cpp:285
TimelineView(const EventViews::PrefsPtr &preferences, QWidget *parent=nullptr)
Create a TimelineView.
Definition timelineview.cpp:210
KCalendarCore::DateList selectedIncidenceDates() const override
Returns a list of the dates of selected events.
Definition timelineview.cpp:275
Akonadi::Item::List selectedIncidences() const override
Definition timelineview.cpp:270
bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const override
Sets the default start/end date/time for new events.
Definition timelineview.cpp:374
void showIncidences(const Akonadi::Item::List &incidenceList, const QDate &date) override
Shows given incidences.
Definition timelineview.cpp:342
void updateView() override
Updates the current display to reflect changes that may have happened in the calendar since the last ...
Definition timelineview.cpp:348
void setStartDateTime(const QDateTime &dt)
QPen defaultPen(ItemType type) const
virtual void paintGanttItem(QPainter *p, const StyleOptionGanttItem &opt, const QModelIndex &idx)
QBrush defaultBrush(ItemType type) const
Position displayPosition
QRectF boundingRect
QRectF itemRect
Q_SCRIPTABLE Q_NOREPLY void start()
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT QString displayName(Akonadi::ETMCalendar *calendar, const Akonadi::Collection &collection)
Type type(const QSqlDatabase &db)
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
EVENTVIEWS_EXPORT QColor resourceColor(const Akonadi::Collection &collection, const PrefsPtr &preferences)
This method returns the proper resource / subresource color for the view.
Definition helper.cpp:56
EventSortStartDate
SortDirectionAscending
ItemTypeRole
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
bool isValid() const const
QDateTime addDuration(std::chrono::milliseconds msecs) const const
bool isValid() const const
ToolTip
qreal height() const const
virtual int type() const const
Stretch
void setSectionResizeMode(ResizeMode mode)
virtual QSize sizeHint() const const override
int column() const const
bool isValid() const const
const QAbstractItemModel * model() const const
QModelIndex parent() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
QObject * parent() const const
T qobject_cast(QObject *object)
Antialiasing
void drawRect(const QRect &rectangle)
void drawText(const QPoint &position, const QString &text)
const QFont & font() const const
void setBrush(Qt::BrushStyle style)
void setBrushOrigin(const QPoint &position)
void setPen(Qt::PenStyle style)
void setRenderHints(RenderHints hints, bool on)
qreal height() const const
bool isValid() const const
void setHeight(qreal height)
void setY(qreal y)
QPointF topLeft() const const
qreal y() const const
int & rheight()
void itemChanged(QStandardItem *item)
CT_ItemViewItem
State_Selected
void initFrom(const QWidget *widget)
typedef Alignment
CustomContextMenu
red
DisplayRole
Horizontal
ScrollBarAlwaysOff
QTimeZone systemTimeZone()
QString toString() const const
T value() const const
void customContextMenuRequested(const QPoint &pos)
virtual bool event(QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.