QFDApp.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef QFDAPP_H
  2. #define QFDAPP_H
  3. #include <QMainWindow>
  4. #include <QGraphicsDropShadowEffect>
  5. #include <QSizeGrip>
  6. class CustomGrip;
  7. namespace Ui {
  8. class QFDApp;
  9. }
  10. class QFDApp : public QMainWindow
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit QFDApp(QWidget *parent = nullptr);
  15. ~QFDApp();
  16. private slots:
  17. void toggleMenu();
  18. void maximizeRestore();
  19. void leftMenuButtonClick();
  20. void openCloseLeftBox();
  21. void openCloseRightBox();
  22. private:
  23. Ui::QFDApp *ui;
  24. QPoint dragPos;
  25. CustomGrip *m_leftGrip;
  26. CustomGrip *m_rightGrip;
  27. CustomGrip *m_topGrip;
  28. CustomGrip *m_bottomGrip;
  29. QGraphicsDropShadowEffect *shadow;
  30. QSizeGrip *sizegrip;
  31. void init();
  32. void loadTheme(const QString &file, bool useCustomTheme);
  33. void setThemeHack();
  34. /**
  35. * @brief START - GUI DEFINITIONS
  36. */
  37. void uiDefinitions();
  38. bool returStatus();
  39. void setStatus(bool status);
  40. QString selectMenu(const QString &getStyle);
  41. QString deselectMenu(const QString &getStyle);
  42. void selectStandardMenu(const QString &widget);
  43. void resetStyle(const QString &widget);
  44. void resizeGrips();
  45. void startBoxAnimation(int leftBoxWidth, int rightBoxWidth, const QString &direction);
  46. // QWidget interface
  47. protected:
  48. void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
  49. void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
  50. bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
  51. };
  52. #endif // QFDAPP_H