messagelist
#include <theme.h>
Public Types | |
enum | Flags { HideWhenDisabled = 1, SoftenByBlendingWhenDisabled = (1 << 1), UseCustomColor = (1 << 2), UseCustomFont = (1 << 3), SoftenByBlending = (1 << 4) } |
enum | Type { Subject = 1 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems | LongText, Date = 2 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems, SenderOrReceiver = 3 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems, Sender = 4 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems, Receiver = 5 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems, Size = 6 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems, ReadStateIcon = 7 | ApplicableToMessageItems | IsIcon, AttachmentStateIcon = 8 | CanBeDisabled | ApplicableToMessageItems | IsIcon, RepliedStateIcon = 9 | CanBeDisabled | ApplicableToMessageItems | IsIcon, GroupHeaderLabel = 10 | DisplaysText | CanUseCustomColor | ApplicableToGroupHeaderItems, ActionItemStateIcon = 11 | CanBeDisabled | ApplicableToMessageItems | IsIcon | IsClickable, ImportantStateIcon = 12 | CanBeDisabled | ApplicableToMessageItems | IsIcon | IsClickable, SpamHamStateIcon = 13 | CanBeDisabled | ApplicableToMessageItems | IsIcon | IsClickable, WatchedIgnoredStateIcon = 14 | CanBeDisabled | ApplicableToMessageItems | IsIcon | IsClickable, ExpandedStateIcon = 15 | CanBeDisabled | ApplicableToGroupHeaderItems | IsIcon | IsClickable, EncryptionStateIcon = 16 | CanBeDisabled | ApplicableToMessageItems | IsIcon, SignatureStateIcon = 17 | CanBeDisabled | ApplicableToMessageItems | IsIcon, VerticalLine = 18 | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems | IsSpacer, HorizontalSpacer = 19 | ApplicableToMessageItems | ApplicableToGroupHeaderItems | IsSpacer, MostRecentDate = 20 | DisplaysText | CanUseCustomColor | ApplicableToMessageItems | ApplicableToGroupHeaderItems, CombinedReadRepliedStateIcon = 21 | ApplicableToMessageItems | IsIcon, TagList = 22 | ApplicableToMessageItems | IsIcon, AnnotationIcon = 23 | ApplicableToMessageItems | IsIcon | CanBeDisabled | IsClickable, InvitationIcon = 24 | ApplicableToMessageItems | IsIcon } |
Public Member Functions | |
ContentItem (Type type) | |
ContentItem (const ContentItem &src) | |
bool | canBeDisabled () const |
bool | canUseCustomColor () const |
const QColor & | customColor () const |
bool | displaysLongText () const |
bool | displaysText () const |
const QFont & | font () const |
const QString & | fontKey () const |
bool | hideWhenDisabled () const |
bool | isClickable () const |
bool | isIcon () const |
bool | isSpacer () const |
bool | load (QDataStream &stream, int themeVersion) |
void | save (QDataStream &stream) const |
void | setCustomColor (const QColor &clr) |
void | setFont (const QFont &font) |
void | setHideWhenDisabled (bool hideWhenDisabled) |
void | setSoftenByBlending (bool softenByBlending) |
void | setSoftenByBlendingWhenDisabled (bool softenByBlendingWhenDisabled) |
void | setUseCustomColor (bool useCustomColor) |
void | setUseCustomFont (bool useCustomFont) |
bool | softenByBlending () const |
bool | softenByBlendingWhenDisabled () const |
Type | type () const |
bool | useCustomColor () const |
bool | useCustomFont () const |
Static Public Member Functions | |
static bool | applicableToGroupHeaderItems (Type type) |
static bool | applicableToMessageItems (Type type) |
static QString | description (Type type) |
Detailed Description
The ContentItem class defines a content item inside a Row.
Content items are data items extracted from a message or a group header: they can be text, spacers, separators or icons.
Member Enumeration Documentation
The available ContentItem types.
Note that the values in this enum are unique values or'ed with the TypePropertyBits above.
Enumerator | |
---|---|
Subject |
Display the subject of the message item. This is a long text. |
Date |
Formatted date time of the message/group. |
SenderOrReceiver |
From: or To: strip, depending on the folder settings. |
Sender |
From: strip, always. |
Receiver |
To: strip, always. |
Size |
Formatted size of the message. |
ReadStateIcon |
The icon that displays the unread/read state (never disabled) |
AttachmentStateIcon |
The icon that displays the atachment state (may be disabled) |
RepliedStateIcon |
The icon that displays the replied/forwarded state (may be disabled) |
GroupHeaderLabel |
The group header label. |
ActionItemStateIcon |
The ActionItem state icon. May be disabled. Clickable (cycles todo->nothing) |
ImportantStateIcon |
The Important tag icon. May be disabled. Clickable (cycles important->nothing) |
SpamHamStateIcon |
The Spam/Ham state icon. May be disabled. Clickable (cycles spam->ham->nothing) |
WatchedIgnoredStateIcon |
The Watched/Ignored state icon. May be disabled. Clickable (cycles watched->ignored->nothing) |
ExpandedStateIcon |
The Expanded state icon for group headers. May be disabled. Clickable (expands/collapses the group) |
EncryptionStateIcon |
The Encryption state icon for messages. May be disabled (no encryption). |
SignatureStateIcon |
The Signature state icon for messages. May be disabled (no signature) |
VerticalLine |
A vertical separation line. |
HorizontalSpacer |
A small empty spacer usable as separator. |
MostRecentDate |
The date of the most recent message in subtree. |
CombinedReadRepliedStateIcon |
The combined icon that displays the unread/read/replied/forwarded state (never disabled) |
TagList |
The list of MessageItem::Tag entries. |
AnnotationIcon |
Whether the message has a annotation/note. |
InvitationIcon |
Whether the message is an invitation. |
Constructor & Destructor Documentation
|
explicit |
Creates a ContentItem with the specified type.
A content item must be added to a theme Row.
|
explicit |
Creates a ContentItem that is a copy of the content item src.
A content item must be added to a theme Row.
Member Function Documentation
|
static |
Static test that returns true if an instance of ContentItem with the specified type makes sense in a Row for group header items.
|
static |
Static test that returns true if an instance of ContentItem with the specified type makes sense in a Row for message items.
|
inline |
Returns true if this ContentItem can be in a "disabled" state.
The attachment state icon, for example, can be disabled when the related message has no attachments. For such items the HideWhenDisabled and SoftenByBlendingWhenDisabled flags are meaningful.
|
inline |
Returns true if this ContentItem can make use of a custom color.
|
inline |
Returns the custom color set for this item.
The return value is meaningful only if canUseCustomColor() returns true returns true and setUseCustomColor( true ) has been called.
|
static |
|
inline |
Returns true if this item displays a long text.
The returned value makes sense only if displaysText() returned true.
|
inline |
|
inline |
|
inline |
Returns the font key used by this item.
It may be a custom font key set by setFont() or the default application font (returned by KGlobalSettings::generalFont()). This setting is valid as long as you have called updateFontMetrics() with the appropriate paint device. It is primary used to avoid to calculate the key every time an item is displayed.
|
inline |
Returns true if this item should be hidden when in disabled state.
Hidden content items simply aren't painted and take no space. This flag has meaning only on items for that canBeDisabled() returns true.
|
inline |
|
inline |
|
inline |
bool Theme::ContentItem::load | ( | QDataStream & | stream, |
int | themeVersion | ||
) |
Handles content item loading (used by Theme::Row::load())
void Theme::ContentItem::save | ( | QDataStream & | stream | ) | const |
Handles content item saving (used by Theme::Row::save())
|
inline |
Sets the custom color for this item.
Meaningful only if canUseCustomColor() returns true and you call setUseCustomColor( true )
void Theme::ContentItem::setFont | ( | const QFont & | font | ) |
Sets the custom font to be used with this item.
The font is meaningful only for items for that displaysText() returns true. You must also call setUseCustomFont() in order for this setting to be effective.
|
inline |
Sets the flag that causes this item to be hidden when disabled.
Hidden content items simply aren't painted and take no space. This flag overrides the setSoftenByBlendingWhenDisabled() setting. This flag has meaning only on items for that canBeDisabled() returns true.
|
inline |
|
inline |
Sets the flag that causes this item to be painted "softly" when disabled.
Soft icons are painted with very low opacity. This flag may be overridden by the setHideWhenDisabled() setting. This flag has meaning only on items for that canBeDisabled() returns true.
|
inline |
Makes this item use the custom color that can be set by setCustomColor().
The custom color is meaningful only if canUseCustomColor() returns true.
|
inline |
|
inline |
|
inline |
Returns true if this item should be painted in a "soft" fashion when in disabled state.
Soft icons are painted with very low opacity. This flag has meaning only on items for that canBeDisabled() returns true.
|
inline |
|
inline |
Returns true if this item uses a custom color.
The return value of this function is valid only if canUseCustomColor() returns true.
|
inline |
Returns true if this item uses a custom font.
The return value of this function is valid only if displaysText() returns true.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.