• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • sources
  • kde-4.14
  • kdepim
  • messagelist
  • core
sortorder.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright 2009 Thomas McGuire <mcguire@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  *******************************************************************************/
20 #include "core/sortorder.h"
21 
22 #include "messagelistutil.h"
23 
24 #include <KLocalizedString>
25 
26 #include <QMetaEnum>
27 
28 using namespace MessageList::Core;
29 
30 SortOrder::SortOrder()
31  : mMessageSorting( SortMessagesByDateTime ),
32  mMessageSortDirection( Descending ),
33  mGroupSorting( NoGroupSorting ),
34  mGroupSortDirection( Ascending )
35 {
36 }
37 
38 QList< QPair< QString, int > > SortOrder::enumerateMessageSortingOptions( Aggregation::Threading t )
39 {
40  QList< QPair< QString, int > > ret;
41  ret.append( QPair< QString, int >( i18n( "None (Storage Order)" ), SortOrder::NoMessageSorting ) );
42  ret.append( QPair< QString, int >( i18n( "By Date/Time" ), SortOrder::SortMessagesByDateTime ) );
43  if ( t != Aggregation::NoThreading )
44  ret.append( QPair< QString, int >( i18n( "By Date/Time of Most Recent in Subtree" ), SortOrder::SortMessagesByDateTimeOfMostRecent ) );
45  ret.append( QPair< QString, int >( i18n( "By Sender" ), SortOrder::SortMessagesBySender ) );
46  ret.append( QPair< QString, int >( i18n( "By Receiver" ), SortOrder::SortMessagesByReceiver ) );
47  ret.append( QPair< QString, int >( i18n( "By Smart Sender/Receiver" ), SortOrder::SortMessagesBySenderOrReceiver ) );
48  ret.append( QPair< QString, int >( i18n( "By Subject" ), SortOrder::SortMessagesBySubject ) );
49  ret.append( QPair< QString, int >( i18n( "By Size" ), SortOrder::SortMessagesBySize ) );
50  ret.append( QPair< QString, int >( i18n( "By Action Item Status" ), SortOrder::SortMessagesByActionItemStatus ) );
51  ret.append( QPair< QString, int >( i18n( "By Unread Status" ), SortOrder::SortMessagesByUnreadStatus ) );
52  ret.append( QPair< QString, int >( i18n( "By Important Status" ), SortOrder::SortMessagesByImportantStatus ) );
53  ret.append( QPair< QString, int >( i18n( "By Attachment Status" ), SortOrder::SortMessagesByAttachmentStatus ) );
54  return ret;
55 }
56 
57 QList< QPair< QString, int > > SortOrder::enumerateMessageSortDirectionOptions( MessageSorting ms )
58 {
59  QList< QPair< QString, int > > ret;
60  if ( ms == SortOrder::NoMessageSorting )
61  return ret;
62 
63  if (
64  ( ms == SortOrder::SortMessagesByDateTime ) ||
65  ( ms == SortOrder::SortMessagesByDateTimeOfMostRecent )
66  )
67  {
68  ret.append( QPair< QString, int >( i18n( "Least Recent on Top" ), SortOrder::Ascending ) );
69  ret.append( QPair< QString, int >( i18n( "Most Recent on Top" ), SortOrder::Descending ) );
70  return ret;
71  }
72 
73  ret.append( QPair< QString, int >( i18nc( "Sort order for messages", "Ascending" ), SortOrder::Ascending ) );
74  ret.append( QPair< QString, int >( i18nc( "Sort order for messages", "Descending" ), SortOrder::Descending ) );
75  return ret;
76 }
77 
78 
79 QList< QPair< QString, int > > SortOrder::enumerateGroupSortingOptions( Aggregation::Grouping g )
80 {
81  QList< QPair< QString, int > > ret;
82  if ( g == Aggregation::NoGrouping )
83  return ret;
84  if ( ( g == Aggregation::GroupByDate ) || ( g == Aggregation::GroupByDateRange ) )
85  ret.append( QPair< QString, int >( i18n( "by Date/Time" ), SortOrder::SortGroupsByDateTime ) );
86  else {
87  ret.append( QPair< QString, int >( i18n( "None (Storage Order)" ), SortOrder::NoGroupSorting ) );
88  ret.append( QPair< QString, int >( i18n( "by Date/Time of Most Recent Message in Group" ), SortOrder::SortGroupsByDateTimeOfMostRecent ) );
89  }
90 
91  if ( g == Aggregation::GroupBySenderOrReceiver )
92  ret.append( QPair< QString, int >( i18n( "by Sender/Receiver" ), SortOrder::SortGroupsBySenderOrReceiver ) );
93  else if ( g == Aggregation::GroupBySender )
94  ret.append( QPair< QString, int >( i18n( "by Sender" ), SortOrder::SortGroupsBySender ) );
95  else if ( g == Aggregation::GroupByReceiver )
96  ret.append( QPair< QString, int >( i18n( "by Receiver" ), SortOrder::SortGroupsByReceiver ) );
97 
98  return ret;
99 }
100 
101 QList< QPair< QString, int > > SortOrder::enumerateGroupSortDirectionOptions( Aggregation::Grouping g,
102  GroupSorting gs )
103 {
104  QList< QPair< QString, int > > ret;
105  if ( g == Aggregation::NoGrouping || gs == SortOrder::NoGroupSorting)
106  return ret;
107 
108  if ( gs == SortOrder::SortGroupsByDateTimeOfMostRecent )
109  {
110  ret.append( QPair< QString, int >( i18n( "Least Recent on Top" ), SortOrder::Ascending ) );
111  ret.append( QPair< QString, int >( i18n( "Most Recent on Top" ), SortOrder::Descending ) );
112  return ret;
113  }
114  ret.append( QPair< QString, int >( i18nc( "Sort order for mail groups", "Ascending" ), SortOrder::Ascending ) );
115  ret.append( QPair< QString, int >( i18nc( "Sort order for mail groups", "Descending" ), SortOrder::Descending ) );
116  return ret;
117 }
118 
119 typedef QPair< QString, int > Pair;
120 typedef QList< Pair > OptionList;
121 static bool optionListHasOption( const OptionList &optionList, int optionValue,
122  int defaultOptionValue )
123 {
124  foreach( const Pair &pair, optionList ) {
125  if ( pair.second == optionValue ) {
126  return true;
127  }
128  }
129  if ( optionValue != defaultOptionValue )
130  return false;
131  else return true;
132 }
133 
134 bool SortOrder::validForAggregation( const Aggregation *aggregation ) const
135 {
136  OptionList messageSortings = enumerateMessageSortingOptions( aggregation->threading() );
137  OptionList messageSortDirections = enumerateMessageSortDirectionOptions( mMessageSorting );
138  OptionList groupSortings = enumerateGroupSortingOptions( aggregation->grouping() );
139  OptionList groupSortDirections = enumerateGroupSortDirectionOptions( aggregation->grouping(),
140  mGroupSorting );
141  SortOrder defaultSortOrder = defaultForAggregation( aggregation, SortOrder() );
142  bool messageSortingOk = optionListHasOption( messageSortings,
143  mMessageSorting, defaultSortOrder.messageSorting() );
144  bool messageSortDirectionOk = optionListHasOption( messageSortDirections, mMessageSortDirection,
145  defaultSortOrder.messageSortDirection() );
146 
147  bool groupSortingOk = optionListHasOption( groupSortings, mGroupSorting,
148  defaultSortOrder.groupSorting() );
149  bool groupSortDirectionOk = optionListHasOption( groupSortDirections, mGroupSortDirection,
150  defaultSortOrder.groupSortDirection() );
151  return messageSortingOk && messageSortDirectionOk &&
152  groupSortingOk && groupSortDirectionOk;
153 }
154 
155 SortOrder SortOrder::defaultForAggregation( const Aggregation *aggregation,
156  const SortOrder &oldSortOrder )
157 {
158  SortOrder newSortOrder;
159 
160  //
161  // First check if we can adopt the message sorting and the message sort direction from
162  // the old sort order. This is mostly true, except, for example, when the old message sorting
163  // was "by most recent in subtree", and the aggregation doesn't use threading.
164  //
165  OptionList messageSortings = enumerateMessageSortingOptions( aggregation->threading() );
166  bool messageSortingOk = optionListHasOption( messageSortings,
167  oldSortOrder.messageSorting(),
168  SortOrder().messageSorting() );
169  bool messageSortDirectionOk = false;
170  if ( messageSortingOk ) {
171  OptionList messageSortDirections = enumerateMessageSortDirectionOptions(
172  oldSortOrder.messageSorting() );
173  messageSortDirectionOk = optionListHasOption( messageSortDirections, oldSortOrder.messageSortDirection(),
174  SortOrder().messageSortDirection() );
175  }
176 
177  //
178  // Ok, if we can partly adopt the old sort order, set the values now.
179  //
180  if ( messageSortingOk )
181  newSortOrder.setMessageSorting( oldSortOrder.messageSorting() );
182  else
183  newSortOrder.setMessageSorting( SortMessagesByDateTime );
184  if ( messageSortDirectionOk )
185  newSortOrder.setMessageSortDirection( oldSortOrder.messageSortDirection() );
186  else
187  newSortOrder.setMessageSortDirection( Descending );
188 
189  //
190  // Now set the group sorting and group sort direction, depending on the aggregation.
191  //
192  Aggregation::Grouping grouping = aggregation->grouping();
193  if ( grouping == Aggregation::GroupByDate ||
194  grouping == Aggregation::GroupByDateRange ) {
195  newSortOrder.setGroupSortDirection( Descending );
196  newSortOrder.setGroupSorting( SortGroupsByDateTime );
197 
198  }
199  else if ( grouping == Aggregation::GroupByReceiver || grouping == Aggregation::GroupBySender ||
200  grouping == Aggregation::GroupBySenderOrReceiver ) {
201  newSortOrder.setGroupSortDirection( Descending );
202  switch ( grouping ) {
203  case Aggregation::GroupByReceiver:
204  newSortOrder.setGroupSorting( SortGroupsByReceiver ); break;
205  case Aggregation::GroupBySender:
206  newSortOrder.setGroupSorting( SortGroupsBySender ); break;
207  case Aggregation::GroupBySenderOrReceiver:
208  newSortOrder.setGroupSorting( SortGroupsBySenderOrReceiver ); break;
209  default: break;
210  }
211  }
212 
213  return newSortOrder;
214 }
215 
216 bool SortOrder::readConfigHelper( KConfigGroup &conf, const QString &id )
217 {
218  if ( !conf.hasKey( id + MessageList::Util::messageSortingConfigName() ) )
219  return false;
220  mMessageSorting = messageSortingForName(
221  conf.readEntry( id + MessageList::Util::messageSortingConfigName() ) );
222  mMessageSortDirection = sortDirectionForName(
223  conf.readEntry( id + MessageList::Util::messageSortDirectionConfigName() ) );
224  mGroupSorting = groupSortingForName(
225  conf.readEntry( id + MessageList::Util::groupSortingConfigName() ) );
226  mGroupSortDirection = sortDirectionForName(
227  conf.readEntry( id + MessageList::Util::groupSortDirectionConfigName() ) );
228  return true;
229 }
230 
231 void SortOrder::readConfig( KConfigGroup &conf, const QString &storageId,
232  bool *storageUsesPrivateSortOrder )
233 {
234  SortOrder privateSortOrder, globalSortOrder;
235  globalSortOrder.readConfigHelper( conf, QLatin1String( "GlobalSortOrder" ) );
236  *storageUsesPrivateSortOrder = privateSortOrder.readConfigHelper( conf, storageId );
237  if ( *storageUsesPrivateSortOrder )
238  *this = privateSortOrder;
239  else
240  *this = globalSortOrder;
241 
242 }
243 
244 void SortOrder::writeConfig( KConfigGroup &conf, const QString &storageId,
245  bool storageUsesPrivateSortOrder ) const
246 {
247  QString id = storageId;
248  if ( !storageUsesPrivateSortOrder ) {
249  id = QLatin1String( "GlobalSortOrder" );
250  conf.deleteEntry( storageId + MessageList::Util::messageSortingConfigName() );
251  conf.deleteEntry( storageId + MessageList::Util::messageSortDirectionConfigName() );
252  conf.deleteEntry( storageId + MessageList::Util::groupSortingConfigName() );
253  conf.deleteEntry( storageId + MessageList::Util::groupSortDirectionConfigName() );
254  }
255 
256  conf.writeEntry( id + MessageList::Util::messageSortingConfigName(),
257  nameForMessageSorting( mMessageSorting ) );
258  conf.writeEntry( id + MessageList::Util::messageSortDirectionConfigName(),
259  nameForSortDirection( mMessageSortDirection ) );
260  conf.writeEntry( id + MessageList::Util::groupSortingConfigName(),
261  nameForGroupSorting( mGroupSorting ) );
262  conf.writeEntry( id + MessageList::Util::groupSortDirectionConfigName(),
263  nameForSortDirection( mGroupSortDirection ) );
264 
265 }
266 
267 bool SortOrder::isValidMessageSorting( SortOrder::MessageSorting ms )
268 {
269  switch( ms )
270  {
271  case SortOrder::NoMessageSorting:
272  case SortOrder::SortMessagesByDateTime:
273  case SortOrder::SortMessagesByDateTimeOfMostRecent:
274  case SortOrder::SortMessagesBySenderOrReceiver:
275  case SortOrder::SortMessagesBySender:
276  case SortOrder::SortMessagesByReceiver:
277  case SortOrder::SortMessagesBySubject:
278  case SortOrder::SortMessagesBySize:
279  case SortOrder::SortMessagesByActionItemStatus:
280  case SortOrder::SortMessagesByUnreadStatus:
281  case SortOrder::SortMessagesByImportantStatus:
282  case SortOrder::SortMessagesByAttachmentStatus:
283  // ok
284  break;
285  default:
286  // b0rken
287  return false;
288  break;
289  }
290 
291  return true;
292 }
293 
294 const QString SortOrder::nameForSortDirection( SortDirection sortDirection )
295 {
296  int index = staticMetaObject.indexOfEnumerator( "SortDirection" );
297  return QLatin1String( staticMetaObject.enumerator( index ).valueToKey( sortDirection ) );
298 }
299 
300 const QString SortOrder::nameForMessageSorting( MessageSorting messageSorting )
301 {
302  int index = staticMetaObject.indexOfEnumerator( "MessageSorting" );
303  return QLatin1String( staticMetaObject.enumerator( index ).valueToKey( messageSorting ) );
304 }
305 
306 const QString SortOrder::nameForGroupSorting( GroupSorting groupSorting )
307 {
308  int index = staticMetaObject.indexOfEnumerator( "GroupSorting" );
309  return QLatin1String( staticMetaObject.enumerator( index ).valueToKey( groupSorting ) );
310 }
311 
312 SortOrder::SortDirection SortOrder::sortDirectionForName( const QString& name )
313 {
314  int index = staticMetaObject.indexOfEnumerator( "SortDirection" );
315  return static_cast<SortDirection>( staticMetaObject.enumerator( index ).keyToValue(
316  name.toLatin1().constData() ) );
317 }
318 
319 SortOrder::MessageSorting SortOrder::messageSortingForName( const QString& name )
320 {
321  int index = staticMetaObject.indexOfEnumerator( "MessageSorting" );
322  return static_cast<MessageSorting>( staticMetaObject.enumerator( index ).keyToValue(
323  name.toLatin1().constData() ) );
324 }
325 
326 SortOrder::GroupSorting SortOrder::groupSortingForName( const QString& name )
327 {
328  int index = staticMetaObject.indexOfEnumerator( "GroupSorting" );
329  return static_cast<GroupSorting>( staticMetaObject.enumerator( index ).keyToValue(
330  name.toLatin1().constData() ) );
331 }
332 
333 #include "moc_sortorder.cpp"
MessageList::Core::SortOrder::SortMessagesByDateTimeOfMostRecent
Sort the messages by date and time of the most recent message in subtree.
Definition: sortorder.h:82
MessageList::Core::SortOrder
A class which holds information about sorting, e.g.
Definition: sortorder.h:37
MessageList::Core::SortOrder::SortMessagesBySubject
Sort the messages by subject.
Definition: sortorder.h:86
MessageList::Core::SortOrder::SortOrder
SortOrder()
Definition: sortorder.cpp:30
MessageList::Core::Aggregation
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:43
optionListHasOption
static bool optionListHasOption(const OptionList &optionList, int optionValue, int defaultOptionValue)
Definition: sortorder.cpp:121
MessageList::Core::SortOrder::SortGroupsByDateTime
Sort groups by date/time of the group.
Definition: sortorder.h:54
MessageList::Core::SortOrder::isValidMessageSorting
static bool isValidMessageSorting(SortOrder::MessageSorting ms)
Returns true if the ms parameter specifies a valid MessageSorting option.
Definition: sortorder.cpp:267
MessageList::Core::Aggregation::NoThreading
Perform no threading at all.
Definition: aggregation.h:85
MessageList::Core::Aggregation::grouping
Grouping grouping() const
Returns the currently set Grouping option.
Definition: aggregation.h:162
MessageList::Core::Aggregation::Threading
Threading
The available threading methods.
Definition: aggregation.h:83
MessageList::Core::Aggregation::GroupBySender
Group by sender, always.
Definition: aggregation.h:58
MessageList::Core::Aggregation::threading
Threading threading() const
Returns the current threading method.
Definition: aggregation.h:202
MessageList::Core::SortOrder::setGroupSortDirection
void setGroupSortDirection(SortDirection groupSortDirection)
Sets the SortDirection for the groups.
Definition: sortorder.h:121
MessageList::Core::Aggregation::GroupByDate
Group the messages by the date of the thread leader.
Definition: aggregation.h:55
MessageList::Core::SortOrder::SortGroupsByReceiver
Sort groups by receiver (makes sense only with GroupByReceiver)
Definition: sortorder.h:58
MessageList::Util::groupSortingConfigName
MESSAGELIST_EXPORT QString groupSortingConfigName()
Definition: messagelistutil.cpp:41
MessageList::Core::Aggregation::GroupByDateRange
Use smart (thread leader) date ranges ("Today","Yesterday","Last Week"...)
Definition: aggregation.h:56
MessageList::Util::messageSortingConfigName
MESSAGELIST_EXPORT QString messageSortingConfigName()
Definition: messagelistutil.cpp:31
OptionList
QList< Pair > OptionList
Definition: sortorder.cpp:120
MessageList::Core::Aggregation::NoGrouping
Don't group messages at all.
Definition: aggregation.h:54
MessageList::Core::SortOrder::SortDirection
SortDirection
The "generic" sort direction: used for groups and for messages If you add values here please look at ...
Definition: sortorder.h:67
MessageList::Core::SortOrder::SortMessagesByReceiver
Sort the messages by receiver.
Definition: sortorder.h:85
MessageList::Core::SortOrder::writeConfig
void writeConfig(KConfigGroup &conf, const QString &storageId, bool storageUsesPrivateSortOrder) const
Writes the sort order to a config group.
Definition: sortorder.cpp:244
MessageList::Core::SortOrder::NoGroupSorting
Don't sort the groups at all, add them as they come in.
Definition: sortorder.h:53
MessageList::Core::SortOrder::enumerateMessageSortDirectionOptions
static QList< QPair< QString, int > > enumerateMessageSortDirectionOptions(MessageSorting ms)
Enumerates the available message sorting directions for the specified MessageSorting option...
Definition: sortorder.cpp:57
QList::append
void append(const T &value)
MessageList::Core::SortOrder::messageSorting
MessageSorting messageSorting() const
Returns the current message sorting option.
Definition: sortorder.h:127
MessageList::Core::Aggregation::GroupByReceiver
Group by receiver, always.
Definition: aggregation.h:59
MessageList::Core::SortOrder::messageSortDirection
SortDirection messageSortDirection() const
Returns the current message SortDirection.
Definition: sortorder.h:139
MessageList::Core::SortOrder::MessageSorting
MessageSorting
The available message sorting options.
Definition: sortorder.h:78
Pair
QPair< QString, int > Pair
Definition: sortorder.cpp:119
QByteArray::constData
const char * constData() const
MessageList::Util::groupSortDirectionConfigName
MESSAGELIST_EXPORT QString groupSortDirectionConfigName()
Definition: messagelistutil.cpp:46
QString
QList
MessageList::Core::SortOrder::enumerateGroupSortDirectionOptions
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
MessageList::Core::SortOrder::Descending
Definition: sortorder.h:70
QPair
MessageList::Util::messageSortDirectionConfigName
MESSAGELIST_EXPORT QString messageSortDirectionConfigName()
Definition: messagelistutil.cpp:36
MessageList::Core::SortOrder::SortMessagesBySender
Sort the messages by sender.
Definition: sortorder.h:84
MessageList::Core::SortOrder::SortGroupsBySender
Sort groups by sender (makes sense only with GroupBySender)
Definition: sortorder.h:57
MessageList::Core::SortOrder::defaultForAggregation
static SortOrder defaultForAggregation(const Aggregation *aggregation, const SortOrder &oldSortOrder)
Returns the default sort order for the given aggregation.
Definition: sortorder.cpp:155
MessageList::Core::SortOrder::readConfig
void readConfig(KConfigGroup &conf, const QString &storageId, bool *storageUsesPrivateSortOrder)
Reads the sort order from a config group.
Definition: sortorder.cpp:231
MessageList::Core::Aggregation::Grouping
Grouping
Message grouping.
Definition: aggregation.h:52
MessageList::Core::SortOrder::NoMessageSorting
Don't sort the messages at all.
Definition: sortorder.h:80
MessageList::Core::SortOrder::setMessageSortDirection
void setMessageSortDirection(SortDirection messageSortDirection)
Sets the SortDirection for the message.
Definition: sortorder.h:146
sortorder.h
MessageList::Core::SortOrder::GroupSorting
GroupSorting
How to sort the groups If you add values here please look at the implementations of the enumerate* fu...
Definition: sortorder.h:51
QString::toLatin1
QByteArray toLatin1() const
MessageList::Core::SortOrder::SortMessagesBySenderOrReceiver
Sort the messages by sender or receiver.
Definition: sortorder.h:83
messagelistutil.h
QLatin1String
MessageList::Core::SortOrder::Ascending
Definition: sortorder.h:69
MessageList::Core::SortOrder::SortMessagesByImportantStatus
Definition: sortorder.h:90
MessageList::Core::SortOrder::enumerateMessageSortingOptions
static QList< QPair< QString, int > > enumerateMessageSortingOptions(Aggregation::Threading t)
Enumerates the message sorting options compatible with the specified Threading setting.
Definition: sortorder.cpp:38
MessageList::Core::SortOrder::setGroupSorting
void setGroupSorting(GroupSorting gs)
Sets the GroupSorting option.
Definition: sortorder.h:108
MessageList::Core::SortOrder::SortGroupsBySenderOrReceiver
Sort groups by sender or receiver (makes sense only with GroupBySenderOrReceiver) ...
Definition: sortorder.h:56
MessageList::Core::SortOrder::SortMessagesByUnreadStatus
Sort the messages by the "Unread" flags of status.
Definition: sortorder.h:89
MessageList::Core::SortOrder::SortMessagesBySize
Sort the messages by size.
Definition: sortorder.h:87
MessageList::Core::SortOrder::SortMessagesByDateTime
Sort the messages by date and time.
Definition: sortorder.h:81
MessageList::Core::SortOrder::setMessageSorting
void setMessageSorting(MessageSorting ms)
Sets the current message sorting option.
Definition: sortorder.h:133
MessageList::Core::Aggregation::GroupBySenderOrReceiver
Group by sender (incoming) or receiver (outgoing) field.
Definition: aggregation.h:57
MessageList::Core::SortOrder::SortMessagesByActionItemStatus
Sort the messages by the "Action Item" flag of status.
Definition: sortorder.h:88
MessageList::Core::SortOrder::validForAggregation
bool validForAggregation(const Aggregation *aggregation) const
Checks if this sort order can be used in combination with the given aggregation.
Definition: sortorder.cpp:134
MessageList::Core::SortOrder::SortGroupsByDateTimeOfMostRecent
Sort groups by date/time of the most recent message.
Definition: sortorder.h:55
MessageList::Core::SortOrder::SortMessagesByAttachmentStatus
Sort the messages By "Important" flags of status.
Definition: sortorder.h:91
MessageList::Core::SortOrder::enumerateGroupSortingOptions
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

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal