mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 05:00:05 +00:00 
			
		
		
		
	Add reset button to layer manager
This commit is contained in:
		
							parent
							
								
									f222b4f666
								
							
						
					
					
						commit
						dd7bfc7a6f
					
				
					 4 changed files with 50 additions and 1 deletions
				
			
		|  | @ -4,6 +4,7 @@ | |||
| #include <scwx/qt/model/layer_model.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #include <QPushButton> | ||||
| #include <QSortFilterProxyModel> | ||||
| 
 | ||||
| namespace scwx | ||||
|  | @ -82,6 +83,12 @@ LayerDialog::~LayerDialog() | |||
| 
 | ||||
| void LayerDialogImpl::ConnectSignals() | ||||
| { | ||||
|    QObject::connect( | ||||
|       self_->ui->buttonBox->button(QDialogButtonBox::StandardButton::Reset), | ||||
|       &QAbstractButton::clicked, | ||||
|       self_, | ||||
|       [this]() { layerModel_->ResetLayers(); }); | ||||
| 
 | ||||
|    QObject::connect(self_->ui->layerFilter, | ||||
|                     &QLineEdit::textChanged, | ||||
|                     layerProxyModel_, | ||||
|  |  | |||
|  | @ -200,11 +200,17 @@ | |||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QDialogButtonBox" name="buttonBox"> | ||||
|         <property name="sizePolicy"> | ||||
|          <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> | ||||
|           <horstretch>0</horstretch> | ||||
|           <verstretch>0</verstretch> | ||||
|          </sizepolicy> | ||||
|         </property> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Horizontal</enum> | ||||
|         </property> | ||||
|         <property name="standardButtons"> | ||||
|          <set>QDialogButtonBox::Close</set> | ||||
|          <set>QDialogButtonBox::Close|QDialogButtonBox::Reset</set> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat