mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:20:06 +00:00
Replace radar site table view with tree view
This commit is contained in:
parent
9e3c525109
commit
4e514ee152
2 changed files with 18 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "./ui_radar_site_dialog.h"
|
||||
|
||||
#include <scwx/qt/model/radar_site_model.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
|
|
@ -10,6 +11,9 @@ namespace qt
|
|||
namespace ui
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "scwx::qt::ui::radar_site_dialog";
|
||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||
|
||||
class RadarSiteDialogImpl
|
||||
{
|
||||
public:
|
||||
|
|
@ -24,7 +28,13 @@ RadarSiteDialog::RadarSiteDialog(QWidget* parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->radarSiteView->setModel(new model::RadarSiteModel(this));
|
||||
model::RadarSiteModel* radarSiteModel = new model::RadarSiteModel(this);
|
||||
ui->radarSiteView->setModel(radarSiteModel);
|
||||
|
||||
for (int column = 0; column < radarSiteModel->columnCount(); column++)
|
||||
{
|
||||
ui->radarSiteView->resizeColumnToContents(column);
|
||||
}
|
||||
}
|
||||
|
||||
RadarSiteDialog::~RadarSiteDialog()
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>470</width>
|
||||
<height>550</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -15,7 +15,11 @@
|
|||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableView" name="radarSiteView"/>
|
||||
<widget class="QTreeView" name="radarSiteView">
|
||||
<property name="indentation">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue