DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dapplication_p.h
1// SPDX-FileCopyrightText: 2015 - 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DAPPLICATION_P_H
6#define DAPPLICATION_P_H
7
8#include "dsizemode.h"
9#include <DObjectPrivate>
10#include <DApplication>
11#include <DPathBuf>
12
13#include <QIcon>
14#include <QPointer>
15
16class QLocalServer;
17class QTranslator;
18
19DWIDGET_BEGIN_NAMESPACE
20DCORE_USE_NAMESPACE
21
22class DAboutDialog;
23class DFeatureDisplayDialog;
24
25class DApplicationPrivate : public DObjectPrivate
26{
27
28public:
29
30 D_DECLARE_PUBLIC(DApplication)
31
34#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
35 D_DECL_DEPRECATED QString theme() const;
36 D_DECL_DEPRECATED void setTheme(const QString &theme);
37#endif
38
39 bool setSingleInstanceBySemaphore(const QString &key);
40#ifdef Q_OS_UNIX
41 bool setSingleInstanceByDbus(const QString &key);
42#endif
43
44 bool loadDtkTranslator(QList<QLocale> localeFallback);
45 void _q_onNewInstanceStarted();
46
47 // 为控件适应当前虚拟键盘的位置
48 void doAcclimatizeVirtualKeyboard(QWidget *window, QWidget *widget, bool allowResizeContentsMargins);
49 void acclimatizeVirtualKeyboardForFocusWidget(bool allowResizeContentsMargins);
50 void _q_panWindowContentsForVirtualKeyboard();
51 void _q_resizeWindowContentsForVirtualKeyboard();
52 void _q_sizeModeChanged();
53 void handleSizeModeChangeEvent(QWidget *widget, QEvent *event);
54
55 static bool isUserManualExists();
56public:
57// int m_pidLockFD = 0;
58 QLocalServer *m_localServer = nullptr;
59#ifdef Q_OS_UNIX
60 QStringList m_monitoredStartupApps;
61#endif
62
63 QString productName;
64 QIcon productIcon;
65 QString appLicense;
66 QString appDescription;
67 QString homePage;
68 QString acknowledgementPage;
69 QString applicationCreditsFile;
70 QByteArray applicationCreditsContent;
71 QString licensePath;
72
73 bool acknowledgementPageVisible = true;
74
75 bool visibleMenuShortcutText = false;
76 bool visibleMenuCheckboxWidget = false;
77 bool visibleMenuIcon = false;
78 bool autoActivateWindows = false;
79
80 DAppHandler *appHandler = Q_NULLPTR;
81 DAboutDialog *aboutDialog = Q_NULLPTR;
82 DFeatureDisplayDialog *featureDisplayDialog = Q_NULLPTR;
83 DLicenseDialog *licenseDialog = Q_NULLPTR;
84
85 // 需要自适应虚拟键盘环境的窗口
86 QPointer<QWidget> activeInputWindow;
87 // 上一次为适配虚拟键盘所设置的值
88 QPair<int, int> lastContentsMargins;
89 QMargins activeInputWindowContentsMargins;
90 QList<QWidget*> acclimatizeVirtualKeyboardWindows;
91};
92
93DWIDGET_END_NAMESPACE
94
95#endif // DAPPLICATION_P_H
DAboutDialog 类提供了应用程序的关于对话框, 规范所有 deepin 应用关于窗口设计规范, 符合 deepin 风格
Definition daboutdialog.h:14
Definition dapplication.h:185
Definition dapplication_p.h:26
DApplication 是 DTK 中用于替换 QCoreApplication 相关功能实现的类.
Definition dapplication.h:33
特性介绍对话框,展示应用更新的新特性
Definition dfeaturedisplaydialog.h:37
开源许可协议对话框,展示应用及组件所用的开源许可协议
Definition dlicensedialog.h:14