All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
QGpGuiTools::XMLEditorDelegate Class Reference

#include <XMLEditor.h>

List of all members.

Public Member Functions

QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
void setEditorData (QWidget *editor, const QModelIndex &index) const
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 XMLEditorDelegate (QObject *parent=0)

Constructor & Destructor Documentation

QGpGuiTools::XMLEditorDelegate::XMLEditorDelegate ( QObject *  parent = 0) [inline]
: QItemDelegate(parent) {}

Member Function Documentation

QWidget * QGpGuiTools::XMLEditorDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

References TRACE, and w.

  {
    TRACE;
    QLineEdit * w=new QLineEdit(parent);
    return w;
  }
void QGpGuiTools::XMLEditorDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const

References TRACE, and w.

  {
    TRACE;
    QLineEdit * w= qobject_cast<QLineEdit *>(editor);
    if( !w) return;
    w->setText(index.model() ->data(index).toString());
    w->selectAll();
  }
void QGpGuiTools::XMLEditorDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

References TRACE, and w.

  {
    TRACE;
    QLineEdit * w=qobject_cast<QLineEdit *>(editor);
    if( !w) return;
    model->setData(index, w->text());
  }

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines