messagelist
widgetbase.cpp
Go to the documentation of this file.
142 connect(d->quickSearchLine, SIGNAL(clearButtonClicked()), SLOT(searchEditClearButtonClicked()) );
144 connect(d->quickSearchLine, SIGNAL(searchEditTextEdited(QString)), SLOT(searchEditTextEdited()) );
206 d->mCurrentStatusFilterIndex = (tagFilterComboBox->currentIndex() != -1) ? tagFilterComboBox->currentIndex() : 0;
207 disconnect( tagFilterComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(statusSelected(int)) );
224 d->quickSearchLine->tagFilterComboBox()->setCurrentIndex(d->mCurrentStatusFilterIndex>=d->quickSearchLine->tagFilterComboBox()->count() ? 0 : d->mCurrentStatusFilterIndex );
262 const Aggregation * opt = Manager::instance()->aggregationForStorageModel( storageModel, &mStorageUsesPrivateAggregation );
276 const Theme * opt = Manager::instance()->themeForStorageModel( storageModel, &mStorageUsesPrivateTheme );
310 mSortOrder = Manager::instance()->sortOrderForStorageModel( storageModel, &mStorageUsesPrivateSortOrder );
360 d->quickSearchLine->setContainsOutboundMessages( d->mStorageModel->containsOutboundMessages() );
466 Manager::instance()->saveThemeForStorageModel( d->mStorageModel, opt->id(), d->mStorageUsesPrivateTheme );
492 qSort(sortedAggregations.begin(),sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
496 for ( QList< Aggregation * >::ConstIterator it = sortedAggregations.constBegin(); it != endagg; ++it ) {
524 Utils::ConfigureAggregationsDialog *dialog = new Utils::ConfigureAggregationsDialog( window() );
544 Manager::instance()->saveAggregationForStorageModel( d->mStorageModel, opt->id(), d->mStorageUsesPrivateAggregation );
747 SortOrder::MessageSorting ord = static_cast< SortOrder::MessageSorting >( action->data().toInt( &ok ) );
771 SortOrder::SortDirection ord = static_cast< SortOrder::SortDirection >( action->data().toInt( &ok ) );
795 SortOrder::GroupSorting ord = static_cast< SortOrder::GroupSorting >( action->data().toInt( &ok ) );
819 SortOrder::SortDirection ord = static_cast< SortOrder::SortDirection >( action->data().toInt( &ok ) );
873 d->switchMessageSorting( column->messageSorting(), d->mSortOrder.messageSortDirection(), logicalIndex );
1031 void Widget::viewMessageListContextPopupRequest( const QList< MessageItem * > &, const QPoint & )
1063 void Widget::viewMessageStatusChangeRequest( MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear )
void aggregationSelected(bool)
Definition: widgetbase.cpp:514
void messageSortingSelected(QAction *action)
Definition: widgetbase.cpp:736
virtual void viewJobBatchStarted()
This is called by View to signal a start of a (possibly lengthy) job batch.
Definition: widgetbase.cpp:1055
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:1051
QList< Akonadi::MessageStatus > currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
Definition: widgetbase.cpp:238
void saveCurrentSelection()
Definition: widgetbase.cpp:315
virtual void viewDropEvent(QDropEvent *e)
This is called by View when a drop event is received.
Definition: widgetbase.cpp:1047
void setCurrentStatusFilterItem()
Must be called by fillMessageTagCombo()
Definition: widgetbase.cpp:219
static bool compareName(Aggregation *agg1, Aggregation *agg2)
Definition: aggregation.h:153
QWidget * window() const
Definition: messageitem.h:46
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:732
QObject * sender() const
void setChecked(bool)
QVariant data() const
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:61
KLineEdit * quickSearch() const
Returns the search line of this widget.
Definition: widgetbase.cpp:368
QAction * addAction(QAction *action)
The MessageList::View is the real display of the message list.
Definition: view.h:65
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition: view.cpp:865
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
Definition: widgetbase.cpp:1075
int size() const
void groupSortDirectionSelected(QAction *action)
Definition: widgetbase.cpp:808
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:565
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:245
Sort the messages by receiver.
Definition: sortorder.h:85
unsigned long uniqueId() const
Definition: messageitem.cpp:534
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
static QList< QPair< QString, int > > enumerateMessageSortDirectionOptions(MessageSorting ms)
Enumerates the available message sorting directions for the specified MessageSorting option...
Definition: sortorder.cpp:57
int toInt(bool *ok) const
void changeQuicksearchVisibility(bool)
Shows or hides the quicksearch field, the filter combobox and the toolbutton for advanced search...
Definition: widgetbase.cpp:176
void slotViewHeaderSectionClicked(int logicalIndex)
Handles header section clicks switching the Aggregation MessageSorting on-the-fly.
Definition: widgetbase.cpp:841
void searchEditClearButtonClicked()
Definition: widgetbase.cpp:1009
bool isEmpty() const
void setObjectName(const QString &name)
bool isEmpty() const
QString currentFilterTagId() const
Returns the id of the MessageItem::Tag currently set in the quicksearch field.
Definition: widgetbase.cpp:252
void aggregationMenuAboutToShow()
Definition: widgetbase.cpp:472
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:329
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition: enums.h:44
virtual void fillMessageTagCombo()
Called when the "Message Status/Tag" filter menu is opened by the user.
Definition: widgetbase.cpp:897
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:101
void selectAggregation(const QString &aggregationId)
Definition: configureaggregationsdialog.cpp:182
void setMargin(int margin)
virtual void viewJobBatchTerminated()
This is called by View to signal the end of a (possibly lengthy) job batch.
Definition: widgetbase.cpp:1059
virtual void viewGroupHeaderContextPopupRequest(GroupHeaderItem *group, const QPoint &globalPos)
This is called by View when a group header is right clicked.
Definition: widgetbase.cpp:1035
void setData(const QVariant &userData)
void tagIdSelected(const QVariant &data)
Definition: widgetbase.cpp:903
Sort the messages by sender.
Definition: sortorder.h:84
iterator end()
void searchEditTextEdited()
Definition: widgetbase.cpp:934
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
Definition: widgetbase.cpp:1070
virtual void viewMessageSelected(MessageItem *msg)
This is called by View when a message is single-clicked (thus selected and made current) ...
Definition: widgetbase.cpp:1019
void setCheckable(bool)
static void registerWidget(Widget *pWidget)
Definition: manager.cpp:147
void slotStatusButtonsClicked()
Definition: widgetbase.cpp:954
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:155
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:1080
MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const
Definition: widgetbase.cpp:233
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:1039
void sortOrderMenuAboutToShow()
Definition: widgetbase.cpp:553
const Theme * themeForStorageModel(const Akonadi::Collection &col, bool *storageUsesPrivateTheme)
Definition: manager.cpp:545
static bool compareName(Theme *theme1, Theme *theme2)
Definition: theme.h:873
void themesChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:882
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:44
const SortOrder sortOrderForStorageModel(const StorageModel *storageModel, bool *storageUsesPrivateSortOrder)
Definition: manager.cpp:461
Core::MessageItem * currentMessageItem() const
Returns the current MessageItem in the current folder.
Definition: widgetbase.cpp:228
void themeMenuAboutToShow()
Definition: widgetbase.cpp:378
void messageSortDirectionSelected(QAction *action)
Definition: widgetbase.cpp:760
virtual void viewDragMoveEvent(QDragMoveEvent *e)
This is called by View when a drag move event is received.
Definition: widgetbase.cpp:1043
bool searchEditHasFocus() const
Definition: widgetbase.cpp:1090
void setAutoFillBackground(bool enabled)
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:1027
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:1031
const_iterator constEnd() const
const_iterator constBegin() const
void aggregationsChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:889
void selectTheme(const QString &themeId)
Definition: configurethemesdialog.cpp:179
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void statusSelected(int index)
Definition: widgetbase.cpp:924
void populateStatusFilterCombo()
This is called to setup the status filter's KComboBox.
Definition: widgetbase.cpp:199
void setPrivateSortOrderForStorage()
Definition: widgetbase.cpp:422
StorageModel * storageModel() const
Returns the StorageModel currently set.
Definition: widgetbase.cpp:363
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:1063
QString toString() const
void addMessageTagItem(const QPixmap &, const QString &, const QVariant &)
Definition: widgetbase.cpp:214
const Aggregation * aggregation(const QString &id)
Definition: manager.cpp:172
iterator begin()
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:1023
void setSpacing(int spacing)
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:1085
const QHash< QString, Theme * > & themes() const
Definition: manager.h:234
void groupSortingSelected(QAction *action)
Definition: widgetbase.cpp:784
static QList< QPair< QString, int > > enumerateGroupSortingOptions(Aggregation::Grouping g)
Enumerates the group sorting options compatible with the specified Grouping.
Definition: sortorder.cpp:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.