VR-Forces 4.0.4 Class Documentation
include/vrvGlStudioQt/DtCockpitMappingEditorLogic.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtCockpitMappingEditorLogic.h,v $ $Revision: 1.3 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvGlStudioQt/DtGlStudioQt.h>
00015 #include <vrvGlStudioShared/DtSharedCockpitSettings.h>
00016 #include <vrvUtil/DtSignalConnectionManager.h>
00017 #include <QtCore/QStringList>
00018 #include <vlpi/entityType.h>
00019 
00020 namespace makVrv
00021 {
00022    class DtDe;
00023    class DtEntityMappingEditorInterface;
00024    class DtEntityTypeMapEditorInterface;
00025    class DtEntityTypeMapper;
00026    class DtModelDefinition;
00027    class DtMultiMapEditorInterface;
00028    class DtPersistenceControlsInterface;
00029    class DtSettingsChangeObject;
00030    class DtSharedSimulationSettingsManager;
00031    class DtSharedCockpitSettings;
00032    class DtSharedCockpitTypeMapper;
00033    class DtUnicode;
00034 
00037    class DT_DLL_VRVGLSTUDIO_QT DtCockpitMappingEditorLogic
00038    {
00039    public:
00041       DtCockpitMappingEditorLogic( DtDe& de, 
00042          const std::string& definitionSchema,
00043          DtEntityMappingEditorInterface& editorInterface, 
00044          DtEntityTypeMapEditorInterface& entityTypeMapInterface,
00045          DtMultiMapEditorInterface& mapInterface,
00046          DtPersistenceControlsInterface& toolbarInterface);
00047 
00048       virtual ~DtCockpitMappingEditorLogic();
00049 
00050       virtual void rebuildDefinitions();
00051 
00052       DtEntityTypeMapper& currentMapper( DtWriteSettingsLock<DtSharedCockpitSettings>& settings );
00053       const DtEntityTypeMapper& currentMapper( const DtReadSettingsLock<DtSharedCockpitSettings>& settings)  const;      
00054 
00055       virtual void on_modelDefinitionAdded( const DtModelDefinition& definition );
00056       virtual void on_modelDefinitionToBeDestroyed( const DtModelDefinition& definition );
00057       virtual void modelDefinitionChanged(const DtSettingsChangeObject*);
00058 
00059    protected:
00060 
00061       void updatePossibleValues();
00062       void updateSettings();
00063       
00064       void refreshPage();
00065 
00066       void buildFiltersFromDefinitions();
00067 
00068       virtual void on_addValue(const std::string& name, 
00069          const std::string& value, int index);
00070       virtual void on_changeValue(const std::string& name, 
00071          const std::string& oldValue,const std::string& value, int index);
00072       virtual void on_deleteValue(const std::string& name,
00073          const std::string& value);
00074       virtual void on_renameValue(const std::string& oldName,
00075          const std::string& value,const std::string& newName);
00076 
00077       virtual void on_import();
00078       virtual void on_export();
00079       virtual void on_importFilePathChosen(const std::string& filePath);
00080       virtual void on_exportFilePathChosen(const std::string& filePath);      
00081       virtual void on_filterChanged(const DtUnicode& filter);
00082       virtual void on_lookupChanged(const std::string& filter);
00083       virtual void on_selectMatch();
00084 
00085       void entityTypeMappingsRestored(const DtSettingsBackup* s);
00086 
00087       void askForNewElementDefinitionForEntityType(std::string entType);
00088 
00089 
00090 
00091    protected:
00092       DtDe& myDe;      
00093       DtSignalConnectionManager myConnections;
00094       DtSharedSimulationSettingsManager& myManager;
00095       DtEntityMappingEditorInterface& myEditorInterface;
00096       DtEntityTypeMapEditorInterface& myEntityTypeMapInterface;
00097       DtMultiMapEditorInterface& myMapInterface;
00098       DtPersistenceControlsInterface& myToolbarInterface;
00099       QStringList myDefinitions;
00100       std::string myDefinitionSchema;
00101       DtEntityType myLookupType;
00102       DtSharedCockpitTypeMapper* myMapperObject;
00103    };
00104 } //makVrv::

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)