Messagelib
theme.h
84 * The item takes more horizontal space than the other text items (at the time of writing it's only the subject)
114 Date = 2 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems,
164 * The Expanded state icon for group headers. May be disabled. Clickable (expands/collapses the group)
178 VerticalLine = 18 | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems | IsSpacer,
186 MostRecentDate = 20 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems,
216 HideWhenDisabled = 1, ///< In disabled state the icon should take no space (overrides SoftenByBlendingWhenDisabled)
217 SoftenByBlendingWhenDisabled = (1 << 1), ///< In disabled state the icon should be still shown, but made very soft by alpha blending
218 UseCustomColor = (1 << 2), ///< For text and vertical line. If set then always use a custom color, otherwise use default text color
219 IsBold = (1 << 3), ///< For text items. If set then always show as bold, otherwise use the default font weight
220 IsItalic = (1 << 4), ///< Fot text items. If set then always show as italic, otherwise use the default font style
228 QColor mCustomColor; ///< The color to use with this content item, meaningful only if canUseCustomColor() return true.
517 int mCurrentlyVisible; ///< Is this column currently visible ? always valid (eventually set from default)
538 * Returns true if there are other references and false otherwise (so the data can be safely deleted)
602 bool mIsSenderOrReceiver; ///< If this column displays the sender/receiver field then we will update its label on the fly
603 SortOrder::MessageSorting mMessageSorting; ///< The message sort order we switch to when clicking on this column
604 QList<Row *> mGroupHeaderRows; ///< The list of rows we display in this column for a GroupHeaderItem
607 SharedRuntimeData *mSharedRuntimeData = nullptr; ///< A pointer to the shared runtime data: shared between all instances of a theme with the same id
800 AutoColor, ///< Automatically determine the color (somewhere in the middle between background and text)
824 // ShowWhenMoreThanOneColumn, ///< This doesn't work at the moment (since without header we don't have means for showing columns back)
868 GroupHeaderBackgroundMode mGroupHeaderBackgroundMode; ///< How do we paint group header background ?
869 QColor mGroupHeaderBackgroundColor; ///< The background color of the message group, used only if CustomColor
870 GroupHeaderBackgroundStyle mGroupHeaderBackgroundStyle; ///< How do we paint group header background ?
bool softenByBlending() const
Returns true if this item should be always painted in a "soft" fashion.
Definition: theme.cpp:254
void setPixmapName(const QString &pixmapName)
Sets the icon's name (used in SmallIcon) for this column.
Definition: theme.cpp:652
bool visibleByDefault() const
Returns true if this column has to be shown by default.
Definition: theme.cpp:667
const QString & description() const
Returns a description of this option set.
Definition: optionset.h:79
@ AttachmentStateIcon
The icon that displays the attachment state (may be disabled)
Definition: theme.h:138
static bool applicableToGroupHeaderItems(Type type)
Static test that returns true if an instance of ContentItem with the specified type makes sense in a ...
Definition: theme.cpp:283
const QList< ContentItem * > & leftItems() const
Returns the list of left aligned items for this row.
Definition: theme.cpp:507
void setHideWhenDisabled(bool hideWhenDisabled)
Sets the flag that causes this item to be hidden when disabled.
Definition: theme.cpp:231
void setMessageSorting(SortOrder::MessageSorting ms)
Sets the sort order for messages that we should switch to when clicking on this column's header (if v...
Definition: theme.cpp:693
static QList< QPair< QString, int > > enumerateViewHeaderPolicyOptions()
Enumerates the available view header policy options.
Definition: theme.cpp:1045
SortOrder::MessageSorting messageSorting() const
Returns the sort order for messages that we should switch to when clicking on this column's header (i...
Definition: theme.cpp:688
void save(QDataStream &stream) const
Handles column saving (used by Theme::save())
Definition: theme.cpp:795
void setCurrentWidth(double currentWidth)
Sets the current shared width setting for this column.
Definition: theme.cpp:713
void setGroupHeaderBackgroundStyle(GroupHeaderBackgroundStyle groupHeaderBackgroundStyle)
Sets the group header background style for this theme.
Definition: theme.cpp:1040
The Row class defines a row of items inside a Column.
Definition: theme.h:412
bool load(QDataStream &stream, int themeVersion)
Handles content item loading (used by Theme::Row::load())
Definition: theme.cpp:295
void setGroupHeaderBackgroundColor(const QColor &clr)
Sets the group header background color for this theme.
Definition: theme.cpp:1030
void save(QDataStream &stream) const override
Pure virtual reimplemented from OptionSet.
Definition: theme.cpp:1180
const QList< Row * > & messageRows() const
Returns the list of rows visible in this column for a MessageItem.
Definition: theme.cpp:718
Column * column(int idx) const
Returns a pointer to the column at the specified index or 0 if there is no such column.
Definition: theme.cpp:973
static bool applicableToMessageItems(Type type)
Static test that returns true if an instance of ContentItem with the specified type makes sense in a ...
Definition: theme.cpp:278
void removeLeftItem(ContentItem *item)
Removes the specified left aligned content item from this row.
Definition: theme.cpp:397
@ IsBold
For text items. If set then always show as bold, otherwise use the default font weight.
Definition: theme.h:219
void removeRightItem(ContentItem *item)
Removes the specified right aligned content item from this row.
Definition: theme.cpp:416
bool softenByBlendingWhenDisabled() const
Returns true if this item should be painted in a "soft" fashion when in disabled state.
Definition: theme.cpp:240
void setUseCustomColor(bool useCustomColor)
Makes this item use the custom color that can be set by setCustomColor().
Definition: theme.cpp:189
void setIsSenderOrReceiver(bool sor)
Marks this column as containing the "sender/receiver" field.
Definition: theme.cpp:662
void insertRightItem(int idx, ContentItem *item)
Adds a right aligned item at the specified position in this row.
Definition: theme.cpp:407
static QString description(Type type)
Returns a descriptive name for the specified content item type.
Definition: theme.cpp:103
@ CombinedReadRepliedStateIcon
The combined icon that displays the unread/read/replied/forwarded state (never disabled)
Definition: theme.h:190
void insertMessageRow(int idx, Row *row)
Inserts a message row to this theme column in the specified position.
Definition: theme.cpp:747
void save(QDataStream &stream) const
Handles content item saving (used by Theme::Row::save())
Definition: theme.cpp:288
void resetColumnSizes()
Resets the column sizes to "default" (subset of resetColumnState() above).
Definition: theme.cpp:961
GroupHeaderBackgroundMode groupHeaderBackgroundMode() const
Returns the group header background mode for this theme.
Definition: theme.cpp:1004
void setCurrentlyVisible(bool currentlyVisible)
Sets the current shared visibility state for this column.
Definition: theme.cpp:703
@ AutoColor
Automatically determine the color (somewhere in the middle between background and text)
Definition: theme.h:800
void setViewHeaderPolicy(ViewHeaderPolicy vhp)
Sets the ViewHeaderPolicy for this theme.
Definition: theme.cpp:1067
GroupHeaderBackgroundStyle groupHeaderBackgroundStyle() const
Returns the group header background style for this theme.
Definition: theme.cpp:1035
void detach()
Detaches this object from the shared runtime data for columns.
Definition: theme.cpp:946
const QList< Column * > & columns() const
Returns the list of columns available in this theme.
Definition: theme.cpp:968
bool load(QDataStream &stream, int themeVersion)
Handles column loading (used by Theme::load())
Definition: theme.cpp:824
bool isSenderOrReceiver() const
Returns true if this column is marked as "sender/receiver" and we should update its label on-the-fly.
Definition: theme.cpp:657
@ RepliedStateIcon
The icon that displays the replied/forwarded state (may be disabled)
Definition: theme.h:142
const QString & pixmapName() const
Returns the icon's name (used in SmallIcon) set for this column.
Definition: theme.cpp:647
bool isEmpty() const const
bool canBeDisabled() const
Returns true if this ContentItem can be in a "disabled" state.
Definition: theme.cpp:68
void insertLeftItem(int idx, ContentItem *item)
Adds a left aligned item at the specified position in this row.
Definition: theme.cpp:388
bool canUseCustomColor() const
Returns true if this ContentItem can make use of a custom color.
Definition: theme.cpp:73
bool load(QDataStream &stream) override
Pure virtual reimplemented from OptionSet.
Definition: theme.cpp:1089
void setGroupHeaderBackgroundMode(GroupHeaderBackgroundMode bm)
Sets the group header background mode for this theme.
Definition: theme.cpp:1017
void insertGroupHeaderRow(int idx, Row *row)
Inserts a group header row to this theme column in the specified position.
Definition: theme.cpp:766
bool currentlyVisible() const
Returns the current shared visibility state for this column.
Definition: theme.cpp:698
double currentWidth() const
Returns the current shared width setting for this column or -1 if the width is not specified and shou...
Definition: theme.cpp:708
The Theme class defines the visual appearance of the MessageList.
Definition: theme.h:47
const QList< ContentItem * > & rightItems() const
Returns the list of right aligned items for this row.
Definition: theme.cpp:402
ViewHeaderPolicy viewHeaderPolicy() const
Returns the currently set ViewHeaderPolicy.
Definition: theme.cpp:1062
bool containsTextItems() const
Returns true if this column contains text items.
Definition: theme.cpp:780
void removeAllLeftItems()
Removes all the left items from this row: the items are deleted.
Definition: theme.cpp:364
static QList< QPair< QString, int > > enumerateGroupHeaderBackgroundStyles()
Enumerates the available group header background styles.
Definition: theme.cpp:1050
GroupHeaderBackgroundMode
Which color do we use to paint group header background ?
Definition: theme.h:798
const QList< Row * > & groupHeaderRows() const
Returns the list of rows visible in this column for a GroupHeaderItem.
Definition: theme.cpp:761
bool isClickable() const
Returns true if clicking on this kind of item can perform an action.
Definition: theme.cpp:93
A set of options that can be applied to the MessageList in one shot.
Definition: optionset.h:32
@ IsItalic
Fot text items. If set then always show as italic, otherwise use the default font style.
Definition: theme.h:220
bool displaysText() const
Returns true if this item displays some kind of text.
Definition: theme.cpp:78
The ContentItem class defines a content item inside a Row.
Definition: theme.h:55
const QColor & groupHeaderBackgroundColor() const
Returns the group header background color for this theme.
Definition: theme.cpp:1025
void resetColumnState()
Resets the column state (visibility and width) to their default values (the "visible by default" ones...
Definition: theme.cpp:953
void save(QDataStream &stream) const
Handles row saving (used by Theme::Column::save())
Definition: theme.cpp:436
@ SoftenByBlendingWhenDisabled
In disabled state the icon should be still shown, but made very soft by alpha blending.
Definition: theme.h:217
const QColor & customColor() const
Returns the custom color set for this item.
Definition: theme.cpp:268
bool displaysLongText() const
Returns true if this item displays a long text.
Definition: theme.cpp:83
void detach()
Detaches the shared runtime data object and makes this object totally independent.
Definition: theme.cpp:677
void removeAllGroupHeaderRows()
Removes all the group header rows from this column.
Definition: theme.cpp:735
bool hideWhenDisabled() const
Returns true if this item should be hidden when in disabled state.
Definition: theme.cpp:226
void insertColumn(int idx, Column *column)
Inserts a column to this theme at the specified position.
Definition: theme.cpp:990
@ UseCustomColor
For text and vertical line. If set then always use a custom color, otherwise use default text color.
Definition: theme.h:218
void setVisibleByDefault(bool vbd)
Sets the "visible by default" tag for this column.
Definition: theme.cpp:672
bool load(QDataStream &stream, int themeVersion)
Handles row loading (used by Theme::Column::load())
Definition: theme.cpp:512
The Column class defines a view column available inside this theme.
Definition: theme.h:505
void setSoftenByBlendingWhenDisabled(bool softenByBlendingWhenDisabled)
Sets the flag that causes this item to be painted "softly" when disabled.
Definition: theme.cpp:245
void setSoftenByBlending(bool softenByBlending)
Sets the flag that causes this item to be painted "softly".
Definition: theme.cpp:259
@ HideWhenDisabled
In disabled state the icon should take no space (overrides SoftenByBlendingWhenDisabled)
Definition: theme.h:216
bool containsTextItems() const
Returns true if this row contains text items.
Definition: theme.cpp:421
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 03:53:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 03:53:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.