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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
  • searchdialog
  • debug
searchdebugwidget.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef SEARCHDEBUGWIDGET_H
19 #define SEARCHDEBUGWIDGET_H
20 
21 #include <QWidget>
22 #include <QStyledItemDelegate>
23 #include <QListView>
24 
25 class QStringListModel;
26 class KJob;
27 class QModelIndex;
28 class QPushButton;
29 class QLabel;
30 class QContextMenuEvent;
31 
32 namespace PimCommon {
33 class PlainTextEditorWidget;
34 }
35 
36 namespace KPIMUtils {
37 class ProgressIndicatorLabel;
38 }
39 
40 class SearchResultListView : public QListView
41 {
42  Q_OBJECT
43 public:
44  explicit SearchResultListView(QWidget *parent=0);
45  ~SearchResultListView();
46 
47 protected:
48  void contextMenuEvent( QContextMenuEvent *event );
49 };
50 
51 class SearchDebugListDelegate : public QStyledItemDelegate
52 {
53 public:
54  SearchDebugListDelegate(QObject *parent = 0);
55  ~SearchDebugListDelegate();
56  QWidget *createEditor( QWidget *, const QStyleOptionViewItem &, const QModelIndex & ) const;
57 };
58 
59 class SearchDebugWidget : public QWidget
60 {
61  Q_OBJECT
62 public:
63  explicit SearchDebugWidget(const QString &query, QWidget *parent=0);
64  ~SearchDebugWidget();
65 
66  QString queryStr() const;
67 
68 protected:
69  bool eventFilter( QObject* watched, QEvent* event );
70 
71 private Q_SLOTS:
72  void slotSearchFinished(KJob*);
73  void slotFetchItem( const QModelIndex &index );
74  void slotItemFetched(KJob*);
75  void slotSearch();
76  void slotUpdateSearchButton();
77  void slotReduceQuery();
78 
79 private:
80  void indentQuery(QString query);
81  QStringListModel *mResultModel;
82  SearchResultListView *mResultView;
83  PimCommon::PlainTextEditorWidget *mItemView;
84  PimCommon::PlainTextEditorWidget *mTextEdit;
85  KPIMUtils::ProgressIndicatorLabel *mProgressIndicator;
86  QPushButton *mSearchButton;
87  QPushButton *mReduceQuery;
88  QLabel *mResultLabel;
89 };
90 
91 #endif // SEARCHDEBUGWIDGET_H
SearchResultListView::SearchResultListView
SearchResultListView(QWidget *parent=0)
Definition: searchdebugwidget.cpp:48
SearchDebugListDelegate::~SearchDebugListDelegate
~SearchDebugListDelegate()
Definition: searchdebugwidget.cpp:83
QWidget
SearchDebugWidget
Definition: searchdebugwidget.h:59
QObject
QStyledItemDelegate
SearchDebugListDelegate::createEditor
QWidget * createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const
Definition: searchdebugwidget.cpp:87
SearchDebugWidget::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: searchdebugwidget.cpp:145
SearchDebugWidget::SearchDebugWidget
SearchDebugWidget(const QString &query, QWidget *parent=0)
Definition: searchdebugwidget.cpp:92
SearchDebugListDelegate
Definition: searchdebugwidget.h:51
SearchResultListView
Definition: searchdebugwidget.h:40
SearchDebugWidget::queryStr
QString queryStr() const
Definition: searchdebugwidget.cpp:164
SearchResultListView::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event)
Definition: searchdebugwidget.cpp:59
QListView
SearchDebugListDelegate::SearchDebugListDelegate
SearchDebugListDelegate(QObject *parent=0)
Definition: searchdebugwidget.cpp:78
QLabel
SearchDebugWidget::~SearchDebugWidget
~SearchDebugWidget()
Definition: searchdebugwidget.cpp:141
SearchResultListView::~SearchResultListView
~SearchResultListView()
Definition: searchdebugwidget.cpp:54
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:52 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

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