19 const QStyleOptionViewItem & option,
20 const QModelIndex & index )
const
33 if ( Model ==
nullptr )
38 if ( index.column() == 0 )
40 emit CreateObjectEditorSignal ( Object );
49 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT ( CommitAndClose() ) );
50 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
61 connect ( widget, SIGNAL ( signal_edit_end() ),
this, SLOT ( CommitAndClose() ) );
62 connect ( widget, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
67 switch ( AttributeData.
p_type )
78 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT ( CommitAndClose() ) );
79 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
105 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT ( CommitAndClose() ) );
106 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
115 connect ( Editor, SIGNAL ( signal_value_change() ),
this, SLOT ( CommitAndClose() ) );
116 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
123 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT ( CommitAndClose() ) );
124 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT ( Close() ) );
223 if ( event->type() == QEvent::KeyPress )
225 QKeyEvent * KeyEvent =
static_cast<QKeyEvent *
> ( event );
227 if ( KeyEvent->key() == Qt::Key_Enter || KeyEvent->key() == Qt::Key_Return )
231 return QItemDelegate::eventFilter (
240 else if ( event->type() == QEvent::FocusOut )
245 return QItemDelegate::eventFilter ( editor, event );
249 const QStyleOptionViewItem & option,
250 const QModelIndex & index )
252 if ( ! ( event->type() == QEvent::MouseButtonPress
253 || event->type() == QEvent::MouseButtonRelease ) )
255 if (
dynamic_cast<QKeyEvent *
> ( event ) )
257 QKeyEvent * KeyEvent =
static_cast<QKeyEvent *
> ( event );
259 if ( KeyEvent->text() !=
"e" )
266 return QItemDelegate::editorEvent ( event, model, option, index );