Kate
katecompletiontree.cpp
Go to the documentation of this file.
49 //We need ScrollPerItem, because ScrollPerPixel is too slow with a very large competion-list(see KDevelop).
68 void KateCompletionTree::currentChanged ( const QModelIndex & current, const QModelIndex & previous ) {
139 if( current.child(0,0).isValid() ) { //If the index has children, it is a group-label. Then we should start with it's first child.
149 // kDebug() << current.row() << "out of" << model()->rowCount(current.parent()) << "in" << current.parent().data(Qt::DisplayRole);
151 // itemDelegate()->sizeHint(QStyleOptionViewItem(), current).isValid() && itemDelegate()->sizeHint(QStyleOptionViewItem(), current).intersects(visibleViewportRect)
157 // kDebug() << "size-hint for" << current.row() << a << ":" << s << current.sibling(current.row(), a).data(Qt::DisplayRole);
255 // kDebug() << geometry() << "newWidth" << newWidth << "current width" << width() << "target width" << newWidth + scrollBarWidth;
263 // kDebug() << "created geometry:" << widget()->geometry() << geometry() << "newWidth" << newWidth << "viewport" << viewport()->width();
265 if( viewport()->width() > totalColumnsWidth ) //Set the size of the last column to fill the whole rest of the widget
KateCompletionWidget * widget() const
Definition: katecompletiontree.cpp:103
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: katecompletionmodel.cpp:1144
virtual int rowCount(const QModelIndex &parent) const =0
const QRect screenGeometry(int screen) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
void setAlternatingRowColors(bool enable)
int width() const
void setScrollingEnabled(bool)
Definition: katecompletiontree.cpp:73
void setCurrentIndex(const QModelIndex &index)
virtual QModelIndex moveCursor(CursorAction cursorAction, QFlags< Qt::KeyboardModifier > modifiers)
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
Definition: expandingtree.h:28
virtual void scrollContentsBy(int dx, int dy)
bool isVisible() const
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
Definition: katecompletiontree.cpp:68
T value() const
QWidget * viewport() const
This class has the responsibility for filtering, sorting, and manipulating code completion data provi...
Definition: katecompletionmodel.h:48
const QPixmap * icon() const
void setVerticalScrollMode(ScrollMode mode)
void setFrameStyle(int style)
const KateCompletionModel * model() const
Definition: katecompletionwidget.cpp:252
width
void resize(int w, int h)
bool isValid() const
int columnWidth(int column) const
void setColumnWidth(int column, int width)
enabled
This is the code completion's main widget, and also contains the core interface logic.
Definition: katecompletionwidget.h:55
virtual void rowSelected(const QModelIndex &row)
Notifies underlying models that the item was selected, collapses any previous partially expanded line...
Definition: katecompletionmodel.cpp:2246
void setUpdatesEnabled(bool enable)
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)
void setItemDelegate(QAbstractItemDelegate *delegate)
int row() const
virtual QStyleOptionViewItem viewOptions() const
Definition: katecompletiontree.cpp:283
QSize actualSize(const QSize &size, Mode mode, State state) const
void setAllColumnsShowFocus(bool enable)
void hide()
QModelIndex parent() const
QSize sizeHintForIndex(const QModelIndex &index) const
QScrollBar * verticalScrollBar() const
void setIndentation(int i)
KateCompletionModel * kateModel() const
Definition: katecompletiontree.cpp:292
int translateColumn(int sourceColumn) const
Definition: katecompletionmodel.cpp:1258
QModelIndex child(int row, int column) const
void resizeColumns(bool firstShow=false, bool forceResize=false)
Definition: katecompletiontree.cpp:114
virtual void scrollContentsBy(int dx, int dy)
Not available as a signal in this way.
Definition: katecompletiontree.cpp:77
int width() const
int frameWidth() const
QVariant data(int role) const
QDesktopWidget * desktop()
bool isNull() const
QModelIndex sibling(int row, int column) const
virtual int columnCount(const QModelIndex &parent) const =0
KateCompletionTree(KateCompletionWidget *parent)
Definition: katecompletiontree.cpp:39
int height() const
virtual QStyleOptionViewItem viewOptions() const
int columnViewportPosition(int column) const
void start(int msec)
int columnTextViewportPosition(int column) const
Returns the approximated viewport position of the text in the given column, skipping an eventual icon...
Definition: katecompletiontree.cpp:86
QHeaderView * header() const
bool previousCompletion()
Definition: katecompletiontree.cpp:320
QAbstractItemModel * model() const
QModelIndex currentIndex() const
void setRootIsDecorated(bool show)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
void setItemsExpandable(bool enable)
int height() const
virtual QModelIndex indexAt(const QPoint &point) const
void setSingleShot(bool singleShot)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.