]> sigrok.org Git - pulseview.git/commitdiff
Added empty context bar
authorJoel Holdsworth <redacted>
Sat, 4 May 2013 08:44:22 +0000 (09:44 +0100)
committerJoel Holdsworth <redacted>
Sun, 19 May 2013 08:45:59 +0000 (09:45 +0100)
CMakeLists.txt
pv/mainwindow.cpp
pv/mainwindow.h
pv/toolbars/contextbar.cpp [new file with mode: 0644]
pv/toolbars/contextbar.h [new file with mode: 0644]

index 0a754020586f10839fadceef949d09d9a4f16559..9714d68c696f91631c6b38e0b5ecb1aa1623c537 100644 (file)
@@ -120,6 +120,7 @@ set(pulseview_SOURCES
        pv/prop/property.cpp
        pv/prop/binding/binding.cpp
        pv/prop/binding/deviceoptions.cpp
+       pv/toolbars/contextbar.cpp
        pv/toolbars/samplingbar.cpp
        pv/view/analogsignal.cpp
        pv/view/cursor.cpp
@@ -139,6 +140,7 @@ set(pulseview_HEADERS
        pv/dialogs/about.h
        pv/dialogs/connect.h
        pv/dialogs/deviceoptions.h
+       pv/toolbars/contextbar.h
        pv/toolbars/samplingbar.h
        pv/view/cursor.h
        pv/view/header.h
index b916999fb9bd2a1fcfd2c691f5aa89a6081f15ba..6b3398f22d9a40c7bb8266b24a37e29972fe3bef 100644 (file)
@@ -41,6 +41,7 @@
 #include "devicemanager.h"
 #include "dialogs/about.h"
 #include "dialogs/connect.h"
+#include "toolbars/contextbar.h"
 #include "toolbars/samplingbar.h"
 #include "view/view.h"
 
@@ -204,6 +205,11 @@ void MainWindow::setup_ui()
                SLOT(run_stop()));
        addToolBar(_sampling_bar);
 
+       // Setup the context bar
+       _context_bar = new toolbars::ContextBar(this);
+       addToolBar(_context_bar);
+       insertToolBarBreak(_context_bar);
+
        // Set the title
        setWindowTitle(QApplication::translate("MainWindow", "PulseView", 0,
                QApplication::UnicodeUTF8));
index 02b792eaa1cd5cc4aed6d8d2b5894edeb935e21f..51577bdb742d9a53303ed260bfc77075e17a8aa8 100644 (file)
@@ -40,6 +40,7 @@ namespace pv {
 class DeviceManager;
 
 namespace toolbars {
+class ContextBar;
 class SamplingBar;
 }
 
@@ -122,6 +123,7 @@ private:
 
        QToolBar *_toolbar;
        toolbars::SamplingBar *_sampling_bar;
+       toolbars::ContextBar *_context_bar;
 };
 
 } // namespace pv
diff --git a/pv/toolbars/contextbar.cpp b/pv/toolbars/contextbar.cpp
new file mode 100644 (file)
index 0000000..8e92676
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include "contextbar.h"
+
+using namespace std;
+
+namespace pv {
+namespace toolbars {
+
+ContextBar::ContextBar(QWidget *parent) :
+       QToolBar(tr("Context Bar"), parent)
+{
+}
+
+} // namespace toolbars
+} // namespace pv
diff --git a/pv/toolbars/contextbar.h b/pv/toolbars/contextbar.h
new file mode 100644 (file)
index 0000000..02ff37e
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#ifndef PULSEVIEW_PV_TOOLBARS_CONTEXTBAR_H
+#define PULSEVIEW_PV_TOOLBARS_CONTEXTBAR_H
+
+#include <QToolBar>
+
+namespace pv {
+namespace toolbars {
+
+class ContextBar : public QToolBar
+{
+       Q_OBJECT
+
+public:
+       ContextBar(QWidget *parent);
+};
+
+} // namespace toolbars
+} // namespace pv
+
+#endif // PULSEVIEW_PV_TOOLBARS_CONTEXTBAR_H