mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:00:04 +00:00 
			
		
		
		
	Commit line settings changes on apply
This commit is contained in:
		
							parent
							
								
									8212d24d34
								
							
						
					
					
						commit
						6b0aaea773
					
				
					 5 changed files with 53 additions and 0 deletions
				
			
		|  | @ -19,6 +19,7 @@ public: | |||
|    explicit Impl() {} | ||||
|    ~Impl() = default; | ||||
| 
 | ||||
|    std::vector<settings::SettingsCategory*>      categories_; | ||||
|    std::vector<settings::SettingsInterfaceBase*> settings_; | ||||
| }; | ||||
| 
 | ||||
|  | @ -29,6 +30,12 @@ SettingsPageWidget::SettingsPageWidget(QWidget* parent) : | |||
| 
 | ||||
| SettingsPageWidget::~SettingsPageWidget() = default; | ||||
| 
 | ||||
| void SettingsPageWidget::AddSettingsCategory( | ||||
|    settings::SettingsCategory* category) | ||||
| { | ||||
|    p->categories_.push_back(category); | ||||
| } | ||||
| 
 | ||||
| void SettingsPageWidget::AddSettingsInterface( | ||||
|    settings::SettingsInterfaceBase* setting) | ||||
| { | ||||
|  | @ -39,6 +46,11 @@ bool SettingsPageWidget::CommitChanges() | |||
| { | ||||
|    bool committed = false; | ||||
| 
 | ||||
|    for (auto& category : p->categories_) | ||||
|    { | ||||
|       committed |= category->Commit(); | ||||
|    } | ||||
| 
 | ||||
|    for (auto& setting : p->settings_) | ||||
|    { | ||||
|       committed |= setting->Commit(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat