helpwidget.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 PatchList;
  12. class HelpWidget : public QWidget
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit HelpWidget(PatchList *legacy_patches, QWidget *parent = 0);
  17. ~HelpWidget();
  18. public slots:
  19. void updateFontsSizes();
  20. protected:
  21. void resizeEvent(QResizeEvent *event) override;
  22. private slots:
  23. void handleContentScrolling(int value);
  24. void moveMenuHoverWidget(QPushButton* target);
  25. void scrollContentToWidget(QWidget* widget);
  26. void on_menuentry_1_clicked();
  27. void on_menuentry_2_clicked();
  28. void on_menuentry_3_clicked();
  29. void on_menuentry_4_clicked();
  30. void on_menuentry_5_clicked();
  31. private:
  32. Ui::HelpWidget *ui;
  33. PatchList *legacy_patches_;
  34. QPushButton* currently_active_entry = nullptr;
  35. QPropertyAnimation* menuHoverWidgetAnimation = nullptr;
  36. QPropertyAnimation* scrollAreaContentsAnimation = nullptr;
  37. };
  38. #endif // HelpWidget_H