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
 
const GraphicsLayerListgetPreviewLayers () const noexcept
 
const LibraryElementCachegetLibraryElementCache () const 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
 
void highlightErcMessage (std::shared_ptr< const RuleCheckMessage > msg, bool zoomTo, int windowId) noexcept
 
std::shared_ptr< MainWindowgetCurrentWindow () noexcept
 
void updateLibrariesContainStandardComponents () noexcept
 
void updateNoLibrariesInstalledNotification () noexcept
 
void updateDesktopIntegrationNotification () noexcept
 
void moveTab (int srcWindowId, int srcSectionIndex, int srcTabIndex, int dstWindowId, int dstSectionIndex, int dstTabIndex, bool forceSwitchToTab) noexcept
 
std::shared_ptr< MainWindowgetWindowById (int id) noexcept
 

Private Attributes

WorkspacemWorkspace
 
bool mLibrariesContainStandardComponents
 
std::unique_ptr< GraphicsLayerListmPreviewLayers
 
std::shared_ptr< LibraryElementCachemLibraryElementCache
 
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
 
std::weak_ptr< OrganizationsDbModelmOrganizationsWithPcbDesignRules
 

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:

◆ getPreviewLayers()

const GraphicsLayerList & getPreviewLayers ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibraryElementCache()

const LibraryElementCache & getLibraryElementCache ( ) const
inlinenoexcept
+ Here is the caller 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

◆ highlightErcMessage()

void highlightErcMessage ( std::shared_ptr< const RuleCheckMessage msg,
bool  zoomTo,
int  windowId 
)
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

◆ moveTab()

void moveTab ( int  srcWindowId,
int  srcSectionIndex,
int  srcTabIndex,
int  dstWindowId,
int  dstSectionIndex,
int  dstTabIndex,
bool  forceSwitchToTab 
)
privatenoexcept

◆ getWindowById()

std::shared_ptr< MainWindow > getWindowById ( int  id)
privatenoexcept

Member Data Documentation

◆ mWorkspace

Workspace& mWorkspace
private

◆ mLibrariesContainStandardComponents

bool mLibrariesContainStandardComponents
private

◆ mPreviewLayers

std::unique_ptr<GraphicsLayerList> mPreviewLayers
private

◆ mLibraryElementCache

std::shared_ptr<LibraryElementCache> mLibraryElementCache
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

◆ mOrganizationsWithPcbDesignRules

std::weak_ptr<OrganizationsDbModel> mOrganizationsWithPcbDesignRules
private

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