2021-08-06 10:20:03 +08:00
|
|
|
#ifndef MAINDIALOG_H
|
|
|
|
#define MAINDIALOG_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2021-09-16 16:05:46 +08:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QToolButton>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QStackedWidget>
|
2022-10-12 17:37:42 +08:00
|
|
|
#include <QDBusInterface>
|
|
|
|
#include <QDBusReply>
|
2021-09-16 16:05:46 +08:00
|
|
|
#include "leftsiderbarwidget.h"
|
2021-08-06 10:20:03 +08:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui { class MainDialog; }
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class MainDialog : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainDialog(QWidget *parent = nullptr);
|
|
|
|
~MainDialog();
|
|
|
|
|
2022-02-24 12:19:06 +08:00
|
|
|
void closeEvent(QCloseEvent *e);
|
|
|
|
|
2022-10-08 13:58:39 +08:00
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
2022-10-13 11:06:50 +08:00
|
|
|
void changeEvent(QEvent *event);
|
2022-10-08 13:58:39 +08:00
|
|
|
|
2021-09-16 16:05:46 +08:00
|
|
|
public slots:
|
|
|
|
void sltMessageReceived(const QString &msg);
|
|
|
|
void closeBtn();
|
2022-10-12 17:37:42 +08:00
|
|
|
void tabletModeChange(bool isTabletMode);
|
2021-11-17 13:23:38 +08:00
|
|
|
void selected(int func_type);
|
2021-09-16 16:05:46 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void initUI();
|
|
|
|
void initTileBar();
|
|
|
|
void initConnect();
|
2021-10-26 09:24:05 +08:00
|
|
|
|
|
|
|
void mountBackupPartition();
|
|
|
|
void umountBackupPartition();
|
2021-08-06 10:20:03 +08:00
|
|
|
private:
|
2021-09-16 16:05:46 +08:00
|
|
|
// 总体布局部分
|
|
|
|
QHBoxLayout *m_totalHLayout = nullptr;
|
|
|
|
LeftsiderbarWidget *m_leftSiderBarWidget = nullptr;
|
2022-01-21 16:09:08 +08:00
|
|
|
QWidget *m_rightWidget = nullptr;
|
2021-09-16 16:05:46 +08:00
|
|
|
QVBoxLayout *m_rightVLayout = nullptr;
|
|
|
|
QWidget *m_titleWidget = nullptr;
|
|
|
|
QStackedWidget *m_stackedWidget = nullptr;
|
|
|
|
|
|
|
|
// 标题栏部分
|
|
|
|
QHBoxLayout *m_titleLayout = nullptr;
|
|
|
|
QToolButton *m_menuOptionBtn = nullptr;
|
|
|
|
QPushButton *m_minBtn = nullptr;
|
2022-10-08 13:58:39 +08:00
|
|
|
QPushButton *m_maxBtn = nullptr;
|
2021-09-16 16:05:46 +08:00
|
|
|
QPushButton *m_closeBtn = nullptr;
|
|
|
|
|
|
|
|
QAction *m_backupHelp = nullptr;
|
|
|
|
QAction *m_backupAbout = nullptr;
|
|
|
|
QAction *m_backupExit = nullptr;
|
|
|
|
|
2022-10-12 17:37:42 +08:00
|
|
|
// 监控是否平板的dbus接口
|
|
|
|
QDBusInterface * m_statusSessionDbus = nullptr;
|
2021-09-16 16:05:46 +08:00
|
|
|
|
2021-08-06 10:20:03 +08:00
|
|
|
Ui::MainDialog *ui;
|
|
|
|
};
|
|
|
|
#endif // MAINDIALOG_H
|