Browse Source
POST /sdrangel/workspace/{workspaceIndex}/actions with a WorkspaceActions body whose action
is one of cascade, tile, stackVertical, stack, autostack or tab, doing what the workspace
toolbar buttons do. The one-shot arrangements switch tabbed windows off first; autostack and
tab set the corresponding option. The SWG class is written by hand to match the yaml, as the
code generator was not run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
chirpmodem-v8.0.0
14 changed files with 511 additions and 0 deletions
@ -0,0 +1,110 @@
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- |
||||
* |
||||
* OpenAPI spec version: 7.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGWorkspaceActions.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGWorkspaceActions::SWGWorkspaceActions(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGWorkspaceActions::SWGWorkspaceActions() { |
||||
arrange = nullptr; |
||||
m_arrange_isSet = false; |
||||
} |
||||
|
||||
SWGWorkspaceActions::~SWGWorkspaceActions() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGWorkspaceActions::init() { |
||||
arrange = new QString(""); |
||||
m_arrange_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGWorkspaceActions::cleanup() { |
||||
if(arrange != nullptr) { |
||||
delete arrange; |
||||
} |
||||
} |
||||
|
||||
SWGWorkspaceActions* |
||||
SWGWorkspaceActions::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGWorkspaceActions::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&arrange, pJson["arrange"], "QString", "QString"); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGWorkspaceActions::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGWorkspaceActions::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(arrange != nullptr && *arrange != QString("")){ |
||||
toJsonValue(QString("arrange"), arrange, obj, QString("QString")); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGWorkspaceActions::getArrange() { |
||||
return arrange; |
||||
} |
||||
void |
||||
SWGWorkspaceActions::setArrange(QString* arrange) { |
||||
this->arrange = arrange; |
||||
this->m_arrange_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGWorkspaceActions::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(arrange && *arrange != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- |
||||
* |
||||
* OpenAPI spec version: 7.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGWorkspaceActions.h |
||||
* |
||||
* Actions on a workspace |
||||
*/ |
||||
|
||||
#ifndef SWGWorkspaceActions_H_ |
||||
#define SWGWorkspaceActions_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGWorkspaceActions: public SWGObject { |
||||
public: |
||||
SWGWorkspaceActions(); |
||||
SWGWorkspaceActions(QString* json); |
||||
virtual ~SWGWorkspaceActions(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGWorkspaceActions* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getArrange(); |
||||
void setArrange(QString* arrange); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* arrange; |
||||
bool m_arrange_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGWorkspaceActions_H_ */ |
||||
Loading…
Reference in new issue