yhkylin-backup-tools/kybackup/leftsiderbarwidget.h

41 lines
937 B
C
Raw Normal View History

2021-09-16 16:05:46 +08:00
#ifndef LEFTSIDERBARWIDGET_H
#define LEFTSIDERBARWIDGET_H
#include <QWidget>
#include <QObject>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QButtonGroup>
#include "functypeconverter.h"
2021-10-13 16:31:58 +08:00
#include "component/mylabel.h"
2021-09-16 16:05:46 +08:00
class LeftsiderbarWidget : public QWidget
{
Q_OBJECT
public:
// 启动模式,不同模式启动时展示的功能模块不同
enum StartMode {
normal,
2021-11-17 13:23:38 +08:00
livecd,
std_user
2021-09-16 16:05:46 +08:00
};
LeftsiderbarWidget(QWidget *parent = nullptr, StartMode mode = StartMode::normal);
~LeftsiderbarWidget();
void paintEvent(QPaintEvent *event);
2021-11-17 13:23:38 +08:00
signals:
void selected(int func_type);
2021-09-16 16:05:46 +08:00
private:
int transparency = 0;
QVBoxLayout *m_leftSideBarVLayout = nullptr;
QLabel *m_mTitleIcon = nullptr;
2021-10-13 16:31:58 +08:00
MyLabel *m_titleLabel = nullptr;
2021-09-16 16:05:46 +08:00
QButtonGroup *m_funcGroup = nullptr;
2021-11-17 13:23:38 +08:00
QStringList m_deplayFuncs;
2021-09-16 16:05:46 +08:00
};
#endif // LEFTSIDERBARWIDGET_H