#ifndef REPORTTRANSLATION_H #define REPORTTRANSLATION_H #include #include #include #include #include "lrpagedesignintf.h" class ATranslationProperty{ public: ATranslationProperty(){} ATranslationProperty(const ACollectionProperty& ){} virtual ~ATranslationProperty(){} }; Q_DECLARE_METATYPE(ATranslationProperty) const int TRANSLATION_TYPE_ID = qMetaTypeId(); namespace LimeReport{ struct PropertyTranslation{ QString propertyName; QString value; QString sourceValue; bool checked; bool sourceHasBeenChanged; }; struct ItemTranslation{ QString itemName; PropertyTranslation* findProperty(const QString& propertyName); ~ItemTranslation(); QList propertyesTranslation; }; struct PageTranslation{ QString pageName; ~PageTranslation(); QHash itemsTranslation; }; class ReportTranslation{ public: ReportTranslation(QLocale::Language language) :m_language(language){} ReportTranslation(QLocale::Language language, QList pages); ReportTranslation(const ReportTranslation& reportTranslation); ~ReportTranslation(); QLocale::Language language() const; QList pagesTranslation() const; PageTranslation* createEmptyPageTranslation(); void updatePageTranslation(PageDesignIntf* page); PageTranslation* findPageTranslation(const QString& page_name); void createItemTranslation(BaseDesignIntf* item, PageTranslation* pageTranslation); private: PageTranslation* createPageTranslation(PageDesignIntf* page); private: QLocale::Language m_language; QList m_pagesTranslation; }; typedef QMap Translations; class ITranslationContainer{ public: virtual ~ITranslationContainer(){} virtual Translations* translations() = 0; virtual void updateTranslations() = 0; virtual bool addTranslationLanguage(QLocale::Language language) = 0; virtual bool removeTranslationLanguage(QLocale::Language language) = 0; virtual QList aviableLanguages() = 0; }; } // namespace LimeReport //Q_DECLARE_METATYPE(ReportTranslation) #endif // REPORTTRANSLATION_H