mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 14:10:05 +00:00 
			
		
		
		
	Alert active filter and sorting
This commit is contained in:
		
							parent
							
								
									7ef3cb8347
								
							
						
					
					
						commit
						6e5cc555f2
					
				
					 6 changed files with 208 additions and 46 deletions
				
			
		
							
								
								
									
										38
									
								
								scwx-qt/source/scwx/qt/model/alert_proxy_model.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								scwx-qt/source/scwx/qt/model/alert_proxy_model.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <memory> | ||||
| 
 | ||||
| #include <QSortFilterProxyModel> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace model | ||||
| { | ||||
| 
 | ||||
| class AlertProxyModelImpl; | ||||
| 
 | ||||
| class AlertProxyModel : public QSortFilterProxyModel | ||||
| { | ||||
| private: | ||||
|    Q_DISABLE_COPY(AlertProxyModel) | ||||
| 
 | ||||
| public: | ||||
|    explicit AlertProxyModel(QObject* parent = nullptr); | ||||
|    ~AlertProxyModel(); | ||||
| 
 | ||||
|    void SetAlertActiveFilter(bool enabled); | ||||
| 
 | ||||
|    bool filterAcceptsRow(int                sourceRow, | ||||
|                          const QModelIndex& sourceParent) const override; | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<AlertProxyModelImpl> p; | ||||
| 
 | ||||
|    friend class AlertProxyModelImpl; | ||||
| }; | ||||
| 
 | ||||
| } // namespace model
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat