summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorsauimone <samu.uimonen@digia.com>2012-11-28 16:04:18 +0200
committersauimone <samu.uimonen@digia.com>2012-11-28 16:04:18 +0200
commitc38123ef51c4512281f716cf626d136753287d4f (patch)
treea4aa2650e558d66dbcb5df4a38ae1c2f83f93918 /examples
parent2932f37127178496c91f6cf0fc94e9cb04740b12 (diff)
Removed buttons from legendmarkers example
Diffstat (limited to 'examples')
-rw-r--r--examples/legendmarkers/mainwidget.cpp24
-rw-r--r--examples/legendmarkers/mainwidget.h1
2 files changed, 3 insertions, 22 deletions
diff --git a/examples/legendmarkers/mainwidget.cpp b/examples/legendmarkers/mainwidget.cpp
index bc5a6e47..f5ad07df 100644
--- a/examples/legendmarkers/mainwidget.cpp
+++ b/examples/legendmarkers/mainwidget.cpp
@@ -36,32 +36,12 @@ QTCOMMERCIALCHART_USE_NAMESPACE
MainWidget::MainWidget(QWidget *parent) :
QWidget(parent)
{
- // Create buttons for ui
- m_buttonLayout = new QGridLayout();
-
- QPushButton *addSliceButton = new QPushButton("add series");
- connect(addSliceButton, SIGNAL(clicked()), this, SLOT(addSeries()));
- m_buttonLayout->addWidget(addSliceButton, 1, 0);
-
- QPushButton *removeSliceButton = new QPushButton("remove series");
- connect(removeSliceButton, SIGNAL(clicked()), this, SLOT(removeSeries()));
- m_buttonLayout->addWidget(removeSliceButton, 2, 0);
-
- QPushButton *connectButton = new QPushButton("Connect markers");
- connect(connectButton, SIGNAL(clicked()), this, SLOT(connectMarkers()));
- m_buttonLayout->addWidget(connectButton, 3, 0);
-
- QPushButton *disConnectButton = new QPushButton("Disconnect markers");
- connect(disConnectButton, SIGNAL(clicked()), this, SLOT(disconnectMarkers()));
- m_buttonLayout->addWidget(disConnectButton, 4, 0);
-
// Create chart view with the chart
m_chart = new QChart();
m_chartView = new QChartView(m_chart, this);
// Create layout for grid and detached legend
m_mainLayout = new QGridLayout();
- m_mainLayout->addLayout(m_buttonLayout, 0, 0);
m_mainLayout->addWidget(m_chartView, 0, 1, 3, 1);
setLayout(m_mainLayout);
@@ -71,8 +51,10 @@ MainWidget::MainWidget(QWidget *parent) :
addSeries();
addSeries();
+ connectMarkers();
+
// Set the title and show legend
- m_chart->setTitle("Legendmarker example");
+ m_chart->setTitle("Legendmarker example (click on legend)");
m_chart->legend()->setVisible(true);
m_chart->legend()->setAlignment(Qt::AlignBottom);
diff --git a/examples/legendmarkers/mainwidget.h b/examples/legendmarkers/mainwidget.h
index 4ffe26e8..36a8d957 100644
--- a/examples/legendmarkers/mainwidget.h
+++ b/examples/legendmarkers/mainwidget.h
@@ -55,7 +55,6 @@ private:
QChartView *m_chartView;
QGridLayout *m_mainLayout;
- QGridLayout *m_buttonLayout;
QGridLayout *m_fontLayout;
};