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 413 of file KoConfigAuthorPage.cpp.

413 : QStyledItemDelegate(parent), m_contactModes(contactModes)
414{
415}

◆ ~KoContactInfoDelegate()

KoContactInfoDelegate::~KoContactInfoDelegate ( )
override

Definition at line 417 of file KoConfigAuthorPage.cpp.

418{
419
420}

Member Function Documentation

◆ createEditor()

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

Definition at line 422 of file KoConfigAuthorPage.cpp.

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

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: