2024-01-12 21:53:29 +01:00
|
|
|
#include "speedverticaldialog.h"
|
|
|
|
|
#include "ui_speedverticaldialog.h"
|
|
|
|
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
2024-01-14 15:31:47 +01:00
|
|
|
SpeedVerticalDialog::SpeedVerticalDialog(SpeedVerticalAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
2024-01-12 21:53:29 +01:00
|
|
|
QDialog{parent},
|
|
|
|
|
m_ui{std::make_unique<Ui::SpeedVerticalDialog>()},
|
|
|
|
|
m_action{action}
|
|
|
|
|
{
|
|
|
|
|
m_ui->setupUi(this);
|
|
|
|
|
|
2024-01-14 15:31:47 +01:00
|
|
|
{
|
|
|
|
|
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
|
|
|
|
sp_retain.setRetainSizeWhenHidden(true);
|
|
|
|
|
m_ui->widgetObject->setSizePolicy(sp_retain);
|
|
|
|
|
}
|
|
|
|
|
m_ui->widgetObject->setProjectModel(projectModel);
|
|
|
|
|
|
|
|
|
|
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
|
|
|
|
m_ui->widgetObject->setShowClearObjectAction(false);
|
|
|
|
|
|
2024-01-12 21:53:29 +01:00
|
|
|
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
|
|
|
|
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
|
|
|
|
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
|
|
|
|
button->setIcon(QIcon{":/qtgameengine/icons/delete.png"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SpeedVerticalDialog::~SpeedVerticalDialog() = default;
|