移动了LayerStyleDialog所在的文件夹

TaoZhang-Branch
ArgonarioD 2023-03-10 16:06:33 +08:00
parent 15e2522591
commit 7c7cd02d71
5 changed files with 14 additions and 8 deletions

View File

@ -105,7 +105,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.cpp" />
<ClCompile Include="src\Editor\LayerStyleDialog.cpp" />
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.cpp" />
<ClCompile Include="src\Editor\EditorWidget.cpp" />
<ClCompile Include="src\Editor\EditorWidgetItem.cpp" />
<ClCompile Include="src\Editor\ElementManager.cpp" />
@ -192,7 +192,7 @@
<QtMoc Include="src\MainWindow.h" />
<QtMoc Include="src\Editor\EditorWidget.h" />
<QtMoc Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.h" />
<QtMoc Include="src\Editor\LayerStyleDialog.h" />
<QtMoc Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.h" />
<ClInclude Include="src\Editor\ElementManager.h" />
<QtMoc Include="src\Editor\ElementPoolWidget.h" />
<ClInclude Include="src\Editor\GraphicElement.h" />

View File

@ -219,7 +219,7 @@
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Editor\LayerStyleDialog.cpp">
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@ -260,7 +260,7 @@
<QtMoc Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="src\Editor\LayerStyleDialog.h">
<QtMoc Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>

View File

@ -1,5 +1,6 @@
#include "LayerStyleDialog.h"
#include <QComboBox>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QDebug>
@ -19,8 +20,9 @@ LayerStyleDialog::LayerStyleDialog(
{
this->layerStyle = existedStyle;
QWidget* styleWidget = layerStyle->getInputWidget();
styleWidget->setParent(this);
this->styleContainer = nullptr;
this->styleWidget = layerStyle->getInputWidget();
this->styleWidget->setParent(this);
dialogLayout->addWidget(styleWidget);
// do something
}
@ -59,6 +61,10 @@ LayerStyleDialog::LayerStyleDialog(
this, &LayerStyleDialog::onStyleTypeSelectorChanged);
}
}
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
connect(buttonBox, &QDialogButtonBox::accepted, this, &LayerStyleDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &LayerStyleDialog::reject);
dialogLayout->addWidget(buttonBox);
}
void LayerStyleDialog::onStyleTypeSelectorChanged(int index)

View File

@ -1,5 +1,5 @@
#include "InfoDisplayWidget.h"
#include "LayerStyleDialog.h"
#include "./EditorWidgetComponent/LayerStyleDialog.h"
#include <QLineEdit>
#include <QTextBlock>
#include <QListWidget>
@ -191,7 +191,7 @@ void InfoDisplayWidget::generateLayerForm()
removeButton->setFixedSize(QSize(20, 20));
connect(detailButton, &QPushButton::clicked, this,
[=]()
[this, styleIterator]()
{
LayerStyleDialog* dialog = new LayerStyleDialog(nullptr, *styleIterator);
dialog->exec();