Back to index

salome-smesh  6.5.0
Public Member Functions | Private Attributes
StdMeshersGUI_FixedPointsParamWdg::LineDelegate Class Reference

List of all members.

Public Member Functions

 LineDelegate (QTreeWidget *)
 ~LineDelegate ()
QWidget * createEditor (QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const

Private Attributes

QTreeWidget * myTreeWidget

Detailed Description

Definition at line 58 of file StdMeshersGUI_FixedPointsParamWdg.cxx.


Constructor & Destructor Documentation

Definition at line 71 of file StdMeshersGUI_FixedPointsParamWdg.cxx.

  : QItemDelegate( parent ),
    myTreeWidget( parent )
{
}

Definition at line 62 of file StdMeshersGUI_FixedPointsParamWdg.cxx.

{}

Member Function Documentation

QWidget * StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Definition at line 77 of file StdMeshersGUI_FixedPointsParamWdg.cxx.

{
  QWidget* w = 0;
  if ( (index.column() == 1 ) ) {
    SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( parent );
    sb->setAcceptNames( false ); // No Notebook variables allowed
    sb->setFrame( false );
    sb->setRange( 1, 999);
    w = sb;
  }

  return w;
}
void StdMeshersGUI_FixedPointsParamWdg::LineDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

Definition at line 93 of file StdMeshersGUI_FixedPointsParamWdg.cxx.

{
  model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::EditRole );
  model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::UserRole );
}

Member Data Documentation

Definition at line 68 of file StdMeshersGUI_FixedPointsParamWdg.cxx.


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