1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

use enum for brushshape at scenetoolshapebrush

This commit is contained in:
Nelsson Huotari 2019-10-04 12:51:57 +03:00
parent bae8636ec0
commit 4f9ec24e41
2 changed files with 14 additions and 5 deletions

View File

@ -58,7 +58,7 @@ CSVWidget::ShapeBrushSizeControls::ShapeBrushSizeControls(const QString &title,
CSVWidget::ShapeBrushWindow::ShapeBrushWindow(CSMDoc::Document& document, QWidget *parent)
: QFrame(parent, Qt::Popup),
mBrushShape(0),
mBrushShape(BrushShape_Point),
mBrushSize(1),
mDocument(document)
{
@ -151,10 +151,10 @@ void CSVWidget::ShapeBrushWindow::setBrushSize(int brushSize)
void CSVWidget::ShapeBrushWindow::setBrushShape()
{
if(mButtonPoint->isChecked()) mBrushShape = 0;
if(mButtonSquare->isChecked()) mBrushShape = 1;
if(mButtonCircle->isChecked()) mBrushShape = 2;
if(mButtonCustom->isChecked()) mBrushShape = 3;
if(mButtonPoint->isChecked()) mBrushShape = BrushShape_Point;
if(mButtonSquare->isChecked()) mBrushShape = BrushShape_Square;
if(mButtonCircle->isChecked()) mBrushShape = BrushShape_Circle;
if(mButtonCustom->isChecked()) mBrushShape = BrushShape_Custom;
emit passBrushShape(mBrushShape);
}

View File

@ -53,6 +53,15 @@ namespace CSVWidget
Q_OBJECT
public:
enum BrushShape
{
BrushShape_Point = 0,
BrushShape_Square = 1,
BrushShape_Circle = 2,
BrushShape_Custom = 3
};
ShapeBrushWindow(CSMDoc::Document& document, QWidget *parent = 0);
void configureButtonInitialSettings(QPushButton *button);