|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef _CONTENT_HISTORY_H
|
|
Toshihiro Shimizu |
890ddd |
#define _CONTENT_HISTORY_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tfilepath.h"
|
|
Toshihiro Shimizu |
890ddd |
#include <qstring></qstring>
|
|
Toshihiro Shimizu |
890ddd |
#include <qdatetime></qdatetime>
|
|
Toshihiro Shimizu |
890ddd |
#include <map></map>
|
|
Toshihiro Shimizu |
890ddd |
#include <set></set>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
using namespace std;
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZCORE_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//!this class keeps tracks of modification times on contents, as well as user and machine info;
|
|
Toshihiro Shimizu |
890ddd |
//!typically used for levels and scene files (or whatever you like...)
|
|
Toshihiro Shimizu |
890ddd |
// it is used for visualitation purposed only in the infoview, in example
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class DVAPI TContentHistory
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
bool m_isLevel;
|
|
Toshihiro Shimizu |
890ddd |
std::map<tframeid, qdatetime=""> m_records;</tframeid,>
|
|
Toshihiro Shimizu |
890ddd |
QString m_frozenHistory;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
const QString currentToString() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
//!set isLevel=true if you want to keep track of single-frames modifications
|
|
Toshihiro Shimizu |
890ddd |
TContentHistory(bool isLevel);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
~TContentHistory();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TContentHistory *clone() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//! history can come only from a deserialization
|
|
Toshihiro Shimizu |
890ddd |
//!WARNING! any preexistent history will be erased by calling this method
|
|
Toshihiro Shimizu |
890ddd |
void deserialize(const QString &history);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//!the returned string is only for visualitation and serialization
|
|
Toshihiro Shimizu |
890ddd |
const QString serialize() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//!after calling this method, following history info added will not "merge" with the history until now
|
|
Toshihiro Shimizu |
890ddd |
void fixCurrentHistory();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//!do not call this 2 methods if isLevel==false! (assertion fails)
|
|
Toshihiro Shimizu |
890ddd |
void frameModifiedNow(const TFrameId &id) { frameRangeModifiedNow(id, id); }
|
|
Toshihiro Shimizu |
890ddd |
void frameRangeModifiedNow(const TFrameId &fromId, const TFrameId &toId);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//!do not call this method if isLevel==true! (assertion fails)
|
|
Toshihiro Shimizu |
890ddd |
void modifiedNow();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|