helper.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. class Helper:public QObject {
  11. Q_OBJECT
  12. public:
  13. Helper();
  14. Helper( const Helper&) = delete;
  15. Helper& operator=( Helper& ) = delete;
  16. int getVersion(QString string);
  17. QMap <QString, QString> htmlColors;
  18. void checkTab(QString tabname);
  19. void loadNews();
  20. void loadHelp();
  21. void hideAll();
  22. void setAbout();
  23. void findSkins();
  24. QString getSkinName();
  25. void setState(QString state);
  26. void applyShadow(QWidget *obj, QString color, int blur, int offset_x, int offset_y);
  27. void myDialogBox(QString text, QString info, QString okText, QString cancelText, QString image,
  28. QString okAnswer, QString cancelAnswer, int w, int h, bool textshadow = false, bool is_cancel = false, bool prevent_dublicates = true);
  29. int dateToTimestamp(QString customDateString, QString format);
  30. void addComboItem(QComboBox* combo, QString itemName, QIcon* icon);
  31. const char *stringToChar(QString val);
  32. void replaceSkin(QString name);
  33. QString dialog_ok_answer;
  34. QString dialog_cancel_answer;
  35. QString last_message_msg;
  36. };
  37. #endif // HELPER_H