ToolWidget-Sketcher: Tool widget basic framework
================================================ Provides a framework to show in the taskbar a taskbox with a tool settings dialog.
This commit is contained in:
@@ -495,7 +495,9 @@ ViewProviderSketch::ViewProviderSketch()
|
||||
}
|
||||
|
||||
ViewProviderSketch::~ViewProviderSketch()
|
||||
{}
|
||||
{
|
||||
connectionToolWidget.disconnect();
|
||||
}
|
||||
|
||||
void ViewProviderSketch::slotUndoDocument(const Gui::Document& /*doc*/)
|
||||
{
|
||||
@@ -3242,10 +3244,12 @@ bool ViewProviderSketch::setEdit(int ModNum)
|
||||
}
|
||||
|
||||
// start the edit dialog
|
||||
if (sketchDlg)
|
||||
Gui::Control().showDialog(sketchDlg);
|
||||
else
|
||||
Gui::Control().showDialog(new TaskDlgEditSketch(this));
|
||||
if (!sketchDlg)
|
||||
sketchDlg = new TaskDlgEditSketch(this);
|
||||
|
||||
connectionToolWidget = sketchDlg->registerToolWidgetChanged(std::bind(&SketcherGui::ViewProviderSketch::slotToolWidgetChanged, this, sp::_1));
|
||||
|
||||
Gui::Control().showDialog(sketchDlg);
|
||||
|
||||
// This call to the solver is needed to initialize the DoF and solve time controls
|
||||
// The false parameter indicates that the geometry of the SketchObject shall not be updateData
|
||||
@@ -3879,6 +3883,12 @@ QIcon ViewProviderSketch::mergeColorfulOverlayIcons(const QIcon& orig) const
|
||||
return Gui::ViewProvider::mergeColorfulOverlayIcons(mergedicon);
|
||||
}
|
||||
|
||||
void ViewProviderSketch::slotToolWidgetChanged(QWidget* newwidget)
|
||||
{
|
||||
if (sketchHandler)
|
||||
sketchHandler->toolWidgetChanged(newwidget);
|
||||
}
|
||||
|
||||
/*************************** functions ViewProviderSketch offers to friends such as
|
||||
* DrawHandlerSketch ************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user