messagelist
widgetbase.cpp
Go to the documentation of this file.
251 d->mStatusFilterCombo->addItem( SmallIcon(QLatin1String( "system-run" )), i18n( "Any Status" ), 0 );
273 d->mStatusFilterCombo->addItem( QIcon( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-thread-watch.png" ) ) ),
277 d->mStatusFilterCombo->addItem( QIcon( KStandardDirs::locate( "data", QLatin1String( "messagelist/pics/mail-thread-ignored.png" ) ) ),
301 const int currentIndex = (d->mStatusFilterCombo->currentIndex() != -1) ? d->mStatusFilterCombo->currentIndex() : 0;
302 disconnect( d->mStatusFilterCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(statusSelected(int)) );
313 d->mStatusFilterCombo->setCurrentIndex(currentIndex>=d->mStatusFilterCombo->count() ? 0 : currentIndex );
345 const Aggregation * opt = Manager::instance()->aggregationForStorageModel( storageModel, &mStorageUsesPrivateAggregation );
359 const Theme * opt = Manager::instance()->themeForStorageModel( storageModel, &mStorageUsesPrivateTheme );
393 mSortOrder = Manager::instance()->sortOrderForStorageModel( storageModel, &mStorageUsesPrivateSortOrder );
548 Manager::instance()->saveThemeForStorageModel( d->mStorageModel, opt->id(), d->mStorageUsesPrivateTheme );
574 qSort(sortedAggregations.begin(),sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
578 for ( QList< Aggregation * >::ConstIterator it = sortedAggregations.constBegin(); it != endagg; ++it ) {
606 Utils::ConfigureAggregationsDialog *dialog = new Utils::ConfigureAggregationsDialog( window() );
626 Manager::instance()->saveAggregationForStorageModel( d->mStorageModel, opt->id(), d->mStorageUsesPrivateAggregation );
829 SortOrder::MessageSorting ord = static_cast< SortOrder::MessageSorting >( action->data().toInt( &ok ) );
853 SortOrder::SortDirection ord = static_cast< SortOrder::SortDirection >( action->data().toInt( &ok ) );
877 SortOrder::GroupSorting ord = static_cast< SortOrder::GroupSorting >( action->data().toInt( &ok ) );
901 SortOrder::SortDirection ord = static_cast< SortOrder::SortDirection >( action->data().toInt( &ok ) );
927 d->mLockSearch->setToolTip( i18nc( "@info:tooltip", "Clear the quick search field when changing folders" ) );
967 d->switchMessageSorting( column->messageSorting(), d->mSortOrder.messageSortDirection(), logicalIndex );
1034 status.fromQInt32( static_cast< qint32 >( d->mStatusFilterCombo->itemData( index ).toInt( &ok ) ) );
1129 void Widget::viewMessageListContextPopupRequest( const QList< MessageItem * > &, const QPoint & )
1161 void Widget::viewMessageStatusChangeRequest( MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear )
void aggregationSelected(bool)
Definition: widgetbase.cpp:596
void messageSortingSelected(QAction *action)
Definition: widgetbase.cpp:818
virtual void viewJobBatchStarted()
This is called by View to signal a start of a (possibly lengthy) job batch.
Definition: widgetbase.cpp:1153
A class which holds information about sorting, e.g.
Definition: sortorder.h:37
const QHash< QString, Aggregation * > & aggregations() const
Definition: manager.h:204
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:43
virtual void viewStartDragRequest()
This is called by View when a drag can possibly be started.
Definition: widgetbase.cpp:1149
void saveCurrentSelection()
Definition: widgetbase.cpp:398
virtual void viewDropEvent(QDropEvent *e)
This is called by View when a drop event is received.
Definition: widgetbase.cpp:1145
static bool compareName(Aggregation *agg1, Aggregation *agg2)
Definition: aggregation.h:153
Definition: messageitem.h:50
The dialog used for configuring MessageList::Aggregation sets.
Definition: configureaggregationsdialog.h:51
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.h:731
virtual QString id() const =0
Returns an unique id for this Storage collection.
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
KLineEdit * quickSearch() const
Returns the search line of this widget.
Definition: widgetbase.cpp:450
void focusQuickSearch()
Sets the focus on the quick search line of the currently active tab.
Definition: widgetbase.cpp:1168
The MessageList::View is the real display of the message list.
Definition: view.h:64
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition: view.cpp:866
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
Definition: widgetbase.cpp:1173
void groupSortDirectionSelected(QAction *action)
Definition: widgetbase.cpp:890
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
SortDirection
The "generic" sort direction: used for groups and for messages If you add values here please look at ...
Definition: sortorder.h:67
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Definition: widgetbase.cpp:328
Sort the messages by receiver.
Definition: sortorder.h:85
unsigned long uniqueId() const
Definition: messageitem.cpp:560
static QList< QPair< QString, int > > enumerateMessageSortDirectionOptions(MessageSorting ms)
Enumerates the available message sorting directions for the specified MessageSorting option...
Definition: sortorder.cpp:56
void changeQuicksearchVisibility(bool)
Shows or hides the quicksearch field, the filter combobox and the toolbutton for advanced search...
Definition: widgetbase.cpp:221
void slotViewHeaderSectionClicked(int logicalIndex)
Handles header section clicks switching the Aggregation MessageSorting on-the-fly.
Definition: widgetbase.cpp:935
void searchEditClearButtonClicked()
Definition: widgetbase.cpp:1107
QString currentFilterTagId() const
Returns the id of the MessageItem::Tag currently set in the quicksearch field.
Definition: widgetbase.cpp:335
void aggregationMenuAboutToShow()
Definition: widgetbase.cpp:554
static void unregisterWidget(Widget *pWidget)
Definition: manager.cpp:155
void setStorageModel(StorageModel *storageModel, PreSelectionMode preSelectionMode=PreSelectLastSelected)
Sets the storage model for this Widget.
Definition: widgetbase.cpp:412
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition: enums.h:44
static QList< QPair< QString, int > > enumerateGroupSortDirectionOptions(Aggregation::Grouping g, GroupSorting groupSorting)
Enumerates the group sort direction options compatible with the specified Grouping and GroupSorting...
Definition: sortorder.cpp:100
void selectAggregation(const QString &aggregationId)
Definition: configureaggregationsdialog.cpp:182
Akonadi::MessageStatus currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
Definition: widgetbase.cpp:321
virtual void viewJobBatchTerminated()
This is called by View to signal the end of a (possibly lengthy) job batch.
Definition: widgetbase.cpp:1157
virtual void viewGroupHeaderContextPopupRequest(GroupHeaderItem *group, const QPoint &globalPos)
This is called by View when a group header is right clicked.
Definition: widgetbase.cpp:1133
void tagIdSelected(const QVariant &data)
Definition: widgetbase.cpp:996
Sort the messages by sender.
Definition: sortorder.h:84
void fullSearchRequest()
Emitted when a full search is requested.
virtual void viewMessageSelected(MessageItem *msg)
This is called by View when a message is single-clicked (thus selected and made current) ...
Definition: widgetbase.cpp:1117
static void registerWidget(Widget *pWidget)
Definition: manager.cpp:147
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition: storagemodelbase.h:45
static SortOrder defaultForAggregation(const Aggregation *aggregation, const SortOrder &oldSortOrder)
Returns the default sort order for the given aggregation.
Definition: sortorder.cpp:154
Don't sort the messages at all.
Definition: sortorder.h:80
bool selectionEmpty() const
Fast function that determines if the selection is empty.
Definition: widgetbase.cpp:1178
GroupSorting
How to sort the groups If you add values here please look at the implementations of the enumerate* fu...
Definition: sortorder.h:51
Sort the messages by sender or receiver.
Definition: sortorder.h:83
virtual void viewDragEnterEvent(QDragEnterEvent *e)
This is called by View when a drag enter event is received.
Definition: widgetbase.cpp:1137
void sortOrderMenuAboutToShow()
Definition: widgetbase.cpp:635
const Theme * themeForStorageModel(const Akonadi::Collection &col, bool *storageUsesPrivateTheme)
Definition: manager.cpp:545
static bool compareName(Theme *theme1, Theme *theme2)
Definition: theme.h:872
void themesChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:976
static QList< QPair< QString, int > > enumerateMessageSortingOptions(Aggregation::Threading t)
Enumerates the message sorting options compatible with the specified Threading setting.
Definition: sortorder.cpp:38
void saveThemeForStorageModel(const StorageModel *storageModel, const QString &id, bool storageUsesPrivateTheme)
Definition: manager.cpp:526
The Akonadi specific implementation of the Core::StorageModel.
Definition: storagemodel.h:48
This class is responsable of matching messages that should be displayed in the View.
Definition: filter.h:51
const SortOrder sortOrderForStorageModel(const StorageModel *storageModel, bool *storageUsesPrivateSortOrder)
Definition: manager.cpp:461
void searchEditTextEdited(const QString &text)
Definition: widgetbase.cpp:1064
Core::MessageItem * currentMessageItem() const
Returns the current MessageItem in the current folder.
Definition: widgetbase.cpp:316
void slotLockSearchClicked(bool b)
Definition: widgetbase.cpp:923
void themeMenuAboutToShow()
Definition: widgetbase.cpp:460
void messageSortDirectionSelected(QAction *action)
Definition: widgetbase.cpp:842
virtual void viewDragMoveEvent(QDragMoveEvent *e)
This is called by View when a drag move event is received.
Definition: widgetbase.cpp:1141
bool searchEditHasFocus() const
Definition: widgetbase.cpp:1188
The Theme class defines the visual appearance of the MessageList.
Definition: theme.h:65
virtual void viewSelectionChanged()
This is called by View when selection changes.
Definition: widgetbase.cpp:1125
const Aggregation * aggregationForStorageModel(const StorageModel *storageModel, bool *storageUsesPrivateAggregation)
Definition: manager.cpp:245
virtual void viewMessageListContextPopupRequest(const QList< MessageItem * > &selectedItems, const QPoint &globalPos)
This is called by View when a message is right clicked.
Definition: widgetbase.cpp:1129
void aggregationsChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:983
void selectTheme(const QString &themeId)
Definition: configurethemesdialog.cpp:179
void statusSelected(int index)
Definition: widgetbase.cpp:1024
void populateStatusFilterCombo()
This is called to setup the status filter's KComboBox.
Definition: widgetbase.cpp:299
void setPrivateSortOrderForStorage()
Definition: widgetbase.cpp:504
StorageModel * storageModel() const
Returns the StorageModel currently set.
Definition: widgetbase.cpp:445
virtual void viewMessageStatusChangeRequest(MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear)
This is called by View when a message item is manipulated by the user in a way that it's status shoul...
Definition: widgetbase.cpp:1161
const Aggregation * aggregation(const QString &id)
Definition: manager.cpp:172
virtual void viewMessageActivated(MessageItem *msg)
This is called by View when a message is double-clicked or activated by other input means...
Definition: widgetbase.cpp:1121
void saveSortOrderForStorageModel(const StorageModel *storageModel, const SortOrder &order, bool storageUsesPrivateSortOrder)
Definition: manager.cpp:476
void setCurrentFolder(const Akonadi::Collection &collection)
Sets the current folder.
Definition: widgetbase.cpp:1183
const QHash< QString, Theme * > & themes() const
Definition: manager.h:234
void groupSortingSelected(QAction *action)
Definition: widgetbase.cpp:866
static QList< QPair< QString, int > > enumerateGroupSortingOptions(Aggregation::Grouping g)
Enumerates the group sorting options compatible with the specified Grouping.
Definition: sortorder.cpp:78
virtual void fillMessageTagCombo(KComboBox *combo)
Called when the "Message Status/Tag" filter menu is opened by the user.
Definition: widgetbase.cpp:991
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.