00001 00006 #ifndef TEMPLATELOADER_H 00007 #define TEMPLATELOADER_H 00008 00009 #include <QString> 00010 #include <QSettings> 00011 #include <QTextCodec> 00012 #include "template.h" 00013 #include <QMutex> 00014 00037 class TemplateLoader : public QObject { 00038 Q_OBJECT 00039 Q_DISABLE_COPY(TemplateLoader); 00040 public: 00041 00047 TemplateLoader(QSettings* settings, QObject* parent=0); 00048 00050 virtual ~TemplateLoader(); 00051 00061 Template getTemplate(QString templateName, QString locales=QString()); 00062 00063 protected: 00064 00070 virtual QString tryFile(QString localizedName); 00071 00073 QString templatePath; 00074 00076 QString fileNameSuffix; 00077 00079 QTextCodec* textCodec; 00080 00082 QMutex mutex; 00083 }; 00084 00085 #endif // TEMPLATELOADER_H