#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 MARGIN 11 |
Definition at line 37 of file SMESHGUI_MeshOrderDlg.cxx.
| #define SPACING 6 |
Definition at line 36 of file SMESHGUI_MeshOrderDlg.cxx.
| enum MeshOrderItemType |
Enumeartion of list widget item types (mesh name or separator)
Definition at line 42 of file SMESHGUI_MeshOrderDlg.cxx.
{ MeshItem = QListWidgetItem::UserType, SeparatorItem };
| 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.
References MeshItem.
Referenced by SMESHGUI_MeshOrderBox.SetMeshes().
{
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.
References SeparatorItem.
Referenced by SMESHGUI_MeshOrderBox.SetMeshes().
{
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.
References SeparatorItem.
Referenced by SMESHGUI_MeshOrderBox.GetMeshIds(), SMESHGUI_MeshOrderBox.GetMeshNames(), SMESHGUI_MeshOrderBox.moveItem(), and SMESHGUI_MeshOrderBox.onSelectionChanged().
{
return theItem && (int)theItem->type() != (int)SeparatorItem;
}