Distribution table widget. More...
#include <StdMeshersGUI_DistrTable.h>

Data Structures | |
| class | SpinBoxDelegate |
| Custom item delegate (uses double spin box to edit table item) More... | |
| class | Table |
| Table function widget. More... | |
Public Types | |
| enum | TableButton { InsertRowBtn, RemoveRowBtn } |
Signals | |
| void | valueChanged (int, int) |
| void | currentChanged (int, int) |
Public Member Functions | |
| StdMeshersGUI_DistrTableFrame (QWidget *=0) | |
| ~StdMeshersGUI_DistrTableFrame () | |
| void | showButton (const TableButton, const bool) |
| bool | isButtonShown (const TableButton) const |
| void | data (DataArray &) const |
| void | setData (const DataArray &) |
| void | setFuncMinValue (double) |
Private Types | |
| enum | { ArgColumn, FuncColumn } |
| typedef SMESH::double_array | DataArray |
Private Slots | |
| void | onInsert () |
| void | onRemove () |
Private Member Functions | |
| QPushButton * | button (const TableButton) const |
Private Attributes | |
| QMap< int, QPushButton * > | myButtons |
| Table * | myTable |
Distribution table widget.
Definition at line 43 of file StdMeshersGUI_DistrTable.h.
typedef SMESH::double_array StdMeshersGUI_DistrTableFrame.DataArray [private] |
Definition at line 50 of file StdMeshersGUI_DistrTable.h.
anonymous enum [private] |
Definition at line 47 of file StdMeshersGUI_DistrTable.h.
{ ArgColumn, FuncColumn };
Definition at line 55 of file StdMeshersGUI_DistrTable.h.
| StdMeshersGUI_DistrTableFrame::StdMeshersGUI_DistrTableFrame | ( | QWidget * | parent = 0 | ) |
Definition at line 510 of file StdMeshersGUI_DistrTable.cxx.
References currentChanged(), InsertRowBtn, main(), myButtons, myTable, onInsert(), onRemove(), RemoveRowBtn, SPACING, and valueChanged().
: QWidget( parent ) { QGridLayout* main = new QGridLayout( this ); main->setMargin( 0 ); main->setSpacing( 0 ); // --- myTable = new Table( this ); connect( myTable, SIGNAL( valueChanged( int, int ) ), this, SIGNAL( valueChanged( int, int ) ) ); myButtons[ InsertRowBtn ] = new QPushButton( tr( "SMESH_INSERT_ROW" ), this ); myButtons[ RemoveRowBtn ] = new QPushButton( tr( "SMESH_REMOVE_ROW" ), this ); // --- main->addWidget( myTable , 0, 0, 1, 3); main->addWidget( myButtons[ InsertRowBtn ] , 1, 0); main->addWidget( myButtons[ RemoveRowBtn ] , 1, 1); main->setColumnStretch(2, 1); main->setSpacing( SPACING ); // --- connect( myButtons[ InsertRowBtn ], SIGNAL( clicked() ), this, SLOT( onInsert() ) ); connect( myButtons[ RemoveRowBtn ], SIGNAL( clicked() ), this, SLOT( onRemove() ) ); connect( myTable, SIGNAL( currentCellChanged( int, int, int, int ) ), this, SIGNAL( currentChanged( int, int ) ) ); connect( myTable, SIGNAL( cellChanged( int, int ) ), this, SIGNAL( valueChanged( int, int ) ) ); }
| StdMeshersGUI_DistrTableFrame::~StdMeshersGUI_DistrTableFrame | ( | ) |
Definition at line 542 of file StdMeshersGUI_DistrTable.cxx.
{
}
| QPushButton * StdMeshersGUI_DistrTableFrame::button | ( | const TableButton | b | ) | const [private] |
Definition at line 593 of file StdMeshersGUI_DistrTable.cxx.
References myButtons.
Referenced by isButtonShown(), and showButton().
Referenced by StdMeshersGUI_DistrTableFrame().
| void StdMeshersGUI_DistrTableFrame::data | ( | DataArray & | array | ) | const |
Definition at line 562 of file StdMeshersGUI_DistrTable.cxx.
References ex13_hole1partial.d, StdMeshersGUI_DistrTableFrame.Table.data(), myTable, and sortData().
Referenced by StdMeshersGUI_NbSegmentsCreator.onValueChanged(), and StdMeshersGUI_NbSegmentsCreator.readParamsFromWidgets().
| bool StdMeshersGUI_DistrTableFrame::isButtonShown | ( | const TableButton | b | ) | const |
Definition at line 555 of file StdMeshersGUI_DistrTable.cxx.
References button().
| void StdMeshersGUI_DistrTableFrame::onInsert | ( | ) | [private, slot] |
Definition at line 600 of file StdMeshersGUI_DistrTable.cxx.
References StdMeshersGUI_DistrTableFrame.Table.addRow(), and myTable.
Referenced by StdMeshersGUI_DistrTableFrame().
| void StdMeshersGUI_DistrTableFrame::onRemove | ( | ) | [private, slot] |
Definition at line 607 of file StdMeshersGUI_DistrTable.cxx.
References StdMeshersGUI_DistrTableFrame.Table.deleteRow(), and myTable.
Referenced by StdMeshersGUI_DistrTableFrame().
| void StdMeshersGUI_DistrTableFrame::setData | ( | const DataArray & | array | ) |
Definition at line 574 of file StdMeshersGUI_DistrTable.cxx.
References ex13_hole1partial.d, myTable, StdMeshersGUI_DistrTableFrame.Table.setData(), and sortData().
Referenced by StdMeshersGUI_NbSegmentsCreator.onValueChanged(), and StdMeshersGUI_NbSegmentsCreator.retrieveParams().
| void StdMeshersGUI_DistrTableFrame::setFuncMinValue | ( | double | v | ) |
Definition at line 586 of file StdMeshersGUI_DistrTable.cxx.
References myTable, and StdMeshersGUI_DistrTableFrame.Table.setFuncMinValue().
Referenced by StdMeshersGUI_NbSegmentsCreator.onValueChanged(), and StdMeshersGUI_NbSegmentsCreator.retrieveParams().
{
myTable->setFuncMinValue( v );
}
| void StdMeshersGUI_DistrTableFrame::showButton | ( | const TableButton | b, |
| const bool | on | ||
| ) |
Definition at line 548 of file StdMeshersGUI_DistrTable.cxx.
References button().
Referenced by StdMeshersGUI_DistrTableFrame().
QMap<int, QPushButton*> StdMeshersGUI_DistrTableFrame.myButtons [private] |
Definition at line 80 of file StdMeshersGUI_DistrTable.h.
Referenced by button(), and StdMeshersGUI_DistrTableFrame().
Table* StdMeshersGUI_DistrTableFrame.myTable [private] |
Definition at line 81 of file StdMeshersGUI_DistrTable.h.
Referenced by StdMeshersGUI_DistrTableFrame.SpinBoxDelegate.createEditor(), data(), onInsert(), onRemove(), setData(), setFuncMinValue(), and StdMeshersGUI_DistrTableFrame().