0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-23 08:29:07 +03:00

Dialog designer has been fixed

This commit is contained in:
Arin Alexander
2020-03-24 23:42:05 +03:00
parent 93316e22bc
commit 20d0637f70
5 changed files with 15 additions and 34 deletions

View File

@@ -55,7 +55,6 @@ ShapeItem::ShapeItem(QObject *owner, QGraphicsItem *parent)
m_shapeBrushType(Qt::NoBrush),
m_lineWidth(1),
m_penStyle(Qt::SolidLine),
m_opacity(100),
m_cornerRadius(0)
{
}
@@ -89,7 +88,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
brush.setTransform(painter->worldTransform().inverted());
painter->setBrush(brush);
painter->setBackground(QBrush(Qt::NoBrush));
painter->setOpacity(qreal(m_opacity)/100);
painter->setOpacity(qreal(opacity())/100);
QRectF rectangleRect = rect().adjusted((lineWidth() / 2),
(lineWidth() / 2),
-(lineWidth() / 2),
@@ -190,27 +189,5 @@ void ShapeItem::setCornerRadius(int borderRadius)
notify("cornerRadius",oldValue,m_cornerRadius);
}
}
int ShapeItem::opacity() const
{
return m_opacity;
}
void ShapeItem::setOpacity(int opacity)
{
if (m_opacity!=opacity){
if (opacity < 0) {
m_opacity = 0;
}
else if (opacity > 100) {
m_opacity = 100;
}
else {
m_opacity = opacity;
}
update();
}
}
}

View File

@@ -66,8 +66,6 @@ public:
qreal lineWidth() const {return m_lineWidth;}
Qt::PenStyle penStyle() const;
void setPenStyle(const Qt::PenStyle &value);
int opacity() const;
void setOpacity(int opacity);
int cornerRadius() const;
void setCornerRadius(int cornerRadius);
@@ -81,7 +79,7 @@ private:
Qt::BrushStyle m_shapeBrushType;
qreal m_lineWidth;
Qt::PenStyle m_penStyle;
int m_opacity;
// int m_opacity;
int m_cornerRadius;
};