helper.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 stop_process = false);
  29. int dateToTimestamp(QString customDateString, QString format);
  30. void addComboItem(QComboBox* combo, QString itemName, QIcon* icon);
  31. void replaceSkin(QString name);
  32. QString countFormattedElapsedTime(qint64 ticks_elapsed, double average_tick_speed);
  33. QString dialog_ok_answer;
  34. QString dialog_cancel_answer;
  35. QString last_message_msg;
  36. };
  37. #endif // HELPER_H