summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-03-28 08:12:21 +0200
committerLiang Qi <liang.qi@qt.io>2018-03-28 08:12:21 +0200
commit794781e7cff9f7d44af64292796428478ed18663 (patch)
treedae1f8478885d95dac5766ce46d5dd4784ca06f4 /examples/widgets/painting
parentf69d32b535d456a2441754ef5733c7fb65411d6c (diff)
parente83f1900f657a41036bd16e917527fcb7a52fd2b (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp4
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/examples/widgets/painting/pathstroke/pathstroke.cpp b/examples/widgets/painting/pathstroke/pathstroke.cpp
index 1e2f75b2a5..5a7b8fd9fe 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.cpp
+++ b/examples/widgets/painting/pathstroke/pathstroke.cpp
@@ -87,10 +87,12 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
m_joinGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
QRadioButton *bevelJoin = new QRadioButton(m_joinGroup);
QRadioButton *miterJoin = new QRadioButton(m_joinGroup);
+ QRadioButton *svgMiterJoin = new QRadioButton(m_joinGroup);
QRadioButton *roundJoin = new QRadioButton(m_joinGroup);
m_joinGroup->setTitle(tr("Join Style"));
bevelJoin->setText(tr("Bevel"));
miterJoin->setText(tr("Miter"));
+ svgMiterJoin->setText(tr("SvgMiter"));
roundJoin->setText(tr("Round"));
m_styleGroup = new QGroupBox(parent);
@@ -145,6 +147,7 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
QVBoxLayout *joinGroupLayout = new QVBoxLayout(m_joinGroup);
joinGroupLayout->addWidget(bevelJoin);
joinGroupLayout->addWidget(miterJoin);
+ joinGroupLayout->addWidget(svgMiterJoin);
joinGroupLayout->addWidget(roundJoin);
QVBoxLayout *styleGroupLayout = new QVBoxLayout(m_styleGroup);
@@ -167,6 +170,7 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
connect(bevelJoin, SIGNAL(clicked()), m_renderer, SLOT(setBevelJoin()));
connect(miterJoin, SIGNAL(clicked()), m_renderer, SLOT(setMiterJoin()));
+ connect(svgMiterJoin, SIGNAL(clicked()), m_renderer, SLOT(setSvgMiterJoin()));
connect(roundJoin, SIGNAL(clicked()), m_renderer, SLOT(setRoundJoin()));
connect(curveMode, SIGNAL(clicked()), m_renderer, SLOT(setCurveMode()));
diff --git a/examples/widgets/painting/pathstroke/pathstroke.h b/examples/widgets/painting/pathstroke/pathstroke.h
index 71352c8cc2..7bc7e09003 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.h
+++ b/examples/widgets/painting/pathstroke/pathstroke.h
@@ -92,6 +92,7 @@ public slots:
void setBevelJoin() { m_joinStyle = Qt::BevelJoin; update(); }
void setMiterJoin() { m_joinStyle = Qt::MiterJoin; update(); }
+ void setSvgMiterJoin() { m_joinStyle = Qt::SvgMiterJoin; update(); }
void setRoundJoin() { m_joinStyle = Qt::RoundJoin; update(); }
void setCurveMode() { m_pathMode = CurveMode; update(); }