Memory editor as independent window

creator-widgets
Elliott Liggett 2024-02-05 12:06:50 -08:00
rodzic fbbeef67cc
commit b37dfe201b
4 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -5,7 +5,7 @@
#include "ui_memories.h"
memories::memories(rigCapabilities rigCaps, bool slowLoad, QWidget *parent) :
QDialog(parent),
QWidget(parent),
slowLoad(slowLoad),
rigCaps(rigCaps),
ui(new Ui::memories)

Wyświetl plik

@ -1,7 +1,7 @@
#ifndef MEMORIES_H
#define MEMORIES_H
#include <QDialog>
#include <QWidget>
#include <QItemDelegate>
#include <QStandardItem>
#include <QStandardItemModel>
@ -24,7 +24,7 @@ namespace Ui {
class memories;
}
class memories : public QDialog
class memories : public QWidget
{
Q_OBJECT

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>memories</class>
<widget class="QDialog" name="memories">
<widget class="QWidget" name="memories">
<property name="geometry">
<rect>
<x>0</x>

Wyświetl plik

@ -5224,6 +5224,7 @@ void wfmain::connectionHandler(bool connect)
// Whatever happened, make sure we delete the memories window.
if (memWindow != Q_NULLPTR) {
memWindow->close();
delete memWindow;
memWindow = Q_NULLPTR;
}
@ -5249,7 +5250,7 @@ void wfmain::on_memoriesBtn_clicked()
if (haveRigCaps) {
if (memWindow == Q_NULLPTR) {
// Add slowload option for background loading.
memWindow = new memories(rigCaps,false,this);
memWindow = new memories(rigCaps,false);
this->memWindow->connect(this, SIGNAL(haveMemory(memoryType)), memWindow, SLOT(receiveMemory(memoryType)));
this->memWindow->connect(this->memWindow, &memories::getMemory, rig,[=](const quint32 &mem) {