VR-Forces 4.0.4 Class Documentation
include/bhave3DGui/bhaveLuaScriptUpdater.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: bhaveLuaScriptUpdater.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef bhaveLuaScriptUpdater_H_
00013 #define bhaveLuaScriptUpdater_H_
00014 
00015 #include <bhave3DGui/bhave3DGuiDefines.h>
00016 #include <vlutil/vlString.h>
00017 #include <vrvUtil/signalslib.h>
00018 #include <QtCore/QTimer>
00019 #include <QtCore/QDateTime>
00020 #include <QtCore/QObject>
00021 #include <vector>
00022 #include <boost/signal.hpp>
00023 
00024 struct DtFileEntry
00025 {
00026    QString myFilename;
00027    QDateTime myLastModified;
00028 };
00029 
00030 namespace BHAVE
00031 {
00032    namespace BHAVE3DGui
00033    {
00039       class DT_DLL_bhave3DGui DtBhaveLuaScriptUpdater : public QObject
00040       {
00041 
00042          Q_OBJECT
00043 
00044       public:
00045 
00047          DtBhaveLuaScriptUpdater(QObject* parent);
00048 
00050          virtual ~DtBhaveLuaScriptUpdater();
00051 
00053          virtual void addEntry(const QString filename);
00054 
00057          virtual int findEntry(const QString& filename);
00058 
00060          virtual void removeEntry(const QString filename);
00061 
00063          virtual void start();
00064 
00066          virtual void stop();
00067 
00070          boost::signal<void (const DtString&, const std::list<DtString>&)> signal_scriptChanged;
00071 
00072       private:
00073 
00075          DtBhaveLuaScriptUpdater(const DtBhaveLuaScriptUpdater& orig);
00076 
00078          DtBhaveLuaScriptUpdater& operator=(const DtBhaveLuaScriptUpdater& orig);
00079 
00080       protected:
00081 
00083          virtual void init();
00084 
00089          virtual void updateScript(const DtString& filename);
00090 
00091       protected slots:
00092 
00096          virtual void slot_checkScriptsForUpdate();
00097 
00098       protected:
00099 
00100          QTimer* myScheduler;
00101          std::list<DtFileEntry> myFileEntries;
00102 
00103       };
00104    }
00105 }
00106 #endif

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)