KDEUI
kdatetable.cpp
Go to the documentation of this file.
317 int offset = ( d->m_weekDayFirstOfMonth - calendar()->weekStartDay() + d->m_numDayColumns ) % d->m_numDayColumns;
330 int offset = ( d->m_weekDayFirstOfMonth - calendar()->weekStartDay() + d->m_numDayColumns ) % d->m_numDayColumns;
373 void KDateTable::paintCell( QPainter *painter, int row, int col, const KColorScheme &colorScheme )
474 bool customDay = ( d->m_useCustomColors && d->m_customPaintingModes.contains(cellDate.toJulianDay()) );
503 //If the cell day is the day of religious observance, then always color text red unless Custom overrides
518 } else if (cellBackgroundColor != palette().color(backgroundRole()) || pos == d->m_hoveredPos) {
649 rect = metrics.boundingRect( calendar()->weekDayName( weekday, KCalendarSystem::ShortDayName ) );
701 if( e->type() != QEvent::MouseButtonPress ) { // the KDatePicker only reacts on mouse press events:
842 void KDateTable::setCustomDatePainting( const QDate &date, const QColor &fgColor, BackgroundMode bgMode, const QColor &bgColor )
int weekDayOfPray() const
QAction * addTitle(const QString &text, QAction *before=0L)
Inserts a title item with no icon.
Definition: kmenu.cpp:170
virtual int day(const QDate &date) const
QList< QAction * > actions() const
Returns the list of KActions which belong to this action collection.
Definition: kactioncollection.cpp:186
ShortDayName
void setCustomDatePainting(const QDate &date, const QColor &fgColor, BackgroundMode bgMode=NoBgMode, const QColor &bgColor=QColor())
Makes a given date be painted with a given foregroundColor, and background (a rectangle,...
Definition: kdatetable.cpp:842
CalendarSystem
QDate readDate(const QString &intstr, const QString &fmt, bool *ok=0) const
virtual QSize sizeHint() const
Returns a recommended size for the widget.
Definition: kdatetable.cpp:821
virtual QString weekDayName(const QDate &date, WeekDayNameFormat format=LongDayName) const
void setShortcuts(const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
Definition: kaction.cpp:224
virtual void mousePressEvent(QMouseEvent *e)
React on mouse clicks that select a date.
Definition: kdatetable.cpp:699
int toJulianDay() const
@ ActiveText
Third color; for example items which are new, active, requesting attention, etc.
Definition: kcolorscheme.h:215
bool isValid() const
bool popupMenuEnabled() const
Returns if the popup menu is enabled or not.
Definition: kdatetable.cpp:837
QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
Definition: kactioncollection.cpp:217
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void unsetCustomDatePainting(const QDate &date)
Unsets the custom painting of a date so that the date is painted as usual.
Definition: kdatetable.cpp:859
KAction * prior(const QObject *recvr, const char *slot, QObject *parent)
Scroll up one page.
Definition: kstandardaction.cpp:409
bool setCalendarSystem(KLocale::CalendarSystem calendarSystem)
Definition: kdatetable.cpp:805
KLocale * locale()
Day
const KCalendarSystem * calendar() const
Returns the currently selected calendar system.
Definition: kdatetable.cpp:788
virtual State validate(QString &text, int &e) const
Definition: kdatetable.cpp:221
virtual QDate dateFromPos(int pos)
calculate the date that is displayed at a given cell in the matrix.
Definition: kdatetable.cpp:328
void setPopupMenuEnabled(bool enable)
Enables a popup menu when right clicking on a date.
Definition: kdatetable.cpp:832
const KLocale * locale() const
QString formatDate(const QString &formatString, KLocale::DateTimeFormatStandard formatStandard=KLocale::KdeFormat) const
ShortNumber
KAction * quit(const QObject *recvr, const char *slot, QObject *parent)
Quit the program.
Definition: kstandardaction.cpp:279
KAction * next(const QObject *recvr, const char *slot, QObject *parent)
Scroll down one page.
Definition: kstandardaction.cpp:414
int month() const
static void beep(const QString &reason=QString(), QWidget *widget=0L)
This is a simple substitution for QApplication::beep()
Definition: knotification.cpp:352
QBrush foreground(ForegroundRole=NormalText) const
Retrieve the requested foreground brush.
Definition: kcolorscheme.cpp:459
static QRect desktopGeometry(const QPoint &point)
This function returns the desktop geometry for an application that needs to set the geometry of a wid...
Definition: kglobalsettings.cpp:732
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition: kstandardshortcut.cpp:349
@ InactiveText
Second color; for example, comments, items which are old, inactive or disabled.
Definition: kcolorscheme.h:210
virtual int weekStartDay() const
void readSettings(KConfigGroup *config=0)
Read all key associations from config.
Definition: kactioncollection.cpp:413
KLocale::CalendarSystem calendarSystem() const
virtual int posFromDate(const QDate &date)
calculate the position of the cell in the matrix for the given date.
Definition: kdatetable.cpp:314
State date(const QString &text, QDate &date) const
Definition: kdatetable.cpp:230
void leaveModality()
int dayOfWeek() const
bool setCalendar(KCalendarSystem *calendar=0)
Changes the calendar system to use.
Definition: kdatetable.cpp:793
void aboutToShowContextMenu(KMenu *menu, const QDate &date)
A popup menu for a given date is about to be shown (as when the user right clicks on that date and th...
void addAssociatedWidget(QWidget *widget)
Associate all actions in this collection to the given widget, including any actions added after this ...
Definition: kactioncollection.cpp:708
int main(int argc, char **argv)
@ NegativeText
Sixth color; for example, errors, untrusted content, deletions, etc.
Definition: kcolorscheme.h:234
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.