30 #include <qstringlist.h> 32 #include <qtextstream.h> 58 static QStringList CmdArgumentMsgs;
63 CmdArgument SearchResult;
79 MSContext(
int& argc,
char **argv,
bool graphical_context =
false);
413 virtual void Pause();
436 static void RegisterTimer(
const QString&
id,
const QString& description);
461 static void StopTimer(
const QString&
id);
int GetCurrentBeat() const
Get the current beat ID.
static void RegisterTimer(const QString &id, const QString &description)
Register a timer.
QString GenerateRecordPath()
Generate a record path.
void FindMindSessionArgs()
Find libmindsession specific command line arguments.
Creates a context for an application.
void HeartFinished()
Listen to the end of the heart.
Interface class to handle new types in the storage.
static void PauseTimers()
Pause the timers.
bool IsPaused() const
Whenever the context is paused.
void SetRecordPath(const QString &record_path)
Set the path of the record directory.
QString GetDefaultDebugItems() const
Get default active debug items.
QString DefaultDebugItems
Default active debugged items.
Basic ancestor class of the elements.
bool IsMalfunctionHappened() const
Whenever a malfunction happened in the context.
static void ResumeTimers()
Resume the timers.
static void StartTimer(const QString &id)
Start a timer.
bool SessionPrepared
The heart beating is prepared.
virtual void StartHeartBeating()
Start the heart beating.
bool IsBeatingFinished() const
Whenever the heart beating is finished.
void PlayedSessionFinished()
The played session is finished.
virtual void StopHeartBeating()
Stop the heart beating.
QString GetRecordPath() const
Get the path of the record directory.
virtual void Resume()
Resume the context.
bool CPUProfiling
CPU profiling.
ArgSearchResult FindArgument(const QString &arg, const QString &long_arg)
Find an argument.
void UnregisterElement(MSElement &element)
Unregister an element.
static int GetTimerElapsedTime(const QString &id)
Get the elapsed time of a timer.
void NewHeartBeat(int beat_id)
New heart beat.
void RegisterSessionStorage(MSSessionStorageInterface &storage)
Register a session storage.
int GetPlayedBeats() const
Get the played beats.
static void ResetTimer(const QString &id)
Reset a timer.
void SetMaxBeats(int max_beats)
Set the limit of the beats.
virtual bool PrepareSession()
Prepare a session.
void HeartStopped()
The heart has been stopped.
bool HasRegisteredElements() const
Has registered elements.
void SetPlaybackPath(const QString &play_path)
Set the path of the play directory.
virtual void FinishSession()
Finish a session.
void SetBeatDurationLimit(int new_limit)
Set the beat duration limit.
QString GetPlaybackPath() const
Get the path of the play directory.
QList< MSElement * > RegElements
Elements to be registered by the heart beat.
~MSContext()
Class destructor.
void Stop()
Stop the activities in the context.
QStringList ProgramArguments
Command line arguments.
MSContext(int &argc, char **argv, bool graphical_context=false)
Class constructor.
void SetDefaultDebugItems(const QString &items)
Set default active debug items.
virtual void Pause()
Pause the context.
static void StopTimer(const QString &id)
Stop a timer.
void RegisterElement(MSElement &element)
Register a new element.
static MSContext * GetInstance()
Get a static instance of the class.
int GetMaxBeats() const
Get the limit of the beats.
const QString SessionRuntimeTimerName
Session runtime timer name.