LibrePCB Developers Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DesktopServices Class Referencefinal

Provides methods to access common desktop services. More...

#include <desktopservices.h>

+ Collaboration diagram for DesktopServices:

Public Member Functions

 DesktopServices ()=delete
 
 DesktopServices (const DesktopServices &other)=delete
 
 DesktopServices (const WorkspaceSettings &settings) noexcept
 
 ~DesktopServices () noexcept
 
bool openUrl (const QUrl &url) const noexcept
 
bool openWebUrl (const QUrl &url) const noexcept
 
bool openLocalPath (const FilePath &filePath) const noexcept
 
DesktopServicesoperator= (const DesktopServices &rhs)=delete
 

Static Public Member Functions

static void downloadAndOpenResourceAsync (const WorkspaceSettings &settings, const QString &name, const QString &mediaType, const QUrl &url, QPointer< QWidget > parent) noexcept
 

Private Member Functions

bool openDirectory (const FilePath &filePath) const noexcept
 
bool openLocalPathWithCommand (const FilePath &filePath, const QStringList &commands) const noexcept
 
bool openUrlFallback (const QUrl &url) const noexcept
 

Static Private Member Functions

static void showWaitCursor () noexcept
 

Private Attributes

const WorkspaceSettingsmSettings
 

Detailed Description

Provides methods to access common desktop services.

Similar to QDesktopServices, but respecting the workspace settings (e.g. custom PDF viewer). In addition, the cursor is automatically changed to a waiting spinner while opening an external application.

See also
https://doc.qt.io/qt-5/qdesktopservices.html

Constructor & Destructor Documentation

◆ DesktopServices() [1/3]

DesktopServices ( )
delete

◆ DesktopServices() [2/3]

DesktopServices ( const DesktopServices other)
delete

◆ DesktopServices() [3/3]

DesktopServices ( const WorkspaceSettings settings)
explicitnoexcept

◆ ~DesktopServices()

~DesktopServices ( )
noexcept

Member Function Documentation

◆ openUrl()

bool openUrl ( const QUrl &  url) const
noexcept
+ Here is the caller graph for this function:

◆ openWebUrl()

bool openWebUrl ( const QUrl &  url) const
noexcept
+ Here is the caller graph for this function:

◆ openLocalPath()

bool openLocalPath ( const FilePath filePath) const
noexcept
+ Here is the caller graph for this function:

◆ downloadAndOpenResourceAsync()

void downloadAndOpenResourceAsync ( const WorkspaceSettings settings,
const QString &  name,
const QString &  mediaType,
const QUrl &  url,
QPointer< QWidget >  parent 
)
staticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

DesktopServices & operator= ( const DesktopServices rhs)
delete

◆ openDirectory()

bool openDirectory ( const FilePath filePath) const
privatenoexcept

◆ openLocalPathWithCommand()

bool openLocalPathWithCommand ( const FilePath filePath,
const QStringList &  commands 
) const
privatenoexcept

◆ openUrlFallback()

bool openUrlFallback ( const QUrl &  url) const
privatenoexcept

◆ showWaitCursor()

void showWaitCursor ( )
staticprivatenoexcept

Member Data Documentation

◆ mSettings

const WorkspaceSettings& mSettings
private

The documentation for this class was generated from the following files: