• 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
  • 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 
31 #include <messagelist/messagelist_export.h>
32 
33 class KLineEdit;
34 class QTimer;
35 class QActionGroup;
36 class KComboBox;
37 class KMenu;
38 
39 namespace Akonadi
40 {
41  class Collection;
42  class MessageStatus;
43 }
44 
45 namespace MessageList
46 {
47 
48 namespace Core
49 {
50 
51 class GroupHeaderItem;
52 class MessageItem;
53 class StorageModel;
54 class View;
55 
60 class MESSAGELIST_EXPORT Widget : public QWidget
61 {
62  friend class View;
63 
64  Q_OBJECT
65 public:
66  explicit Widget( QWidget *parent );
67  ~Widget();
68 
75  void setStorageModel( StorageModel * storageModel, PreSelectionMode preSelectionMode = PreSelectLastSelected );
76 
80  StorageModel *storageModel() const;
81 
86  KLineEdit *quickSearch() const;
87 
91  View *view() const;
92 
97  Core::MessageItem * currentMessageItem() const;
98 
102  Akonadi::MessageStatus currentFilterStatus() const;
103 
107  QString currentFilterSearchString() const;
108 
112  QString currentFilterTagId() const;
113 
117  void focusQuickSearch();
118 
123  bool isThreaded() const;
127  bool selectionEmpty() const;
128 
132  void setCurrentFolder( const Akonadi::Collection &collection );
133 
134  void saveCurrentSelection();
135 
136  bool searchEditHasFocus() const;
137 
138 
139  void sortOrderMenuAboutToShow(KMenu *menu);
140  void themeMenuAboutToShow(KMenu *menu);
141  void aggregationMenuAboutToShow(KMenu *menu);
142 
143 public slots:
144 
148  void populateStatusFilterCombo();
149 
153  void changeQuicksearchVisibility(bool);
154 
155 protected:
164  virtual void fillMessageTagCombo( KComboBox * combo );
165 
169  virtual void viewMessageSelected( MessageItem *msg );
170 
174  virtual void viewMessageActivated( MessageItem *msg );
175 
179  virtual void viewSelectionChanged();
180 
184  virtual void viewMessageListContextPopupRequest( const QList< MessageItem * > &selectedItems, const QPoint &globalPos );
185 
189  virtual void viewGroupHeaderContextPopupRequest( GroupHeaderItem *group, const QPoint &globalPos );
190 
194  virtual void viewDragEnterEvent( QDragEnterEvent * e );
195 
199  virtual void viewDragMoveEvent( QDragMoveEvent * e );
200 
204  virtual void viewDropEvent( QDropEvent * e );
205 
209  virtual void viewStartDragRequest();
210 
215  virtual void viewMessageStatusChangeRequest( MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear );
216 
220  virtual void viewJobBatchStarted();
221 
225  virtual void viewJobBatchTerminated();
226 
227  void tagIdSelected(const QVariant &data );
228 
229 Q_SIGNALS:
233  void fullSearchRequest();
234 
239  void statusMessage( const QString &message );
240 
241 protected slots:
245  void aggregationsChanged();
246 
250  void themesChanged();
251 
252 
253  void themeMenuAboutToShow();
254  void aggregationMenuAboutToShow();
255  void themeSelected( bool );
256  void configureThemes();
257  void setPrivateSortOrderForStorage();
258  void aggregationSelected( bool );
259  void statusSelected( int index );
260  void searchEditTextEdited( const QString &text );
261  void searchTimerFired();
262  void searchEditClearButtonClicked();
263  void sortOrderMenuAboutToShow();
264  void messageSortingSelected( QAction *action );
265  void messageSortDirectionSelected( QAction *action );
266  void groupSortingSelected( QAction *action );
267  void groupSortDirectionSelected( QAction *action );
268  void resetFilter();
269 
273  void slotViewHeaderSectionClicked( int logicalIndex );
274 
275  void slotLockSearchClicked(bool b);
276 
277 private:
278  void defaultFilterStatus();
279  class Private;
280  Private * const d;
281 };
282 
283 } // namespace Core
284 
285 } // namespace MessageList
286 
287 
288 #endif
289 
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::Core::View
The MessageList::View is the real display of the message list.
Definition: view.h:64
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
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
KComboBox
MessageList::Core::PreSelectLastSelected
Definition: enums.h:47
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