Part: use of TaskDialog::addTaskBox
This commit is contained in:
@@ -538,11 +538,7 @@ void CrossSections::makePlanes(Plane type, const std::vector<double>& d, double
|
||||
TaskCrossSections::TaskCrossSections(const Base::BoundBox3d& bb)
|
||||
{
|
||||
widget = new CrossSections(bb);
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_CrossSections"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_CrossSections"), widget);
|
||||
}
|
||||
|
||||
bool TaskCrossSections::accept()
|
||||
|
||||
@@ -96,7 +96,6 @@ public:
|
||||
|
||||
private:
|
||||
CrossSections* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -471,11 +471,7 @@ void DlgBooleanOperation::accept()
|
||||
TaskBooleanOperation::TaskBooleanOperation()
|
||||
{
|
||||
widget = new DlgBooleanOperation();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Booleans"),
|
||||
widget->windowTitle(), false, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Booleans"), widget, false);
|
||||
}
|
||||
|
||||
void TaskBooleanOperation::clicked(int id)
|
||||
|
||||
@@ -86,7 +86,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgBooleanOperation* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -754,11 +754,7 @@ void DlgExtrusion::writeParametersToFeature(App::DocumentObject &feature, App::D
|
||||
TaskExtrusion::TaskExtrusion()
|
||||
{
|
||||
widget = new DlgExtrusion();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Extrude"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Extrude"), widget);
|
||||
}
|
||||
|
||||
bool TaskExtrusion::accept()
|
||||
|
||||
@@ -117,7 +117,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgExtrusion* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -1069,11 +1069,7 @@ void FilletEdgesDialog::accept()
|
||||
TaskFilletEdges::TaskFilletEdges(Part::Fillet* fillet)
|
||||
{
|
||||
widget = new DlgFilletEdges(DlgFilletEdges::FILLET, fillet);
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Fillet"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Fillet"), widget);
|
||||
}
|
||||
|
||||
TaskFilletEdges::~TaskFilletEdges()
|
||||
@@ -1126,11 +1122,7 @@ const char* DlgChamferEdges::getFilletType() const
|
||||
TaskChamferEdges::TaskChamferEdges(Part::Chamfer* chamfer)
|
||||
{
|
||||
widget = new DlgChamferEdges(chamfer);
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Chamfer"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Chamfer"), widget);
|
||||
}
|
||||
|
||||
TaskChamferEdges::~TaskChamferEdges()
|
||||
|
||||
@@ -168,7 +168,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgFilletEdges* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
class TaskChamferEdges : public Gui::TaskView::TaskDialog
|
||||
@@ -192,7 +191,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgChamferEdges* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -2185,16 +2185,11 @@ QString Location::toPlacement() const
|
||||
|
||||
TaskPrimitives::TaskPrimitives()
|
||||
{
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
widget = new DlgPrimitives();
|
||||
taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(widget);
|
||||
|
||||
location = new Location();
|
||||
taskbox = new Gui::TaskView::TaskBox(QPixmap(), location->windowTitle() ,true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(location);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(location);
|
||||
}
|
||||
|
||||
QDialogButtonBox::StandardButtons TaskPrimitives::getStandardButtons() const
|
||||
@@ -2227,17 +2222,12 @@ bool TaskPrimitives::reject()
|
||||
TaskPrimitivesEdit::TaskPrimitivesEdit(Part::Primitive* feature)
|
||||
{
|
||||
// create and show dialog for the primitives
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
widget = new DlgPrimitives(nullptr, feature);
|
||||
taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(widget);
|
||||
|
||||
// create and show dialog for the location
|
||||
location = new Location(nullptr, feature);
|
||||
taskbox = new Gui::TaskView::TaskBox(QPixmap(), location->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(location);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(location);
|
||||
}
|
||||
|
||||
QDialogButtonBox::StandardButtons TaskPrimitivesEdit::getStandardButtons() const
|
||||
|
||||
@@ -570,11 +570,7 @@ void DlgRevolution::autoSolid()
|
||||
TaskRevolution::TaskRevolution()
|
||||
{
|
||||
widget = new DlgRevolution();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Revolve"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Revolve"), widget);
|
||||
}
|
||||
|
||||
bool TaskRevolution::accept()
|
||||
|
||||
@@ -98,7 +98,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgRevolution* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -330,11 +330,7 @@ void DlgScale::writeParametersToFeature(App::DocumentObject &feature, App::Docum
|
||||
TaskScale::TaskScale()
|
||||
{
|
||||
widget = new DlgScale();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Scale"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Scale"), widget);
|
||||
}
|
||||
|
||||
bool TaskScale::accept()
|
||||
|
||||
@@ -86,7 +86,6 @@ public:
|
||||
|
||||
private:
|
||||
DlgScale* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -358,11 +358,7 @@ bool Mirroring::accept()
|
||||
TaskMirroring::TaskMirroring()
|
||||
{
|
||||
widget = new Mirroring();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Mirror.svg"),
|
||||
widget->windowTitle(), false, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Mirror.svg"), widget, false);
|
||||
}
|
||||
|
||||
bool TaskMirroring::accept()
|
||||
|
||||
@@ -78,7 +78,6 @@ public:
|
||||
|
||||
private:
|
||||
Mirroring* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
@@ -451,10 +451,7 @@ void FaceColors::changeEvent(QEvent* e)
|
||||
TaskFaceColors::TaskFaceColors(ViewProviderPartExt* vp)
|
||||
{
|
||||
widget = new FaceColors(vp);
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(widget);
|
||||
}
|
||||
|
||||
TaskFaceColors::~TaskFaceColors() = default;
|
||||
|
||||
@@ -85,7 +85,6 @@ public:
|
||||
|
||||
private:
|
||||
FaceColors* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
@@ -248,11 +248,7 @@ void LoftWidget::changeEvent(QEvent *e)
|
||||
TaskLoft::TaskLoft()
|
||||
{
|
||||
widget = new LoftWidget();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Loft"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Loft"), widget);
|
||||
}
|
||||
|
||||
TaskLoft::~TaskLoft() = default;
|
||||
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
|
||||
private:
|
||||
LoftWidget* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
@@ -238,11 +238,7 @@ void OffsetWidget::changeEvent(QEvent *e)
|
||||
TaskOffset::TaskOffset(Part::Offset* offset)
|
||||
{
|
||||
widget = new OffsetWidget(offset);
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Offset"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Offset"), widget);
|
||||
}
|
||||
|
||||
TaskOffset::~TaskOffset() = default;
|
||||
|
||||
@@ -80,7 +80,6 @@ public:
|
||||
|
||||
private:
|
||||
OffsetWidget* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
@@ -599,11 +599,7 @@ void ShapeBuilderWidget::changeEvent(QEvent *e)
|
||||
TaskShapeBuilder::TaskShapeBuilder()
|
||||
{
|
||||
widget = new ShapeBuilderWidget();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Shapebuilder"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Shapebuilder"), widget);
|
||||
}
|
||||
|
||||
TaskShapeBuilder::~TaskShapeBuilder() = default;
|
||||
|
||||
@@ -83,7 +83,6 @@ public:
|
||||
|
||||
private:
|
||||
ShapeBuilderWidget* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
@@ -462,11 +462,7 @@ void SweepWidget::changeEvent(QEvent *e)
|
||||
TaskSweep::TaskSweep() : label(nullptr)
|
||||
{
|
||||
widget = new SweepWidget();
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Sweep"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Sweep"), widget);
|
||||
}
|
||||
|
||||
TaskSweep::~TaskSweep()
|
||||
|
||||
@@ -80,7 +80,6 @@ public:
|
||||
private:
|
||||
SweepWidget* widget;
|
||||
Gui::StatusWidget* label;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
@@ -296,11 +296,7 @@ TaskThickness::TaskThickness(Part::Thickness* offset)
|
||||
{
|
||||
widget = new ThicknessWidget(offset);
|
||||
widget->setWindowTitle(ThicknessWidget::tr("Thickness"));
|
||||
taskbox = new Gui::TaskView::TaskBox(
|
||||
Gui::BitmapFactory().pixmap("Part_Thickness"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
addTaskBox(Gui::BitmapFactory().pixmap("Part_Thickness"), widget);
|
||||
}
|
||||
|
||||
Part::Thickness* TaskThickness::getObject() const
|
||||
|
||||
@@ -79,7 +79,6 @@ public:
|
||||
|
||||
private:
|
||||
ThicknessWidget* widget;
|
||||
Gui::TaskView::TaskBox* taskbox;
|
||||
};
|
||||
|
||||
} //namespace PartGui
|
||||
|
||||
Reference in New Issue
Block a user