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

The GuiApplication class. More...

#include <guiapplication.h>

Inherits QObject.

+ Collaboration diagram for GuiApplication:

Signals

void statusBarMessageChanged (const QString &message, int timeoutMs)
 
void librariesContainStandardComponentsChanged (bool contains)
 

Public Member Functions

 GuiApplication ()=delete
 
 GuiApplication (const GuiApplication &other)=delete
 
 GuiApplication (Workspace &ws, bool fileFormatIsOutdated, QObject *parent=nullptr) noexcept
 
 ~GuiApplication () noexcept
 
WorkspacegetWorkspace () noexcept
 
QuickAccessModelgetQuickAccess () noexcept
 
void openFile (const FilePath &fp, QWidget *parent) noexcept
 
void switchWorkspace (QWidget *parent) noexcept
 
void execWorkspaceSettingsDialog (QWidget *parent) noexcept
 
void addExampleProjects (QWidget *parent) noexcept
 
LibrariesModelgetLocalLibraries () noexcept
 
LibrariesModelgetRemoteLibraries () noexcept
 
const QVector< std::shared_ptr< LibraryEditor > > & getLibraries () noexcept
 
std::shared_ptr< LibraryEditorgetLibrary (const FilePath &libDir) noexcept
 
std::shared_ptr< LibraryEditoropenLibrary (const FilePath &libDir) noexcept
 
void closeLibrary (const FilePath &libDir) noexcept
 
bool requestClosingAllLibraries () noexcept
 
const QVector< std::shared_ptr< ProjectEditor > > & getProjects () noexcept
 
void createProject (const FilePath &parentDir, bool eagleImport, QWidget *parent) noexcept
 
std::shared_ptr< ProjectEditoropenProject (FilePath fp, QWidget *parent) noexcept
 Open a project with the editor.
 
void closeProject (int index) noexcept
 
bool requestClosingAllProjects () noexcept
 
NotificationsModelgetNotifications () noexcept
 
void createNewWindow (int id=-1, int projectIndex=-1) noexcept
 
int getWindowCount () const noexcept
 
void stopWindowStateAutosaveTimer () noexcept
 
void exec ()
 
void quit (QPointer< QWidget > parent) noexcept
 
GuiApplicationoperator= (const GuiApplication &rhs)=delete
 

Protected Member Functions

bool eventFilter (QObject *watched, QEvent *event) noexcept override
 

Private Member Functions

void openProjectsPassedByCommandLine () noexcept
 
void openProjectPassedByOs (const QString &file, bool silent=false) noexcept
 
void openProjectLibraryUpdater (const FilePath &project) noexcept
 
std::shared_ptr< MainWindowgetCurrentWindow () noexcept
 
void updateLibrariesContainStandardComponents () noexcept
 
void updateNoLibrariesInstalledNotification () noexcept
 
void updateDesktopIntegrationNotification () noexcept
 

Private Attributes

WorkspacemWorkspace
 
bool mLibrariesContainStandardComponents
 
std::shared_ptr< NotificationsModelmNotifications
 
std::shared_ptr< NotificationmNotificationNoLibrariesInstalled
 
std::shared_ptr< NotificationmNotificationDesktopIntegration
 
std::shared_ptr< QuickAccessModelmQuickAccessModel
 
std::shared_ptr< LibrariesModelmLocalLibraries
 
std::shared_ptr< LibrariesModelmRemoteLibraries
 
std::unique_ptr< SlintKeyEventTextBuildermLibrariesFilter
 
std::shared_ptr< UiObjectList< ProjectEditor, ui::ProjectData > > mProjects
 
std::shared_ptr< UiObjectList< LibraryEditor, ui::LibraryData > > mLibraries
 
std::unique_ptr< ProjectLibraryUpdatermProjectLibraryUpdater
 
QList< std::shared_ptr< MainWindow > > mWindows
 
QTimer mSaveOpenedWindowsCountdown
 

Detailed Description

The GuiApplication class.

Constructor & Destructor Documentation

◆ GuiApplication() [1/3]

GuiApplication ( )
delete

◆ GuiApplication() [2/3]

GuiApplication ( const GuiApplication other)
delete

◆ GuiApplication() [3/3]

