VR-Forces 4.0.4 Class Documentation
include/vrfGuiCoreQt/DtSimulationCommandChangeHostility.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2009 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtSimulationCommandChangeHostility.h,v $ $Revision: 108016 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00013 
00014 #pragma once
00015 
00016 #include <vrfGuiCoreQt/vrfGuiCoreQt.h>
00017 #include <vrfGuiCoreQt/DtSimulationCommandDialogInterface.h>
00018 
00019 class DtChangeHostilityCommand;
00020 
00021 class QWidget;
00022 class QGridLayout;
00023 class QLabel;
00024 class QRadioButton;
00025 class QComboBox;
00026 
00027 namespace makVrf
00028 {
00029    class DT_DLL_VRFGUICOREQT DtChangeHostilityObjectWrapper : public DtSimCommandObjectWrapper
00030    {
00031    public:
00032       DtChangeHostilityObjectWrapper(const DtChangeHostilityCommand&);
00033       DtChangeHostilityObjectWrapper(const DtChangeHostilityObjectWrapper&);
00034 
00035       virtual void setObjectName(const DtString&);
00036       virtual DtString objectName() const;
00037 
00038       virtual DtSimCommandObjectWrapper* clone() const;
00039    };
00040 
00041    class DT_DLL_VRFGUICOREQT DtSimulationCommandChangeHostilityWidget : public DtSimulationCommandDialogInterface
00042    {
00043       Q_OBJECT
00044 
00045    public:
00046       //CTOR
00047       DtSimulationCommandChangeHostilityWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
00048 
00049       //DTOR
00050       virtual ~DtSimulationCommandChangeHostilityWidget();
00051 
00052       virtual void setForceOne(int);
00053       virtual int forceOne() const;
00054 
00055       virtual void setForceTwo(int);
00056       virtual int forceTwo() const;
00057 
00058       virtual void setForceOneIsHostileToForceTwo(bool);
00059       virtual bool forceOneIsHostileToForceTwo() const;
00060 
00061       virtual void addForce(const std::string&, int force);
00062       virtual void removeForce(int force);
00063 
00064    protected:
00065 
00066       virtual QWidget* contents(const std::vector<makVrv::DtSimEntry*>& data);         
00067 
00068       virtual void sendRequest();
00069       virtual void setupStatement(const DtSimStatement*);
00070 
00071    protected:
00072       virtual bool wantsSelectionOfObjectInCommandMode() const;
00073       virtual void initializeItems(const std::vector<makVrv::DtSimEntry*>& data);
00074 
00075    public:
00076       QWidget* myCanvas;
00077       QGridLayout* myMainLayout;
00078 
00079       QLabel* myForceToChangeLabel;
00080       QComboBox* myForceToChangeCombo;
00081 
00082       QLabel* myNewStanceLabel;
00083       QRadioButton* myHostileTo;
00084       QRadioButton* myFriendlyTo;
00085 
00086       QLabel* myToForceLabel;
00087       QComboBox* myToForceCombo;
00088    };
00089 
00090    class DT_DLL_VRFGUICOREQT DtSimulationCommandChangeHostilityCreator : public DtVrfSimulationCommandDialogCreator
00091    {
00092    public:
00093       virtual DtSimulationCommandDialogInterface* create(makVrv::DtDe&, QWidget* parent);
00094       virtual bool supportsType(int, const DtSimStatement*) const;
00095       virtual std::string objectNameFromStatement(const DtSimCommand*) const;
00096    };
00097 }

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)