• 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
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 <akonadi/item.h>
25 
26 #include <kmime/kmime_message.h>
27 
28 #include <messagelist/messagelist_export.h>
29 
30 class KXMLGUIClient;
31 class QWidget;
32 
33 namespace MessageList
34 {
35 
44 class MESSAGELIST_EXPORT Widget : public MessageList::Core::Widget
45 {
46  Q_OBJECT
47 
48 public:
52  explicit Widget( QWidget *parent );
53  ~Widget();
54 
63  void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
64 
69  Akonadi::Item currentItem() const;
70 
75  KMime::Message::Ptr currentMessage() const;
76 
77 
81  bool canAcceptDrag( const QDropEvent *e );
82 
96  bool selectNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
97  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
98  bool centerItem,
99  bool loop );
100 
114  bool selectPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter,
115  MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour,
116  bool centerItem,
117  bool loop );
118 
129  bool focusNextMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
130 
141  bool focusPreviousMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop );
142 
149  void selectFocusedMessageItem( bool centerItem );
150 
166  bool selectFirstMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
167 
175  bool selectLastMessageItem( MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem );
176 
180  void selectAll();
185  void setCurrentThreadExpanded( bool expand );
186 
191  void setAllThreadsExpanded( bool expand );
192 
199  void setAllGroupsExpanded( bool expand );
200 
204  void focusQuickSearch();
205 
217  QList<KMime::Message::Ptr > selectionAsMessageList( bool includeCollapsedChildren = true ) const;
218 
230  QList<Akonadi::Item> selectionAsMessageItemList( bool includeCollapsedChildren = true ) const;
231 
244  QVector<qlonglong> selectionAsMessageItemListId( bool includeCollapsedChildren ) const;
245  QList<Akonadi::Item::Id> selectionAsListMessageId( bool includeCollapsedChildren ) const;
246 
257  QList<Akonadi::Item> currentThreadAsMessageList() const;
258 
262  Akonadi::MessageStatus currentFilterStatus() const;
263 
267  QString currentFilterSearchString() const;
268 
273  bool isThreaded() const;
274 
278  bool selectionEmpty() const;
279 
290  bool getSelectionStats( Akonadi::Item::List &selectedSernums,
291  Akonadi::Item::List &selectedVisibleSernums,
292  bool * allSelectedBelongToSameThread,
293  bool includeCollapsedChildren = true ) const;
298  void deletePersistentSet( MessageList::Core::MessageItemSetReference ref );
299 
306  void markMessageItemsAsAboutToBeRemoved( MessageList::Core::MessageItemSetReference ref, bool bMark );
307 
311  QList<Akonadi::Item> itemListFromPersistentSet( MessageList::Core::MessageItemSetReference ref );
312 
316  MessageList::Core::MessageItemSetReference selectionAsPersistentSet( bool includeCollapsedChildren = true ) const;
317 
321  MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
322  Akonadi::Collection currentCollection() const;
323 
324 protected:
325 
329  virtual void fillMessageTagCombo( KComboBox * combo );
330 
334  virtual void viewMessageSelected( MessageList::Core::MessageItem *msg );
335 
339  virtual void viewMessageActivated( MessageList::Core::MessageItem *msg );
340 
344  virtual void viewSelectionChanged();
345 
349  virtual void viewMessageListContextPopupRequest( const QList< MessageList::Core::MessageItem * > &selectedItems, const QPoint &globalPos );
350 
354  virtual void viewGroupHeaderContextPopupRequest( MessageList::Core::GroupHeaderItem *group, const QPoint &globalPos );
355 
359  virtual void viewDragEnterEvent( QDragEnterEvent * e );
360 
364  virtual void viewDragMoveEvent( QDragMoveEvent * e );
365 
369  virtual void viewDropEvent( QDropEvent * e );
370 
374  virtual void viewStartDragRequest();
375 
379  virtual void viewMessageStatusChangeRequest( MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
380 
381 private Q_SLOTS:
382  void slotCollapseItem();
383  void slotExpandItem();
384 
385 
386 signals:
397  void messageSelected( const Akonadi::Item &item );
398 
402  void messageActivated( const Akonadi::Item &item );
403 
407  void selectionChanged();
408 
412  void messageStatusChangeRequest( const Akonadi::Item &item, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
413 
414 private:
415  class Private;
416  Private * const d;
417 };
418 
419 } // namespace MessageList
420 
421 #endif
messagelist_export.h
MessageList::Core::GroupHeaderItem
Definition: groupheaderitem.h:34
MessageList::Core::MessageItem
Definition: messageitem.h:50
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:60
QWidget
MessageList::Widget
The Akonadi specific implementation of the Core::Widget.
Definition: widget.h:44
view.h
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
KComboBox
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-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