12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #ifndef MAINWINDOW_H
- #define MAINWINDOW_H
- #include <QMainWindow>
- #include <QPropertyAnimation>
- #include <QTimer>
- #include "statuswidget.h"
- #include "rusificationwidget.h"
- #include "settingswidget.h"
- #include "newswidget.h"
- #include "helpwidget.h"
- namespace Ui {
- class MainWindow;
- }
- class MenuEntry;
- class LegacyApp;
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
- public:
- explicit MainWindow(LegacyApp *app = 0, QWidget *parent = 0);
- void Init();
- ~MainWindow();
- protected:
- void mouseMoveEvent(QMouseEvent *event) override;
- void mousePressEvent(QMouseEvent *event) override;
- void resizeEvent(QResizeEvent *event) override;
- private slots:
- void on_menuentry_1_clicked();
- void on_menuentry_2_clicked();
- void on_menuentry_3_clicked();
- void on_menuentry_4_clicked();
- void on_menuentry_5_clicked();
- void onHoverMenuentry();
- void on_closeButton_clicked();
- void on_minimizeButton_clicked();
- private:
- void setupWindowBackgroundAndMask(int bg_id);
- void setupMenuHoverWidget();
- void moveMenuHoverWidget(MenuEntry* target);
- void checkMenuIsHovered();
- void hideAllContentWidgets();
- private:
- LegacyApp *app;
- Ui::MainWindow *ui;
- QWidget* menuHoverWidget;
- QPropertyAnimation* menuHoverWidgetAnimation;
- QPropertyAnimation* menuHoverWidgetScaleAnimation;
- QTimer menu_hover_checker_timer;
- QPoint dragPosition;
- StatusWidget *status_frame;
- RusificationWidget *rusification_frame;
- SettingsWidget *settings_frame;
- NewsWidget *news_frame;
- HelpWidget *help_frame;
- };
- #endif // MAINWINDOW_H
|