]> sigrok.org Git - pulseview.git/commitdiff
Added initial toolbar
authorJoel Holdsworth <redacted>
Mon, 9 Jul 2012 22:05:45 +0000 (23:05 +0100)
committerJoel Holdsworth <redacted>
Mon, 3 Sep 2012 12:59:06 +0000 (13:59 +0100)
mainwindow.cpp
mainwindow.h

index d827e2dc8b25db5f597fff6cc106795e8b5000bf..0b6f6e1567672e07ea066eac1c04018549cb106f 100644 (file)
@@ -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()));
index 9605ccfbc832722daad20a69bfed278c0701ccce..4633aa0e245426b6c0a72a6b1ec4582c544cc418 100644 (file)
@@ -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;