mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
Implementation of some SCPI commands via TCP
This commit is contained in:
parent
f1d52f159b
commit
a15d02f217
15 changed files with 627 additions and 19 deletions
|
|
@ -22,6 +22,7 @@ JSONPickerDialog::~JSONPickerDialog()
|
|||
JSONModel::JSONModel(const nlohmann::json &json, QObject *parent) :
|
||||
json(json)
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
setupJsonInfo(json);
|
||||
}
|
||||
|
||||
|
|
@ -97,6 +98,7 @@ int JSONModel::rowCount(const QModelIndex &parent) const
|
|||
|
||||
int JSONModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent)
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
@ -133,11 +135,15 @@ QVariant JSONModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
QVariant JSONModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
Q_UNUSED(section)
|
||||
Q_UNUSED(orientation)
|
||||
Q_UNUSED(role)
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool JSONModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
Q_UNUSED(value)
|
||||
nlohmann::json *item = static_cast<nlohmann::json*>(index.internalPointer());
|
||||
auto info = jsonInfo.at(item);
|
||||
if(role == Qt::CheckStateRole)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue