helpwidget.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef HelpWidget_H
  2. #define HelpWidget_H
  3. #include <QWidget>
  4. #include <QTimer>
  5. #include <QSettings>
  6. #include <QPropertyAnimation>
  7. #include <QPushButton>
  8. namespace Ui {
  9. class HelpWidget;
  10. }
  11. class PatchDownloader;
  12. class LotroDatManager;
  13. class HelpWidget : public QWidget
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit HelpWidget(QSettings* settings, PatchDownloader* patch_downloader, LotroDatManager* lotro_dat_manager, QWidget *parent = 0);
  18. ~HelpWidget();
  19. public slots:
  20. void updateFontsSizes();
  21. protected:
  22. void resizeEvent(QResizeEvent *event) override;
  23. private slots:
  24. void handleContentScrolling(int value);
  25. void moveMenuHoverWidget(QPushButton* target);
  26. void scrollContentToWidget(QWidget* widget);
  27. void on_menuentry_1_clicked();
  28. void on_menuentry_2_clicked();
  29. void on_menuentry_3_clicked();
  30. void on_menuentry_4_clicked();
  31. void on_menuentry_5_clicked();
  32. private:
  33. QSettings* app_settings;
  34. PatchDownloader* patch_updater;
  35. LotroDatManager* lotro_manager;
  36. QPushButton* currently_active_entry = nullptr;
  37. QPropertyAnimation* menuHoverWidgetAnimation = nullptr;
  38. QPropertyAnimation* scrollAreaContentsAnimation = nullptr;
  39. Ui::HelpWidget *ui;
  40. };
  41. #endif // HelpWidget_H