Sketcher: ToolSettings Widget - Tool Management
=============================================== Sets the full interface between the DrawSketchHandler and a tool widget available somewhere in the UI. Signalling is as follows: 1. On activation of the tool, DrawSketchHandler notifies the tool widget. 2. The tool widget retrieves tool information necessary for representation (type of widget, visibility, ...) 3. When the tool widget has created an appropriate widget, it notifies back a widget change. 4. The tool receives the widget handler and can now configure and interact with the widget.
This commit is contained in:
committed by
abdullahtahiriyo
parent
9538aafc9a
commit
71a9eca750
@@ -286,6 +286,27 @@ QString DrawSketchHandler::getCrosshairCursorSVGName() const
|
||||
return QString::fromLatin1("None");
|
||||
}
|
||||
|
||||
std::unique_ptr<QWidget> DrawSketchHandler::createWidget() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool DrawSketchHandler::isWidgetVisible() const
|
||||
{
|
||||
return false;
|
||||
};
|
||||
|
||||
QPixmap DrawSketchHandler::getToolIcon() const
|
||||
{
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
QString DrawSketchHandler::getToolWidgetText() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
void DrawSketchHandler::activate(ViewProviderSketch* vp)
|
||||
{
|
||||
sketchgui = vp;
|
||||
@@ -1105,6 +1126,26 @@ void DrawSketchHandler::drawDirectionAtCursor(const Base::Vector2d& position,
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<QWidget> DrawSketchHandler::createToolWidget() const
|
||||
{
|
||||
return createWidget(); // NVI
|
||||
}
|
||||
|
||||
bool DrawSketchHandler::isToolWidgetVisible() const
|
||||
{
|
||||
return isWidgetVisible(); // NVI
|
||||
}
|
||||
|
||||
QPixmap DrawSketchHandler::getToolWidgetHeaderIcon() const
|
||||
{
|
||||
return getToolIcon();
|
||||
}
|
||||
|
||||
QString DrawSketchHandler::getToolWidgetHeaderText() const
|
||||
{
|
||||
return getToolWidgetText();
|
||||
}
|
||||
|
||||
void DrawSketchHandler::drawEditMarkers(const std::vector<Base::Vector2d>& EditMarkers,
|
||||
unsigned int augmentationlevel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user