Krita Source Code Documentation
Loading...
Searching...
No Matches
KoContactInfoDelegate Class Reference

The KoContactInfoDelegate class. More...

#include <KoConfigAuthorPage.h>

+ Inheritance diagram for KoContactInfoDelegate:

Public Member Functions

QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
 KoContactInfoDelegate (QWidget *parent, QStringList contactModes)
 
 ~KoContactInfoDelegate () override
 

Public Attributes

QStringList m_contactModes
 

Detailed Description

The KoContactInfoDelegate class.

quick delegate subclass to allow a qcombobox for the type.

Definition at line 44 of file KoConfigAuthorPage.h.

Constructor & Destructor Documentation

◆ KoContactInfoDelegate()

KoContactInfoDelegate::KoContactInfoDelegate ( QWidget * parent,
QStringList contactModes )

Definition at line 411 of file KoConfigAuthorPage.cpp.

411 : QStyledItemDelegate(parent), m_contactModes(contactModes)
412{
413}

◆ ~KoContactInfoDelegate()

KoContactInfoDelegate::~KoContactInfoDelegate ( )
override

Definition at line 415 of file KoConfigAuthorPage.cpp.

416{
417
418}

Member Function Documentation

◆ createEditor()

QWidget * KoContactInfoDelegate::createEditor ( QWidget * parent,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Definition at line 420 of file KoConfigAuthorPage.cpp.

421{
422
423 if (index.column() > 0) {
424 return new QLineEdit(parent);
425 } else {
426 QComboBox *box = new QComboBox(parent);
427 box->addItems(m_contactModes);
428 return box;
429 }
430}

References m_contactModes.

Member Data Documentation

◆ m_contactModes

QStringList KoContactInfoDelegate::m_contactModes

Definition at line 52 of file KoConfigAuthorPage.h.


The documentation for this class was generated from the following files: