helper.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 saveLocale(int locale, QPushButton *button);
  27. QString getSkinName();
  28. void setState(QString state);
  29. void applyShadow(QWidget *obj, QString color, int blur, int offset_x, int offset_y);
  30. void myDialogBox(QString text, QString info, QString okText, QString cancelText, QString image,
  31. QString okAnswer, QString cancelAnswer, int w, int h, bool textshadow = false, bool is_cancel = false);
  32. int dateToTimestamp(QString customDateString, QString format);
  33. void addComboItem(QComboBox* combo, QString itemName, QIcon* icon);
  34. bool setGameLocale(QString locale);
  35. const char *stringToChar(QString val);
  36. void replaceSkin(QString name);
  37. QByteArray ba;
  38. QString dialog_ok_answer;
  39. QString dialog_cancel_answer;
  40. private slots:
  41. void handleFinisheddd();
  42. };
  43. #endif // HELPER_H