yhkylin-backup-tools/kybackup/maindialog.h

75 lines
1.8 KiB
C
Raw Normal View History

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>
#include <QDBusInterface>
#include <QDBusReply>
2021-09-16 16:05:46 +08:00
#include "leftsiderbarwidget.h"
#include "component/doubleclickwidget.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();
void closeEvent(QCloseEvent *e);
protected:
void resizeEvent(QResizeEvent *event);
void changeEvent(QEvent *event);
void keyPressEvent(QKeyEvent *event);
2021-09-16 16:05:46 +08:00
public slots:
void sltMessageReceived(const QString &msg);
void closeBtn();
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;
DoubleClickWidget *m_titleWidget = nullptr;
QWidget *m_workWidget = nullptr;
QVBoxLayout *m_workVLayout = nullptr;
2021-09-16 16:05:46 +08:00
QStackedWidget *m_stackedWidget = nullptr;
// 标题栏部分
QHBoxLayout *m_titleLayout = nullptr;
QToolButton *m_menuOptionBtn = nullptr;
QPushButton *m_minBtn = nullptr;
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;
// 监控是否平板的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