#ifndef UBTEACHERBARDATAMGR_H #define UBTEACHERBARDATAMGR_H #include #include #include #include #include #include #include #include typedef enum{ eTeacherBarState_DocumentEdit, eTeacherBarState_DocumentPreview, eTeacherBarState_PageEdit, eTeacherBarState_PagePreview }eTeacherBarState; typedef enum{ eActionOwner_Teacher, eActionOwner_Student }eActionOwner; typedef struct{ int type; QString content; }sAction; typedef struct{ QString title; QString link; }sLink; class UBTeacherBarDataMgr { public: UBTeacherBarDataMgr(); ~UBTeacherBarDataMgr(); // Session Title void setSessionTitle(const QString& title){mSessionTitle = title;} QString sessionTitle(){return mSessionTitle;} // Session Target void setSessionTarget(const QString& target){mSessionTarget = target;} QString sessionTarget(){return mSessionTarget;} // Page Title void setPageTitle(const QString& title){mPageTitle = title;} QString pageTitle(){return mPageTitle;} // Actions QVector* actions(){return &mActionList;} // Medias QVector medias(){return mMediaList;} void addMediaUrl(const QString& url){mMediaUrls << url;} QStringList mediaUrls(){return mMediaUrls;} // Urls QVector* urls(){return &mUrlList;} // Comments void setComments(const QString& c){mComments = c;} QString comments(){return mComments;} // Others void clearLists(); void saveContent(); void loadContent(); private: QString mSessionTitle; QString mSessionTarget; QString mPageTitle; QString mComments; QVector mActionList; QVector mUrlList; QVector mMediaList; QStringList mMediaUrls; }; #endif // UBTEACHERBARDATAMGR_H