Changeset - a0f1ec28dad2
[Not reviewed]
default
0 4 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-09-17 11:14:52
hy@ozderya.net
enabled Alt-* shortcuts for menu items
4 files changed with 22 insertions and 22 deletions:
0 comments (0 inline, 0 general)
src/commandpanel.cpp
Show inline comments
 
@@ -24,13 +24,13 @@
 
#include "ui_commandpanel.h"
 
#include "setting_defines.h"
 

	
 
CommandPanel::CommandPanel(QSerialPort* port, QWidget *parent) :
 
    QWidget(parent),
 
    ui(new Ui::CommandPanel),
 
    _menu(trUtf8("Commands")), _newCommandAction(trUtf8("New Command"), this)
 
    _menu(trUtf8("&Commands")), _newCommandAction(trUtf8("&New Command"), this)
 
{
 
    serialPort = port;
 

	
 
    ui->setupUi(this);
 
    auto layout = new QVBoxLayout();
 
    layout->setSpacing(0);
src/mainwindow.ui
Show inline comments
 
@@ -87,36 +87,36 @@
 
  <widget class="QMenuBar" name="menuBar">
 
   <property name="geometry">
 
    <rect>
 
     <x>0</x>
 
     <y>0</y>
 
     <width>653</width>
 
     <height>20</height>
 
     <height>27</height>
 
    </rect>
 
   </property>
 
   <widget class="QMenu" name="menuHelp">
 
    <property name="title">
 
     <string>Help</string>
 
     <string>&amp;Help</string>
 
    </property>
 
    <addaction name="actionDemoMode"/>
 
    <addaction name="actionReportBug"/>
 
    <addaction name="actionHelpAbout"/>
 
   </widget>
 
   <widget class="QMenu" name="menuFile">
 
    <property name="title">
 
     <string>File</string>
 
     <string>&amp;File</string>
 
    </property>
 
    <addaction name="actionSaveSettings"/>
 
    <addaction name="actionLoadSettings"/>
 
    <addaction name="actionExportCsv"/>
 
    <addaction name="separator"/>
 
    <addaction name="actionQuit"/>
 
   </widget>
 
   <widget class="QMenu" name="menuView">
 
    <property name="title">
 
     <string>View</string>
 
     <string>&amp;View</string>
 
    </property>
 
   </widget>
 
   <addaction name="menuFile"/>
 
   <addaction name="menuView"/>
 
   <addaction name="menuHelp"/>
 
  </widget>
 
@@ -158,61 +158,61 @@
 
   <property name="shortcut">
 
    <string>Ctrl+K</string>
 
   </property>
 
  </action>
 
  <action name="actionHelpAbout">
 
   <property name="text">
 
    <string>About</string>
 
    <string>&amp;About</string>
 
   </property>
 
  </action>
 
  <action name="actionDemoMode">
 
   <property name="checkable">
 
    <bool>true</bool>
 
   </property>
 
   <property name="text">
 
    <string>Demo Mode</string>
 
    <string>&amp;Demo Mode</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Toggle Demo Mode</string>
 
   </property>
 
  </action>
 
  <action name="actionExportCsv">
 
   <property name="text">
 
    <string>Export CSV</string>
 
    <string>&amp;Export CSV</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Export plot data to CSV</string>
 
   </property>
 
  </action>
 
  <action name="actionQuit">
 
   <property name="text">
 
    <string>Quit</string>
 
    <string>&amp;Quit</string>
 
   </property>
 
   <property name="shortcut">
 
    <string>Ctrl+Q</string>
 
   </property>
 
  </action>
 
  <action name="actionReportBug">
 
   <property name="text">
 
    <string>Report a Bug</string>
 
    <string>&amp;Report a Bug</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Report a Bug on SerialPlot Website</string>
 
   </property>
 
  </action>
 
  <action name="actionSaveSettings">
 
   <property name="text">
 
    <string>Save Settings</string>
 
    <string>&amp;Save Settings</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Save Settings to a File</string>
 
   </property>
 
  </action>
 
  <action name="actionLoadSettings">
 
   <property name="text">
 
    <string>Load Settings</string>
 
    <string>&amp;Load Settings</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Load Settings from a File</string>
 
   </property>
 
  </action>
 
 </widget>
src/plotmanager.cpp
Show inline comments
 
@@ -24,18 +24,18 @@
 
#include "utils.h"
 
#include "setting_defines.h"
 

	
 
PlotManager::PlotManager(QWidget* plotArea, QObject *parent) :
 
    QObject(parent),
 
    _plotArea(plotArea),
 
    showGridAction("Grid", this),
 
    showMinorGridAction("Minor Grid", this),
 
    unzoomAction("Unzoom", this),
 
    darkBackgroundAction("Dark Background", this),
 
    showLegendAction("Legend", this),
 
    showMultiAction("Multi Plot", this)
 
    showGridAction("&Grid", this),
 
    showMinorGridAction("&Minor Grid", this),
 
    unzoomAction("&Unzoom", this),
 
    darkBackgroundAction("&Dark Background", this),
 
    showLegendAction("&Legend", this),
 
    showMultiAction("Multi &Plot", this)
 
{
 
    _autoScaled = true;
 
    _yMin = 0;
 
    _yMax = 1;
 
    isDemoShown = false;
 

	
src/snapshotmanager.cpp
Show inline comments
 
@@ -27,16 +27,16 @@
 
#include <QtDebug>
 

	
 
#include "snapshotmanager.h"
 

	
 
SnapshotManager::SnapshotManager(QMainWindow* mainWindow,
 
                                 ChannelManager* channelMan) :
 
    _menu("Snapshots"),
 
    _takeSnapshotAction("Take Snapshot", this),
 
    loadSnapshotAction("Load Snapshots", this),
 
    clearAction("Clear Snapshots", this)
 
    _menu("&Snapshots"),
 
    _takeSnapshotAction("&Take Snapshot", this),
 
    loadSnapshotAction("&Load Snapshots", this),
 
    clearAction("&Clear Snapshots", this)
 
{
 
    _mainWindow = mainWindow;
 
    _channelMan = channelMan;
 

	
 
    _takeSnapshotAction.setToolTip("Take a snapshot of current plot");
 
    _takeSnapshotAction.setShortcut(QKeySequence("F5"));
0 comments (0 inline, 0 general)