forked from linuxdeepin/deepin-diskmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathddbase.cpp
More file actions
35 lines (29 loc) · 866 Bytes
/
Copy pathddbase.cpp
File metadata and controls
35 lines (29 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-only
#include "ddbase.h"
#include "common.h"
#include <QKeyEvent>
DDBase::DDBase(QWidget *parent)
: DDialog(parent)
{
qDebug() << "Creating base dialog";
setModal(true);
setIcon(QIcon::fromTheme(appName));
m_mainFrame = new DFrame(this);
m_mainFrame->setFrameRounded(false);
m_mainFrame->setFrameStyle(DFrame::NoFrame);
addContent(m_mainFrame);
qDebug() << "Base dialog initialized with main frame";
// updateGeometry();
}
void DDBase::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key::Key_Escape) {
qDebug() << "Ignoring Escape key press";
event->ignore();
} else {
qDebug() << "Forwarding key press to base class";
DDialog::keyPressEvent(event);
}
}