| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | // Copyright (C) 2020 Edouard Griffiths, F4EXB                                   //
 | 
					
						
							|  |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // This program is free software; you can redistribute it and/or modify          //
 | 
					
						
							|  |  |  | // it under the terms of the GNU General Public License as published by          //
 | 
					
						
							|  |  |  | // the Free Software Foundation as version 3 of the License, or                  //
 | 
					
						
							|  |  |  | // (at your option) any later version.                                           //
 | 
					
						
							|  |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful,               //
 | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of                //
 | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                  //
 | 
					
						
							|  |  |  | // GNU General Public License V3 for more details.                               //
 | 
					
						
							|  |  |  | //                                                                               //
 | 
					
						
							|  |  |  | // You should have received a copy of the GNU General Public License             //
 | 
					
						
							|  |  |  | // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
					
						
							|  |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-04 10:23:52 +02:00
										 |  |  | #include "gui/workspace.h"
 | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | #include "plugin/pluginapi.h"
 | 
					
						
							|  |  |  | #include "settings/featuresetpreset.h"
 | 
					
						
							|  |  |  | #include "feature/featureutils.h"
 | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  | #include "feature/featureset.h"
 | 
					
						
							| 
									
										
										
										
											2020-10-03 05:26:07 +02:00
										 |  |  | #include "feature/feature.h"
 | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  | #include "feature/featuregui.h"
 | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "featureuiset.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  | FeatureUISet::FeatureUISet(int tabIndex, FeatureSet *featureSet) | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     m_featureTabIndex = tabIndex; | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  |     m_featureSet = featureSet; | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FeatureUISet::~FeatureUISet() | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2020-10-04 10:30:49 +02:00
										 |  |  |     freeFeatures(); | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-16 08:35:06 +02:00
										 |  |  | void FeatureUISet::registerFeatureInstance(FeatureGUI* featureGUI, Feature *feature) | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2020-10-16 08:35:06 +02:00
										 |  |  |     m_featureInstanceRegistrations.append(FeatureInstanceRegistration(featureGUI, feature)); | 
					
						
							|  |  |  |     m_featureSet->addFeatureInstance(feature); | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  |     QObject::connect( | 
					
						
							|  |  |  |         featureGUI, | 
					
						
							|  |  |  |         &FeatureGUI::closing, | 
					
						
							|  |  |  |         this, | 
					
						
							| 
									
										
										
										
											2020-10-04 19:07:42 +02:00
										 |  |  |         [=](){ this->handleClosingFeatureGUI(featureGUI); }, | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  |         Qt::QueuedConnection | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | // sort by name
 | 
					
						
							|  |  |  | bool FeatureUISet::FeatureInstanceRegistration::operator<(const FeatureInstanceRegistration& other) const | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2020-10-03 11:43:14 +02:00
										 |  |  |     if (m_feature && other.m_feature) { | 
					
						
							|  |  |  |         return m_feature->getName() < other.m_feature->getName(); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  |     } else { | 
					
						
							|  |  |  |         return false; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | void FeatureUISet::freeFeatures() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     for(int i = 0; i < m_featureInstanceRegistrations.count(); i++) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         qDebug("FeatureUISet::freeFeatures: destroying feature [%s]", | 
					
						
							|  |  |  |             qPrintable(m_featureInstanceRegistrations.at(i).m_feature->getURI()) | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |         m_featureInstanceRegistrations.at(i).m_gui->destroy(); | 
					
						
							| 
									
										
										
										
											2022-07-22 03:25:14 +02:00
										 |  |  |         m_featureInstanceRegistrations.at(i).m_feature->destroy(); | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |     m_featureInstanceRegistrations.clear(); | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  |     m_featureSet->clearFeatures(); | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void FeatureUISet::deleteFeature(int featureIndex) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if ((featureIndex >= 0) && (featureIndex < m_featureInstanceRegistrations.count())) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         qDebug("FeatureUISet::deleteFeature: delete feature [%s] at %d", | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |             qPrintable(m_featureInstanceRegistrations.at(featureIndex).m_feature->getURI()), | 
					
						
							|  |  |  |             featureIndex | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |         m_featureInstanceRegistrations.at(featureIndex).m_gui->destroy(); | 
					
						
							| 
									
										
										
										
											2022-07-22 03:25:14 +02:00
										 |  |  |         m_featureInstanceRegistrations.at(featureIndex).m_feature->destroy(); | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         m_featureInstanceRegistrations.removeAt(featureIndex); | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  |         m_featureSet->removeFeatureInstanceAt(featureIndex); | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-04-12 16:20:45 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Renumerate
 | 
					
						
							|  |  |  |     for (int i = 0; i < m_featureInstanceRegistrations.count(); i++) { | 
					
						
							|  |  |  |         m_featureInstanceRegistrations.at(i).m_gui->setIndex(i); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-09-20 01:06:34 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-09-21 03:13:36 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | const Feature *FeatureUISet::getFeatureAt(int featureIndex) const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if ((featureIndex >= 0) && (featureIndex < m_featureInstanceRegistrations.count())) { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         return m_featureInstanceRegistrations.at(featureIndex).m_feature; | 
					
						
							| 
									
										
										
										
											2020-09-21 03:13:36 +02:00
										 |  |  |     } else{ | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Feature *FeatureUISet::getFeatureAt(int featureIndex) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if ((featureIndex >= 0) && (featureIndex < m_featureInstanceRegistrations.count())) { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         return m_featureInstanceRegistrations.at(featureIndex).m_feature; | 
					
						
							| 
									
										
										
										
											2020-09-21 03:13:36 +02:00
										 |  |  |     } else{ | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  | const FeatureGUI *FeatureUISet::getFeatureGuiAt(int featureIndex) const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if ((featureIndex >= 0) && (featureIndex < m_featureInstanceRegistrations.count())) { | 
					
						
							|  |  |  |         return m_featureInstanceRegistrations.at(featureIndex).m_gui; | 
					
						
							|  |  |  |     } else{ | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FeatureGUI *FeatureUISet::getFeatureGuiAt(int featureIndex) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if ((featureIndex >= 0) && (featureIndex < m_featureInstanceRegistrations.count())) { | 
					
						
							|  |  |  |         return m_featureInstanceRegistrations.at(featureIndex).m_gui; | 
					
						
							|  |  |  |     } else{ | 
					
						
							|  |  |  |         return nullptr; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-04 10:23:52 +02:00
										 |  |  | void FeatureUISet::loadFeatureSetSettings( | 
					
						
							|  |  |  |     const FeatureSetPreset *preset, | 
					
						
							|  |  |  |     PluginAPI *pluginAPI, | 
					
						
							|  |  |  |     WebAPIAdapterInterface *apiAdapter, | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |     QList<Workspace*> *workspaces, | 
					
						
							|  |  |  |     Workspace *currentWorkspace | 
					
						
							| 
									
										
										
										
											2022-04-04 10:23:52 +02:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |     qDebug("FeatureUISet::loadFeatureSetSettings: Loading preset [%s | %s]", | 
					
						
							|  |  |  |         qPrintable(preset->getGroup()), | 
					
						
							|  |  |  |         qPrintable(preset->getDescription()) | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Available feature plugins
 | 
					
						
							|  |  |  |     PluginAPI::FeatureRegistrations *featureRegistrations = pluginAPI->getFeatureRegistrations(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // copy currently open features and clear list
 | 
					
						
							|  |  |  |     FeatureInstanceRegistrations openFeatures = m_featureInstanceRegistrations; | 
					
						
							|  |  |  |     m_featureInstanceRegistrations.clear(); | 
					
						
							| 
									
										
										
										
											2020-10-11 00:22:42 +02:00
										 |  |  |     m_featureSet->clearFeatures(); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     for (int i = 0; i < openFeatures.count(); i++) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         qDebug("FeatureUISet::loadFeatureSetSettings: destroying old feature [%s]", | 
					
						
							|  |  |  |             qPrintable(openFeatures.at(i).m_feature->getURI()) | 
					
						
							|  |  |  |         ); | 
					
						
							| 
									
										
										
										
											2020-10-04 10:30:49 +02:00
										 |  |  |         openFeatures[i].m_feature->destroy(); | 
					
						
							| 
									
										
										
										
											2021-04-21 12:28:56 +02:00
										 |  |  |         openFeatures[i].m_gui->destroy(); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qDebug("FeatureUISet::loadFeatureSetSettings: %d feature(s) in preset", preset->getFeatureCount()); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for (int i = 0; i < preset->getFeatureCount(); i++) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         const FeatureSetPreset::FeatureConfig& featureConfig = preset->getFeatureConfig(i); | 
					
						
							| 
									
										
										
										
											2020-10-05 16:28:58 +02:00
										 |  |  |         FeatureGUI *featureGUI = nullptr; | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |         Feature *feature = nullptr; | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         // create feature instance
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         for(int i = 0; i < featureRegistrations->count(); i++) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             if (FeatureUtils::compareFeatureURIs((*featureRegistrations)[i].m_featureIdURI, featureConfig.m_featureIdURI)) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 qDebug("FeatureUISet::loadFeatureSetSettings: creating new feature [%s] from config [%s]", | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |                     qPrintable((*featureRegistrations)[i].m_featureIdURI), | 
					
						
							|  |  |  |                     qPrintable(featureConfig.m_featureIdURI) | 
					
						
							|  |  |  |                 ); | 
					
						
							| 
									
										
										
										
											2022-04-18 12:08:33 +02:00
										 |  |  |                 PluginInterface *pluginInterface = (*featureRegistrations)[i].m_plugin; | 
					
						
							|  |  |  |                 feature = pluginInterface->createFeature(apiAdapter); | 
					
						
							|  |  |  |                 featureGUI = pluginInterface->createFeatureGUI(this, feature); | 
					
						
							| 
									
										
										
										
											2020-10-16 08:35:06 +02:00
										 |  |  |                 registerFeatureInstance(featureGUI, feature); | 
					
						
							| 
									
										
										
										
											2022-04-18 12:08:33 +02:00
										 |  |  |                 featureGUI->setDisplayedame(pluginInterface->getPluginDescriptor().displayedName); | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |                 break; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if (featureGUI) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             qDebug("FeatureUISet::loadFeatureSetSettings: deserializing feature [%s]", | 
					
						
							|  |  |  |                 qPrintable(featureConfig.m_featureIdURI)); | 
					
						
							|  |  |  |             featureGUI->deserialize(featureConfig.m_config); | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |             featureGUI->setIndex(feature->getIndexInFeatureSet()); | 
					
						
							|  |  |  |             int originalWorkspaceIndex = featureGUI->getWorkspaceIndex(); | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |             if (workspaces && (workspaces->size() > 0) && (originalWorkspaceIndex < workspaces->size())) // restore in original workspace
 | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |             { | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |                 (*workspaces)[originalWorkspaceIndex]->addToMdiArea((QMdiSubWindow*) featureGUI); | 
					
						
							|  |  |  |                 featureGUI->restoreGeometry(featureGUI->getGeometryBytes()); | 
					
						
							| 
									
										
										
										
											2022-11-03 19:00:13 +01:00
										 |  |  |                 featureGUI->getRollupContents()->arrangeRollups(); | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |             else if (currentWorkspace) // restore in current workspace
 | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |             { | 
					
						
							| 
									
										
										
										
											2022-04-09 13:38:22 +02:00
										 |  |  |                 featureGUI->setWorkspaceIndex(currentWorkspace->getIndex()); | 
					
						
							|  |  |  |                 currentWorkspace->addToMdiArea((QMdiSubWindow*) featureGUI); | 
					
						
							|  |  |  |                 featureGUI->restoreGeometry(featureGUI->getGeometryBytes()); | 
					
						
							| 
									
										
										
										
											2022-11-03 19:00:13 +01:00
										 |  |  |                 featureGUI->getRollupContents()->arrangeRollups(); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void FeatureUISet::saveFeatureSetSettings(FeatureSetPreset *preset) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     for (int i = 0; i < m_featureInstanceRegistrations.count(); i++) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         qDebug("FeatureUISet::saveFeatureSetSettings: saving feature [%s]", | 
					
						
							|  |  |  |             qPrintable(m_featureInstanceRegistrations.at(i).m_feature->getURI()) | 
					
						
							|  |  |  |         ); | 
					
						
							| 
									
										
										
										
											2022-04-05 16:26:57 +02:00
										 |  |  |         FeatureGUI *featureGUI = m_featureInstanceRegistrations.at(i).m_gui; | 
					
						
							|  |  |  |         featureGUI->setGeometryBytes(featureGUI->saveGeometry()); | 
					
						
							| 
									
										
										
										
											2021-11-26 08:41:42 +01:00
										 |  |  |         preset->addFeature( | 
					
						
							|  |  |  |             m_featureInstanceRegistrations.at(i).m_feature->getURI(), | 
					
						
							|  |  |  |             m_featureInstanceRegistrations.at(i).m_gui->serialize() | 
					
						
							|  |  |  |         ); | 
					
						
							| 
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-04 19:07:42 +02:00
										 |  |  | void FeatureUISet::handleClosingFeatureGUI(FeatureGUI *featureGUI) | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2020-10-04 19:07:42 +02:00
										 |  |  |     for (FeatureInstanceRegistrations::iterator it = m_featureInstanceRegistrations.begin(); it != m_featureInstanceRegistrations.end(); ++it) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         if (it->m_gui == featureGUI) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2022-07-22 03:25:14 +02:00
										 |  |  |             Feature *feature = it->m_feature; | 
					
						
							|  |  |  |             m_featureSet->removeFeatureInstance(feature); | 
					
						
							|  |  |  |             QObject::connect( | 
					
						
							|  |  |  |                 featureGUI, | 
					
						
							|  |  |  |                 &FeatureGUI::destroyed, | 
					
						
							|  |  |  |                 this, | 
					
						
							|  |  |  |                 [this, feature](){ this->handleDeleteFeature(feature); } | 
					
						
							|  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2020-10-04 19:07:42 +02:00
										 |  |  |             m_featureInstanceRegistrations.erase(it); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2022-04-12 16:20:45 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Renumerate
 | 
					
						
							|  |  |  |     for (int i = 0; i < m_featureInstanceRegistrations.count(); i++) { | 
					
						
							|  |  |  |         m_featureInstanceRegistrations.at(i).m_gui->setIndex(i); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-10-03 23:55:24 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-07-22 03:25:14 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | void FeatureUISet::handleDeleteFeature(Feature *feature) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     feature->destroy(); | 
					
						
							|  |  |  | } |