Radar site dialog

This commit is contained in:
Dan Paulat 2022-10-06 23:24:00 -05:00
parent 60a85a6b14
commit 9e3c525109
6 changed files with 162 additions and 4 deletions

View file

@ -0,0 +1,37 @@
#include "radar_site_dialog.hpp"
#include "./ui_radar_site_dialog.h"
#include <scwx/qt/model/radar_site_model.hpp>
namespace scwx
{
namespace qt
{
namespace ui
{
class RadarSiteDialogImpl
{
public:
explicit RadarSiteDialogImpl() {}
~RadarSiteDialogImpl() = default;
};
RadarSiteDialog::RadarSiteDialog(QWidget* parent) :
QDialog(parent),
p(std::make_unique<RadarSiteDialogImpl>()),
ui(new Ui::RadarSiteDialog)
{
ui->setupUi(this);
ui->radarSiteView->setModel(new model::RadarSiteModel(this));
}
RadarSiteDialog::~RadarSiteDialog()
{
delete ui;
}
} // namespace ui
} // namespace qt
} // namespace scwx

View file

@ -0,0 +1,34 @@
#pragma once
#include <QDialog>
namespace Ui
{
class RadarSiteDialog;
}
namespace scwx
{
namespace qt
{
namespace ui
{
class RadarSiteDialogImpl;
class RadarSiteDialog : public QDialog
{
Q_OBJECT
public:
explicit RadarSiteDialog(QWidget* parent = nullptr);
~RadarSiteDialog();
private:
std::unique_ptr<RadarSiteDialogImpl> p;
Ui::RadarSiteDialog* ui;
};
} // namespace ui
} // namespace qt
} // namespace scwx

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RadarSiteDialog</class>
<widget class="QDialog" name="RadarSiteDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Select Radar Site</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTableView" name="radarSiteView"/>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>RadarSiteDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>RadarSiteDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>