mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 15:30:04 +00:00 
			
		
		
		
	Add NMEA to settings dialog
This commit is contained in:
		
							parent
							
								
									b7a258d143
								
							
						
					
					
						commit
						8270153957
					
				
					 4 changed files with 412 additions and 475 deletions
				
			
		|  | @ -12,36 +12,6 @@ | |||
| #include <QToolButton> | ||||
| #include <QVBoxLayout> | ||||
| 
 | ||||
| #define SCWX_SETTINGS_COMBO_BOX(settingsInterface, comboBox, Iterator, ToName) \ | ||||
|    for (const auto& enumValue : Iterator)                                      \ | ||||
|    {                                                                           \ | ||||
|       comboBox->addItem(QString::fromStdString(ToName(enumValue)));            \ | ||||
|    }                                                                           \ | ||||
|                                                                                \ | ||||
|    settingsInterface.SetMapFromValueFunction(                                  \ | ||||
|       [](const std::string& text) -> std::string                               \ | ||||
|       {                                                                        \ | ||||
|          for (const auto& enumValue : Iterator)                                \ | ||||
|          {                                                                     \ | ||||
|             const std::string valueName = ToName(enumValue);                   \ | ||||
|                                                                                \ | ||||
|             if (boost::iequals(text, valueName))                               \ | ||||
|             {                                                                  \ | ||||
|                return valueName;                                               \ | ||||
|             }                                                                  \ | ||||
|          }                                                                     \ | ||||
|                                                                                \ | ||||
|          return "?";                                                           \ | ||||
|       });                                                                      \ | ||||
|    settingsInterface.SetMapToValueFunction(                                    \ | ||||
|       [](std::string text) -> std::string                                      \ | ||||
|       {                                                                        \ | ||||
|          boost::to_lower(text);                                                \ | ||||
|          return text;                                                          \ | ||||
|       });                                                                      \ | ||||
|                                                                                \ | ||||
|    settingsInterface.SetEditWidget(comboBox); | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat