• 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
widgetbase.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
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 
21 #ifndef __MESSAGELIST_CORE_WIDGETBASE_H__
22 #define __MESSAGELIST_CORE_WIDGETBASE_H__
23 
24 #include <QWidget>
25 #include <QString>
26 #include <QList>
27 
28 #include <messagelist/core/enums.h>
29 #include <messagelist/core/sortorder.h>
30 #include <messagelist/core/widgets/quicksearchline.h>
31 
32 #include <messagelist/messagelist_export.h>
33 
34 class KLineEdit;
35 class QTimer;
36 class QActionGroup;
37 class KComboBox;
38 class KMenu;
39 
40 namespace Akonadi
41 {
42 class Collection;
43 class MessageStatus;
44 }
45 
46 namespace MessageList
47 {
48 
49 namespace Core
50 {
51 
52 class GroupHeaderItem;
53 class MessageItem;
54 class StorageModel;
55 class View;
56 
61 class MESSAGELIST_EXPORT Widget : public QWidget
62 {
63  friend class View;
64 
65  Q_OBJECT
66 public:
67  explicit Widget( QWidget *parent );
68  ~Widget();
69 
76  void setStorageModel( StorageModel * storageModel, PreSelectionMode preSelectionMode = PreSelectLastSelected );
77 
81  StorageModel *storageModel() const;
82 
87  KLineEdit *quickSearch() const;
88 
92  View *view() const;
93 
98  Core::MessageItem * currentMessageItem() const;
99 
103  QList<Akonadi::MessageStatus> currentFilterStatus() const;
104 
108  QString currentFilterSearchString() const;
109 
113  QString currentFilterTagId() const;
114 
118  void focusQuickSearch(const QString &selectedText);
119 
124  bool isThreaded() const;
128  bool selectionEmpty() const;
129 
133  void setCurrentFolder( const Akonadi::Collection &collection );
134 
135  void saveCurrentSelection();
136 
137  bool searchEditHasFocus() const;
138 
139 
140  void sortOrderMenuAboutToShow(KMenu *menu);
141  void themeMenuAboutToShow(KMenu *menu);
142  void aggregationMenuAboutToShow(KMenu *menu);
143 
144  MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const;
145 public slots:
146 
150  void populateStatusFilterCombo();
151 
155  void changeQuicksearchVisibility(bool);
156 
157 protected:
168  virtual void fillMessageTagCombo();
169 
170  void addMessageTagItem(const QPixmap &, const QString &, const QVariant &);
171 
175  void setCurrentStatusFilterItem();
176 
180  virtual void viewMessageSelected( MessageItem *msg );
181 
185  virtual void viewMessageActivated( MessageItem *msg );
186 
190  virtual void viewSelectionChanged();
191 
195  virtual void viewMessageListContextPopupRequest( const QList< MessageItem * > &selectedItems, const QPoint &globalPos );
196 
200  virtual void viewGroupHeaderContextPopupRequest( GroupHeaderItem *group, const QPoint &globalPos );
201 
205  virtual void viewDragEnterEvent( QDragEnterEvent * e );
206 
210  virtual void viewDragMoveEvent( QDragMoveEvent * e );
211 
215  virtual void viewDropEvent( QDropEvent * e );
216 
220  virtual void viewStartDragRequest();
221 
226  virtual void viewMessageStatusChangeRequest( MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
227 
231  virtual void viewJobBatchStarted();
232 
236  virtual void viewJobBatchTerminated();
237 
238  void tagIdSelected(const QVariant &data );
239 
240 Q_SIGNALS:
245  void statusMessage( const QString &message );
246 
247 protected slots:
251  void aggregationsChanged();
252 
256  void themesChanged();
257 
258 
259  void themeMenuAboutToShow();
260  void aggregationMenuAboutToShow();
261  void themeSelected( bool );
262  void configureThemes();
263  void setPrivateSortOrderForStorage();
264  void aggregationSelected( bool );
265  void statusSelected( int index );
266  void searchEditTextEdited();
267  void searchTimerFired();
268  void searchEditClearButtonClicked();
269  void sortOrderMenuAboutToShow();
270  void messageSortingSelected( QAction *action );
271  void messageSortDirectionSelected( QAction *action );
272  void groupSortingSelected( QAction *action );
273  void groupSortDirectionSelected( QAction *action );
274  void resetFilter();
275 
279  void slotViewHeaderSectionClicked( int logicalIndex );
280  void slotStatusButtonsClicked();
281 
282 private:
283  class Private;
284  Private * const d;
285 };
286 
287 } // namespace Core
288 
289 } // namespace MessageList
290 
291 
292 #endif
293 
quicksearchline.h
QWidget
messagelist_export.h
MessageList::Core::GroupHeaderItem
Definition: groupheaderitem.h:34
QActionGroup
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
QPoint
MessageList::Core::View
The MessageList::View is the real display of the message list.
Definition: view.h:65
QTimer
QDropEvent
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
QString
QList< Akonadi::MessageStatus >
QPixmap
MESSAGELIST_EXPORT
#define MESSAGELIST_EXPORT
Definition: messagelist_export.h:34
MessageList::Core::StorageModel
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Definition: storagemodelbase.h:45
sortorder.h
enums.h
QDragEnterEvent
QAction
KComboBox
MessageList::Core::PreSelectLastSelected
Definition: enums.h:47
QVariant
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