Kate
katecompletiontree.h
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2006 Hamish Rodda <rodda@kde.org> 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 KATECOMPLETIONTREE_H 00020 #define KATECOMPLETIONTREE_H 00021 00022 #include "expandingtree/expandingtree.h" 00023 00024 class KateCompletionWidget; 00025 class KateCompletionModel; 00026 00027 class QTimer; 00028 00029 class KateCompletionTree : public ExpandingTree 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 explicit KateCompletionTree(KateCompletionWidget* parent); 00035 00036 KateCompletionWidget* widget() const; 00037 KateCompletionModel* kateModel() const; 00038 00039 void resizeColumns(bool fromResizeEvent = false, bool firstShow = false); 00040 00041 // Navigation 00042 bool nextCompletion(); 00043 bool previousCompletion(); 00044 bool pageDown(); 00045 bool pageUp(); 00046 void top(); 00047 void bottom(); 00048 00049 private slots: 00050 void resizeColumnsSlot(); 00051 00052 protected: 00053 virtual void currentChanged ( const QModelIndex & current, const QModelIndex & previous ); 00054 virtual void scrollContentsBy(int dx, int dy); 00055 virtual QStyleOptionViewItem viewOptions() const; 00056 private: 00057 QTimer* m_resizeTimer; 00058 bool m_needResize; 00059 }; 00060 00061 #endif