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

kmail

  • sources
  • kde-4.14
  • kdepim
  • kmail
  • searchdialog
searchwindow.h
Go to the documentation of this file.
1 /*
2  * kmail: KDE mail client
3  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
4  * Copyright (c) 2001 Aaron J. Seigo <aseigo@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *
20  */
21 
22 #ifndef KMAIL_SEARCHWINDOW_H
23 #define KMAIL_SEARCHWINDOW_H
24 
25 #include "mailcommon/search/searchpattern.h"
26 #include "ui_searchwindow.h"
27 
28 #include <akonadi/collection.h>
29 #include <akonadi/item.h>
30 #include <kdialog.h>
31 #include <kxmlguiclient.h>
32 
33 #include <QtCore/QTimer>
34 
35 class QCloseEvent;
36 class QKeyEvent;
37 class KActionMenu;
38 class KJob;
39 class KMMainWidget;
40 class KMSearchMessageModel;
41 
42 namespace PimCommon {
43 class SelectMultiCollectionDialog;
44 }
45 
46 namespace Akonadi {
47 class StandardMailActionManager;
48 }
49 
50 namespace KMime {
51 class Message;
52 }
53 
54 namespace KMail {
55 
62 class SearchPatternWarning;
63 class SearchWindow: public KDialog, public KXMLGUIClient
64 {
65  Q_OBJECT
66 
67 public:
75  explicit SearchWindow( KMMainWidget* parent, const Akonadi::Collection &collection = Akonadi::Collection() );
76 
80  ~SearchWindow();
81 
87  void activateFolder( const Akonadi::Collection &folder );
88 
94  Akonadi::Item::List selectedMessages() const;
95 
101  Akonadi::Item selectedMessage() const;
102 
106  void addRulesToSearchPattern( const MailCommon::SearchPattern &pattern );
107 
108 protected:
110  void keyPressEvent( QKeyEvent* );
111 
113  void closeEvent( QCloseEvent* );
114 
115  void createSearchModel();
116 
117 private Q_SLOTS:
118  void updateCollectionStatistic(Akonadi::Collection::Id, const Akonadi::CollectionStatistics &);
119 
120  void slotClose();
121  void slotSearch();
122  void slotStop();
123  void scheduleRename( const QString& );
124  void renameSearchFolder();
125  void openSearchFolder();
126  void slotViewSelectedMsg();
127  void slotViewMsg( const Akonadi::Item& );
128  void slotCurrentChanged( const Akonadi::Item& );
129  void updateContextMenuActions();
130  void slotFolderActivated();
131  void slotClearSelection();
132  void slotReplyToMsg();
133  void slotReplyAllToMsg();
134  void slotReplyListToMsg();
135  void slotForwardMsg();
136  void slotForwardAttachedMsg();
137  void slotSaveMsg();
138  void slotSaveAttachments();
139  void slotPrintMsg();
140 
142  void searchDone( KJob* );
143  void enableGUI();
144 
145  void setEnabledSearchButton( bool );
146  void slotSearchFolderRenameDone( KJob* );
147 
148  void slotContextMenuRequested( const QPoint& );
149  void slotSelectMultipleFolders();
150 
151  void slotSearchCollectionsFetched( KJob *job );
152 
153  void slotJumpToFolder();
154 private:
155  void doSearch();
156  QPointer<PimCommon::SelectMultiCollectionDialog> mSelectMultiCollectionDialog;
157  QList<Akonadi::Collection> mCollectionId;
158  Akonadi::SearchQuery mQuery;
159  bool mCloseRequested;
160  int mSortColumn;
161  Qt::SortOrder mSortOrder;
162  Akonadi::Collection mFolder;
163  KJob *mSearchJob;
164 
165  KMSearchMessageModel *mResultModel;
166  Ui_SearchWindow mUi;
167  KGuiItem mStartSearchGuiItem;
168  KGuiItem mStopSearchGuiItem;
169  KPushButton *mSearchButton;
170 
171  QAction *mReplyAction, *mReplyAllAction, *mReplyListAction, *mSaveAsAction,
172  *mForwardInlineAction, *mForwardAttachedAction, *mPrintAction, *mClearAction,
173  *mSaveAtchAction, *mJumpToFolderAction;
174  KActionMenu *mForwardActionMenu;
175  QTimer mRenameTimer;
176  QByteArray mHeaderState;
177  // not owned by us
178  KMMainWidget* mKMMainWidget;
179  MailCommon::SearchPattern mSearchPattern;
180  SearchPatternWarning *mSearchPatternWidget;
181 
182  Akonadi::StandardMailActionManager *mAkonadiStandardAction;
183 };
184 
185 }
186 
187 #endif
KMail::SearchWindow::selectedMessage
Akonadi::Item selectedMessage() const
Provides access to the currently selected message.
Definition: searchwindow.cpp:723
KXMLGUIClient
QByteArray
QPointer< PimCommon::SelectMultiCollectionDialog >
QPoint
KDialog
KMail::SearchWindow::selectedMessages
Akonadi::Item::List selectedMessages() const
Provides access to the list of currently selected message in the listview.
Definition: searchwindow.cpp:710
QCloseEvent
KMail::SearchWindow::closeEvent
void closeEvent(QCloseEvent *)
Reimplemented to stop searching when the window is closed.
Definition: searchwindow.cpp:615
QTimer
KMail::SearchWindow::createSearchModel
void createSearchModel()
Definition: searchwindow.cpp:318
KMMainWidget
Definition: kmmainwidget.h:91
KMail::SearchWindow::addRulesToSearchPattern
void addRulesToSearchPattern(const MailCommon::SearchPattern &pattern)
Loads a search pattern into the search window, appending its rules to the current one...
Definition: searchwindow.cpp:833
QString
QList< Akonadi::Collection >
KMail::SearchWindow::~SearchWindow
~SearchWindow()
Destroys the search window.
Definition: searchwindow.cpp:290
QKeyEvent
KActionMenu
KMail::SearchPatternWarning
Definition: searchpatternwarning.h:25
KMail::SearchWindow::keyPressEvent
void keyPressEvent(QKeyEvent *)
Reimplemented to react to Escape.
Definition: searchwindow.cpp:367
KMSearchMessageModel
Definition: kmsearchmessagemodel.h:33
KMail::SearchWindow::SearchWindow
SearchWindow(KMMainWidget *parent, const Akonadi::Collection &collection=Akonadi::Collection())
Creates a new search window.
Definition: searchwindow.cpp:70
QAction
KJob
KMail::SearchWindow::activateFolder
void activateFolder(const Akonadi::Collection &folder)
Changes the base folder for search operations to a different folder.
Definition: searchwindow.cpp:382
KMail::SearchWindow
Definition: searchwindow.h:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • 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