Kate
kateargumenthinttree.h
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2007 David Nolden <david.nolden.kdevelop@art-master.de> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KATEARGUMENTHINTTREE_H 00020 #define KATEARGUMENTHINTTREE_H 00021 00022 #include "expandingtree/expandingtree.h" 00023 00024 class KateCompletionWidget; 00025 class KateArgumentHintModel; 00026 class QRect; 00027 00028 class KateArgumentHintTree : public ExpandingTree { 00029 Q_OBJECT 00030 public: 00031 KateArgumentHintTree( KateCompletionWidget* parent ); 00032 00033 // Navigation 00034 bool nextCompletion(); 00035 bool previousCompletion(); 00036 bool pageDown(); 00037 bool pageUp(); 00038 void top(); 00039 void bottom(); 00040 00041 //Returns the total size of all columns 00042 int resizeColumns(); 00043 00044 void clearCompletion(); 00045 public slots: 00046 void updateGeometry(); 00047 void updateGeometry(QRect rect); 00048 protected: 00049 virtual void paintEvent ( QPaintEvent * event ); 00050 virtual void rowsInserted ( const QModelIndex & parent, int start, int end ); 00051 virtual void dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); 00052 virtual void currentChanged ( const QModelIndex & current, const QModelIndex & previous ); 00053 private: 00054 uint rowHeight(const QModelIndex& index) const; 00055 KateArgumentHintModel* model() const; 00056 virtual int sizeHintForColumn ( int column ) const; 00057 00058 KateCompletionWidget* m_parent; 00059 }; 00060 00061 #endif