this, SLOT( onSelectionChanged() ) );
connect( aModel, SIGNAL( showError( const QString& ) ), this, SLOT( onShowError( const QString& ) ) );
+ connect( aModel, SIGNAL( ruleChanged() ), this, SIGNAL( ruleChanged() ) );
}
/**
if ( aModel ) {
if (aModel->createNewRule()) {
updateControls();
+ emit ruleChanged();
}
}
}
if ( aModel->removeRows( aRows ) ) {
updateControls();
+ emit ruleChanged();
}
}
}
dynamic_cast<HYDROGUI_PriorityTableModel*>( myTable->model() );
if ( aModel && aModel->removeAll() ) {
updateControls();
+ emit ruleChanged();
}
}
Set objects which could be used for rules definition.
@param theObjects the ordered list of objects
*/
-void HYDROGUI_PriorityWidget::setObjects( const QList<Handle(HYDROData_Object)>& theObjects )
+void HYDROGUI_PriorityWidget::setObjects( const QList<Handle(HYDROData_Entity)>& theObjects )
{
HYDROGUI_PriorityTableModel* aModel =
dynamic_cast<HYDROGUI_PriorityTableModel*>( myTable->model() );
}
}
+/**
+ Get table view.
+ @return the table view
+ */
+QTableView* HYDROGUI_PriorityWidget::getTable() const
+{
+ return myTable;
+}
+
/**
Slot called on table selection change.
*/
*/
void HYDROGUI_PriorityWidget::onShowError( const QString& theMsg ) {
SUIT_MessageBox::warning( this, tr( "INCORRECT_INPUT" ), theMsg );
-}
\ No newline at end of file
+}
+
+/**
+ Undo last change in priority rules table.
+ */
+void HYDROGUI_PriorityWidget::undoLastChange()
+{
+ HYDROGUI_PriorityTableModel* aModel =
+ dynamic_cast<HYDROGUI_PriorityTableModel*>( myTable->model() );
+ if ( aModel )
+ aModel->undoLastChange();
+}