Compare commits
No commits in common. "293c1f3096397d3842ea71551d5a963c6d4648a3" and "520597e2889a1b86f3972a929e96dd6408f7a87b" have entirely different histories.
293c1f3096
...
520597e288
|
@ -105,7 +105,7 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.cpp" />
|
||||
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.cpp" />
|
||||
<ClCompile Include="src\Editor\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\EditorWidgetComponent\LayerStyleDialog.h" />
|
||||
<QtMoc Include="src\Editor\LayerStyleDialog.h" />
|
||||
<ClInclude Include="src\Editor\ElementManager.h" />
|
||||
<QtMoc Include="src\Editor\ElementPoolWidget.h" />
|
||||
<ClInclude Include="src\Editor\GraphicElement.h" />
|
||||
|
|
|
@ -219,7 +219,7 @@
|
|||
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerCreateWidget.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Editor\EditorWidgetComponent\LayerStyleDialog.cpp">
|
||||
<ClCompile Include="src\Editor\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\EditorWidgetComponent\LayerStyleDialog.h">
|
||||
<QtMoc Include="src\Editor\LayerStyleDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -45,15 +45,6 @@ QWidget* StrokeElementLayerStyle::getListDisplayWidget() const
|
|||
return w;
|
||||
}
|
||||
|
||||
StrokeElementLayerStyle::StrokeElementLayerStyle(StrokeElementLayerStyle& other)
|
||||
{
|
||||
materialStyles = std::vector<std::shared_ptr<Renderer::MaterialStyleStroke>>(other.materialStyles.size());
|
||||
for (size_t i = 0; i < other.materialStyles.size(); i++)
|
||||
{
|
||||
materialStyles[i] = std::make_shared<Renderer::MaterialStyleStroke>(*other.materialStyles[i]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Renderer::BaseStyle> FillElementLayerStyle::toBaseStyles() const
|
||||
{
|
||||
return std::vector<Renderer::BaseStyle>();
|
||||
|
@ -81,13 +72,4 @@ QWidget* FillElementLayerStyle::getListDisplayWidget() const
|
|||
layout->setMargin(0);
|
||||
layout->addWidget(name);
|
||||
return w;
|
||||
}
|
||||
|
||||
FillElementLayerStyle::FillElementLayerStyle(FillElementLayerStyle& other)
|
||||
{
|
||||
materialStyles = std::vector<std::shared_ptr<Renderer::MaterialStyleFill>>(other.materialStyles.size());
|
||||
for (size_t i = 0; i < other.materialStyles.size(); i++)
|
||||
{
|
||||
materialStyles[i] = std::make_shared<Renderer::MaterialStyleFill>(*other.materialStyles[i]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,9 +34,8 @@ public:
|
|||
QWidget* getInputWidget() const override;
|
||||
QWidget* getListDisplayWidget() const override;
|
||||
StrokeElementLayerStyle() = default;
|
||||
StrokeElementLayerStyle(StrokeElementLayerStyle& other);
|
||||
~StrokeElementLayerStyle() = default;
|
||||
std::vector<std::shared_ptr<Renderer::MaterialStyleStroke>> materialStyles;
|
||||
std::vector<std::shared_ptr<Renderer::MaterialStroke>> materialStyles;
|
||||
};
|
||||
|
||||
class FillElementLayerStyle : public Renderer::ElementStyle, public LayerStyle
|
||||
|
@ -47,7 +46,6 @@ public:
|
|||
QWidget* getInputWidget() const override;
|
||||
QWidget* getListDisplayWidget() const override;
|
||||
FillElementLayerStyle() = default;
|
||||
FillElementLayerStyle(FillElementLayerStyle& other);
|
||||
~FillElementLayerStyle() = default;
|
||||
std::vector<std::shared_ptr<Renderer::MaterialStyleFill>> materialStyles;
|
||||
std::vector<std::shared_ptr<Renderer::MaterialFill>> materialStyles;
|
||||
};
|
|
@ -1,6 +1,5 @@
|
|||
#include "LayerStyleDialog.h"
|
||||
#include <QComboBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
|
@ -20,9 +19,8 @@ LayerStyleDialog::LayerStyleDialog(
|
|||
{
|
||||
this->layerStyle = existedStyle;
|
||||
|
||||
this->styleContainer = nullptr;
|
||||
this->styleWidget = layerStyle->getInputWidget();
|
||||
this->styleWidget->setParent(this);
|
||||
QWidget* styleWidget = layerStyle->getInputWidget();
|
||||
styleWidget->setParent(this);
|
||||
dialogLayout->addWidget(styleWidget);
|
||||
// do something
|
||||
}
|
||||
|
@ -61,10 +59,6 @@ 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)
|
|
@ -1,5 +1,5 @@
|
|||
#include "InfoDisplayWidget.h"
|
||||
#include "./EditorWidgetComponent/LayerStyleDialog.h"
|
||||
#include "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();
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Renderer
|
|||
virtual MaterialStyleType type() const override;
|
||||
virtual std::vector<GLfloat> encoded() const override;
|
||||
virtual bool operator==(const MaterialStyle&) const override;
|
||||
//protected:
|
||||
protected:
|
||||
std::shared_ptr<MaterialFill> materialFill;
|
||||
};
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Renderer
|
|||
virtual std::vector<GLfloat> encoded() const override;
|
||||
virtual bool operator==(const MaterialStyle&) const override;
|
||||
float getHalfWidth() const;
|
||||
//protected:
|
||||
protected:
|
||||
float halfWidth;
|
||||
StrokeType strokeType;
|
||||
StrokeEndType endType;
|
||||
|
|
Loading…
Reference in New Issue