158901 【HWE】【备份还原】无法双击最大化/还原备份还原工具窗口
This commit is contained in:
parent
c274e096e7
commit
6bd2c8080e
|
@ -0,0 +1,13 @@
|
|||
#include "doubleclickwidget.h"
|
||||
|
||||
DoubleClickWidget::DoubleClickWidget(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DoubleClickWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
emit this->doubleClicked();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef DOUBLECLICKWIDGET_H
|
||||
#define DOUBLECLICKWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class DoubleClickWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DoubleClickWidget(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
|
||||
signals:
|
||||
void doubleClicked();
|
||||
|
||||
};
|
||||
|
||||
#endif // DOUBLECLICKWIDGET_H
|
|
@ -43,6 +43,7 @@ HEADERS += \
|
|||
component/backuppositionselectdialog.h \
|
||||
component/circlelabel.h \
|
||||
component/clicklabel.h \
|
||||
component/doubleclickwidget.h \
|
||||
component/filefilterproxymodelforbackup.h \
|
||||
component/hoverwidget.h \
|
||||
component/imageutil.h \
|
||||
|
@ -93,6 +94,7 @@ SOURCES += \
|
|||
component/backuppositionselectdialog.cpp \
|
||||
component/circlelabel.cpp \
|
||||
component/clicklabel.cpp \
|
||||
component/doubleclickwidget.cpp \
|
||||
component/filefilterproxymodelforbackup.cpp \
|
||||
component/hoverwidget.cpp \
|
||||
component/imageutil.cpp \
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QPainter>
|
||||
#include "../common/mydefine.h"
|
||||
#include "component/myiconbutton.h"
|
||||
#include "component/doubleclickwidget.h"
|
||||
#include "globalbackupinfo.h"
|
||||
#include "gsettingswrapper.h"
|
||||
|
||||
|
@ -40,8 +41,9 @@ void LeftsiderbarWidget::initUi()
|
|||
m_leftSideBarVLayout->setSpacing(5);
|
||||
setLayout(m_leftSideBarVLayout);
|
||||
|
||||
QWidget *titleWidget = new QWidget(this);
|
||||
DoubleClickWidget *titleWidget = new DoubleClickWidget(this);
|
||||
m_leftSideBarVLayout->addWidget(titleWidget);
|
||||
connect(titleWidget, &DoubleClickWidget::doubleClicked, this, &LeftsiderbarWidget::doubleClicked);
|
||||
|
||||
QHBoxLayout * titleLayout = new QHBoxLayout;
|
||||
m_mTitleIcon = new PixmapLabel;
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
|
||||
signals:
|
||||
void selected(int func_type);
|
||||
void doubleClicked();
|
||||
private:
|
||||
QGSettings *m_personalQgsettings;
|
||||
qreal m_transparency = 0.8;
|
||||
|
|
|
@ -100,7 +100,7 @@ void MainDialog::initUI()
|
|||
m_rightVLayout->setSpacing(0);
|
||||
|
||||
// 右侧窗口:标题栏
|
||||
m_titleWidget = new QWidget;
|
||||
m_titleWidget = new DoubleClickWidget;
|
||||
m_titleWidget->setObjectName(QString::fromUtf8("m_titleWidget"));
|
||||
m_titleWidget->setFixedHeight(40);
|
||||
m_rightVLayout->addWidget(m_titleWidget);
|
||||
|
@ -235,6 +235,8 @@ void MainDialog::initConnect()
|
|||
showMaximized();
|
||||
}
|
||||
});
|
||||
connect(m_titleWidget, &DoubleClickWidget::doubleClicked, m_maxBtn, &QPushButton::click);
|
||||
connect(m_leftSiderBarWidget, &LeftsiderbarWidget::doubleClicked, m_maxBtn, &QPushButton::click);
|
||||
|
||||
//关闭按钮
|
||||
connect(m_closeBtn, &QPushButton::clicked, this, &MainDialog::closeBtn);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <QDBusInterface>
|
||||
#include <QDBusReply>
|
||||
#include "leftsiderbarwidget.h"
|
||||
#include "component/doubleclickwidget.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainDialog; }
|
||||
|
@ -49,7 +50,7 @@ private:
|
|||
LeftsiderbarWidget *m_leftSiderBarWidget = nullptr;
|
||||
QWidget *m_rightWidget = nullptr;
|
||||
QVBoxLayout *m_rightVLayout = nullptr;
|
||||
QWidget *m_titleWidget = nullptr;
|
||||
DoubleClickWidget *m_titleWidget = nullptr;
|
||||
QWidget *m_workWidget = nullptr;
|
||||
QVBoxLayout *m_workVLayout = nullptr;
|
||||
QStackedWidget *m_stackedWidget = nullptr;
|
||||
|
|
|
@ -5,4 +5,3 @@ SUBDIRS += \
|
|||
backup-daemon
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
|
|
Loading…
Reference in New Issue