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

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • snippet
snippetfilterproxymodel.h
Go to the documentation of this file.
1 /* This file is part of the Kate project.
2  * Based on the snippet plugin from KDevelop 4.
3  *
4  * Copyright (C) 2007 Robert Gruber <rgruber@users.sourceforge.net>
5  * Copyright (C) 2012 Christoph Cullmann <cullmann@kde.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library 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 GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 #ifndef __SNIPPETFILTERPROXYMODEL_H__
23 #define __SNIPPETFILTERPROXYMODEL_H__
24 
25 #include <QSortFilterProxyModel>
26 
30 class SnippetFilterProxyModel : public QSortFilterProxyModel {
31  Q_OBJECT
32 
33 public:
34  SnippetFilterProxyModel(QObject *parent);
35  ~SnippetFilterProxyModel();
36 
37  virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
38 
39 public slots:
40  void changeFilter(const QString& filter);
41 
42 private slots:
43  void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
44 
45 private:
46  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
47 
48  QString filter_;
49 };
50 
51 #endif
52 
QSortFilterProxyModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QModelIndex
SnippetFilterProxyModel::~SnippetFilterProxyModel
~SnippetFilterProxyModel()
Definition: snippetfilterproxymodel.cpp:37
SnippetFilterProxyModel::SnippetFilterProxyModel
SnippetFilterProxyModel(QObject *parent)
Definition: snippetfilterproxymodel.cpp:27
SnippetFilterProxyModel
Definition: snippetfilterproxymodel.h:30
SnippetFilterProxyModel::changeFilter
void changeFilter(const QString &filter)
Definition: snippetfilterproxymodel.cpp:54
QObject
SnippetFilterProxyModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: snippetfilterproxymodel.cpp:41
QString
QSortFilterProxyModel
QObject::parent
QObject * parent() const
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

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