Back to index

salome-smesh  6.5.0
Defines | Enumerations | Functions
SMESHGUI_MeshOrderDlg.cxx File Reference
#include "SMESHGUI_MeshOrderDlg.h"
#include <Qt>
#include <QFrame>
#include <QLabel>
#include <QBoxLayout>
#include <QSpacerItem>
#include <QToolButton>
#include <QListWidget>
#include <QListWidgetItem>

Go to the source code of this file.

Defines

#define SPACING   6
#define MARGIN   11

Enumerations

enum  MeshOrderItemType { MeshItem = QListWidgetItem::UserType, SeparatorItem }
 Enumeartion of list widget item types (mesh name or separator) More...

Functions

static void addSeparator (QListWidget *theList)
 add separator item
static void addMeshItem (QListWidget *theList, const QString &theName, const int theId)
 add sub-mesh item
static bool checkItem (QListWidgetItem *theItem)
 cehck that item exists and not a separator

Define Documentation

#define MARGIN   11

Definition at line 37 of file SMESHGUI_MeshOrderDlg.cxx.

#define SPACING   6

Definition at line 36 of file SMESHGUI_MeshOrderDlg.cxx.


Enumeration Type Documentation

Enumeartion of list widget item types (mesh name or separator)

Enumerator:
MeshItem 
SeparatorItem 

Definition at line 42 of file SMESHGUI_MeshOrderDlg.cxx.

{ MeshItem = QListWidgetItem::UserType, SeparatorItem };

Function Documentation

static void addMeshItem ( QListWidget *  theList,
const QString &  theName,
const int  theId 
) [static]

add sub-mesh item

Definition at line 114 of file SMESHGUI_MeshOrderDlg.cxx.

{
  QListWidgetItem* item = new QListWidgetItem( theName, theList, MeshItem );
  item->setData( Qt::UserRole, theId );
  theList->addItem( item );
}
static void addSeparator ( QListWidget *  theList) [static]

add separator item

Definition at line 99 of file SMESHGUI_MeshOrderDlg.cxx.

{
  QListWidgetItem* item = new QListWidgetItem( theList, SeparatorItem );
  QFrame* hline = new QFrame( theList );
  hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
  theList->addItem( item );
  theList->setItemWidget( item, hline );
}
static bool checkItem ( QListWidgetItem *  theItem) [static]

cehck that item exists and not a separator

Definition at line 166 of file SMESHGUI_MeshOrderDlg.cxx.

{
  return theItem && (int)theItem->type() != (int)SeparatorItem;
}