summaryrefslogtreecommitdiffstats
path: root/examples/widget/main.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-06-05 13:56:59 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-06-06 06:17:56 +0300
commit4f5546e028c346537df65e3f5977ab7922ccedf2 (patch)
treeaf1e34e9d9104c3bf01b65722a610f063f5a1f93 /examples/widget/main.cpp
parent8cd166fe789fa2aa3a40442a31df015f645d32b8 (diff)
Added API for disabling/enabling background
Still to do: new bar objects are needed for disabled background, as current ones do not have bottom (to save in polygon count). Change-Id: I9689fc57314b48b8a6929886d04416bd513ea3dc Change-Id: I9689fc57314b48b8a6929886d04416bd513ea3dc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/widget/main.cpp')
-rw-r--r--examples/widget/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/widget/main.cpp b/examples/widget/main.cpp
index 3824f717..1b33b177 100644
--- a/examples/widget/main.cpp
+++ b/examples/widget/main.cpp
@@ -93,6 +93,10 @@ int main(int argc, char **argv)
QPushButton *selectionButton = new QPushButton(widget);
selectionButton->setText(QStringLiteral("Change selection mode"));
+ QCheckBox *backgroundCheckBox = new QCheckBox(widget);
+ backgroundCheckBox->setText(QStringLiteral("Show background"));
+ backgroundCheckBox->setChecked(true);
+
QCheckBox *gridCheckBox = new QCheckBox(widget);
gridCheckBox->setText(QStringLiteral("Show grid"));
gridCheckBox->setChecked(true);
@@ -186,6 +190,7 @@ int main(int argc, char **argv)
vLayout->addWidget(styleButton, 0, Qt::AlignTop);
vLayout->addWidget(cameraButton, 0, Qt::AlignTop);
vLayout->addWidget(selectionButton, 0, Qt::AlignTop);
+ vLayout->addWidget(backgroundCheckBox);
vLayout->addWidget(gridCheckBox);
vLayout->addWidget(new QLabel(QStringLiteral("Adjust shadow quality")));
vLayout->addWidget(shadowQuality);
@@ -234,6 +239,8 @@ int main(int argc, char **argv)
QObject::connect(fontList, &QFontComboBox::currentFontChanged, modifier,
&ChartModifier::changeFont);
+ QObject::connect(backgroundCheckBox, &QCheckBox::stateChanged, modifier,
+ &ChartModifier::setBackgroundEnabled);
QObject::connect(gridCheckBox, &QCheckBox::stateChanged, modifier,
&ChartModifier::setGridEnabled);