• 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
 
- Public Member Functions inherited from QItemDelegate
 QItemDelegate (QObject *parent)
 
 ~QItemDelegate ()
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
bool hasClipping () const
 
QItemEditorFactory * itemEditorFactory () const
 
void setClipping (bool clip)
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
void setItemEditorFactory (QItemEditorFactory *factory)
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
virtual void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
- Public Member Functions inherited from QAbstractItemDelegate
 QAbstractItemDelegate (QObject *parent)
 
virtual  ~QAbstractItemDelegate ()
 
void closeEditor (QWidget *editor, QAbstractItemDelegate::EndEditHint hint)
 
void commitData (QWidget *editor)
 
bool helpEvent (QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index)
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
 
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const =0
 
void sizeHintChanged (const QModelIndex &index)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () 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 Member Functions inherited from QItemDelegate
void drawBackground (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void drawCheck (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, Qt::CheckState state) const
 
virtual void drawFocus (QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const
 
virtual bool eventFilter (QObject *editor, QEvent *event)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from QAbstractItemDelegate
QString elidedText (const QFontMetrics &fontMetrics, int width, Qt::TextElideMode mode, const QString &text)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QItemDelegate
 clipping
 
- Properties inherited from QObject
 objectName
 

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 283 of file expandingdelegate.cpp.

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

Reimplemented from QItemDelegate.

Definition at line 278 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

Reimplemented from QItemDelegate.

Definition at line 158 of file expandingdelegate.cpp.

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

Reimplemented from QItemDelegate.

Definition at line 299 of file expandingdelegate.cpp.

void ExpandingDelegate::heightChanged ( ) const
protectedvirtual

Reimplemented in KateCompletionDelegate.

Definition at line 296 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 315 of file expandingdelegate.cpp.

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

Definition at line 292 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

Reimplemented from QItemDelegate.

Definition at line 73 of file expandingdelegate.cpp.

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

Reimplemented from QItemDelegate.

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-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:00 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
  • 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