Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 FLManagerModules.h - description 00003 ------------------- 00004 begin : mie dic 24 2003 00005 copyright : (C) 2003-2004 by InfoSiAL, S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef FLMANAGERMODULES_H 00019 #define FLMANAGERMODULES_H 00020 00021 class FLAction; 00022 class FLInfoMod; 00023 class FLSqlDatabase; 00024 class FLApplication; 00025 struct AQStaticBdInfo; 00026 00047 class FL_EXPORT FLManagerModules 00048 { 00049 00050 friend class FLSqlDatabase; 00051 friend class FLApplication; 00052 00053 protected: 00054 00058 FLManagerModules(FLSqlDatabase *db); 00059 00060 public: 00061 00065 explicit FLManagerModules(); 00066 00070 ~FLManagerModules(); 00071 00072 public: 00073 00077 void init(); 00078 00082 void finish(); 00083 00094 QString content(const QString &n); 00095 00104 QString byteCodeToStr(const QByteArray &byteCode) const; 00105 #ifndef QSDEBUGGER 00106 QString contentCode(const QString &n) const; 00107 #else 00108 QString contentCode(const QString &n); 00109 #endif 00110 00117 static QString contentFS(const QString &pN); 00118 00128 QString contentCached(const QString &n, QString *shaKey = 0); 00129 00137 void setContent(const QString &n, const QString &idM, const QString &content); 00138 00148 QWidget *createUI(const QString &n, QObject *connector = 0, QWidget *parent = 0, const char *name = 0); 00149 00158 QWidget *createForm(const FLAction *a, QObject *connector = 0, QWidget *parent = 0, const char *name = 0); 00159 00164 QWidget *createFormRecord(const FLAction *a, QObject *connector = 0, QWidget *parent = 0, const char *name = 0); 00165 00174 void setActiveIdModule(const QString &id); 00175 00181 QString activeIdArea() const { 00182 return activeIdArea_; 00183 } 00184 00190 QString activeIdModule() const { 00191 return activeIdModule_; 00192 } 00193 00199 QStringList listIdAreas(); 00200 00207 QStringList listIdModules(const QString &idA); 00208 00214 QStringList listAllIdModules(); 00215 00222 QString idAreaToDescription(const QString &idA); 00223 00230 QString idModuleToDescription(const QString &idM); 00231 00238 QPixmap iconModule(const QString &idM); 00239 00246 QString versionModule(const QString &idM); 00247 00253 QString shaLocal(); 00254 00260 QString shaGlobal(); 00261 00265 void setShaLocalFromGlobal(); 00266 00273 QString shaOfFile(const QString &n); 00274 00278 void loadKeyFiles(); 00279 00283 void loadAllIdModules(); 00284 00288 void loadIdAreas(); 00289 00296 QString idModuleOfFile(const QString &n); 00297 00298 protected: 00299 00303 void writeState(); 00304 00308 void readState(); 00309 00310 private: 00311 00315 QString activeIdArea_; 00316 00320 QString activeIdModule_; 00321 00325 QString shaLocal_; 00326 00330 QDict<QString> *dictKeyFiles; 00331 00335 QStringList *listAllIdModules_; 00336 00340 QStringList *listIdAreas_; 00341 00345 QDict<FLInfoMod> *dictInfoMods; 00346 00350 QDict<QString> *dictModFiles; 00351 00355 FLSqlDatabase *db_; 00356 00364 QString contentStatic(const QString &n); 00365 00370 void staticLoaderSetup(); 00371 00376 AQStaticBdInfo *staticBdInfo_; 00377 00381 QString rootDir_, 00382 scriptsDir_, 00383 tablesDir_, 00384 formsDir_, 00385 reportsDir_, 00386 queriesDir_, 00387 transDir_; 00388 }; 00389 00390 #endif