mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:10:05 +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
				
			
		|  | @ -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
	
	 Dan Paulat
						Dan Paulat