Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef GEOPSYCOREENGINE_H
00030 #define GEOPSYCOREENGINE_H
00031
00032 #include <QGpCoreTools.h>
00033
00034 #include "GeopsyCoreDLLExport.h"
00035 #include "SignalFile.h"
00036 #include "SignalFileFormat.h"
00037
00038 namespace GeopsyCore {
00039
00040 class SignalDB;
00041 class GeopsyPlugins;
00042 class GeopsyPreferences;
00043 class Signal;
00044 class SubSignalPool;
00045 class SignalFile;
00046 class DoubleSignal;
00047 class KeepSignal;
00048 class CustomFileFormats;
00049 class AbstractSignalGroup;
00050
00051 class GEOPSYCORE_EXPORT GeopsyCoreEngine : public GlobalObject
00052 {
00053 TRANSLATIONS( "GeopsyCoreEngine" )
00054 public:
00055 GeopsyCoreEngine(bool debug=false);
00056 virtual ~GeopsyCoreEngine();
00057
00058 void clear();
00059
00060 Cache * cache() {return _cache;}
00061 GeopsyPreferences * preferences() {return _preferences;}
00062 GeopsyPlugins * plugins() {return _plugins;}
00063 SignalDB * currentDB() {return _currentDB;}
00064 SignalDB * database(QString path);
00065 SignalFile * file(QString fileName);
00066 CustomFileFormats * customFileFormats() {return _customFileFormats;}
00067
00068 SubSignalPool load(QString fileName, SignalFileFormat format=SignalFileFormat::Unknown, bool viewFile=false);
00069 SubSignalPool load(QStringList fileNames, SignalFileFormat format=SignalFileFormat::Unknown, bool viewFiles=false);
00070 void showSignal(const DoubleSignal * sig, const QString& name=QString::null, const QString& comments=QString::null);
00071 void showSignal(const KeepSignal * sig, const QString& name=QString::null, const QString& comments=QString::null);
00072
00073 void setConsoleProgress(bool s);
00074 virtual bool useProgress() {return _progress;}
00075 virtual void setProgressMaximum(int val);
00076 virtual int progressMaximum() {if(_progress) return _progress->maximum(); else return 0;}
00077 virtual void setProgressValue(int val) {if(_progress) _progress->setValue(val);}
00078 virtual int progressValue() {if(_progress) return _progress->value(); else return 0;}
00079 virtual void increaseProgressValue(int val=1) {if(_progress) _progress->increaseValue(val);}
00080 virtual void showMessage(QString s);
00081 virtual void showLoadedSignals(const SubSignalPool& ) {}
00082
00083
00084 virtual SignalFileFormat askLoadFormat(const QString& signalFileName);
00085 virtual bool askTimeReference(double& t0, QDateTime& timeRef, const QDateTime& timeTrue);
00086 virtual bool askRD3LogParameter(int& nSamples, double& sampFreq, double& t0);
00087 protected:
00088 GeopsyPreferences * _preferences;
00089 Cache * _cache;
00090 QList<SignalDB *> _databases;
00091 SignalDB * _currentDB;
00092 CustomFileFormats * _customFileFormats;
00093 ConsoleProgress * _progress;
00094 GeopsyPlugins * _plugins;
00095 };
00096
00097 extern GEOPSYCORE_EXPORT GeopsyCoreEngine * geopsyCore;
00098
00099 }
00100
00101 #endif // GEOPSYCOREENGINE_H