VR-Forces 4.0.4 Class Documentation
include/vrfGuiCoreQt/DtVrfSimulationCommandDialogManager.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2009 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtVrfSimulationCommandDialogManager.h,v $ $Revision: 1.2 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00013 
00014 #pragma once
00015 
00016 #include <vrfGuiCoreQt/vrfGuiCoreQt.h>
00017 #include <vrvUtil/DtVirtualBaseClass.h>
00018 
00019 #include <vrvUtil/signalslib.h>
00020 
00021 #include <QtCore/QObject>
00022 
00023 namespace makVrv
00024 {
00025    class DtDe;
00026    class DtSimEntry;
00027 }
00028 
00029 class QWidget;
00030 class DtSimStatement;
00031 class DtSimCommand;
00032 class DtTaskStmt;
00033 class DtSimCommandStmt;
00034 
00035 namespace makVrf
00036 {
00037    class DtSimulationCommandDialogInterface;
00038    class DtVrfSimulationCommandDialogCreator;
00039    class DtVrfSimulationCommandAction;
00040    class DtCommandAssignmentWidgetInterface;
00041    class DtCommandAssignmentWidget;
00042 
00043    class DT_DLL_VRFGUICOREQT DtVrfSimulationCommandDialogSignalHandler : public QObject
00044    {
00045       Q_OBJECT
00046 
00047    public:
00048       DtVrfSimulationCommandDialogSignalHandler(makVrv::DtDe&);
00049       virtual ~DtVrfSimulationCommandDialogSignalHandler();
00050 
00051       virtual void connectSignals(DtCommandAssignmentWidgetInterface*);
00052       virtual void disconnectSignals(DtCommandAssignmentWidget*);
00053 
00054    public:
00056       boost::signal<void (DtCommandAssignmentWidgetInterface*)> signal_dialogDestroyed;
00057 
00058    protected slots:
00059       virtual void onDialogDestroyed();
00060 
00061    protected:
00062       makVrv::DtDe&               myDe;
00063    };
00064 
00066    class DT_DLL_VRFGUICOREQT DtVrfSimulationCommandDialogManager : public makVrv::DtVirtualBaseClass
00067    {
00068       typedef std::map<std::string, DtVrfSimulationCommandDialogCreator*> DtVrfSimulationCommandDialogCreatorMap;
00069 
00070    public:
00072       DtVrfSimulationCommandDialogManager(makVrv::DtDe&);
00073 
00075       virtual ~DtVrfSimulationCommandDialogManager();
00076 
00078       static DtVrfSimulationCommandDialogManager& instance(makVrv::DtDe& de);
00079 
00080    public:
00084       virtual DtCommandAssignmentWidgetInterface* createCommandDialogFor(const std::string& menuItemType, QWidget* parent,
00085          DtVrfSimulationCommandAction* forAction, const std::vector<makVrv::DtSimEntry*>& data);
00086       virtual DtCommandAssignmentWidgetInterface* createCommandDialogFor(const DtSimStatement*, QWidget* parent);
00087 
00090       virtual DtCommandAssignmentWidgetInterface* createCommandDialogFor(const DtSimCommand* simCommand, QWidget* parent);
00091 
00092       virtual DtCommandAssignmentWidgetInterface* createCommandDialogFor(QWidget* parent, DtCommandAssignmentWidgetInterface*);
00093 
00094       virtual DtTaskStmt* statementFromSimCommand(const DtSimCommand* simCommand) const;
00095 
00096       bool dialogInProgress() const
00097       {
00098          return myDialogInProgress;
00099       }
00100 
00103       virtual std::string objectNameFromStatement(const DtSimCommandStmt*);
00104 
00105    public:
00108       virtual void addDialogCreator(const std::string& menuItemType, DtVrfSimulationCommandDialogCreator*);
00109       
00111       virtual bool removeDialogCreator(const std::string& menuItemType);
00112 
00114       virtual bool hasDialogCreator(const std::string& menuItemType);
00115 
00117       virtual void removeAllDialogCreators();
00118 
00120       virtual bool statementIsEditable(const DtSimStatement*) const;
00121 
00122    protected:
00123       virtual void slot_onDialogDestroyed(DtCommandAssignmentWidgetInterface*);
00124 
00125    protected:
00128       virtual void prepDialog(DtCommandAssignmentWidgetInterface*, DtVrfSimulationCommandAction* forAction);
00129 
00130    public:
00132       boost::signal<void (DtCommandAssignmentWidgetInterface*)> signal_dialogCreated;
00133 
00135       boost::signal<void (DtCommandAssignmentWidgetInterface*)> signal_dialogDestroyed;
00136 
00137    protected:
00138       makVrv::DtDe&                     myDe;
00139       DtVrfSimulationCommandDialogCreatorMap     myDialogCreatorMap;
00140       DtVrfSimulationCommandDialogSignalHandler  mySimulationCommandDialogSignalHandler;
00141       bool                             myDialogInProgress;
00142    };
00143 }

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)