[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
klfitemviewsearchtarget.h
Go to the documentation of this file.
1 /***************************************************************************
2  * file klfitemviewsearchtarget.h
3  * This file is part of the KLatexFormula Project.
4  * Copyright (C) 2012 by Philippe Faist
5  * philippe.faist at bluewin.ch
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 /* $Id: klfitemviewsearchtarget.h 953 2016-12-27 00:13:10Z phfaist $ */
23 
24 
25 #ifndef KLFITEMVIEWSEARCHTARGET_H
26 #define KLFITEMVIEWSEARCHTARGET_H
27 
28 #include <QAbstractItemModel>
29 #include <QAbstractItemView>
30 
31 #include <klfdefs.h>
32 #include <klfsearchbar.h>
33 #include <klfiteratorsearchable.h>
34 
35 
36 struct KLFItemViewSearchTargetPrivate;
37 
39 
60 class KLFItemViewSearchTarget : public QObject, public KLFIteratorSearchable<QModelIndex>
61 {
62  Q_OBJECT
63 public:
64  KLFItemViewSearchTarget(QAbstractItemView * view, QObject *parent = NULL);
65  virtual ~KLFItemViewSearchTarget();
66 
67  QAbstractItemView * view() ;
69 
70  virtual QModelIndex searchIterAdvance(const QModelIndex &pos, bool forward);
71  virtual QModelIndex searchIterBegin();
72  virtual QModelIndex searchIterEnd();
73 
74  virtual bool searchIterMatches(const QModelIndex &pos, const QString &queryString);
75  virtual void searchPerformed(const QModelIndex& resultMatchPosition, bool found,
76  const QString& queryString);
77  virtual void searchAborted();
78  virtual void searchReinitialized();
79  virtual void searchMoveToIterPos(const QModelIndex& pos);
80 
81  void setSearchView(QAbstractItemView *view);
82  void setSearchColumns(const QList<int>& columnList);
83 private:
84  KLF_DECLARE_PRIVATE(KLFItemViewSearchTarget) ;
85 };
86 
87 
88 
89 
90 
91 
92 #endif
virtual QModelIndex searchIterEnd()
virtual QModelIndex searchIterBegin()
Base declarations for klatexformula and some utilities.
A Searchable object interface based on iterative searching.
virtual void searchMoveToIterPos(const QModelIndex &pos)
virtual QModelIndex searchIterAdvance(const QModelIndex &pos, bool forward)
KLFItemViewSearchTarget(QAbstractItemView *view, QObject *parent=NULL)
virtual bool searchIterMatches(const QModelIndex &pos, const QString &queryString)
void setSearchColumns(const QList< int > &columnList)
virtual void searchPerformed(const QModelIndex &resultMatchPosition, bool found, const QString &queryString)
A search target (for KLFSearchBar) for standard item views.
QObject * parent() const
void setSearchView(QAbstractItemView *view)

Generated by doxygen 1.8.13