Eventviews
monthscene.cpp
42 mAnniversaryPixmap = QIcon::fromTheme(QStringLiteral("view-calendar-wedding-anniversary")).pixmap(16, 16);
189 i18nc("monthname year", "%1 %2", QLocale().standaloneMonthName(dayInMonth.month(), QLocale::LongFormat), QString::number(dayInMonth.year())));
206 p->drawText(QRect(mScene->cellHorizontalPos(cell), mScene->cellVerticalPos(cell) - 15, mScene->columnWidth(), 15),
218 const QList<QDate> workDays = CalendarSupport::workDays(mMonthView->actualStartDateTime().date(), mMonthView->actualEndDateTime().date());
240 const QRect cellRect(mScene->cellHorizontalPos(cell), mScene->cellVerticalPos(cell), columnWidth, rowHeight);
289 for (QDate d = mMonthView->actualStartDateTime().date(); d <= mMonthView->actualEndDateTime().date(); d = d.addDays(1)) {
297 const auto brush = KColorScheme(QPalette::Normal, KColorScheme::ColorSet::Header).background(KColorScheme::BackgroundRole::NormalBackground);
316 dayText = i18nc("'Month day' for month view cells", "%1 %2", QLocale::system().monthName(d.month(), QLocale::ShortFormat), d.day());
343 mScene->cellVerticalPos(cell) + rowHeight - cell->downArrow()->boundingRect().height() / 2 - 2);
386 for (QDate d = mMonthView->actualStartDateTime().date(); d <= mMonthView->actualEndDateTime().date(); d = d.addDays(1)) {
506 if (iItem->monthItem()->isResizable() && iItem->isBeginItem() && iItem->mapFromScene(pos).x() <= 10) {
508 } else if (iItem->monthItem()->isResizable() && iItem->isEndItem() && iItem->mapFromScene(pos).x() >= iItem->boundingRect().width() - 10) {
590 if (iItem->monthItem()->isResizable() && iItem->isBeginItem() && iItem->mapFromScene(pos).x() <= 10) {
593 } else if (iItem->monthItem()->isResizable() && iItem->isEndItem() && iItem->mapFromScene(pos).x() >= iItem->boundingRect().width() - 10) {
void defaultAction(const Akonadi::Item &incidence)
Perform the default action for an incidence, e.g.
Definition eventview.cpp:74
A MonthGraphicsItem representing a part of an event.
Definition monthgraphicsitems.h:116
QRectF boundingRect() const override
Reimplemented from QGraphicsItem.
Definition monthgraphicsitems.cpp:203
bool isBeginItem() const
Returns true if this MonthGraphicsItem is the first one of the MonthItem ones.
Definition monthgraphicsitems.cpp:141
bool isEndItem() const
Returns true if this MonthGraphicsItem is the last one of the MonthItem ones.
Definition monthgraphicsitems.cpp:136
void setActionCursor(MonthScene::ActionType actionType)
Change the cursor according to actionType.
Definition monthscene.cpp:762
void drawBackground(QPainter *painter, const QRectF &rect) override
Draws the cells.
Definition monthscene.cpp:167
void moveTo(QDate date)
Called during a drag to move the item to a particular date.
Definition monthitem.cpp:164
virtual bool isMoveable() const =0
Returns true if the item can be moved.
bool resizeBy(int offsetFromPreviousDate)
Called during resize to resize the item a bit, relative to the previous resize step.
Definition monthitem.cpp:136
QDate startDate() const
The start date of the incidence, generally realStartDate.
Definition monthitem.cpp:184
virtual bool isResizable() const =0
Returns true if the item can be resized.
KCalendarCore::DateList selectedIncidenceDates() const override
Returns dates of the currently selected events.
Definition monthview.cpp:306
Graphics items which indicates that the view can be scrolled to display more events.
Definition monthgraphicsitems.h:22
QBrush background(BackgroundRole=NormalBackground) const
QBrush foreground(ForegroundRole=NormalText) const
Q_SCRIPTABLE Q_NOREPLY void start()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Incidence::Ptr incidence(const Akonadi::Item &item)
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
KGuiItem ok()
void start(int msec, QObject *object)
void stop()
int timerId() const const
const QColor & color() const const
QColor darker(int factor) const const
void setAlpha(int alpha)
QDate addDays(qint64 ndays) const const
QDate currentDate()
qint64 daysTo(QDate d) const const
QDate date() const const
void accept()
virtual void setAccepted(bool accepted)
void setBold(bool enable)
void hide()
bool isVisible() const const
QPainterPath mapFromScene(const QPainterPath &path) const const
void setPos(const QPointF &pos)
void show()
BackgroundLayer
virtual bool event(QEvent *event) override
void invalidate(const QRectF &rect, SceneLayers layers)
QGraphicsItem * itemAt(const QPointF &position, const QTransform &deviceTransform) const const
void removeItem(QGraphicsItem *item)
sceneRect
void update(const QRectF &rect)
QList< QGraphicsView * > views() const const
QWidget * widget() const const
QPointF scenePos() const const
QPoint screenPos() const const
Qt::MouseButton button() const const
QPointF scenePos() const const
virtual bool event(QEvent *event) override
QGraphicsScene * scene() const const
void setScene(QGraphicsScene *scene)
QPixmap pixmap(QWindow *window, const QSize &size, Mode mode, State state) const const
QIcon fromTheme(const QString &name)
const_reference at(qsizetype i) const const
bool contains(const AT &value) const const
bool isEmpty() const const
LongFormat
QString dayName(int day, FormatType type) const const
QLocale system()
Q_EMITQ_EMIT
T qobject_cast(QObject *object)
None
void drawRect(const QRect &rectangle)
void drawText(const QPoint &position, const QString &text)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
const QFont & font() const const
void setBrush(Qt::BrushStyle style)
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
Normal
Window
QColor color() const const
qreal x() const const
qreal y() const const
bool isNull() const const
qreal height() const const
qreal width() const const
bool isEmpty() const const
QString number(double n, char format, int precision)
AlignCenter
ArrowCursor
RightButton
NoPen
int timerId() const const
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
void setCursor(const QCursor &)
font
void setMouseTracking(bool enable)
palette
rect
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.