Messagelib
widgetbase.cpp
65 void switchMessageSorting(SortOrder::MessageSorting messageSorting, SortOrder::SortDirection sortDirection, int logicalHeaderColumnIndex);
97 bool mStorageUsesPrivateTheme = false; ///< true if the current folder does not use the global theme
98 bool mStorageUsesPrivateAggregation = false; ///< true if the current folder does not use the global aggregation
99 bool mStorageUsesPrivateSortOrder = false; ///< true if the current folder does not use the global sort order
111 connect(Manager::instance(), &Manager::aggregationsChanged, this, &Widget::aggregationsChanged);
123 connect(d->quickSearchLine, &QuickSearchLine::clearButtonClicked, this, &Widget::searchEditClearButtonClicked);
125 connect(d->quickSearchLine, &QuickSearchLine::searchEditTextEdited, this, &Widget::searchEditTextEdited);
126 connect(d->quickSearchLine, &QuickSearchLine::searchOptionChanged, this, &Widget::searchEditTextEdited);
127 connect(d->quickSearchLine, &QuickSearchLine::statusButtonsClicked, this, &Widget::slotStatusButtonsClicked);
130 connect(d->quickSearchLine, &QuickSearchLine::activateFilter, this, &Widget::slotActivateFilter);
151 connect(d->mView->header(), &QHeaderView::sectionClicked, this, &Widget::slotViewHeaderSectionClicked);
219 d->mCurrentStatusFilterIndex = (tagFilterComboBox->currentIndex() != -1) ? tagFilterComboBox->currentIndex() : 0;
235 connect(d->quickSearchLine->tagFilterComboBox(), &QComboBox::currentIndexChanged, this, &Widget::statusSelected);
237 d->mCurrentStatusFilterIndex >= d->quickSearchLine->tagFilterComboBox()->count() ? 0 : d->mCurrentStatusFilterIndex);
276 void Widget::WidgetPrivate::setDefaultAggregationForStorageModel(const StorageModel *storageModel)
278 const Aggregation *opt = Manager::instance()->aggregationForStorageModel(storageModel, &mStorageUsesPrivateAggregation);
292 const Theme *opt = Manager::instance()->themeForStorageModel(storageModel, &mStorageUsesPrivateTheme);
316 Manager::instance()->saveSortOrderForStorageModel(storageModel, mSortOrder, mStorageUsesPrivateSortOrder);
322 void Widget::WidgetPrivate::setDefaultSortOrderForStorageModel(const StorageModel *storageModel)
325 mSortOrder = Manager::instance()->sortOrderForStorageModel(storageModel, &mStorageUsesPrivateSortOrder);
441 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
480 Manager::instance()->saveThemeForStorageModel(d->mStorageModel, opt->id(), d->mStorageUsesPrivateTheme);
506 std::sort(sortedAggregations.begin(), sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
556 Manager::instance()->saveAggregationForStorageModel(d->mStorageModel, opt->id(), d->mStorageUsesPrivateAggregation);
634 options = SortOrder::enumerateGroupSortDirectionOptions(d->mAggregation->grouping(), d->mSortOrder.groupSorting());
658 void Widget::WidgetPrivate::switchMessageSorting(SortOrder::MessageSorting messageSorting, SortOrder::SortDirection sortDirection, int logicalHeaderColumnIndex)
691 || (column->messageSorting() == SortOrder::SortMessagesByReceiver) || (column->messageSorting() == SortOrder::SortMessagesBySender))
692 && ((messageSorting == SortOrder::SortMessagesBySenderOrReceiver) || (messageSorting == SortOrder::SortMessagesByReceiver)
740 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
765 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
791 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
816 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
873 d->switchMessageSorting(column->messageSorting(), d->mSortOrder.messageSortDirection(), logicalIndex);
875 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
1046 void Widget::viewMessageListContextPopupRequest(const QVector<MessageItem *> &, const QPoint &)
1070 void Widget::viewMessageStatusChangeRequest(MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear)
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
void aggregationsChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:887
QWidget * window() const const
void viewSelectionChanged() override
Reimplemented from MessageList::Core::Widget.
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
SortDirection
The "generic" sort direction: used for groups and for messages If you add values here please look at ...
Definition: sortorder.h:68
bool selectionEmpty() const
Fast function that determines if the selection is empty.
The MessageList::View is the real display of the message list.
Definition: view.h:47
void viewDragMoveEvent(QDragMoveEvent *e) override
Reimplemented from MessageList::Core::Widget.
Core::MessageItem * currentMessageItem() const
Returns the current MessageItem in the current folder.
Definition: widgetbase.cpp:241
void changeQuicksearchVisibility(bool)
Shows or hides the quicksearch field, the filter combobox and the toolbutton for advanced search.
Definition: widgetbase.cpp:190
AscendingOrder
QObject * sender() const const
currentIndex
const QString & searchString() const
Returns the currently set search string.
Definition: filter.cpp:150
void setCurrentStatusFilterItem()
Must be called by fillMessageTagCombo()
Definition: widgetbase.cpp:232
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Provides a widget which has the messagelist and the most important helper widgets,...
Definition: widgetbase.h:40
void slotViewHeaderSectionClicked(int logicalIndex)
Handles header section clicks switching the Aggregation MessageSorting on-the-fly.
Definition: widgetbase.cpp:837
void viewDragEnterEvent(QDragEnterEvent *e) override
Reimplemented from MessageList::Core::Widget.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QVector< Akonadi::MessageStatus > currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
void clear()
void viewGroupHeaderContextPopupRequest(MessageList::Core::GroupHeaderItem *group, const QPoint &globalPos) override
Reimplemented from MessageList::Core::Widget.
QString i18n(const char *text, const TYPE &arg...)
constexpr bool isEmpty() const
OtherFocusReason
void sectionClicked(int logicalIndex)
void timeout()
bool isEmpty() const const
The Akonadi specific implementation of the Core::StorageModel.
Definition: storagemodel.h:35
QFuture< void > filter(Sequence &sequence, KeepFunctor filterFunction)
int toInt(bool *ok) const const
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition: messagelist/src/core/enums.h:40
A class which holds information about sorting, e.g.
Definition: sortorder.h:34
StorageModel * storageModel() const
Returns the StorageModel currently set.
Definition: widgetbase.cpp:376
QString currentFilterTagId() const
Returns the id of the MessageItem::Tag currently set in the quicksearch field.
Definition: widgetbase.cpp:267
void themesChanged()
This is called by Manager when the option sets stored within have changed.
Definition: widgetbase.cpp:880
void setCheckable(bool)
void viewMessageListContextPopupRequest(const QVector< Core::MessageItem * > &selectedItems, const QPoint &globalPos) override
Reimplemented from MessageList::Core::Widget.
void show()
void populateStatusFilterCombo()
This is called to setup the status filter's QComboBox.
Definition: widgetbase.cpp:212
QVariant data() const const
void setStorageModel(StorageModel *storageModel, PreSelectionMode preSelectionMode=PreSelectLastSelected)
Sets the storage model for this Widget.
Definition: widgetbase.cpp:341
void setData(const QVariant &userData)
QVector< Akonadi::MessageStatus > status() const
Returns the currently set status mask.
Definition: filter.cpp:109
NoFrame
Definition: aggregation.h:21
The Theme class defines the visual appearance of the MessageList.
Definition: theme.h:48
void triggered(bool checked)
void viewMessageSelected(MessageList::Core::MessageItem *msg) override
Reimplemented from MessageList::Core::Widget.
void clear()
QLineEdit * quickSearch() const
Returns the search line of this widget.
Definition: widgetbase.cpp:381
void triggered(QAction *action)
PositionAtCenter
void viewDropEvent(QDropEvent *e) override
Reimplemented from MessageList::Core::Widget.
void setObjectName(const QString &name)
void currentIndexChanged(int index)
void viewStartDragRequest() override
Reimplemented from MessageList::Core::Widget.
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition: storagemodelbase.h:28
void viewMessageActivated(MessageList::Core::MessageItem *msg) override
Reimplemented from MessageList::Core::Widget.
QList::iterator begin()
void setAutoFillBackground(bool enabled)
void setCurrentFolder(const Akonadi::Collection &collection)
Sets the current folder.
Definition: widgetbase.cpp:1097
int size() const const
void viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear) override
Reimplemented from MessageList::Core::Widget.
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
void fillMessageTagCombo() override
Reimplemented from MessageList::Core::Widget.
GroupSorting
How to sort the groups If you add values here please look at the implementations of the enumerate* fu...
Definition: sortorder.h:53
KGuiItem ok()
This class is responsible of matching messages that should be displayed in the View.
Definition: filter.h:44
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition: view.cpp:856
QAction * addAction(QAction *action)
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
void setChecked(bool)
QList::iterator end()
virtual QString id() const =0
Returns an unique id for this Storage collection.
void setFocus()
A set of aggregation options that can be applied to the MessageList::Model in a single shot.
Definition: aggregation.h:28
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.