LibrePCB Developers Documentation
Loading...
Searching...
No Matches
DesktopIntegration Class Referencefinal

Allow installing/uninstalling LibrePCB to the desktop environment. More...

#include <desktopintegration.h>

+ Collaboration diagram for DesktopIntegration:

Public Types

enum class  Status
 
enum class  Mode
 

Public Member Functions

 DesktopIntegration ()=delete
 

Static Public Member Functions

static bool isSupported () noexcept
 Check if this feature is available.
 
static Status getStatus () noexcept
 Check which application is currently installed.
 
static FilePath getExecutable () noexcept
 Get the path to the executable to be installed.
 
static void install ()
 Install this application to the desktop.
 
static void uninstall ()
 Uninstall this application from the desktop.
 
static bool execDialog (Mode mode, QWidget *parent) noexcept
 Execute dialog to install or uninstall the desktop integration.
 

Static Private Member Functions

static QHash< FilePath, QByteArray > getFileContentToInstall ()
 
static QSet< FilePathloadInstalledFiles ()
 
static void storeInstalledFiles (const QSet< FilePath > &files)
 
static void updateDatabase ()
 
static FilePath getDesktopFile () noexcept
 
static FilePath getConfigFile () noexcept
 
static FilePath getShareDirectory () noexcept
 

Detailed Description

Allow installing/uninstalling LibrePCB to the desktop environment.

Member Enumeration Documentation

◆ Status

enum class Status
strong
Enumerator
NothingInstalled 
InstalledThis 
InstalledOther 
InstalledUnknown 

◆ Mode

enum class Mode
strong
Enumerator
Install 
Uninstall 

Constructor & Destructor Documentation

◆ DesktopIntegration()

DesktopIntegration ( )
delete

Member Function Documentation

◆ isSupported()

bool isSupported ( )
staticnoexcept

Check if this feature is available.

Returns
True if integration is available, false if not.
+ Here is the call graph for this function:

◆ getStatus()

DesktopIntegration::Status getStatus ( )
staticnoexcept

Check which application is currently installed.

Returns
The current desktop integration status.
+ Here is the call graph for this function:

◆ getExecutable()

FilePath getExecutable ( )
staticnoexcept

Get the path to the executable to be installed.

Returns
FIle path to executable
+ Here is the caller graph for this function:

◆ install()

void install ( )
static

Install this application to the desktop.

Exceptions
ExceptionIn case of an error.
+ Here is the call graph for this function:

◆ uninstall()

void uninstall ( )
static

Uninstall this application from the desktop.

Exceptions
ExceptionIn case of an error.
+ Here is the call graph for this function:

◆ execDialog()

bool execDialog ( Mode  mode,
QWidget *  parent 
)
staticnoexcept

Execute dialog to install or uninstall the desktop integration.

Parameters
modeWhether the dialog should install or uninstall.
parentParent widget.
Returns
True on success, false otherwise.
+ Here is the call graph for this function:

◆ getFileContentToInstall()

QHash< FilePath, QByteArray > getFileContentToInstall ( )
staticprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadInstalledFiles()

QSet< FilePath > loadInstalledFiles ( )
staticprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeInstalledFiles()

void storeInstalledFiles ( const QSet< FilePath > &  files)
staticprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateDatabase()

void updateDatabase ( )
staticprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDesktopFile()

FilePath getDesktopFile ( )
staticprivatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getConfigFile()

FilePath getConfigFile ( )
staticprivatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getShareDirectory()

FilePath getShareDirectory ( )
staticprivatenoexcept
+ Here is the caller graph for this function:

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