Changeset - 3b42589b1df8
[Not reviewed]
default
0 3 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-11-07 14:59:53
hy@ozderya.net
renamed toolbars
3 files changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
mainwindow.cpp
Show inline comments
 
@@ -55,25 +55,25 @@ MainWindow::MainWindow(QWidget *parent) 
 
    portControl(&serialPort),
 
    commandPanel(&serialPort),
 
    dataFormatPanel(&serialPort, &channelBuffers),
 
    snapshotMan(this, &channelBuffers)
 
{
 
    ui->setupUi(this);
 
    ui->tabWidget->insertTab(0, &portControl, "Port");
 
    ui->tabWidget->insertTab(1, &dataFormatPanel, "Data Format");
 
    ui->tabWidget->insertTab(3, &commandPanel, "Commands");
 
    ui->tabWidget->setCurrentIndex(0);
 
    addToolBar(portControl.toolBar());
 

	
 
    ui->mainToolBar->addAction(snapshotMan.takeSnapshotAction());
 
    ui->plotToolBar->addAction(snapshotMan.takeSnapshotAction());
 
    ui->menuBar->insertMenu(ui->menuHelp->menuAction(), snapshotMan.menu());
 

	
 
    setupAboutDialog();
 

	
 
    // init view menu
 
    for (auto a : ui->plot->menuActions())
 
    {
 
        ui->menuView->addAction(a);
 
    }
 

	
 
    // init UI signals
 

	
mainwindow.ui
Show inline comments
 
@@ -249,25 +249,28 @@
 
    <addaction name="separator"/>
 
    <addaction name="actionQuit"/>
 
   </widget>
 
   <widget class="QMenu" name="menuView">
 
    <property name="title">
 
     <string>View</string>
 
    </property>
 
   </widget>
 
   <addaction name="menuFile"/>
 
   <addaction name="menuView"/>
 
   <addaction name="menuHelp"/>
 
  </widget>
 
  <widget class="QToolBar" name="mainToolBar">
 
  <widget class="QToolBar" name="plotToolBar">
 
   <property name="windowTitle">
 
    <string>Plot Toolbar</string>
 
   </property>
 
   <attribute name="toolBarArea">
 
    <enum>TopToolBarArea</enum>
 
   </attribute>
 
   <attribute name="toolBarBreak">
 
    <bool>false</bool>
 
   </attribute>
 
   <addaction name="actionPause"/>
 
   <addaction name="actionClear"/>
 
  </widget>
 
  <widget class="QStatusBar" name="statusBar"/>
 
  <action name="actionPause">
 
   <property name="checkable">
portcontrol.cpp
Show inline comments
 
@@ -22,25 +22,25 @@
 

	
 
#include <QSerialPortInfo>
 
#include <QKeySequence>
 
#include <QLabel>
 
#include <QtDebug>
 
#include "utils.h"
 

	
 
#define TBPORTLIST_MINWIDTH (200)
 

	
 
PortControl::PortControl(QSerialPort* port, QWidget* parent) :
 
    QWidget(parent),
 
    ui(new Ui::PortControl),
 
    portToolBar("Port"),
 
    portToolBar("Port Toolbar"),
 
    openAction("Open", this)
 
{
 
    ui->setupUi(this);
 

	
 
    serialPort = port;
 

	
 
    // setup the toolbar
 
    openAction.setCheckable(true);
 
    openAction.setShortcut(QKeySequence("F2"));
 
    openAction.setToolTip("Open Port (F2)");
 
    QObject::connect(&openAction, &QAction::triggered,
 
                     this, &PortControl::openActionTriggered);
0 comments (0 inline, 0 general)