DtkGui
DTK Gui module
载入中...
搜索中...
未找到
Dtk::Gui::DDesktopServices类 参考

Public 类型

enum  SystemSoundEffect {
  SSE_Notifications , SEE_Screenshot , SSE_EmptyTrash , SSE_SendFileComplete ,
  SSE_BootUp , SSE_Shutdown , SSE_Logout , SSE_WakeUp ,
  SSE_VolumeChange , SSE_LowBattery , SSE_PlugIn , SSE_PlugOut ,
  SSE_DeviceAdded , SSE_DeviceRemoved , SSE_Error
}
 系统音效的枚举 更多...
 

静态 Public 成员函数

static bool showFolder (const QString &localFilePath, const QString &startupId=QString())
 
static bool showFolders (const QList< QString > &localFilePaths, const QString &startupId=QString())
 
static bool showFolder (const QUrl &url, const QString &startupId=QString())
 
static bool showFolders (const QList< QUrl > &urls, const QString &startupId=QString())
 
static bool showFileItemProperty (const QString &localFilePath, const QString &startupId=QString())
 
static bool showFileItemProperties (const QList< QString > &localFilePaths, const QString &startupId=QString())
 
static bool showFileItemProperty (const QUrl &url, const QString &startupId=QString())
 
static bool showFileItemProperties (const QList< QUrl > &urls, const QString &startupId=QString())
 
static bool showFileItem (const QString &localFilePath, const QString &startupId=QString())
 
static bool showFileItems (const QList< QString > &localFilePaths, const QString &startupId=QString())
 
static bool showFileItem (const QUrl &url, const QString &startupId=QString())
 
static bool showFileItems (const QList< QUrl > &urls, const QString &startupId=QString())
 
static bool trash (const QString &localFilePath)
 
static bool trash (const QList< QString > &localFilePaths)
 
static bool trash (const QUrl &url)
 
static bool trash (const QList< QUrl > &urls)
 
static bool playSystemSoundEffect (const SystemSoundEffect &effect)
 
static bool playSystemSoundEffect (const QString &name)
 
static bool previewSystemSoundEffect (const SystemSoundEffect &effect)
 
static bool previewSystemSoundEffect (const QString &name)
 
static QString getNameByEffectType (const SystemSoundEffect &effect)
 
static QString errorMessage ()
 

成员枚举类型说明

◆ SystemSoundEffect

enum Dtk::Gui::DDesktopServices::SystemSoundEffect

系统音效的枚举

枚举值
SSE_Notifications 

显示通知的音效

SEE_Screenshot 

截屏的音效

SSE_EmptyTrash 

清空回收站的音效

SSE_SendFileComplete 

完成发送文件(到桌面)的音效

SSE_BootUp 

开机的音效

SSE_Shutdown 

关机的音效

SSE_Logout 

注销的音效

SSE_WakeUp 

唤醒的音效

SSE_VolumeChange 

音量调节的音效

SSE_LowBattery 

低电量的音效

SSE_PlugIn 

电源接入的音效

SSE_PlugOut 

电源移除的音效

SSE_DeviceAdded 

移动设备接入的音效

SSE_DeviceRemoved 

移动设备移除的音效

SSE_Error 

错误提示的音效

成员函数说明

◆ errorMessage()

Dtk::Gui::DDesktopServices::errorMessage ( )
static

文件管理器相关调用出错时可以通过此接口获取错误信息

返回
错误信息

◆ getNameByEffectType()

Dtk::Gui::DDesktopServices::getNameByEffectType ( const SystemSoundEffect effect)
static

根据音效名预览系统音效。

参数
[in]effect要获取名称的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
返回
QString effect 对应的音效名称

◆ playSystemSoundEffect() [1/2]

Dtk::Gui::DDesktopServices::playSystemSoundEffect ( const QString &  name)
static

根据音效名播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败

参数
[in]name要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
返回
调用成功返回 true, 否则返回 false

◆ playSystemSoundEffect() [2/2]

Dtk::Gui::DDesktopServices::playSystemSoundEffect ( const SystemSoundEffect effect)
static

播放系统音效。如果系统音效被禁用或者要播放音效被禁用将播放失败

参数
[in]effect要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
返回
调用成功返回 true, 否则返回 false

◆ previewSystemSoundEffect() [1/2]

Dtk::Gui::DDesktopServices::previewSystemSoundEffect ( const QString &  name)
static

根据音效名预览系统音效。

参数
[in]name要播放的音效名称,见 Dtk::Gui::DDesktopServices::getNameByEffectType
返回
调用成功返回 true, 否则返回 false

◆ previewSystemSoundEffect() [2/2]

Dtk::Gui::DDesktopServices::previewSystemSoundEffect ( const SystemSoundEffect effect)
static

