helper.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. bool fileExists(QString path);
  22. void loadNews();
  23. void loadHelp();
  24. void hideAll();
  25. void setAbout();
  26. void findSkins();
  27. void prepareMicroPatch();
  28. void saveLocale(int locale, QPushButton *button);
  29. QString getSkinName();
  30. void setState(QString state);
  31. void applyShadow(QWidget *obj, QString color, int blur, int offset_x, int offset_y);
  32. void myDialogBox(QString text, QString info, QString okText, QString cancelText, QString image,
  33. QString okAnswer, QString cancelAnswer, int w, int h, bool textshadow, bool is_cancel);
  34. QString fileHash(const QString &fileName, QCryptographicHash::Algorithm hashAlgorithm);
  35. int dateToTimestamp(QString customDateString, QString format);
  36. void addComboItem(QComboBox* combo, QString itemName, QIcon* icon);
  37. bool setGameLocale(QString locale);
  38. void startGame();
  39. bool openDatFile(int id);
  40. void closeDatFile(int id);
  41. void applyPatch(QString name);
  42. void processFile();
  43. const char *stringToChar(QString val);
  44. void applyGlobal();
  45. bool isDatReady();
  46. void replaceSkin(QString name);
  47. void applyMicroPatch();
  48. void installMicroPatch();
  49. void applyLoadscreens();
  50. int checkDatFile();
  51. void clearFolder(QDir &dir);
  52. QByteArray ba;
  53. QString dialog_ok_answer;
  54. QString dialog_cancel_answer;
  55. LOTRO_DAT::LOCALE dat_locale;
  56. private slots:
  57. void handleFinisheddd();
  58. };
  59. #endif // HELPER_H