messagelist
manager.cpp
Go to the documentation of this file.
69 mPixmapMessageRepliedAndForwarded = new QPixmap( SmallIcon( QLatin1String( "mail-forwarded-replied" ) ) );
70 mPixmapMessageQueued = new QPixmap( SmallIcon( QLatin1String( "mail-queued" ) ) ); // mail-queue ?
74 mPixmapMessageImportant = new QPixmap( SmallIcon( QLatin1String( "emblem-important" ) ) ); // "flag"
75 mPixmapMessageWatched = new QPixmap( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-thread-watch.png" ) ) );
76 mPixmapMessageIgnored = new QPixmap( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-thread-ignored.png" ) ) );
83 mPixmapMessageFullyEncrypted = new QPixmap( SmallIcon( QLatin1String( "mail-encrypted-full" ) ) );
84 mPixmapMessagePartiallyEncrypted = new QPixmap( SmallIcon( QLatin1String( "mail-encrypted-part" ) ) );
85 mPixmapMessageUndefinedEncrypted = new QPixmap( SmallIcon( QLatin1String( "mail-encrypted" ) ) );
95 mPixmapVerticalLine = new QPixmap( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-vertical-separator-line.png" ) ) );
96 mPixmapHorizontalSpacer = new QPixmap( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-horizontal-space.png" ) ) );
159 qWarning("ERROR: MessageList::Manager::unregisterWidget() called when Manager::mInstance is 0");
207 void Manager::saveAggregationForStorageModel( const Akonadi::Collection &col, const QString &id, bool storageUsesPrivateAggregation )
211 saveAggregationForStorageModel( QString::number( col.id() ), id, storageUsesPrivateAggregation );
214 void Manager::saveAggregationForStorageModel( const StorageModel *storageModel, const QString &id, bool storageUsesPrivateAggregation )
219 void Manager::saveAggregationForStorageModel( const QString &modelId, const QString &id, bool storageUsesPrivateAggregation )
233 const Aggregation * Manager::aggregationForStorageModel( const Akonadi::Collection &col, bool *storageUsesPrivateAggregation )
241 return Manager::aggregationForStorageModel( QString::number( col.id() ), storageUsesPrivateAggregation );
245 const Aggregation * Manager::aggregationForStorageModel( const StorageModel *storageModel, bool *storageUsesPrivateAggregation )
253 return Manager::aggregationForStorageModel( storageModel->id(), storageUsesPrivateAggregation );
256 const Aggregation * Manager::aggregationForStorageModel( const QString &storageId, bool *storageUsesPrivateAggregation )
261 const QString aggregationId = conf.readEntry( MessageList::Util::setForStorageModelConfigName().arg( storageId ), "" );
410 i18n( "This view groups the messages in threads and then groups the threads by the starting user." ),
426 i18n( "This view groups the messages in threads and then groups the threads by the starting user. " \
444 for( QHash< QString, Aggregation * >::ConstIterator it = mAggregations.constBegin(); it != end; ++it )
461 const SortOrder Manager::sortOrderForStorageModel( const StorageModel *storageModel, bool *storageUsesPrivateSortOrder )
470 KConfigGroup conf( Settings::self()->config(), MessageList::Util::storageModelSortOrderGroup() );
479 KConfigGroup conf( Settings::self()->config(), MessageList::Util::storageModelSortOrderGroup() );
521 void Manager::saveThemeForStorageModel( int index, const QString &id, bool storageUsesPrivateTheme )
526 void Manager::saveThemeForStorageModel( const StorageModel *storageModel, const QString &id, bool storageUsesPrivateTheme )
531 void Manager::saveThemeForStorageModel( const QString &storageModelIndex, const QString &id, bool storageUsesPrivateTheme )
536 conf.writeEntry( MessageList::Util::setForStorageModelConfigName().arg( storageModelIndex ), id );
545 const Theme * Manager::themeForStorageModel( const Akonadi::Collection & col, bool * storageUsesPrivateTheme )
557 const Theme * Manager::themeForStorageModel( const StorageModel *storageModel, bool *storageUsesPrivateTheme )
573 const QString themeId = conf.readEntry( MessageList::Util::setForStorageModelConfigName().arg( id ), "" );
602 static Theme::Column * add_theme_simple_text_column( Theme * s, const QString &name, Theme::ContentItem::Type type, bool visibleByDefault, SortOrder::MessageSorting messageSorting, bool alignRight, bool addGroupHeaderItem )
642 static Theme::Column * add_theme_simple_icon_column( Theme * s, const QString &name, const QString &pixmapName, Theme::ContentItem::Type type, bool visibleByDefault, SortOrder::MessageSorting messageSorting )
718 c = add_theme_simple_text_column( s, i18n( "Sender/Receiver" ), Theme::ContentItem::SenderOrReceiver, true, SortOrder::SortMessagesBySenderOrReceiver, false, false);
720 add_theme_simple_text_column( s, i18nc( "Sender of a message", "Sender" ), Theme::ContentItem::Sender, false, SortOrder::SortMessagesBySender, false, false );
721 add_theme_simple_text_column( s, i18nc( "Receiver of a message", "Receiver" ), Theme::ContentItem::Receiver, false, SortOrder::SortMessagesByReceiver, false, false );
722 add_theme_simple_text_column( s, i18nc( "Date of a message", "Date" ), Theme::ContentItem::Date, true, SortOrder::SortMessagesByDateTime, false, false );
723 add_theme_simple_text_column( s, i18n( "Most Recent Date" ), Theme::ContentItem::MostRecentDate, false, SortOrder::SortMessagesByDateTimeOfMostRecent, false, true );
724 add_theme_simple_text_column( s, i18nc( "Size of a message", "Size" ), Theme::ContentItem::Size, false, SortOrder::SortMessagesBySize, false, false );
725 add_theme_simple_icon_column( s, i18nc( "Attachement indication", "Attachment" ), QLatin1String( "mail-attachment" ), Theme::ContentItem::AttachmentStateIcon, false, SortOrder::NoMessageSorting );
726 add_theme_simple_icon_column( s, i18n( "Read/Unread" ), QLatin1String( "mail-unread-new" ), Theme::ContentItem::ReadStateIcon, false, SortOrder::SortMessagesByUnreadStatus );
727 add_theme_simple_icon_column( s, i18n( "Replied" ), QLatin1String( "mail-replied" ), Theme::ContentItem::RepliedStateIcon, false, SortOrder::NoMessageSorting );
728 add_theme_simple_icon_column( s, i18nc( "Message importance indication", "Important" ), QLatin1String( "emblem-important" ), Theme::ContentItem::ImportantStateIcon, false, SortOrder::SortMessagesByImportantStatus );
729 add_theme_simple_icon_column( s, i18n( "Action Item" ), QLatin1String( "mail-task" ), Theme::ContentItem::ActionItemStateIcon, false, SortOrder::SortMessagesByActionItemStatus );
730 add_theme_simple_icon_column( s, i18n( "Spam/Ham" ), QLatin1String( "mail-mark-junk" ), Theme::ContentItem::SpamHamStateIcon, false, SortOrder::NoMessageSorting );
731 add_theme_simple_icon_column( s, i18n( "Watched/Ignored" ), QLatin1String( "mail-thread-watch" ), Theme::ContentItem::WatchedIgnoredStateIcon, false, SortOrder::NoMessageSorting );
732 add_theme_simple_icon_column( s, i18n( "Encryption" ), QLatin1String( "mail-encrypted-full" ), Theme::ContentItem::EncryptionStateIcon, false, SortOrder::NoMessageSorting );
733 add_theme_simple_icon_column( s, i18n( "Signature" ), QLatin1String( "mail-signed-verified" ), Theme::ContentItem::SignatureStateIcon, false, SortOrder::NoMessageSorting );
734 add_theme_simple_icon_column( s, i18n( "Tag List" ), QLatin1String( "feed-subscribe" ), Theme::ContentItem::TagList, false, SortOrder::NoMessageSorting );
789 Theme::Row * firstFancyRow = r; // save it so we can continue adding stuff below (after cloning the theme)
808 // clone the "Fancy theme" here so we'll use it as starting point for the "Fancy with clickable status"
841 s->setDescription( i18n( "A smart multiline and multi item theme with a clickable status column" ) );
1026 for( QHash< QString, Aggregation * >::ConstIterator it = mAggregations.constBegin(); it != end; ++it )
The ContentItem class defines a content item inside a Row.
Definition: theme.h:73
Whether the message is an invitation.
Definition: theme.h:223
Sort the messages by date and time of the most recent message in subtree.
Definition: sortorder.h:82
The Expanded state icon for group headers.
Definition: theme.h:186
A class which holds information about sorting, e.g.
Definition: sortorder.h:37
Sort the messages by subject.
Definition: sortorder.h:86
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:43
The icon that displays the unread/read state (never disabled)
Definition: theme.h:154
void setDescription(const QString &description)
Sets the description for this option set.
Definition: optionset.h:94
Thread by all of the above and try to match subjects too.
Definition: aggregation.h:88
Perform no threading at all.
Definition: aggregation.h:85
void reloadGlobalConfiguration()
Reloads the global configuration from the config files (so we assume it has changed) The settings pri...
Definition: manager.cpp:905
The combined icon that displays the unread/read/replied/forwarded state (never disabled) ...
Definition: theme.h:210
Makes sense only with GroupByDate or GroupByDateRange.
Definition: aggregation.h:73
virtual QString id() const =0
Returns an unique id for this Storage collection.
void themesChanged()
Provides a widget which has the messagelist and the most important helper widgets, like the search line and the comboboxes for changing status filtering, aggregation etc.
Definition: widgetbase.h:60
The Row class defines a row of items inside a Column.
Definition: theme.h:466
Group the messages by the date of the thread leader.
Definition: aggregation.h:55
The icon that displays the atachment state (may be disabled)
Definition: theme.h:158
void setSoftenByBlendingWhenDisabled(bool softenByBlendingWhenDisabled)
Sets the flag that causes this item to be painted "softly" when disabled.
Definition: theme.h:389
MESSAGELIST_EXPORT QString storageModelSortOrderGroup()
Definition: messagelistutil.cpp:58
Never expand groups during a view fill algorithm.
Definition: aggregation.h:72
Use smart (thread leader) date ranges ("Today","Yesterday","Last Week"...)
Definition: aggregation.h:56
The Important tag icon.
Definition: theme.h:174
Whether the message has a annotation/note.
Definition: theme.h:218
void setVisibleByDefault(bool vbd)
Sets the "visible by default" tag for this column.
Definition: theme.h:718
The thread grouping is computed from the topmost message (very similar to least recent, but might be different if timezones or machine clocks are screwed)
Definition: aggregation.h:99
static Theme::Column * add_theme_simple_text_column(Theme *s, const QString &name, Theme::ContentItem::Type type, bool visibleByDefault, SortOrder::MessageSorting messageSorting, bool alignRight, bool addGroupHeaderItem)
Definition: manager.cpp:602
void reloadAllWidgets()
Explicitly reloads the contents of all the widgets.
Definition: manager.cpp:893
void saveAggregationForStorageModel(const StorageModel *storageModel, const QString &id, bool storageUsesPrivateAggregation)
Definition: manager.cpp:214
The Column class defines a view column available inside this theme.
Definition: theme.h:564
void setFont(const QFont &font)
Sets the custom font to be used with this item.
Definition: theme.cpp:166
The icon that displays the replied/forwarded state (may be disabled)
Definition: theme.h:162
Sort the messages by receiver.
Definition: sortorder.h:85
void writeConfig(KConfigGroup &conf, const QString &storageId, bool storageUsesPrivateSortOrder) const
Writes the sort order to a config group.
Definition: sortorder.cpp:243
const Aggregation * defaultAggregation()
Definition: manager.cpp:181
void themesConfigurationCompleted()
This is called by the theme configuration dialog once the sets have been changed. ...
Definition: manager.cpp:882
: The manager for all the existing MessageList::Widget objects.
Definition: manager.h:61
Display the subject of the message item.
Definition: theme.h:130
static void unregisterWidget(Widget *pWidget)
Definition: manager.cpp:155
MESSAGELIST_EXPORT QString storageModelThemesGroup()
Definition: messagelistutil.cpp:63
MESSAGELIST_EXPORT QString storageModelAggregationsGroup()
Definition: messagelistutil.cpp:68
void generateUniqueId()
(Re)generates a (hopefully) unique identifier for this option set.
Definition: optionset.cpp:57
static Theme::Column * add_theme_simple_icon_column(Theme *s, const QString &name, const QString &pixmapName, Theme::ContentItem::Type type, bool visibleByDefault, SortOrder::MessageSorting messageSorting)
Definition: manager.cpp:642
void resetColumnState()
Resets the column state (visibility and width) to their default values (the "visible by default" ones...
Definition: theme.cpp:725
void addAggregation(Aggregation *set)
Definition: manager.cpp:281
Formatted date time of the message/group.
Definition: theme.h:134
The list of MessageItem::Tag entries.
Definition: theme.h:214
bool loadFromString(const QString &data)
Attempts to unpack this configuration object from a string (that is likely to come out from a config ...
Definition: optionset.cpp:86
MESSAGELIST_EXPORT QString setForStorageModelConfigName()
Definition: messagelistutil.cpp:74
Do larger chunks of work, zero intervals between chunks.
Definition: aggregation.h:127
Sort the messages by sender.
Definition: sortorder.h:84
From: or To: strip, depending on the folder settings.
Definition: theme.h:138
Expand threads with "hot" messages (this includes new, unread, important, todo)
Definition: aggregation.h:115
static void registerWidget(Widget *pWidget)
Definition: manager.cpp:147
Never expand any thread, this is fast.
Definition: aggregation.h:111
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition: storagemodelbase.h:45
void readConfig(KConfigGroup &conf, const QString &storageId, bool *storageUsesPrivateSortOrder)
Reads the sort order from a config group.
Definition: sortorder.cpp:230
Don't sort the messages at all.
Definition: sortorder.h:80
The thread grouping is computed from the most recent message.
Definition: aggregation.h:100
The Spam/Ham state icon.
Definition: theme.h:178
Do small chunks of work, small intervals between chunks to allow for UI event processing.
Definition: aggregation.h:126
Sort the messages by sender or receiver.
Definition: sortorder.h:83
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.h:738
void aggregationsConfigurationCompleted()
This is called by the aggregation configuration dialog once the sets have been changed.
Definition: manager.cpp:450
const Theme * themeForStorageModel(const Akonadi::Collection &col, bool *storageUsesPrivateTheme)
Definition: manager.cpp:545
void aggregationsChanged()
The ActionItem state icon.
Definition: theme.h:170
Sort the messages By "Important" flags of status.
Definition: sortorder.h:90
void setUseCustomFont(bool useCustomFont)
Makes this item use the custom font that can be set by setCustomFont().
Definition: theme.h:355
void saveThemeForStorageModel(const StorageModel *storageModel, const QString &id, bool storageUsesPrivateTheme)
Definition: manager.cpp:526
void setSoftenByBlending(bool softenByBlending)
Sets the flag that causes this item to be painted "softly".
Definition: theme.h:403
const SortOrder sortOrderForStorageModel(const StorageModel *storageModel, bool *storageUsesPrivateSortOrder)
Definition: manager.cpp:461
Sort the messages by the "Unread" flags of status.
Definition: sortorder.h:89
Sort the messages by size.
Definition: sortorder.h:87
Sort the messages by date and time.
Definition: sortorder.h:81
void detach()
Detaches this object from the shared runtime data for columns.
Definition: theme.cpp:718
The Signature state icon for messages.
Definition: theme.h:194
void removeAllAggregations()
Definition: manager.cpp:441
The Theme class defines the visual appearance of the MessageList.
Definition: theme.h:65
const Aggregation * aggregationForStorageModel(const StorageModel *storageModel, bool *storageUsesPrivateAggregation)
Definition: manager.cpp:245
void setIsSenderOrReceiver(bool sor)
Marks this column as containing the "sender/receiver" field.
Definition: theme.h:706
The group header label.
Definition: theme.h:166
The Watched/Ignored state icon.
Definition: theme.h:182
The Encryption state icon for messages.
Definition: theme.h:190
The date of the most recent message in subtree.
Definition: theme.h:206
Group by sender (incoming) or receiver (outgoing) field.
Definition: aggregation.h:57
void setViewHeaderPolicy(ViewHeaderPolicy vhp)
Sets the ViewHeaderPolicy for this theme.
Definition: theme.h:1031
const Aggregation * aggregation(const QString &id)
Definition: manager.cpp:172
Sort the messages by the "Action Item" flag of status.
Definition: sortorder.h:88
void saveSortOrderForStorageModel(const StorageModel *storageModel, const SortOrder &order, bool storageUsesPrivateSortOrder)
Definition: manager.cpp:476
void setHideWhenDisabled(bool hideWhenDisabled)
Sets the flag that causes this item to be hidden when disabled.
Definition: theme.h:372
void setPixmapName(const QString &pixmapName)
Sets the icon's name (used in SmallIcon) for this column.
Definition: theme.h:692
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
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.