From 28196978e28479c9fd03e87919092433deb09f36 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 3 Jan 2018 12:25:58 +0100 Subject: [PATCH] Commands: basic dock widget setup and command class --- app/main.cpp | 2 +- doc/img/edit.xcf | Bin 0 -> 26824 bytes doc/img/listing.xcf | Bin 0 -> 107904 bytes sdrgui/CMakeLists.txt | 4 + sdrgui/commands/command.cpp | 83 +++++++++++++ sdrgui/commands/command.h | 58 +++++++++ sdrgui/mainwindow.cpp | 5 + sdrgui/mainwindow.ui | 228 +++++++++++++++++++++++++++++------ sdrgui/resources/edit.png | Bin 0 -> 398 bytes sdrgui/resources/listing.png | Bin 0 -> 381 bytes sdrgui/resources/res.qrc | 2 + 11 files changed, 346 insertions(+), 36 deletions(-) create mode 100644 doc/img/edit.xcf create mode 100644 doc/img/listing.xcf create mode 100644 sdrgui/commands/command.cpp create mode 100644 sdrgui/commands/command.h create mode 100644 sdrgui/resources/edit.png create mode 100644 sdrgui/resources/listing.png diff --git a/app/main.cpp b/app/main.cpp index 913e0f69c..0b02ffef8 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -33,7 +33,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo */ QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangel"); - QCoreApplication::setApplicationVersion("3.9.1"); + QCoreApplication::setApplicationVersion("3.10.0"); #if 1 qApp->setStyle(QStyleFactory::create("fusion")); diff --git a/doc/img/edit.xcf b/doc/img/edit.xcf new file mode 100644 index 0000000000000000000000000000000000000000..57567ef872c94bcc0dc1727e4906860d5a5f001f GIT binary patch literal 26824 zcmeI5dyt)FeaD}(_j@+k%_f`cZZ?zqD)7$j6khADSue-GG1ydVmnnjwY3+uQnj{BaVk|2kv-?UPe0$^Z&!BLRRSbr z!IPQi{XXxz=klKSxqZLC%ahT=Z%TJvdtjt%S z&^t1E;ONyyvt7Lg{n^ngujm>a7_@)0RE8%0)W=(|oaL>PfA9L`6}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ee(Xc>9&Ff8GrWX{@kl?nSDM9WB1HHAF4OFsv}I(oQArMaMAbS*iqdcyOzC0rQnhgO8Ox9M-;TPD`S){mKJy>5OT~hd6{4eNz+6Q~0b<)hIxL@#bq3%nI)mzn(}4J$ z(-HmlW}gkJNA@tYtM_)v^pgZ4QN63J735`Hz|qy*imHKuNwTs6XTq$nP%W3S@t=;W gTNRm1!?NwA2oDY^8f$< literal 0 HcmV?d00001 diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index 5fb6e333a..d907d9480 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -40,6 +40,8 @@ set(sdrgui_SOURCES gui/valuedial.cpp gui/valuedialz.cpp + commands/command.cpp + dsp/scopevis.cpp dsp/scopevisng.cpp dsp/scopevismulti.cpp @@ -92,6 +94,8 @@ set(sdrgui_HEADERS gui/valuedial.h gui/valuedialz.h + commands/command.h + dsp/scopevis.h dsp/scopevisng.h dsp/scopevismulti.h diff --git a/sdrgui/commands/command.cpp b/sdrgui/commands/command.cpp new file mode 100644 index 000000000..ab848b14a --- /dev/null +++ b/sdrgui/commands/command.cpp @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2018 Edouard Griffiths, F4EXB // +// // +// 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 as version 3 of the License, or // +// // +// 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 V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#include "command.h" +#include "util/simpleserializer.h" + +Command::Command() +{ + resetToDefaults(); +} + +Command::~Command() +{} + +void Command::resetToDefaults() +{ + m_group = "default"; + m_description = "no name"; + m_command = ""; + m_argString = ""; + m_pressKey = static_cast(0); + m_releaseKey = static_cast(0); +} + +QByteArray Command::serialize() const +{ + SimpleSerializer s(1); + + s.writeString(1, m_group); + s.writeString(2, m_description); + s.writeString(3, m_command); + s.writeString(4, m_argString); + s.writeS32(5, (int) m_pressKey); + s.writeS32(6, (int) m_releaseKey); + + return s.final(); +} + + +bool Command::deserialize(const QByteArray& data) +{ + SimpleDeserializer d(data); + + if (!d.isValid()) + { + resetToDefaults(); + return false; + } + + if (d.getVersion() == 1) + { + int tmpInt; + + d.readString(1, &m_group, "default"); + d.readString(2, &m_description, "no name"); + d.readString(3, &m_command, ""); + d.readString(4, &m_argString, ""); + d.readS32(5, &tmpInt, 0); + m_pressKey = static_cast(tmpInt); + d.readS32(6, &tmpInt, 0); + m_releaseKey = static_cast(tmpInt); + + return true; + } + else + { + resetToDefaults(); + return false; + } +} diff --git a/sdrgui/commands/command.h b/sdrgui/commands/command.h new file mode 100644 index 000000000..cca9e0bc7 --- /dev/null +++ b/sdrgui/commands/command.h @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2018 Edouard Griffiths, F4EXB // +// // +// 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 as version 3 of the License, or // +// // +// 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 V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef SDRBASE_COMMANDS_COMMAND_H_ +#define SDRBASE_COMMANDS_COMMAND_H_ + +#include +#include +#include + +class Command +{ +public: + Command(); + ~Command(); + void resetToDefaults(); + + QByteArray serialize() const; + bool deserialize(const QByteArray& data); + + void setCommand(const QString& command) { m_command = command; } + const QString& getCommand() const { return m_command; } + void setArgString(const QString& argString) { m_argString = argString; } + const QString& getArgString() const { return m_argString; } + void setGroup(const QString& group) { m_group = group; } + const QString& getGroup() const { return m_group; } + void setDescription(const QString& description) { m_description = description; } + const QString& getDescription() const { return m_description; } + void setPressKey(Qt::Key key) { m_pressKey = key; } + Qt::Key getPressKey() const { return m_pressKey; } + void setReleaseKey(Qt::Key key) { m_releaseKey = key; } + Qt::Key getReleaseKey() const { return m_releaseKey; } + +private: + QString m_command; + QString m_argString; + QString m_group; + QString m_description; + Qt::Key m_pressKey; + Qt::Key m_releaseKey; +}; + + + +#endif /* SDRBASE_COMMANDS_COMMAND_H_ */ diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index ddde9df5e..2456dcf55 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -104,23 +104,28 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse removeDockWidget(ui->inputSelectDock); removeDockWidget(ui->spectraDisplayDock); removeDockWidget(ui->presetDock); + removeDockWidget(ui->commandsDock); removeDockWidget(ui->channelDock); addDockWidget(Qt::LeftDockWidgetArea, ui->inputViewDock); addDockWidget(Qt::LeftDockWidgetArea, ui->inputSelectDock); addDockWidget(Qt::LeftDockWidgetArea, ui->spectraDisplayDock); addDockWidget(Qt::LeftDockWidgetArea, ui->presetDock); + addDockWidget(Qt::LeftDockWidgetArea, ui->commandsDock); + tabifyDockWidget(ui->presetDock, ui->commandsDock); addDockWidget(Qt::RightDockWidgetArea, ui->channelDock); ui->inputViewDock->show(); ui->inputSelectDock->show(); ui->spectraDisplayDock->show(); ui->presetDock->show(); + ui->commandsDock->show(); ui->channelDock->show(); ui->menu_Window->addAction(ui->inputViewDock->toggleViewAction()); ui->menu_Window->addAction(ui->inputSelectDock->toggleViewAction()); ui->menu_Window->addAction(ui->spectraDisplayDock->toggleViewAction()); ui->menu_Window->addAction(ui->presetDock->toggleViewAction()); + ui->menu_Window->addAction(ui->commandsDock->toggleViewAction()); ui->menu_Window->addAction(ui->channelDock->toggleViewAction()); ui->tabInputsView->setStyleSheet("QWidget { background: rgb(50,50,50); } " diff --git a/sdrgui/mainwindow.ui b/sdrgui/mainwindow.ui index 1709e7756..876147771 100644 --- a/sdrgui/mainwindow.ui +++ b/sdrgui/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 1012 - 767 + 721 @@ -391,40 +391,6 @@ - - - - 10 - - - true - - - 5 - - - - Freq (MHz) - - - Center frequency in MHz - - - - - M - - - Mode: R: Rx or source, T: Tx or sink - - - - - Description - - - - @@ -519,6 +485,40 @@ + + + + 10 + + + true + + + 5 + + + + Freq (MHz) + + + Center frequency in MHz + + + + + M + + + Mode: R: Rx or source, T: Tx or sink + + + + + Description + + + + @@ -559,6 +559,163 @@ + + + Commands + + + 1 + + + + + 3 + + + 2 + + + 2 + + + 2 + + + 2 + + + + + 5 + + + true + + + 3 + + + 5 + + + + Description + + + + + Key press + + + + + Key release + + + + + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + Edit command details + + + + + + + :/edit.png:/edit.png + + + + + + + Run command + + + + + + + :/play.png:/play.png + + + + + + + View last run output + + + + + + + :/listing.png:/listing.png + + + + + + + Save commands in settings + + + + + + + :/preset-last.png:/preset-last.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Delete selected command + + + + + + + :/preset-delete.png:/preset-delete.png + + + + + + + + E&xit @@ -699,6 +856,7 @@ presetDock channelDock + commandsDock diff --git a/sdrgui/resources/edit.png b/sdrgui/resources/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..7ff556af1ec3d1eaa1470dafea738b75fb2b01c8 GIT binary patch literal 398 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHiPTGna+pyEpq;7#J9(JzX3_JdWR;y4Q=@QKa>}3-dt% z!&YCZwJaZ1YbM$_-#bup&CHBT=?2H5-lmA|QWnK1wbn%k<$dP=&B@!SH#v6Z&4wo- zo6FPpSAV;Ay64M%RvqT_0~{~TF#S7|KX=N^1o8d5Ha?IFVAnd(tnbWI!&<=-*I3#e zoBpGE;fGxZ8HKXntlGPK`;X9`&yCBah z9eGV(uzldmx%t_VtxlxcDo;9t$Hch4NbpUK*W3M#zTMkT@3P1X=2SEDA-QabKgNpx2s$Gca|kC(J$yS_Lp6~()i~**XP!kEBo3V^sV?FDQ$RU zS><@ni|>w6Vu1X%zb@u~CR=)2GTzzc*c@7|6Xiy>iTrazwnaAB}L)!*%Qs!>L0gPi+x}g XbQQ7i@z=Kn1{Q;-tDnm{r-UW|TZfY4 literal 0 HcmV?d00001 diff --git a/sdrgui/resources/res.qrc b/sdrgui/resources/res.qrc index a085780ff..cf629361b 100644 --- a/sdrgui/resources/res.qrc +++ b/sdrgui/resources/res.qrc @@ -82,5 +82,7 @@ clocksource.png flip_sidebands.png filter_highpass.png + edit.png + listing.png