Kate
katecompletiondelegate.cpp
Go to the documentation of this file.
39 KateCompletionDelegate::KateCompletionDelegate(ExpandingWidgetModel* model, KateCompletionWidget* parent) :
44 void KateCompletionDelegate::adjustStyle( const QModelIndex& index, QStyleOptionViewItem & option ) const {
79 QList<QTextLayout::FormatRange> KateCompletionDelegate::createHighlighting(const QModelIndex& index, QStyleOptionViewItem& option) const {
90 return highlightingFromVariantList(model()->data(index, KTextEditor::CodeCompletionModel::CustomHighlight).toList());
97 if( index.row() == m_cachedRow && highlightMethod & KTextEditor::CodeCompletionModel::InternalHighlighting ) {
113 QString startText = document()->text(KTextEditor::Range(completionStart.line(), 0, completionStart.line(), completionStart.column()));
122 QString text = model()->data(model()->index(index.row(), i, index.parent()), Qt::DisplayRole).toString();
129 //kDebug( 13035 ) << "About to highlight with mode " << highlightMethod << " text [" << thisLine->string() << "]";
145 document()->highlight()->doHighlight(previousLine.data(), thisLine.data(), nextLine.data(), ctxChanged);
151 QList<QTextLayout::FormatRange> ret = renderer()->decorationsForLine(thisLine, 0, false, &rr, option.state & QStyle::State_Selected);
virtual void adjustStyle(const QModelIndex &index, QStyleOptionViewItem &option) const
Definition: katecompletiondelegate.cpp:44
KateDocument * document() const
Definition: katecompletiondelegate.cpp:69
KateCompletionWidget * widget() const
Definition: katecompletiondelegate.cpp:64
KateCompletionDelegate(ExpandingWidgetModel *model, KateCompletionWidget *parent)
Definition: katecompletiondelegate.cpp:39
Handles all of the work of rendering the text (used for the views and printing)
Definition: katerenderer.h:50
This is the code completion's main widget, and also contains the core interface logic.
Definition: katecompletionwidget.h:55
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: expandingwidgetmodel.cpp:88
QList< QTextLayout::FormatRange > createHighlighting(const QModelIndex &index, QStyleOptionViewItem &option) const
Definition: katecompletiondelegate.cpp:79
Definition: katerenderrange.h:47
uint matchColor(const QModelIndex &index) const
Returns the match-color for the given index, or zero if match-quality could not be computed...
Definition: expandingwidgetmodel.cpp:58
KateRenderer * renderer() const
Definition: katecompletiondelegate.cpp:59
QList< QTextLayout::FormatRange > highlightingFromVariantList(const QList< QVariant > &customHighlights) const
Creates a list of FormatRanges as should be returned by createHighlighting from a list of QVariants a...
Definition: expandingdelegate.cpp:314
Definition: katedocument.h:74
void updateHeight()
Called by KateViewInternal, because we need the specific information from the event.
Definition: katecompletionwidget.cpp:552
static const int ColumnCount
void doHighlight(const Kate::TextLineData *prevLine, Kate::TextLineData *textLine, const Kate::TextLineData *nextLine, bool &ctxChanged, int tabWidth=0)
Parse the text and fill in the context array and folding list array.
Definition: katehighlight.cpp:253
QList< int > m_cachedColumnStarts
Definition: katecompletiondelegate.h:36
virtual int line() const
This is a delegate that cares, together with ExpandingWidgetModel, about embedded widgets in tree-vie...
Definition: expandingdelegate.h:42
virtual const MovingCursor & start() const =0
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
virtual void heightChanged() const
Definition: katecompletiondelegate.cpp:74
virtual QString text(const KTextEditor::Range &range, bool blockwise=false) const
Definition: katedocument.cpp:337
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QList< QTextLayout::FormatRange > m_cachedHighlights
Definition: expandingdelegate.h:83
QList< QTextLayout::FormatRange > decorationsForLine(const Kate::TextLine &textLine, int line, bool selectionsOnly=false, KateRenderRange *completionHighlight=0L, bool completionSelected=false) const
The ultimate decoration creation function.
Definition: katerenderer.cpp:340
int column() const
KTextEditor::MovingRange * completionRange(KTextEditor::CodeCompletionModel *model=0) const
Definition: katecompletionwidget.cpp:875
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.