Gui: extend and add overloaded method of TaskDialog::addTaskBox
This commit is contained in:
@@ -56,12 +56,20 @@ TaskDialog::~TaskDialog()
|
||||
|
||||
//==== Slots ===============================================================
|
||||
|
||||
void TaskDialog::addTaskBox(QWidget* widget)
|
||||
QWidget* TaskDialog::addTaskBox(QWidget* widget, bool expandable, QWidget* parent)
|
||||
{
|
||||
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
|
||||
QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
return addTaskBox(QPixmap(), widget, expandable, parent);
|
||||
}
|
||||
|
||||
QWidget* TaskDialog::addTaskBox(const QPixmap& icon,
|
||||
QWidget* widget,
|
||||
bool expandable,
|
||||
QWidget* parent)
|
||||
{
|
||||
auto taskbox = new Gui::TaskView::TaskBox(icon, widget->windowTitle(), expandable, parent);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
return taskbox;
|
||||
}
|
||||
|
||||
const std::vector<QWidget*> &TaskDialog::getDialogContent() const
|
||||
|
||||
@@ -57,7 +57,8 @@ public:
|
||||
TaskDialog();
|
||||
~TaskDialog() override;
|
||||
|
||||
void addTaskBox(QWidget*);
|
||||
QWidget* addTaskBox(QWidget* widget, bool expandable = true, QWidget* parent = nullptr);
|
||||
QWidget* addTaskBox(const QPixmap& icon, QWidget* widget, bool expandable = true, QWidget* parent = nullptr);
|
||||
|
||||
void setButtonPosition(ButtonPosition p)
|
||||
{ pos = p; }
|
||||
|
||||
Reference in New Issue
Block a user