mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 21:30:05 +00:00 
			
		
		
		
	Add level 3 product selection
This commit is contained in:
		
							parent
							
								
									52bd14e6d5
								
							
						
					
					
						commit
						4325f352b1
					
				
					 1 changed files with 37 additions and 1 deletions
				
			
		|  | @ -63,7 +63,43 @@ public: | |||
|             for (size_t tilt = 1; tilt <= common::kLevel3ProductMaxTilts; | ||||
|                  ++tilt) | ||||
|             { | ||||
|                QAction* action = | ||||
|                   productMenu->addAction(tr("Tilt %1").arg(tilt)); | ||||
| 
 | ||||
|                QObject::connect( | ||||
|                   action, | ||||
|                   &QAction::triggered, | ||||
|                   this, | ||||
|                   [=]() | ||||
|                   { | ||||
|                      std::shared_lock lock {availableCategoryMutex_}; | ||||
| 
 | ||||
|                      // Find product map associated with current category
 | ||||
|                      auto productMapIt = availableCategoryMap_.find(category); | ||||
|                      if (productMapIt != availableCategoryMap_.cend()) | ||||
|                      { | ||||
|                         // Find tilt list associated with current product
 | ||||
|                         auto tiltListIt = productMapIt->second.find(product); | ||||
|                         if (tiltListIt != productMapIt->second.cend()) | ||||
|                         { | ||||
|                            // Find AWIPS product in tilt list
 | ||||
|                            if (tilt <= tiltListIt->second.size()) | ||||
|                            { | ||||
|                               std::string awipsProductName = | ||||
|                                  tiltListIt->second.at(tilt - 1); | ||||
| 
 | ||||
|                               self_->UpdateProductSelection( | ||||
|                                  common::RadarProductGroup::Level3, | ||||
|                                  awipsProductName); | ||||
| 
 | ||||
|                               emit self_->RadarProductSelected( | ||||
|                                  common::RadarProductGroup::Level3, | ||||
|                                  awipsProductName, | ||||
|                                  0); | ||||
|                            } | ||||
|                         } | ||||
|                      } | ||||
|                   }); | ||||
|             } | ||||
| 
 | ||||
|             productMenus[product] = productMenu; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat