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

messagelist

  • sources
  • kde-4.12
  • kdepim
  • messagelist
pane.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef __MESSAGELIST_PANE_H__
20 #define __MESSAGELIST_PANE_H__
21 
22 #include <messagelist/core/enums.h>
23 #include <messagelist/core/view.h>
24 #include <QtCore/QHash>
25 #include <KTabWidget>
26 
27 #include <kmime/kmime_message.h>
28 #include <akonadi/collection.h>
29 #include <akonadi/item.h>
30 #include <messagelist/messagelist_export.h>
31 
32 class KXMLGUIClient;
33 class QAbstractItemModel;
34 class QAbstractProxyModel;
35 class QItemSelectionModel;
36 class QItemSelection;
37 class QToolButton;
38 
39 namespace KPIM
40 {
41  class MessageStatus;
42 }
43 
44 namespace Akonadi
45 {
46  class Item;
47 }
48 
49 namespace MessageList
50 {
51 
52 class Widget;
53 class StorageModel;
54 
65 class MESSAGELIST_EXPORT Pane : public KTabWidget
66 {
67  Q_OBJECT
68 
69 public:
73  explicit Pane(bool restoreSession, QAbstractItemModel *model, QItemSelectionModel *selectionModel, QWidget *parent = 0 );
74  ~Pane();
75 
76 
77  virtual MessageList::StorageModel *createStorageModel( QAbstractItemModel *model, QItemSelectionModel *selectionModel, QObject *parent );
78 
79  virtual void writeConfig(bool restoreSession);
80 
89  void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
90 
95  Akonadi::Item currentItem() const;
96 
101  KMime::Message::Ptr currentMessage() const;
102 
103 
115  QList<KMime::Message::Ptr > selectionAsMessageList( bool includeCollapsedChildren = true ) const;
116 
128  QList<Akonadi::Item> selectionAsMessageItemList( bool includeCollapsedChildren = true ) const;
129 
141  QVector<qlonglong> selectionAsMessageItemListId( bool includeCollapsedChildren = true ) const;
142 
143  QList<Akonadi::Item::Id> selectionAsListMessageId( bool includeCollapsedChildren = true) const;
144 
155  QList<Akonadi::Item> currentThreadAsMessageList() const;
156 
157 
171  bool selectNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
172  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
173  bool centerItem,
174  bool loop );
175 
189  bool selectPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
190  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
191  bool centerItem,
192  bool loop );
193 
204  bool focusNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
205 
216  bool focusPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
217 
224  void selectFocusedMessageItem( bool centerItem );
225 
241  bool selectFirstMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
242 
250  bool selectLastMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
251 
256  void setCurrentThreadExpanded( bool expand );
257 
262  void setAllThreadsExpanded( bool expand );
263 
270  void setAllGroupsExpanded( bool expand );
271 
275  void focusQuickSearch();
276 
280  Akonadi::MessageStatus currentFilterStatus() const;
281 
285  QString currentFilterSearchString() const;
286 
287 
292  bool isThreaded() const;
293 
297  bool selectionEmpty() const;
307  bool getSelectionStats( Akonadi::Item::List &selectedItems,
308  Akonadi::Item::List &selectedVisibleItems,
309  bool * allSelectedBelongToSameThread,
310  bool includeCollapsedChildren = true) const;
315  void deletePersistentSet( MessageList::Core::MessageItemSetReference ref );
316 
317 
324  void markMessageItemsAsAboutToBeRemoved( MessageList::Core::MessageItemSetReference ref, bool bMark );
325 
329  QList<Akonadi::Item> itemListFromPersistentSet( MessageList::Core::MessageItemSetReference ref );
330 
331 
335  MessageList::Core::MessageItemSetReference selectionAsPersistentSet( bool includeCollapsedChildren = true ) const;
336 
340  MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
344  void focusView();
345 
349  void reloadGlobalConfiguration();
350 
354  QItemSelectionModel* currentItemSelectionModel();
355 
374  void setCurrentFolder(
375  const Akonadi::Collection &fld,
376  bool preferEmptyTab = false,
377  MessageList::Core::PreSelectionMode preSelectionMode = MessageList::Core::PreSelectLastSelected,
378  const QString &overrideLabel = QString()
379  );
380 
381  void resetModelStorage();
382 
383  void setPreferEmptyTab( bool emptyTab );
384 
385  void updateTabIconText( const Akonadi::Collection &collection, const QString&label, const QIcon& icon );
386 
387  void saveCurrentSelection();
388 
389  void updateTagComboBox();
390 
391 
392  bool searchEditHasFocus() const;
393 
394 public slots:
398  void selectAll();
399 
403  QItemSelectionModel *createNewTab();
404 
405  void sortOrderMenuAboutToShow();
406 
407  void aggregationMenuAboutToShow();
408 
409  void themeMenuAboutToShow();
410 
411 
412 signals:
423  void messageSelected( const Akonadi::Item &item );
424 
428  void messageActivated( const Akonadi::Item &item );
429 
433  void selectionChanged();
434 
438  void messageStatusChangeRequest( const Akonadi::Item &item, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
439 
443  void fullSearchRequest();
444 
449  void statusMessage( const QString &message );
450 
456  void currentTabChanged();
457 
458 
459 
460 private:
461 
462 
463  void readConfig(bool restoreSession);
464 
465  Q_PRIVATE_SLOT(d, void onSelectionChanged( const QItemSelection&, const QItemSelection& ))
466  Q_PRIVATE_SLOT(d, void onNewTabClicked())
467  Q_PRIVATE_SLOT(d, void onCloseTabClicked())
468  Q_PRIVATE_SLOT(d, void activateTab())
469  Q_PRIVATE_SLOT(d, void moveTabLeft())
470  Q_PRIVATE_SLOT(d, void moveTabRight())
471  Q_PRIVATE_SLOT(d, void activateNextTab())
472  Q_PRIVATE_SLOT(d, void activatePreviousTab())
473  Q_PRIVATE_SLOT(d, void closeTab( QWidget * ))
474  Q_PRIVATE_SLOT(d, void onCurrentTabChanged())
475  Q_PRIVATE_SLOT(d, void onTabContextMenuRequest( const QPoint& ))
476  Q_PRIVATE_SLOT(d, void updateTabControls())
477  Q_PRIVATE_SLOT(d, void changeQuicksearchVisibility(bool))
478 
479  bool eventFilter( QObject *obj, QEvent *event );
480 
481  class Private;
482  Private * const d;
483 };
484 
485 } // namespace MessageList
486 
487 #endif
messagelist_export.h
QWidget
QObject
view.h
MessageList::Core::PreSelectionMode
PreSelectionMode
Pre-selection is the action of automatically selecting a message just after the folder has finished l...
Definition: enums.h:44
QAbstractItemModel
MESSAGELIST_EXPORT
#define MESSAGELIST_EXPORT
Definition: messagelist_export.h:34
MessageList::Core::MessageTypeFilter
MessageTypeFilter
This enum is used in the view message selection functions (for instance View::nextMessageItem()).
Definition: enums.h:56
enums.h
MessageList::StorageModel
The Akonadi specific implementation of the Core::StorageModel.
Definition: storagemodel.h:48
MessageList::Pane
This is the main MessageList panel for Akonadi applications.
Definition: pane.h:65
MessageList::Core::PreSelectLastSelected
Definition: enums.h:47
MessageList::Core::MessageItemSetReference
long int MessageItemSetReference
Definition: messageitemsetmanager.h:33
MessageList::Core::ExistingSelectionBehaviour
ExistingSelectionBehaviour
This enum is used in the view message selection functions (for instance View::selectNextMessage()) ...
Definition: enums.h:65
KTabWidget
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

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

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