DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
ddesktopservices.h
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DDESKTOPSERVICES_H
6#define DDESKTOPSERVICES_H
7
8#include <dtkwidget_global.h>
9
10#include <QUrl>
11
12DWIDGET_BEGIN_NAMESPACE
13
14class
15 D_DECL_DEPRECATED_X("Use Dtk::Gui::DDesktopServices")
17{
18public:
19
20#ifdef Q_OS_LINUX
21 enum SystemSoundEffect {
22 SSE_Notifications,
23 SEE_Screenshot,
24 SSE_EmptyTrash,
25 SSE_SendFileComplete,
26 SSE_BootUp,
27 SSE_Shutdown,
28 SSE_Logout,
29 SSE_WakeUp,
30 SSE_VolumeChange,
31 SSE_LowBattery,
32 SSE_PlugIn,
33 SSE_PlugOut,
34 SSE_DeviceAdded,
35 SSE_DeviceRemoved,
36 SSE_Error,
37 };
38#endif
39
40 static bool showFolder(QString localFilePath, const QString &startupId = QString());
41 static bool showFolders(const QList<QString> localFilePaths, const QString &startupId = QString());
42 static bool showFolder(QUrl url, const QString &startupId = QString());
43 static bool showFolders(const QList<QUrl> urls, const QString &startupId = QString());
44
45 static bool showFileItemPropertie(QString localFilePath, const QString &startupId = QString());
46 static bool showFileItemProperties(const QList<QString> localFilePaths, const QString &startupId = QString());
47 static bool showFileItemPropertie(QUrl url, const QString &startupId = QString());
48 static bool showFileItemProperties(const QList<QUrl> urls, const QString &startupId = QString());
49
50 static bool showFileItem(QString localFilePath, const QString &startupId = QString());
51 static bool showFileItems(const QList<QString> localFilePaths, const QString &startupId = QString());
52 static bool showFileItem(QUrl url, const QString &startupId = QString());
53 static bool showFileItems(const QList<QUrl> urls, const QString &startupId = QString());
54
55 static bool trash(QString localFilePath);
56 static bool trash(const QList<QString> localFilePaths);
57 static bool trash(QUrl urlstartupId);
58 static bool trash(const QList<QUrl> urls);
59
60#ifdef Q_OS_LINUX
61 static bool playSystemSoundEffect(const SystemSoundEffect &effect);
62 static bool playSystemSoundEffect(const QString &name);
63 static bool previewSystemSoundEffect(const SystemSoundEffect &effect);
64 static bool previewSystemSoundEffect(const QString &name);
65 static QString getNameByEffectType(const SystemSoundEffect &effect);
66#endif
67
68 static QString errorMessage();
69};
70
71DWIDGET_END_NAMESPACE
72
73#ifdef Q_OS_LINUX
74Q_DECLARE_METATYPE(DTK_WIDGET_NAMESPACE::DDesktopServices::SystemSoundEffect)
75#endif
76
77#endif // DDESKTOPSERVICES_H
Definition ddesktopservices.h:17