Messagelib
widgetbase.cpp
69 void switchMessageSorting(SortOrder::MessageSorting messageSorting, SortOrder::SortDirection sortDirection, int logicalHeaderColumnIndex);
101 bool mStorageUsesPrivateTheme = false; ///< true if the current folder does not use the global theme
102 bool mStorageUsesPrivateAggregation = false; ///< true if the current folder does not use the global aggregation
103 bool mStorageUsesPrivateSortOrder = false; ///< true if the current folder does not use the global sort order
115 connect(Manager::instance(), &Manager::aggregationsChanged, this, &Widget::aggregationsChanged);
127 connect(d->quickSearchLine, &QuickSearchLine::clearButtonClicked, this, &Widget::searchEditClearButtonClicked);
129 connect(d->quickSearchLine, &QuickSearchLine::searchEditTextEdited, this, &Widget::searchEditTextEdited);
130 connect(d->quickSearchLine, &QuickSearchLine::searchOptionChanged, this, &Widget::searchEditTextEdited);
131 connect(d->quickSearchLine, &QuickSearchLine::statusButtonsClicked, this, &Widget::slotStatusButtonsClicked);
134 connect(d->quickSearchLine, &QuickSearchLine::activateFilter, this, &Widget::slotActivateFilter);
155 connect(d->mView->header(), &QHeaderView::sectionClicked, this, &Widget::slotViewHeaderSectionClicked);
194 KMessageBox::information(this, i18n("No filter defined."), i18nc("@title:window", "Create Filter"));
227 d->mCurrentStatusFilterIndex = (tagFilterComboBox->currentIndex() != -1) ? tagFilterComboBox->currentIndex() : 0;
243 connect(d->quickSearchLine->tagFilterComboBox(), &QComboBox::currentIndexChanged, this, &Widget::statusSelected);
284void Widget::WidgetPrivate::setDefaultAggregationForStorageModel(const StorageModel *storageModel)
286 const Aggregation *opt = Manager::instance()->aggregationForStorageModel(storageModel, &mStorageUsesPrivateAggregation);
300 const Theme *opt = Manager::instance()->themeForStorageModel(storageModel, &mStorageUsesPrivateTheme);
324 Manager::instance()->saveSortOrderForStorageModel(storageModel, mSortOrder, mStorageUsesPrivateSortOrder);
333 mSortOrder = Manager::instance()->sortOrderForStorageModel(storageModel, &mStorageUsesPrivateSortOrder);
449 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
488 Manager::instance()->saveThemeForStorageModel(d->mStorageModel, opt->id(), d->mStorageUsesPrivateTheme);
514 std::sort(sortedAggregations.begin(), sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
564 Manager::instance()->saveAggregationForStorageModel(d->mStorageModel, opt->id(), d->mStorageUsesPrivateAggregation);
642 options = SortOrder::enumerateGroupSortDirectionOptions(d->mAggregation->grouping(), d->mSortOrder.groupSorting());
666void Widget::WidgetPrivate::switchMessageSorting(SortOrder::MessageSorting messageSorting, SortOrder::SortDirection sortDirection, int logicalHeaderColumnIndex)
699 || (column->messageSorting() == SortOrder::SortMessagesByReceiver) || (column->messageSorting() == SortOrder::SortMessagesBySender))
700 && ((messageSorting == SortOrder::SortMessagesBySenderOrReceiver) || (messageSorting == SortOrder::SortMessagesByReceiver)
748 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
773 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
799 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
824 Manager::instance()->saveSortOrderForStorageModel(d->mStorageModel, d->mSortOrder, d->mStorageUsesPrivateSortOrder);
881 d->switchMessageSorting(column->messageSorting(), d->mSortOrder.messageSortDirection(), logicalIndex);
1083void Widget::viewMessageStatusChangeRequest(MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear)
constexpr bool isEmpty() const
A set of aggregation options that can be applied to the MessageList::Model in a single shot.
Definition aggregation.h:29
A class which holds information about sorting, e.g.
Definition sortorder.h:23
SortDirection
The "generic" sort direction: used for groups and for messages If you add values here please look at ...
Definition sortorder.h:50
static QList< QPair< QString, int > > enumerateGroupSortingOptions(Aggregation::Grouping g)
Enumerates the group sorting options compatible with the specified Grouping.
Definition sortorder.cpp:98
static QList< QPair< QString, int > > enumerateMessageSortDirectionOptions(MessageSorting ms)
Enumerates the available message sorting directions for the specified MessageSorting option.
Definition sortorder.cpp:80
static QList< QPair< QString, int > > enumerateMessageSortingOptions(Aggregation::Threading t)
Enumerates the message sorting options compatible with the specified Threading setting.
Definition sortorder.cpp:60
GroupSorting
How to sort the groups If you add values here please look at the implementations of the enumerate* fu...
Definition sortorder.h:35
static SortOrder defaultForAggregation(const Aggregation *aggregation, SortOrder oldSortOrder)
Returns the default sort order for the given aggregation.
Definition sortorder.cpp:169
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:122
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition storagemodelbase.h:29
virtual QString id() const =0
Returns an unique id for this Storage collection.
The Theme class defines the visual appearance of the MessageList.
Definition theme.h:48
The MessageList::View is the real display of the message list.
Definition view.h:47
MessageItem * currentMessageItem(bool selectIfNeeded=true) const
Returns the current MessageItem (that is bound to current StorageModel).
Definition view.cpp:849
void setAggregation(const Aggregation *aggregation)
Sets the aggregation for this view.
Definition view.cpp:249
Provides a widget which has the messagelist and the most important helper widgets,...
Definition widgetbase.h:41
virtual void viewDragMoveEvent(QDragMoveEvent *e)
This is called by View when a drag move event is received.
Definition widgetbase.cpp:1071
bool isThreaded() const
Returns true if the current Aggregation is threaded, false otherwise (or if there is no current Aggre...
Definition widgetbase.cpp:1095
virtual void fillMessageTagCombo()
Called when the "Message Status/Tag" filter menu is opened by the user.
Definition widgetbase.cpp:903
virtual void viewMessageStatusChangeRequest(MessageItem *msg, Akonadi::MessageStatus set, 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:1083
bool selectionEmpty() const
Fast function that determines if the selection is empty.
Definition widgetbase.cpp:1100
void changeQuicksearchVisibility(bool)
Shows or hides the quicksearch field, the filter combobox and the toolbutton for advanced search.
Definition widgetbase.cpp:198
StorageModel * storageModel() const
Returns the StorageModel currently set.
Definition widgetbase.cpp:384
virtual void viewDropEvent(QDropEvent *e)
This is called by View when a drop event is received.
Definition widgetbase.cpp:1075
void slotViewHeaderSectionClicked(int logicalIndex)
Handles header section clicks switching the Aggregation MessageSorting on-the-fly.
Definition widgetbase.cpp:845
virtual void viewMessageListContextPopupRequest(const QList< MessageItem * > &selectedItems, const QPoint &globalPos)
This is called by View when a message is right clicked.
Definition widgetbase.cpp:1059
void setCurrentFolder(const Akonadi::Collection &collection)
Sets the current folder.
Definition widgetbase.cpp:1110
virtual void viewSelectionChanged()
This is called by View when selection changes.
Definition widgetbase.cpp:1055
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:1051
virtual void viewStartDragRequest()
This is called by View when a drag can possibly be started.
Definition widgetbase.cpp:1079
virtual void viewGroupHeaderContextPopupRequest(GroupHeaderItem *group, const QPoint &globalPos)
This is called by View when a group header is right clicked.
Definition widgetbase.cpp:1063
void setCurrentStatusFilterItem()
Must be called by fillMessageTagCombo()
Definition widgetbase.cpp:240
void populateStatusFilterCombo()
This is called to setup the status filter's QComboBox.
Definition widgetbase.cpp:220
void aggregationsChanged()
This is called by Manager when the option sets stored within have changed.
Definition widgetbase.cpp:895
void themesChanged()
This is called by Manager when the option sets stored within have changed.
Definition widgetbase.cpp:888
QString currentFilterTagId() const
Returns the id of the MessageItem::Tag currently set in the quicksearch field.
Definition widgetbase.cpp:275
Core::MessageItem * currentMessageItem() const
Returns the current MessageItem in the current folder.
Definition widgetbase.cpp:249
void setStorageModel(StorageModel *storageModel, PreSelectionMode preSelectionMode=PreSelectLastSelected)
Sets the storage model for this Widget.
Definition widgetbase.cpp:349
QList< Akonadi::MessageStatus > currentFilterStatus() const
Returns the Akonadi::MessageStatus in the current quicksearch field.
Definition widgetbase.cpp:259
virtual void viewMessageSelected(MessageItem *msg)
This is called by View when a message is single-clicked (thus selected and made current)
Definition widgetbase.cpp:1047
virtual void viewDragEnterEvent(QDragEnterEvent *e)
This is called by View when a drag enter event is received.
Definition widgetbase.cpp:1067
void focusQuickSearch(const QString &selectedText)
Sets the focus on the quick search line of the currently active tab.
Definition widgetbase.cpp:1090
QString currentFilterSearchString() const
Returns the search term in the current quicksearch field.
Definition widgetbase.cpp:267
The Akonadi specific implementation of the Core::StorageModel.
Definition storagemodel.h:36
The dialog used for configuring MessageList::Aggregation sets.
Definition configureaggregationsdialog.h:29
Q_SCRIPTABLE CaptureState status()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
KGuiItem ok()
The implementation independent part of the MessageList library.
Definition aggregation.h:22
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition messagelist/src/core/enums.h:28
PositionAtCenter
void setCheckable(bool)
void setChecked(bool)
QVariant data() const const
void setData(const QVariant &data)
void triggered(bool checked)
QAction * addAction(QAction *action)
void clear()
currentIndex
void currentIndexChanged(int index)
NoFrame
void sectionClicked(int logicalIndex)
void clear()
iterator begin()
iterator end()
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
T qobject_cast(QObject *object)
QObject * sender() const const
void setObjectName(QAnyStringView name)
bool isEmpty() const const
OtherFocusReason
AscendingOrder
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void timeout()
QString toString() const const
void setFocus()
void show()
QWidget * window() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.