GuiApplication ( Workspace ws,
bool  fileFormatIsOutdated,
QObject *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~GuiApplication()

~GuiApplication ( )
noexcept

Member Function Documentation

◆ getWorkspace()

Workspace & getWorkspace ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ getQuickAccess()

QuickAccessModel & getQuickAccess ( )
inlinenoexcept

◆ openFile()

void openFile ( const FilePath fp,
QWidget *  parent 
)
noexcept
+ Here is the call graph for this function:

◆ switchWorkspace()

void switchWorkspace ( QWidget *  parent)
noexcept
+ Here is the call graph for this function:

◆ execWorkspaceSettingsDialog()

void execWorkspaceSettingsDialog ( QWidget *  parent)
noexcept

◆ addExampleProjects()

void addExampleProjects ( QWidget *  parent)
noexcept
+ Here is the call graph for this function:

◆ getLocalLibraries()

LibrariesModel & getLocalLibraries ( )
inlinenoexcept

◆ getRemoteLibraries()

LibrariesModel & getRemoteLibraries ( )
inlinenoexcept

◆ getLibraries()

const QVector< std::shared_ptr< LibraryEditor > > & getLibraries ( )
inlinenoexcept

◆ getLibrary()

std::shared_ptr< LibraryEditor > getLibrary ( const FilePath libDir)
noexcept

◆ openLibrary()

std::shared_ptr< LibraryEditor > openLibrary ( const FilePath libDir)
noexcept
+ Here is the call graph for this function:

◆ closeLibrary()

void closeLibrary ( const FilePath libDir)
noexcept

◆ requestClosingAllLibraries()

bool requestClosingAllLibraries ( )
noexcept
+ Here is the caller graph for this function:

◆ getProjects()

const QVector< std::shared_ptr< ProjectEditor > > & getProjects ( )
inlinenoexcept

◆ createProject()

void createProject ( const FilePath parentDir,
bool  eagleImport,
QWidget *  parent 
)
noexcept
+ Here is the call graph for this function:

◆ openProject()

std::shared_ptr< ProjectEditor > openProject ( FilePath  fp,
QWidget *  parent 
)
noexcept

Open a project with the editor.

Parameters
fpThe filepath to the *.lpp project file to open. If invalid, a file dialog will be shown to select it.
parentParent widget for dialogs.
Returns
The pointer to the opened project editor (nullptr on error)
+ Here is the call graph for this function:

◆ closeProject()

void closeProject ( int  index)
noexcept

◆ requestClosingAllProjects()

bool requestClosingAllProjects ( )
noexcept
+ Here is the caller graph for this function:

◆ getNotifications()

NotificationsModel & getNotifications ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ createNewWindow()

void createNewWindow ( int  id = -1,
int  projectIndex = -1 
)
noexcept
+ Here is the call graph for this function:

◆ getWindowCount()

int getWindowCount ( ) const
noexcept
+ Here is the caller graph for this function:

◆ stopWindowStateAutosaveTimer()

void stopWindowStateAutosaveTimer ( )
noexcept
+ Here is the caller graph for this function:

◆ exec()

void exec ( )
+ Here is the caller graph for this function:

◆ quit()

void quit ( QPointer< QWidget >  parent)
noexcept

◆ operator=()

GuiApplication & operator= ( const GuiApplication rhs)
delete

◆ statusBarMessageChanged

void statusBarMessageChanged ( const QString &  message,
int  timeoutMs 
)
signal

◆ librariesContainStandardComponentsChanged

void librariesContainStandardComponentsChanged ( bool  contains)
signal

◆ eventFilter()

bool eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotectednoexcept

◆ openProjectsPassedByCommandLine()

void openProjectsPassedByCommandLine ( )
privatenoexcept

◆ openProjectPassedByOs()

void openProjectPassedByOs ( const QString &  file,
bool  silent = false 
)
privatenoexcept
+ Here is the call graph for this function:

◆ openProjectLibraryUpdater()

void openProjectLibraryUpdater ( const FilePath project)
privatenoexcept

◆ getCurrentWindow()

std::shared_ptr< MainWindow > getCurrentWindow ( )
privatenoexcept

◆ updateLibrariesContainStandardComponents()

void updateLibrariesContainStandardComponents ( )
privatenoexcept
+ Here is the call graph for this function:

◆ updateNoLibrariesInstalledNotification()

void updateNoLibrariesInstalledNotification ( )
privatenoexcept
+ Here is the call graph for this function:

◆ updateDesktopIntegrationNotification()

void updateDesktopIntegrationNotification ( )
privatenoexcept

Member Data Documentation

◆ mWorkspace

Workspace& mWorkspace
private

◆ mLibrariesContainStandardComponents

bool mLibrariesContainStandardComponents
private

◆ mNotifications

std::shared_ptr<NotificationsModel> mNotifications
private

◆ mNotificationNoLibrariesInstalled

std::shared_ptr<Notification> mNotificationNoLibrariesInstalled
private

◆ mNotificationDesktopIntegration

std::shared_ptr<Notification> mNotificationDesktopIntegration
private

◆ mQuickAccessModel

std::shared_ptr<QuickAccessModel> mQuickAccessModel
private

◆ mLocalLibraries

std::shared_ptr<LibrariesModel> mLocalLibraries
private

◆ mRemoteLibraries

std::shared_ptr<LibrariesModel> mRemoteLibraries
private

◆ mLibrariesFilter

std::unique_ptr<SlintKeyEventTextBuilder> mLibrariesFilter
private

◆ mProjects

std::shared_ptr<UiObjectList<ProjectEditor, ui::ProjectData> > mProjects
private

◆ mLibraries

std::shared_ptr<UiObjectList<LibraryEditor, ui::LibraryData> > mLibraries
private

◆ mProjectLibraryUpdater

std::unique_ptr<ProjectLibraryUpdater> mProjectLibraryUpdater
private

◆ mWindows

QList<std::shared_ptr<MainWindow> > mWindows
private

◆ mSaveOpenedWindowsCountdown

QTimer mSaveOpenedWindowsCountdown
private

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