Back to index

salome-smesh  6.5.0
Classes | Enumerations | Functions
StdMeshersGUI Namespace Reference

Classes

class  GridAxisTab
 Widget defining the grid in one direction. More...
class  LineDelegate

Enumerations

enum  { COORD_BUT = 0, SPACING_BUT }

Functions

void getFromItem (QTreeWidgetItem *item, double &t0, double &t1, QString &fun)
 get spacing definition from a tree item
QTreeWidgetItem * setToItem (double t0, double t1, const QString &fun, QTreeWidgetItem *item)
 set spacing definition to a tree item
double coordFromItem (QListWidgetItem *item)
 Retrieves coordinate value from a list item.
QListWidgetItem * coordToItem (double coord, QListWidgetItem *item)
 Sets coordinate value to a list item.

Enumeration Type Documentation

anonymous enum
Enumerator:
COORD_BUT 
SPACING_BUT 

Definition at line 67 of file StdMeshersGUI_CartesianParamCreator.cxx.


Function Documentation

double StdMeshersGUI::coordFromItem ( QListWidgetItem *  item)

Retrieves coordinate value from a list item.

Definition at line 107 of file StdMeshersGUI_CartesianParamCreator.cxx.

  {
    return item ? item->data( Qt::UserRole ).toDouble() : 0;
  }

Here is the caller graph for this function:

QListWidgetItem * StdMeshersGUI::coordToItem ( double  coord,
QListWidgetItem *  item 
)

Sets coordinate value to a list item.

Definition at line 118 of file StdMeshersGUI_CartesianParamCreator.cxx.

  {
    if ( !item ) item = new QListWidgetItem;
    item->setText( QString::number( coord ));
    item->setData( Qt::UserRole, coord );
    item->setFlags( item->flags() | Qt::ItemIsEditable );
    return item;
  }

Here is the caller graph for this function:

void StdMeshersGUI::getFromItem ( QTreeWidgetItem *  item,
double &  t0,
double &  t1,
QString &  fun 
)

get spacing definition from a tree item

Definition at line 75 of file StdMeshersGUI_CartesianParamCreator.cxx.

  {
    if ( item )
    {
      t0 = item->text( 0 ).split(' ')[0].toDouble();
      t1 = item->data( 0, Qt::UserRole ).toDouble();
      fun = item->text( 1 );
    }
  }

Here is the caller graph for this function:

QTreeWidgetItem * StdMeshersGUI::setToItem ( double  t0,
double  t1,
const QString &  fun,
QTreeWidgetItem *  item 
)

set spacing definition to a tree item

Definition at line 91 of file StdMeshersGUI_CartesianParamCreator.cxx.

  {
    if ( !item ) item = new QTreeWidgetItem;
    item->setText( 0, QString( "%1 - %2" ).arg( t0 ).arg( t1 ));
    item->setData( 0, Qt::UserRole, t1 );
    item->setText( 1, fun );
    item->setFlags( item->flags() | Qt::ItemIsEditable );
    return item;
  }

Here is the caller graph for this function: