kopia lustrzana https://gitlab.com/eliggett/wfview
Added pageup and pagedown keystrokes.
rodzic
2c104f9950
commit
6a1f53887b
26
wfmain.cpp
26
wfmain.cpp
|
@ -125,6 +125,14 @@ wfmain::wfmain(QWidget *parent) :
|
||||||
keyQuit->setKey(Qt::CTRL + Qt::Key_Q);
|
keyQuit->setKey(Qt::CTRL + Qt::Key_Q);
|
||||||
connect(keyQuit, SIGNAL(activated()), this, SLOT(on_exitBtn_clicked()));
|
connect(keyQuit, SIGNAL(activated()), this, SLOT(on_exitBtn_clicked()));
|
||||||
|
|
||||||
|
keyPageUp = new QShortcut(this);
|
||||||
|
keyPageUp->setKey(Qt::Key_PageUp);
|
||||||
|
connect(keyPageUp, SIGNAL(activated()), this, SLOT(shortcutPageUp()));
|
||||||
|
|
||||||
|
keyPageDown = new QShortcut(this);
|
||||||
|
keyPageDown->setKey(Qt::Key_PageDown);
|
||||||
|
connect(keyPageDown, SIGNAL(activated()), this, SLOT(shortcutPageDown()));
|
||||||
|
|
||||||
keyF = new QShortcut(this);
|
keyF = new QShortcut(this);
|
||||||
keyF->setKey(Qt::Key_F);
|
keyF->setKey(Qt::Key_F);
|
||||||
connect(keyF, SIGNAL(activated()), this, SLOT(shortcutF()));
|
connect(keyF, SIGNAL(activated()), this, SLOT(shortcutF()));
|
||||||
|
@ -672,6 +680,22 @@ void wfmain::shortcutControlPlus()
|
||||||
ui->freqDial->setValue( ui->freqDial->value() + ui->freqDial->pageStep() );
|
ui->freqDial->setValue( ui->freqDial->value() + ui->freqDial->pageStep() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wfmain::shortcutPageUp()
|
||||||
|
{
|
||||||
|
emit setFrequency(this->freqMhz + 1.0);
|
||||||
|
cmdOutQue.append(cmdGetFreq);
|
||||||
|
cmdOutQue.append(cmdGetMode); // maybe not really needed.
|
||||||
|
delayedCommand->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wfmain::shortcutPageDown()
|
||||||
|
{
|
||||||
|
emit setFrequency(this->freqMhz - 1.0);
|
||||||
|
cmdOutQue.append(cmdGetFreq);
|
||||||
|
cmdOutQue.append(cmdGetMode); // maybe not really needed.
|
||||||
|
delayedCommand->start();
|
||||||
|
}
|
||||||
|
|
||||||
void wfmain::shortcutF()
|
void wfmain::shortcutF()
|
||||||
{
|
{
|
||||||
showStatusBarText("Sending speech command (frequency) to radio.");
|
showStatusBarText("Sending speech command (frequency) to radio.");
|
||||||
|
@ -831,7 +855,7 @@ void wfmain::setPlotTheme(QCustomPlot *plot, bool isDark)
|
||||||
void wfmain::runDelayedCommand()
|
void wfmain::runDelayedCommand()
|
||||||
{
|
{
|
||||||
cmds qdCmd;
|
cmds qdCmd;
|
||||||
// switch case on enum
|
// Note: This cmdOut queue will be removed entirely soon and only the cmdOutQue will be available.
|
||||||
switch (cmdOut)
|
switch (cmdOut)
|
||||||
{
|
{
|
||||||
case cmdGetFreq:
|
case cmdGetFreq:
|
||||||
|
|
6
wfmain.h
6
wfmain.h
|
@ -92,6 +92,9 @@ private slots:
|
||||||
void shortcutControlMinus();
|
void shortcutControlMinus();
|
||||||
void shortcutControlPlus();
|
void shortcutControlPlus();
|
||||||
|
|
||||||
|
void shortcutPageUp();
|
||||||
|
void shortcutPageDown();
|
||||||
|
|
||||||
void shortcutF();
|
void shortcutF();
|
||||||
void shortcutM();
|
void shortcutM();
|
||||||
|
|
||||||
|
@ -270,6 +273,9 @@ private:
|
||||||
QShortcut *keyControlPlus;
|
QShortcut *keyControlPlus;
|
||||||
QShortcut *keyQuit;
|
QShortcut *keyQuit;
|
||||||
|
|
||||||
|
QShortcut *keyPageUp;
|
||||||
|
QShortcut *keyPageDown;
|
||||||
|
|
||||||
QShortcut *keyF;
|
QShortcut *keyF;
|
||||||
QShortcut *keyM;
|
QShortcut *keyM;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue