+}
+
+/**
+ Update GUI controls state.
+ */
+void HYDROGUI_PriorityWidget::updateControls()
+{
+ HYDROGUI_PriorityTableModel* aModel =
+ dynamic_cast<HYDROGUI_PriorityTableModel*>( myTable->model() );
+ if( aModel ) {
+ myAdd->setEnabled( aModel->canCreateNewRule() );
+ bool isTableNotEmpty = aModel->rowCount() > 0;
+ myClear->setEnabled( isTableNotEmpty );
+ }
+ onSelectionChanged();
+}
+
+/**
+ Show error message.
+ */
+void HYDROGUI_PriorityWidget::onShowError( const QString& theMsg ) {
+ SUIT_MessageBox::warning( this, tr( "INCORRECT_INPUT" ), theMsg );
+}
+
+/**
+ Undo last change in priority rules table.
+ */
+void HYDROGUI_PriorityWidget::undoLastChange()
+{
+ HYDROGUI_PriorityTableModel* aModel =
+ dynamic_cast<HYDROGUI_PriorityTableModel*>( myTable->model() );
+ if ( aModel )
+ aModel->undoLastChange();
+}