From: Joel Holdsworth Date: Mon, 9 Jul 2012 22:05:45 +0000 (+0100) Subject: Added initial toolbar X-Git-Tag: pulseview-0.1.0~321 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0a4db787f8b25e1b4d68b4bcb3e2c9a26c8c13bb;p=pulseview.git Added initial toolbar --- diff --git a/mainwindow.cpp b/mainwindow.cpp index d827e2dc..0b6f6e15 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -69,6 +69,7 @@ void MainWindow::setup_ui() _action_about = new QAction(this); _action_about->setObjectName(QString::fromUtf8("actionAbout")); _action_open = new QAction(this); + _action_open->setIcon(QIcon::fromTheme("document-open")); _action_open->setObjectName(QString::fromUtf8("actionOpen")); // Setup the menu bar @@ -88,6 +89,10 @@ void MainWindow::setup_ui() QMetaObject::connectSlotsByName(this); // Setup the toolbars + _toolbar = new QToolBar(this); + _toolbar->addAction(_action_open); + addToolBar(_toolbar); + _sampling_bar = new SamplingBar(this); connect(_sampling_bar, SIGNAL(run_stop()), this, SLOT(run_stop())); diff --git a/mainwindow.h b/mainwindow.h index 9605ccfb..4633aa0e 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -37,6 +37,7 @@ class QMenuBar; class QMenu; class QVBoxLayout; class QStatusBar; +class QToolBar; class QWidget; class MainWindow : public QMainWindow @@ -65,6 +66,7 @@ private: QWidget *_central_widget; QVBoxLayout *_vertical_layout; + QToolBar *_toolbar; SamplingBar *_sampling_bar; QStatusBar *_status_bar;