Gui: use of TaskDialog::addTaskBox

This commit is contained in:
wmayer
2024-03-26 10:19:51 +01:00
committed by wwmayer
parent bc9d845296
commit 0ed7eb5652
12 changed files with 8 additions and 31 deletions

View File

@@ -627,9 +627,7 @@ TaskDisplayProperties::TaskDisplayProperties()
{
this->setButtonPosition(TaskDisplayProperties::North);
widget = new DlgDisplayPropertiesImp(false);
taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(),true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
addTaskBox(widget);
}
TaskDisplayProperties::~TaskDisplayProperties() = default;

View File

@@ -123,7 +123,6 @@ public:
private:
DlgDisplayPropertiesImp* widget;
Gui::TaskView::TaskBox* taskbox;
};
} // namespace Dialog

View File

@@ -1017,10 +1017,7 @@ TaskPlacement::TaskPlacement()
this->setButtonPosition(TaskPlacement::South);
widget = new Placement();
widget->showDefaultButtons(false);
taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(),true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
addTaskBox(widget);
connect(widget, &Placement::placementChanged, this, &TaskPlacement::slotPlacementChanged);
}

View File

@@ -201,7 +201,6 @@ Q_SIGNALS:
private:
Placement* widget;
Gui::TaskView::TaskBox* taskbox;
};
} // namespace Dialog

View File

@@ -543,10 +543,7 @@ void ElementColors::onElementListItemDoubleClicked(QListWidgetItem *item) {
TaskElementColors::TaskElementColors(ViewProviderDocumentObject* vp, bool noHide)
{
widget = new ElementColors(vp,noHide);
taskbox = new TaskView::TaskBox(
QPixmap(), widget->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
addTaskBox(widget);
}
TaskElementColors::~TaskElementColors() = default;

View File

@@ -87,7 +87,6 @@ public:
private:
ElementColors* widget;
TaskView::TaskBox* taskbox;
};
} //namespace Gui

View File

@@ -634,12 +634,9 @@ SbVec3f InteractiveScale::getCoordsOnImagePlane(const SbVec3f& point)
// ----------------------------------------------------------------------------
TaskImageDialog::TaskImageDialog(Image::ImagePlane* obj)
: widget{new TaskImage(obj)}
{
widget = new TaskImage(obj);
auto taskbox = new Gui::TaskView::TaskBox(
Gui::BitmapFactory().pixmap("image-plane"), widget->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
addTaskBox(Gui::BitmapFactory().pixmap("image-plane"), widget);
}
void TaskImageDialog::open()

View File

@@ -201,10 +201,7 @@ void TaskOrientation::updateIcon()
TaskOrientationDialog::TaskOrientationDialog(App::GeoFeature* obj)
{
widget = new TaskOrientation(obj);
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
QPixmap(), widget->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
addTaskBox(widget);
}
void TaskOrientationDialog::open()

View File

@@ -183,9 +183,7 @@ void TextureMapping::onCheckEnvToggled(bool b)
TaskTextureMapping::TaskTextureMapping()
{
dialog = new TextureMapping();
taskbox = new Gui::TaskView::TaskBox(QPixmap(), dialog->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(dialog);
Content.push_back(taskbox);
addTaskBox(dialog);
}
TaskTextureMapping::~TaskTextureMapping() = default;

View File

@@ -78,7 +78,6 @@ public:
private:
TextureMapping* dialog;
Gui::TaskView::TaskBox* taskbox;
};
} // namespace Dialog

View File

@@ -428,9 +428,7 @@ TaskTransform::TaskTransform()
this->setButtonPosition(TaskTransform::South);
dialog = new Transform();
dialog->showStandardButtons(false);
taskbox = new Gui::TaskView::TaskBox(QPixmap(), dialog->windowTitle(), true, nullptr);
taskbox->groupLayout()->addWidget(dialog);
Content.push_back(taskbox);
addTaskBox(dialog);
}
TaskTransform::~TaskTransform() = default;

View File

@@ -119,7 +119,6 @@ public:
private:
Transform* dialog;
Gui::TaskView::TaskBox* taskbox;
};
} // namespace Dialog