VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtObserverViewsWidgetLogic.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2008 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtObserverViewsWidgetLogic.h,v $ $Revision: 1.12 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #pragma once 
00014 #include <vrvCoreQt/vrvCoreQt.h> 
00015 #include <vrvCore/DtSubjectObserver.h>
00016 #include <makArchives/DtObserverStateRecordsList.h>
00017 
00018 namespace makVrv 
00019 { 
00020    class DtDe;
00021    class DtObserverViewsWidgetInterface;
00022    class DtObserver;
00023    class DtInputDriver;
00024 
00028    class DT_DLL_VRVCOREQT DtObserverViewsWidgetLogic : public DtDeObserver
00029    {
00030 
00031    public: 
00032       
00034       static DtObserverViewsWidgetLogic* create(DtDe& de, 
00035          DtObserverViewsWidgetInterface* iFace );
00036          
00038       virtual ~DtObserverViewsWidgetLogic();
00039       
00041       virtual void setCurrentObserver( const std::string& observerName );
00042       virtual void setCurrentObserver( DtObserver* );
00043 
00046       virtual void captureAndAddObserverView();
00047 
00049       virtual void setObserverView(const std::string&);
00050 
00052       virtual void clearObserverViews();
00053 
00055       virtual void saveObserverStateRecords(const std::string& filename);
00056 
00058       virtual void saveObserverStateRecord(const std::string& filename, const std::string& record);
00059 
00061       virtual void deleteView(const std::string&);
00062 
00066       virtual void loadObserverStateRecords(const std::string&);
00067 
00070       virtual void loadAndSetObserverState(const std::string&);
00071 
00074       virtual bool renameObserverRecord(const std::string& newName, const std::string& oldName);
00075 
00076    protected:
00077       virtual void slot_activate(DtDe* subject);
00078       virtual void slot_deactivate(DtDe* subject);
00079 
00080       virtual void onObserverAboutToBeDestroyed( DtInputDriver* inputDriver,
00081          DtObserver* observer );
00082       virtual void onCurrentObserverChanged( DtInputDriver* inputDriver, DtObserver* observer );
00083       virtual void onInputDriverCreated( DtInputDriver* inputDriver );
00084       virtual void onInputDriverAboutToBeDestroyed( DtInputDriver* inputDriver );
00085 
00086    protected:
00089       virtual void processEnableState();
00090 
00093       virtual std::string generateName(const makArchives::DtObserverStateRecord&) const;
00094 
00096       virtual void loadObserverStateRecords(const std::string&, makArchives::DtObserverStateRecordsList&) const;
00097 
00100       virtual void loadObserverStateRecords(const std::string&, bool setObservers);
00101 
00102    protected:
00103 
00105       DtObserverViewsWidgetLogic(DtDe& de, DtObserverViewsWidgetInterface* iFace );
00106 
00107    protected:
00108    
00109       DtDe& myDe;
00110       DtObserverViewsWidgetInterface* myInterface;
00111       DtObserver* myCurrentObserver;
00112       DtInputDriver* myInputDriver;
00113 
00114       makArchives::DtObserverStateRecordsList myObserverRecords;
00115     };
00116 }
00117 

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)