• 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
widget.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_WIDGET_H__
20 #define __MESSAGELIST_WIDGET_H__
21 
22 #include <messagelist/core/widgetbase.h>
23 #include <messagelist/core/view.h>
24 #include <messagelist/core/widgets/quicksearchline.h>
25 #include <akonadi/item.h>
26 
27 #include <kmime/kmime_message.h>
28 #include <KJob>
29 
30 #include <messagelist/messagelist_export.h>
31 
32 class KXMLGUIClient;
33 class QWidget;
34 
35 namespace MessageList
36 {
37 
46 class MESSAGELIST_EXPORT Widget : public MessageList::Core::Widget
47 {
48  Q_OBJECT
49 
50 public:
54  explicit Widget( QWidget *parent );
55  ~Widget();
56 
65  void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
66 
71  Akonadi::Item currentItem() const;
72 
77  KMime::Message::Ptr currentMessage() const;
78 
79 
83  bool canAcceptDrag( const QDropEvent *e );
84 
98  bool selectNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
99  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
100  bool centerItem,
101  bool loop );
102 
116  bool selectPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
117  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
118  bool centerItem,
119  bool loop );
120 
131  bool focusNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
132 
143  bool focusPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
144 
151  void selectFocusedMessageItem( bool centerItem );
152 
168  bool selectFirstMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
169 
177  bool selectLastMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
178 
182  void selectAll();
187  void setCurrentThreadExpanded( bool expand );
188 
193  void setAllThreadsExpanded( bool expand );
194 
201  void setAllGroupsExpanded( bool expand );
202 
206  void focusQuickSearch(const QString &selectedText);
207 
219  QList<KMime::Message::Ptr > selectionAsMessageList( bool includeCollapsedChildren = true ) const;
220 
232  QList<Akonadi::Item> selectionAsMessageItemList( bool includeCollapsedChildren = true ) const;
233 
246  QVector<qlonglong> selectionAsMessageItemListId( bool includeCollapsedChildren ) const;
247  QList<Akonadi::Item::Id> selectionAsListMessageId( bool includeCollapsedChildren ) const;
248 
259  QList<Akonadi::Item> currentThreadAsMessageList() const;
260 
264  QList<Akonadi::MessageStatus> currentFilterStatus() const;
265 
269  QString currentFilterSearchString() const;
270 
275  bool isThreaded() const;
276 
280  bool selectionEmpty() const;
281 
292  bool getSelectionStats( Akonadi::Item::List &selectedSernums,
293  Akonadi::Item::List &selectedVisibleSernums,
294  bool * allSelectedBelongToSameThread,
295  bool includeCollapsedChildren = true ) const;
300  void deletePersistentSet( MessageList::Core::MessageItemSetReference ref );
301 
308  void markMessageItemsAsAboutToBeRemoved( MessageList::Core::MessageItemSetReference ref, bool bMark );
309 
313  QList<Akonadi::Item> itemListFromPersistentSet( MessageList::Core::MessageItemSetReference ref );
314 
318  MessageList::Core::MessageItemSetReference selectionAsPersistentSet( bool includeCollapsedChildren = true ) const;
319 
323  MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
324  Akonadi::Collection currentCollection() const;
325 
326  void setQuickSearchClickMessage(const QString &msg);
327  MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const;
328 protected:
329 
333  virtual void fillMessageTagCombo();
334 
338  virtual void viewMessageSelected( MessageList::Core::MessageItem *msg );
339 
343  virtual void viewMessageActivated( MessageList::Core::MessageItem *msg );
344 
348  virtual void viewSelectionChanged();
349 
353  virtual void viewMessageListContextPopupRequest( const QList< MessageList::Core::MessageItem * > &selectedItems, const QPoint &globalPos );
354 
358  virtual void viewGroupHeaderContextPopupRequest( MessageList::Core::GroupHeaderItem *group, const QPoint &globalPos );
359 
363  virtual void viewDragEnterEvent( QDragEnterEvent * e );
364 
368  virtual void viewDragMoveEvent( QDragMoveEvent * e );
369 
373  virtual void viewDropEvent( QDropEvent * e );
374 
378  virtual void viewStartDragRequest();
379 
383  virtual void viewMessageStatusChangeRequest( MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
384 
385 private Q_SLOTS:
386  void slotCollapseItem();
387  void slotExpandItem();
388  void slotTagsFetched(KJob *job);
389 
390 
391 signals:
402  void messageSelected( const Akonadi::Item &item );
403 
407  void messageActivated( const Akonadi::Item &item );
408 
412  void selectionChanged();
413 
417  void messageStatusChangeRequest( const Akonadi::Item &item, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
418 
419 private:
420  class Private;
421  Private * const d;
422 };
423 
424 } // namespace MessageList
425 
426 #endif
quicksearchline.h
QWidget
messagelist_export.h
MessageList::Core::GroupHeaderItem
Definition: groupheaderitem.h:34
MessageList::Core::MessageItem
Definition: messageitem.h:46
QDragMoveEvent
MessageList::Core::Widget
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
MessageList::Widget
The Akonadi specific implementation of the Core::Widget.
Definition: widget.h:46
QPoint
view.h
QDropEvent
QString
QList
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
QVector
QDragEnterEvent
widgetbase.h
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
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