LibrePCB Developers Documentation
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, QWidget *parent) 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
 

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
 
QPointer< QWidget > mParent
 

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,
QWidget *  parent 
)
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:

◆ 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

◆ mParent

QPointer<QWidget> mParent
private

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