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

Kate

kateargumenthintmodel.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries and the Kate part.
00002  *
00003  *  Copyright (C) 2007 David Nolden <david.nolden.kdevelop@art-master.de>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to
00017  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  *  Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KATEARGUMENTHINTMODEL_H
00022 #define KATEARGUMENTHINTMODEL_H
00023 
00024 #include <QAbstractListModel>
00025 #include "katecompletionmodel.h"
00026 #include "expandingtree/expandingwidgetmodel.h"
00027 
00028 class KateCompletionWidget;
00029 
00030 class KateArgumentHintModel : public ExpandingWidgetModel {
00031   Q_OBJECT
00032   public:
00033     KateArgumentHintModel( KateCompletionWidget* parent );
00034 
00035     virtual QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
00036     
00037     virtual int rowCount ( const QModelIndex & parent ) const;
00038 
00039     virtual int columnCount ( const QModelIndex & /*parent*/ ) const;
00040 
00041     virtual QTreeView* treeView() const;
00042 
00043     virtual bool indexIsItem(const QModelIndex& index) const;
00044 
00045     void emitDataChanged( const QModelIndex& start, const QModelIndex& end );
00046     
00047     //Returns the index in the source-model for an index within this model
00048     QModelIndex mapToSource( const QModelIndex & proxyIndex ) const;
00049     
00050     void buildRows();
00051     void clear();
00052   protected:
00053     virtual int contextMatchQuality(const QModelIndex& row) const;
00054   public slots:
00055     void parentModelReset();
00056   signals:
00057     void contentStateChanged(bool hasContent);
00058   private:
00059     KateCompletionModel::Group* group() const;
00060     KateCompletionModel* model() const;
00061 
00062     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
00063     
00064     KateCompletionWidget* m_parent;
00065 };
00066 
00067 #endif

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal