• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • MessageList
  • Core
  • Theme
  • ContentItem
Public Types | Public Member Functions | Static Public Member Functions | List of all members
MessageList::Core::Theme::ContentItem Class Reference

#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.

Definition at line 73 of file theme.h.

Member Enumeration Documentation

enum MessageList::Core::Theme::ContentItem::Flags
Enumerator
HideWhenDisabled 

In disabled state the icon should take no space (overrides SoftenByBlendingWhenDisabled)

SoftenByBlendingWhenDisabled 

In disabled state the icon should be still shown, but made very soft by alpha blending.

UseCustomColor 

For text and vertical line. If set then always use a custom color, otherwise use default text color.

UseCustomFont 

For text items. If set then always use a custom font, otherwise default to the global font.

SoftenByBlending 

For text items: use 60% opacity.

Definition at line 231 of file theme.h.

enum MessageList::Core::Theme::ContentItem::Type

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.

Definition at line 125 of file theme.h.

Constructor & Destructor Documentation

Theme::ContentItem::ContentItem ( Type  type)
explicit

Creates a ContentItem with the specified type.

A content item must be added to a theme Row.

Definition at line 62 of file theme.cpp.

Theme::ContentItem::ContentItem ( const ContentItem &  src)
explicit

Creates a ContentItem that is a copy of the content item src.

A content item must be added to a theme Row.

Definition at line 67 of file theme.cpp.

Member Function Documentation

bool Theme::ContentItem::applicableToGroupHeaderItems ( Type  type)
static

Static test that returns true if an instance of ContentItem with the specified type makes sense in a Row for group header items.

Definition at line 161 of file theme.cpp.

bool Theme::ContentItem::applicableToMessageItems ( Type  type)
static

Static test that returns true if an instance of ContentItem with the specified type makes sense in a Row for message items.

Definition at line 156 of file theme.cpp.

bool MessageList::Core::Theme::ContentItem::canBeDisabled ( ) const
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.

Definition at line 273 of file theme.h.

bool MessageList::Core::Theme::ContentItem::canUseCustomColor ( ) const
inline

Returns true if this ContentItem can make use of a custom color.

Definition at line 279 of file theme.h.

const QColor& MessageList::Core::Theme::ContentItem::customColor ( ) const
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.

Definition at line 437 of file theme.h.

QString Theme::ContentItem::description ( Type  type)
static

Returns a descriptive name for the specified content item type.

Definition at line 75 of file theme.cpp.

bool MessageList::Core::Theme::ContentItem::displaysLongText ( ) const
inline

Returns true if this item displays a long text.

The returned value makes sense only if displaysText() returned true.

Definition at line 293 of file theme.h.

bool MessageList::Core::Theme::ContentItem::displaysText ( ) const
inline

Returns true if this item displays some kind of text.

Items that display text make use of the customFont() setting.

Definition at line 286 of file theme.h.

const QFont& MessageList::Core::Theme::ContentItem::font ( ) const
inline

Returns the font used by this item.

It may be a custom font 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.

Definition at line 419 of file theme.h.

const QString& MessageList::Core::Theme::ContentItem::fontKey ( ) const
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.

Definition at line 429 of file theme.h.

bool MessageList::Core::Theme::ContentItem::hideWhenDisabled ( ) const
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.

Definition at line 363 of file theme.h.

bool MessageList::Core::Theme::ContentItem::isClickable ( ) const
inline

Returns true if clicking on this kind of item can perform an action.

Definition at line 304 of file theme.h.

bool MessageList::Core::Theme::ContentItem::isIcon ( ) const
inline

Returns true if this item displays an icon.

Definition at line 299 of file theme.h.

bool MessageList::Core::Theme::ContentItem::isSpacer ( ) const
inline

Returns true if this item is a small spacer.

Definition at line 310 of file theme.h.

bool Theme::ContentItem::load ( QDataStream &  stream,
int  themeVersion 
)

Handles content item loading (used by Theme::Row::load())

Definition at line 180 of file theme.cpp.

void Theme::ContentItem::save ( QDataStream &  stream) const

Handles content item saving (used by Theme::Row::save())

Definition at line 172 of file theme.cpp.

void MessageList::Core::Theme::ContentItem::setCustomColor ( const QColor &  clr)
inline

Sets the custom color for this item.

Meaningful only if canUseCustomColor() returns true and you call setUseCustomColor( true )

Definition at line 444 of file theme.h.

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.

Definition at line 166 of file theme.cpp.

void MessageList::Core::Theme::ContentItem::setHideWhenDisabled ( bool  hideWhenDisabled)
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.

Definition at line 372 of file theme.h.

void MessageList::Core::Theme::ContentItem::setSoftenByBlending ( bool  softenByBlending)
inline

Sets the flag that causes this item to be painted "softly".

Meaningful only for text items.

Definition at line 403 of file theme.h.

void MessageList::Core::Theme::ContentItem::setSoftenByBlendingWhenDisabled ( bool  softenByBlendingWhenDisabled)
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.

Definition at line 389 of file theme.h.

void MessageList::Core::Theme::ContentItem::setUseCustomColor ( bool  useCustomColor)
inline

Makes this item use the custom color that can be set by setCustomColor().

The custom color is meaningful only if canUseCustomColor() returns true.

Definition at line 341 of file theme.h.

void MessageList::Core::Theme::ContentItem::setUseCustomFont ( bool  useCustomFont)
inline

Makes this item use the custom font that can be set by setCustomFont().

The custom font is meaningful only if canUseCustomFont() returns true.

Definition at line 355 of file theme.h.

bool MessageList::Core::Theme::ContentItem::softenByBlending ( ) const
inline

Returns true if this item should be always painted in a "soft" fashion.

Meaningful only for text items.

Definition at line 396 of file theme.h.

bool MessageList::Core::Theme::ContentItem::softenByBlendingWhenDisabled ( ) const
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.

Definition at line 380 of file theme.h.

Type MessageList::Core::Theme::ContentItem::type ( ) const
inline

Returns the type of this content item.

Definition at line 264 of file theme.h.

bool MessageList::Core::Theme::ContentItem::useCustomColor ( ) const
inline

Returns true if this item uses a custom color.

The return value of this function is valid only if canUseCustomColor() returns true.

Definition at line 334 of file theme.h.

bool MessageList::Core::Theme::ContentItem::useCustomFont ( ) const
inline

Returns true if this item uses a custom font.

The return value of this function is valid only if displaysText() returns true.

Definition at line 348 of file theme.h.


The documentation for this class was generated from the following files:
  • theme.h
  • theme.cpp
This file is part of the KDE documentation.
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.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal