Changeset - ab6bc6d4e2f6
[Not reviewed]
recording
0 4 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-02-07 15:11:09
hy@ozderya.net
added record toolbar
4 files changed with 25 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/mainwindow.cpp
Show inline comments
 
@@ -77,6 +77,7 @@ MainWindow::MainWindow(QWidget *parent) 
 
    ui->tabWidget->setCurrentIndex(0);
 
    auto tbPortControl = portControl.toolBar();
 
    addToolBar(tbPortControl);
 
    addToolBar(recordPanel.toolbar());
 

	
 
    ui->plotToolBar->addAction(snapshotMan.takeSnapshotAction());
 
    ui->menuBar->insertMenu(ui->menuHelp->menuAction(), snapshotMan.menu());
src/recordpanel.cpp
Show inline comments
 
@@ -20,14 +20,29 @@
 
#include "recordpanel.h"
 
#include "ui_recordpanel.h"
 

	
 
#include <QIcon>
 

	
 
RecordPanel::RecordPanel(QWidget *parent) :
 
    QWidget(parent),
 
    ui(new Ui::RecordPanel)
 
    ui(new Ui::RecordPanel),
 
    recordToolBar(tr("Record Toolbar")),
 
    recordAction(QIcon::fromTheme("media-record"), tr("Record"), this)
 
{
 
    ui->setupUi(this);
 

	
 
    recordAction.setCheckable(true);
 
    recordToolBar.addAction(&recordAction);
 
    ui->pbRecord->setDefaultAction(&recordAction);
 

	
 
    recordToolBar.setObjectName("tbRecord");
 
}
 

	
 
RecordPanel::~RecordPanel()
 
{
 
    delete ui;
 
}
 

	
 
QToolBar* RecordPanel::toolbar()
 
{
 
    return &recordToolBar;
 
}
src/recordpanel.h
Show inline comments
 
@@ -21,6 +21,8 @@
 
#define RECORDPANEL_H
 

	
 
#include <QWidget>
 
#include <QToolBar>
 
#include <QAction>
 

	
 
namespace Ui {
 
class RecordPanel;
 
@@ -34,8 +36,12 @@ public:
 
    explicit RecordPanel(QWidget *parent = 0);
 
    ~RecordPanel();
 

	
 
    QToolBar* toolbar();
 

	
 
private:
 
    Ui::RecordPanel *ui;
 
    QToolBar recordToolBar;
 
    QAction recordAction;
 
};
 

	
 
#endif // RECORDPANEL_H
src/recordpanel.ui
Show inline comments
 
@@ -29,7 +29,7 @@
 
        </widget>
 
       </item>
 
       <item>
 
        <widget class="QLabel" name="label">
 
        <widget class="QLabel" name="lbFileName">
 
         <property name="sizePolicy">
 
          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
 
           <horstretch>0</horstretch>
 
@@ -87,7 +87,7 @@
 
   <item>
 
    <layout class="QVBoxLayout" name="verticalLayout_2">
 
     <item>
 
      <widget class="QToolButton" name="toolButton_2">
 
      <widget class="QToolButton" name="pbRecord">
 
       <property name="minimumSize">
 
        <size>
 
         <width>85</width>
 
@@ -100,12 +100,6 @@
 
       <property name="text">
 
        <string>Record</string>
 
       </property>
 
       <property name="icon">
 
        <iconset theme="media-record"/>
 
       </property>
 
       <property name="checkable">
 
        <bool>true</bool>
 
       </property>
 
      </widget>
 
     </item>
 
     <item>
0 comments (0 inline, 0 general)