yhkylin-backup-tools/kybackup/maindialog.h

60 lines
1.3 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 "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();
2021-09-16 16:05:46 +08:00
public slots:
void sltMessageReceived(const QString &msg);
void closeBtn();
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 initStyleSheet();
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;
QVBoxLayout *m_rightVLayout = nullptr;
QWidget *m_titleWidget = nullptr;
QStackedWidget *m_stackedWidget = nullptr;
// 标题栏部分
QHBoxLayout *m_titleLayout = nullptr;
QToolButton *m_menuOptionBtn = nullptr;
QPushButton *m_minBtn = nullptr;
QPushButton *m_closeBtn = nullptr;
QAction *m_backupHelp = nullptr;
QAction *m_backupAbout = nullptr;
QAction *m_backupExit = nullptr;
// 右侧内容展示部分
2021-08-06 10:20:03 +08:00
Ui::MainDialog *ui;
};
#endif // MAINDIALOG_H