系统音效预览。

参数
[in]effect要播放的音效,见枚举 Dtk::Gui::DDesktopServices::SystemSoundEffect
返回
调用成功返回 true, 否则返回 false

◆ showFileItem() [1/2]

Dtk::Gui::DDesktopServices::showFileItem ( const QString &  localFilePath,
const QString &  startupId = QString() 
)
static

通过文件管理器在父目录中显示并选中文件(目录)

参数
[in]localFilePath要显示(选中)的文件(目录)路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItem() [2/2]

Dtk::Gui::DDesktopServices::showFileItem ( const QUrl &  url,
const QString &  startupId = QString() 
)
static

通过文件管理器在父目录中显示并选中文件(目录)

参数
[in]url要显示(选中)的文件(目录)QUrl 形式路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItemProperties() [1/2]

Dtk::Gui::DDesktopServices::showFileItemProperties ( const QList< QString > &  localFilePaths,
const QString &  startupId = QString() 
)
static

通过文件管理器显示多个文件的属性

参数
[in]localFilePaths要显示的文件路径列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItemProperties() [2/2]

Dtk::Gui::DDesktopServices::showFileItemProperties ( const QList< QUrl > &  urls,
const QString &  startupId = QString() 
)
static

通过文件管理器显示多个文件的属性

参数
[in]urls要显示的目录路径 url 列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItemProperty() [1/2]

Dtk::Gui::DDesktopServices::showFileItemProperty ( const QString &  localFilePath,
const QString &  startupId = QString() 
)
static

通过文件管理器显示文件的属性

参数
[in]localFilePath要显示的文件路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItemProperty() [2/2]

Dtk::Gui::DDesktopServices::showFileItemProperty ( const QUrl &  url,
const QString &  startupId = QString() 
)
static

通过文件管理器显示文件的属性

参数
[in]url要显示的文件 QUrl 形式路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItems() [1/2]

Dtk::Gui::DDesktopServices::showFileItems ( const QList< QString > &  localFilePaths,
const QString &  startupId = QString() 
)
static

通过文件管理器父目录中显示并选中多个文件(目录)

参数
[in]localFilePaths要显示(选中)的文件(目录)路径列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFileItems() [2/2]

Dtk::Gui::DDesktopServices::showFileItems ( const QList< QUrl > &  urls,
const QString &  startupId = QString() 
)
static

通过文件管理器父目录中显示并选中多个文件(目录)

参数
[in]urls要显示选中)的文件(目录)路径 url 列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFolder() [1/2]

Dtk::Gui::DDesktopServices::showFolder ( const QString &  localFilePath,
const QString &  startupId = QString() 
)
static

通过文件管理器显示目录

参数
[in]localFilePath要显示的目录路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFolder() [2/2]

Dtk::Gui::DDesktopServices::showFolder ( const QUrl &  url,
const QString &  startupId = QString() 
)
static

通过文件管理器显示目录

参数
[in]url要显示的目录 QUrl 形式路径
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFolders() [1/2]

Dtk::Gui::DDesktopServices::showFolders ( const QList< QString > &  localFilePaths,
const QString &  startupId = QString() 
)
static

通过文件管理器显示多个目录

参数
[in]localFilePaths要显示的目录路径列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ showFolders() [2/2]

Dtk::Gui::DDesktopServices::showFolders ( const QList< QUrl > &  urls,
const QString &  startupId = QString() 
)
static

通过文件管理器显示多个目录

参数
[in]urls要显示的目录路径 url 列表
[in]startupId本次启动的id, 默认为空
返回
调用成功返回 true, 否则返回 false

◆ trash() [1/4]

Dtk::Gui::DDesktopServices::trash ( const QList< QString > &  localFilePaths)
static

通过文件管理器将多个文件移入回收站

参数
[in]localFilePaths要移入回收站的文件路径列表
返回
调用成功返回 true, 否则返回 false

◆ trash() [2/4]

Dtk::Gui::DDesktopServices::trash ( const QList< QUrl > &  urls)
static

通过文件管理器将多个文件移入回收站

参数
[in]urls要移入回收站的文件路径 url 列表
返回
调用成功返回 true, 否则返回 false

◆ trash() [3/4]

Dtk::Gui::DDesktopServices::trash ( const QString &  localFilePath)
static

通过文件管理器将文件移入回收站

参数
[in]localFilePath要移入回收站的文件路径
返回
调用成功返回 true, 否则返回 false

◆ trash() [4/4]

Dtk::Gui::DDesktopServices::trash ( const QUrl &  url)
static

通过文件管理器将文件移入回收站

参数
[in]url要移入回收站的文件 url 路径
返回
调用成功返回 true, 否则返回 false

该类的文档由以下文件生成: