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

Kate

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ExpandingDelegate Class Reference

#include <expandingdelegate.h>

Inheritance diagram for ExpandingDelegate:
Inheritance graph
[legend]

Public Member Functions

 ExpandingDelegate (ExpandingWidgetModel *model, QObject *parent=0L)
 
QSize basicSizeHint (const QModelIndex &index) const
 
ExpandingWidgetModel * model () const
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 

Protected Member Functions

void adjustRect (QRect &rect) const
 
virtual void adjustStyle (const QModelIndex &index, QStyleOptionViewItem &option) const
 
virtual QList
< QTextLayout::FormatRange > 
createHighlighting (const QModelIndex &index, QStyleOptionViewItem &option) const
 
virtual void drawBackground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void drawDecoration (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap) const
 
virtual void drawDisplay (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const
 
virtual bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
 
virtual void heightChanged () const
 
QList< QTextLayout::FormatRange > highlightingFromVariantList (const QList< QVariant > &customHighlights) const
 
void initStyleOption (QStyleOptionViewItem *option, const QModelIndex &index) const
 
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
 

Protected Attributes

QColor m_backgroundColor
 
Qt::Alignment m_cachedAlignment
 
QList< QTextLayout::FormatRange > m_cachedHighlights
 
int m_currentColumnStart
 
QList< int > m_currentColumnStarts
 
QModelIndex m_currentIndex
 

Detailed Description

This is a delegate that cares, together with ExpandingWidgetModel, about embedded widgets in tree-view.

Definition at line 42 of file expandingdelegate.h.

Constructor & Destructor Documentation

ExpandingDelegate::ExpandingDelegate ( ExpandingWidgetModel *  model,
QObject *  parent = 0L 
)
explicit

Definition at line 34 of file expandingdelegate.cpp.

Member Function Documentation

void ExpandingDelegate::adjustRect ( QRect &  rect) const
protected

Definition at line 146 of file expandingdelegate.cpp.

void ExpandingDelegate::adjustStyle ( const QModelIndex &  index,
QStyleOptionViewItem &  option 
) const
protectedvirtual

Reimplemented in KateCompletionDelegate.

Definition at line 140 of file expandingdelegate.cpp.

QSize ExpandingDelegate::basicSizeHint ( const QModelIndex &  index) const

Definition at line 121 of file expandingdelegate.cpp.

QList< QTextLayout::FormatRange > ExpandingDelegate::createHighlighting ( const QModelIndex &  index,
QStyleOptionViewItem &  option 
) const
protectedvirtual

Reimplemented in KateCompletionDelegate.

Definition at line 115 of file expandingdelegate.cpp.

void ExpandingDelegate::drawBackground ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
protectedvirtual

Definition at line 282 of file expandingdelegate.cpp.

void ExpandingDelegate::drawDecoration ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QRect &  rect,
const QPixmap &  pixmap 
) const
protectedvirtual

Definition at line 277 of file expandingdelegate.cpp.

void ExpandingDelegate::drawDisplay ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QRect &  rect,
const QString &  text 
) const
protectedvirtual

For some reason the text-formats seem to be invalid in some way, sometimes

Todo:
Fix this properly, it sucks not copying everything over

Definition at line 158 of file expandingdelegate.cpp.

bool ExpandingDelegate::editorEvent ( QEvent *  event,
QAbstractItemModel *  model,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
protectedvirtual

Definition at line 298 of file expandingdelegate.cpp.

void ExpandingDelegate::heightChanged ( ) const
protectedvirtual

Reimplemented in KateCompletionDelegate.

Definition at line 295 of file expandingdelegate.cpp.

QList< QTextLayout::FormatRange > ExpandingDelegate::highlightingFromVariantList ( const QList< QVariant > &  customHighlights) const
protected

Creates a list of FormatRanges as should be returned by createHighlighting from a list of QVariants as described in the kde header ktexteditor/codecompletionmodel.h.

Definition at line 314 of file expandingdelegate.cpp.

void ExpandingDelegate::initStyleOption ( QStyleOptionViewItem *  option,
const QModelIndex &  index 
) const
protected
ExpandingWidgetModel * ExpandingDelegate::model ( ) const

Definition at line 291 of file expandingdelegate.cpp.

void ExpandingDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

This is a bug workaround for the Qt raster paint engine: It paints over widgets embedded into the viewport when updating due to mouse events

Todo:
report to Qt Software

Definition at line 73 of file expandingdelegate.cpp.

QSize ExpandingDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
protectedvirtual

Definition at line 125 of file expandingdelegate.cpp.

Member Data Documentation

QColor ExpandingDelegate::m_backgroundColor
mutableprotected

Definition at line 86 of file expandingdelegate.h.

Qt::Alignment ExpandingDelegate::m_cachedAlignment
mutableprotected

Definition at line 85 of file expandingdelegate.h.

QList<QTextLayout::FormatRange> ExpandingDelegate::m_cachedHighlights
mutableprotected

Definition at line 83 of file expandingdelegate.h.

int ExpandingDelegate::m_currentColumnStart
mutableprotected

Definition at line 81 of file expandingdelegate.h.

QList<int> ExpandingDelegate::m_currentColumnStarts
mutableprotected

Definition at line 82 of file expandingdelegate.h.

QModelIndex ExpandingDelegate::m_currentIndex
mutableprotected

Definition at line 87 of file expandingdelegate.h.


The documentation for this class was generated from the following files:
  • expandingdelegate.h
  • expandingdelegate.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal