/// \return a widget or null
ModuleBase_ModelWidget* findFirstAcceptingValueWidget();
+ /// The method is called on accepting of operation
+ virtual void onAcceptData() = 0;
+
/// Returns the first widget, where canAcceptFocus returns true
/// \return a widget or null
static ModuleBase_ModelWidget* findFirstAcceptingValueWidget(
if (anActiveWidget && anActiveWidget->getValueState() == ModuleBase_ModelWidget::ModifiedInPP) {
anActiveWidget->storeValue();
}
+ aPanel->onAcceptData();
}
if (canBeCommitted()) {
emit beforeCommitted();
QAction* anAct = theMgr->operationStateAction(aActionIds.at(i));
aBtn->setDefaultAction(anAct);
}
- // This code is necessary for remembering of user choice in property panel
- QToolButton* aBtn = findButton(PROP_PANEL_OK);
- if (aBtn)
- connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData()));
- aBtn = findButton(PROP_PANEL_OK_PLUS);
- if (aBtn)
- connect(aBtn->defaultAction(), SIGNAL(triggered(bool)), this, SLOT(onAcceptData()));
}
void XGUI_PropertyPanel::onAcceptData()
/// \param theIsNext true, if Tab(to the next widget) or false(moving to the previous)
bool setFocusNextPrevChild(bool theIsNext);
+ /// The method is called on accepting of operation
+ virtual void onAcceptData();
+
public slots:
/// \brief Update all widgets in property panel with values from the given feature
/// \param theFeature a Feature to update values in widgets
/// \param theWidget the current widget
void onActivateNextWidget(ModuleBase_ModelWidget* theWidget);
- /// The method is called on accepting of operation
- void onAcceptData();
-
signals:
/// The signal is emitted if the enter is clicked in the control of the widget
/// \param theObject a sender of the event