helper.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef HELPER_H
  2. #define HELPER_H
  3. #include <QString>
  4. #include <QObject>
  5. #include <QMap>
  6. #include <QDir>
  7. #include <QPushButton>
  8. #include <QComboBox>
  9. #include <QCryptographicHash>
  10. #include "LotroDat.h"
  11. class Helper:public QObject {
  12. Q_OBJECT
  13. public:
  14. Helper();
  15. Helper( const Helper&);
  16. Helper& operator=( Helper& );
  17. int getVersion(QString string);
  18. QMap <QString, QString> getPathsMap();
  19. QMap <QString, QString> htmlColors;
  20. void checkTab(QString tabname);
  21. void loadNews();
  22. void loadHelp();
  23. void hideAll();
  24. void setAbout();
  25. void findSkins();
  26. void prepareMicroPatch();
  27. void saveLocale(int locale, QPushButton *button);
  28. QString getSkinName();
  29. void setState(QString state);
  30. void applyShadow(QWidget *obj, QString color, int blur, int offset_x, int offset_y);
  31. void myDialogBox(QString text, QString info, QString okText, QString cancelText, QString image,
  32. QString okAnswer, QString cancelAnswer, int w, int h, bool textshadow, bool is_cancel);
  33. int dateToTimestamp(QString customDateString, QString format);
  34. void addComboItem(QComboBox* combo, QString itemName, QIcon* icon);
  35. bool setGameLocale(QString locale);
  36. void startGame();
  37. bool openDatFile(int id);
  38. void closeDatFile(int id);
  39. void applyPatch(QString name);
  40. void processFile();
  41. const char *stringToChar(QString val);
  42. void applyGlobal();
  43. bool isDatReady();
  44. void replaceSkin(QString name);
  45. void applyMicroPatch();
  46. void installMicroPatch();
  47. void applyLoadscreens();
  48. int checkDatFile();
  49. QByteArray ba;
  50. QString dialog_ok_answer;
  51. QString dialog_cancel_answer;
  52. LOTRO_DAT::LOCALE dat_locale;
  53. private slots:
  54. void handleFinisheddd();
  55. };
  56. #endif // HELPER_H