• 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
  • completion
kateargumenthintmodel.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2007 David Nolden <david.nolden.kdevelop@art-master.de>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KATEARGUMENTHINTMODEL_H
22 #define KATEARGUMENTHINTMODEL_H
23 
24 #include <QAbstractListModel>
25 #include "katecompletionmodel.h"
26 #include "expandingtree/expandingwidgetmodel.h"
27 
28 class KateCompletionWidget;
29 
30 class KateArgumentHintModel : public ExpandingWidgetModel {
31  Q_OBJECT
32  public:
33  KateArgumentHintModel( KateCompletionWidget* parent );
34 
35  virtual QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
36 
37  virtual int rowCount ( const QModelIndex & parent ) const;
38 
39  virtual int columnCount ( const QModelIndex & /*parent*/ ) const;
40 
41  virtual QTreeView* treeView() const;
42 
43  virtual bool indexIsItem(const QModelIndex& index) const;
44 
45  void emitDataChanged( const QModelIndex& start, const QModelIndex& end );
46 
47  //Returns the index in the source-model for an index within this model
48  QModelIndex mapToSource( const QModelIndex & proxyIndex ) const;
49 
50  void buildRows();
51  void clear();
52  protected:
53  virtual int contextMatchQuality(const QModelIndex& row) const;
54  public slots:
55  void parentModelReset();
56  signals:
57  void contentStateChanged(bool hasContent);
58  private:
59  KateCompletionModel::Group* group() const;
60  KateCompletionModel* model() const;
61 
62  QList<int> m_rows; //Maps rows to either a positive row-number in the source group, or to a negative number which indicates a label
63 
64  KateCompletionWidget* m_parent;
65 };
66 
67 #endif
QModelIndex
KateArgumentHintModel::columnCount
virtual int columnCount(const QModelIndex &) const
Definition: kateargumenthintmodel.cpp:233
KateArgumentHintModel
Definition: kateargumenthintmodel.h:30
KateArgumentHintModel::mapToSource
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Definition: kateargumenthintmodel.cpp:39
QAbstractTableModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
KateArgumentHintModel::KateArgumentHintModel
KateArgumentHintModel(KateCompletionWidget *parent)
Definition: kateargumenthintmodel.cpp:85
KateCompletionModel
This class has the responsibility for filtering, sorting, and manipulating code completion data provi...
Definition: katecompletionmodel.h:48
expandingwidgetmodel.h
KateArgumentHintModel::contextMatchQuality
virtual int contextMatchQuality(const QModelIndex &row) const
Definition: kateargumenthintmodel.cpp:257
KateCompletionWidget
This is the code completion's main widget, and also contains the core interface logic.
Definition: katecompletionwidget.h:55
KateArgumentHintModel::buildRows
void buildRows()
Definition: kateargumenthintmodel.cpp:62
KateArgumentHintModel::rowCount
virtual int rowCount(const QModelIndex &parent) const
Definition: kateargumenthintmodel.cpp:226
KateArgumentHintModel::contentStateChanged
void contentStateChanged(bool hasContent)
katecompletionmodel.h
KateArgumentHintModel::parentModelReset
void parentModelReset()
Definition: kateargumenthintmodel.cpp:57
KateArgumentHintModel::clear
void clear()
Definition: kateargumenthintmodel.cpp:34
QList< int >
KateArgumentHintModel::emitDataChanged
void emitDataChanged(const QModelIndex &start, const QModelIndex &end)
Definition: kateargumenthintmodel.cpp:249
KateCompletionModel::Group
Definition: katecompletionmodel.h:274
KateArgumentHintModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Does not request data from index, this only returns local data like highlighting for expanded rows an...
Definition: kateargumenthintmodel.cpp:90
QTreeView
KateArgumentHintModel::indexIsItem
virtual bool indexIsItem(const QModelIndex &index) const
Should return true if the given row should be painted like a contained item(as opposed to label-rows ...
Definition: kateargumenthintmodel.cpp:253
KateArgumentHintModel::treeView
virtual QTreeView * treeView() const
Definition: kateargumenthintmodel.cpp:245
QObject::parent
QObject * parent() const
QVariant
ExpandingWidgetModel
Cares about expanding/un-expanding items in a tree-view together with ExpandingDelegate.
Definition: expandingwidgetmodel.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:57 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