mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:00:08 +00:00
Implementing default Radar Product Model methods
This commit is contained in:
parent
8abee4cda1
commit
b917e1a818
4 changed files with 33 additions and 4 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <scwx/qt/manager/radar_product_manager.hpp>
|
||||
#include <scwx/qt/manager/settings_manager.hpp>
|
||||
#include <scwx/qt/map/map_widget.hpp>
|
||||
#include <scwx/qt/model/radar_product_model.hpp>
|
||||
#include <scwx/qt/ui/flow_layout.hpp>
|
||||
#include <scwx/qt/ui/level2_products_widget.hpp>
|
||||
#include <scwx/qt/ui/level2_settings_widget.hpp>
|
||||
|
|
@ -140,6 +141,8 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||
// Configure Docks
|
||||
ui->resourceExplorerDock->setVisible(false);
|
||||
|
||||
ui->resourceTreeView->setModel(new model::RadarProductModel());
|
||||
|
||||
// Add Level 2 Products
|
||||
p->level2ProductsWidget_ = new ui::Level2ProductsWidget(this);
|
||||
ui->radarProductGroupBox->layout()->replaceWidget(ui->level2ProductFrame,
|
||||
|
|
|
|||
|
|
@ -232,7 +232,13 @@
|
|||
<attribute name="dockWidgetArea">
|
||||
<number>8</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents"/>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QTreeView" name="resourceTreeView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ class RadarProductModelImpl
|
|||
{
|
||||
public:
|
||||
explicit RadarProductModelImpl() {}
|
||||
|
||||
~RadarProductModelImpl() {}
|
||||
~RadarProductModelImpl() = default;
|
||||
};
|
||||
|
||||
RadarProductModel::RadarProductModel(QObject* parent) :
|
||||
|
|
@ -25,6 +24,22 @@ RadarProductModel::RadarProductModel(QObject* parent) :
|
|||
}
|
||||
RadarProductModel::~RadarProductModel() = default;
|
||||
|
||||
int RadarProductModel::rowCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RadarProductModel::columnCount(const QModelIndex& /*parent*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
QVariant RadarProductModel::data(const QModelIndex& /*index*/,
|
||||
int /*role*/) const
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
} // namespace model
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
|
|
|
|||
|
|
@ -13,12 +13,17 @@ namespace model
|
|||
|
||||
class RadarProductModelImpl;
|
||||
|
||||
class RadarProductModel : QAbstractTableModel
|
||||
class RadarProductModel : public QAbstractTableModel
|
||||
{
|
||||
public:
|
||||
explicit RadarProductModel(QObject* parent = nullptr);
|
||||
~RadarProductModel();
|
||||
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex& index,
|
||||
int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<RadarProductModelImpl> p;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue