![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtVrfSimulationMenuItem.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00011 00013 00014 #pragma once 00015 00016 #include <vrfGuiCoreQt/vrfGuiCoreQt.h> 00017 #include <vrvCore/DtDe.h> 00018 #include <vrvCoreQt/DtMenuItem.h> 00019 00020 #include <QtGui/QAction> 00021 00022 namespace makVrf 00023 { 00024 class DtVrfBackendState; 00025 00026 class DT_DLL_VRFGUICOREQT DtVrfSimulationMenuItem : public QAction 00027 { 00028 Q_OBJECT 00029 00030 public: 00031 enum DtVrfSimMenuItemValidations 00032 { 00033 DtAlwaysEnabled = 0, 00034 DtAnyBackendsPresent = 1, 00035 DtAnyBackendsLoaded = 2, 00036 DtAnyBackendsPlaying = 3, 00037 DtAllBackendsCanSimulate = 4, 00038 DtSelectedBackendLoaded = 5, 00039 DtTerrainLoadedOnly = 6, 00040 DtCustomValidation = 100 00041 }; 00042 00043 public: 00044 //CTOR 00045 DtVrfSimulationMenuItem(makVrv::DtDe& de, QWidget* parent, DtVrfSimMenuItemValidations = DtVrfSimulationMenuItem::DtAlwaysEnabled); 00046 00047 //DTOR 00048 virtual ~DtVrfSimulationMenuItem(); 00049 00050 virtual void setCheckTerrainLoaded(bool); 00051 bool checkTerrainLoaded() const 00052 { 00053 return myCheckTerrainLoaded; 00054 } 00055 00057 virtual void evaluate(); 00058 00059 protected: 00061 virtual void setFlags(DtVrfSimMenuItemValidations); 00062 const DtVrfSimMenuItemValidations& flags() const 00063 { 00064 return myFlags; 00065 } 00066 00067 virtual void slot_terrainPatchToBeDeleted(); 00068 00069 virtual bool terrainLoaded(int terrainCountOffset = 0) const; 00070 00071 protected: 00072 virtual void validate(int terrainPatchOffset = 0); 00073 00074 virtual void slot_backendUpdated(const DtVrfBackendState&, int); 00075 00076 virtual void customValidation(int terrainPatchOffset = 0); 00077 00078 protected: 00079 makVrv::DtDe& myDe; 00080 DtVrfSimMenuItemValidations myFlags; 00081 bool myCheckTerrainLoaded; 00082 bool myCheckSessionJoined; 00083 }; 00084 }