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

The MainWindow class. More...

#include <mainwindow.h>

Inherits QObject.

+ Collaboration diagram for MainWindow:

Signals

void aboutToClose ()
 

Public Member Functions

 MainWindow ()=delete
 
 MainWindow (const MainWindow &other)=delete
 
 MainWindow (GuiApplication &app, slint::ComponentHandle< ui::AppWindow > win, int id, QObject *parent=nullptr) noexcept
 
 ~MainWindow () noexcept
 
int getId () const noexcept
 
bool isCurrentWindow () const noexcept
 
void makeCurrentWindow () noexcept
 
void showPanelPage (ui::PanelPage page) noexcept
 
void popUpNotifications () noexcept
 
void showStatusBarMessage (const QString &message, int timeoutMs)
 
void setCurrentLibrary (int index) noexcept
 
void setCurrentProject (int index) noexcept
 
MainWindowoperator= (const MainWindow &rhs)=delete
 

Private Member Functions

slint::CloseRequestResponse closeRequested () noexcept
 
void trigger (ui::Action a) noexcept
 
void triggerSection (int section, ui::WindowSectionAction a) noexcept
 
void triggerTab (int section, int tab, ui::TabAction a) noexcept
 
void triggerLibrary (slint::SharedString path, ui::LibraryAction a) noexcept
 
void triggerLibraryElement (slint::SharedString path, ui::LibraryElementAction a) noexcept
 
void triggerProject (int index, ui::ProjectAction a) noexcept
 
void triggerSchematic (int project, int schematic, ui::SchematicAction a) noexcept
 
void triggerBoard (int project, int board, ui::BoardAction a) noexcept
 
void openLibraryTab (const FilePath &fp, bool wizardMode) noexcept
 
void openComponentCategoryTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openPackageCategoryTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openSymbolTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openPackageTab (LibraryEditor &editor, const FilePath &fp) noexcept
 
void openComponentTab (LibraryEditor &editor, const FilePath &fp) noexcept
 
void openDeviceTab (LibraryEditor &editor, const FilePath &fp) noexcept
 
void openSchematicTab (int projectIndex, int index) noexcept
 
void openBoard2dTab (int projectIndex, int index) noexcept
 
void openBoard3dTab (int projectIndex, int index) noexcept
 
void splitSection (int index, bool makeCurrent) noexcept
 
void updateHomeTabSection () noexcept
 
void addTab (std::shared_ptr< WindowTab > tab) noexcept
 
template<typename T >
bool switchToTab () noexcept
 
template<typename T >
bool switchToLibraryElementTab (const FilePath &fp) noexcept
 
template<typename T >
bool switchToProjectTab (int prjIndex, int objIndex) noexcept
 

Private Attributes

const int mId
 
const QString mSettingsPrefix
 
GuiApplicationmApp
 
slint::ComponentHandle< ui::AppWindow > mWindow
 
QWidget * mWidget
 
std::shared_ptr< UiObjectList< WindowSection, ui::WindowSectionData > > mSections
 
std::unique_ptr< ProjectReadmeRenderermProjectPreviewRenderer
 
std::unique_ptr< MainWindowTestAdaptermTestAdapter
 

Friends

class MainWindowTestAdapter
 

Detailed Description

The MainWindow class.

Constructor & Destructor Documentation

◆ MainWindow() [1/3]

MainWindow ( )
delete

◆ MainWindow() [2/3]

MainWindow ( const MainWindow other)
delete

◆ MainWindow() [3/3]

MainWindow ( GuiApplication app,
slint::ComponentHandle< ui::AppWindow >  win,
int  id,
QObject *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~MainWindow()

~MainWindow ( )
noexcept

Member Function Documentation

◆ getId()

int getId ( ) const
inlinenoexcept

◆ isCurrentWindow()

bool isCurrentWindow ( ) const
noexcept

◆ makeCurrentWindow()

void makeCurrentWindow ( )
noexcept

◆ showPanelPage()

void showPanelPage ( ui::PanelPage  page)
noexcept
+ Here is the caller graph for this function:

◆ popUpNotifications()

void popUpNotifications ( )
noexcept
+ Here is the call graph for this function:

◆ showStatusBarMessage()

void showStatusBarMessage ( const QString &  message,
int  timeoutMs 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCurrentLibrary()

void setCurrentLibrary ( int  index)
noexcept

◆ setCurrentProject()

void setCurrentProject ( int  index)
noexcept

◆ operator=()

MainWindow & operator= ( const MainWindow rhs)
delete

◆ aboutToClose

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

◆ closeRequested()

slint::CloseRequestResponse closeRequested ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigger()

void trigger ( ui::Action  a)
privatenoexcept
+ Here is the call graph for this function:

◆ triggerSection()

void triggerSection ( int  section,
ui::WindowSectionAction  a 
)
privatenoexcept

◆ triggerTab()

void triggerTab ( int  section,
int  tab,
ui::TabAction  a 
)
privatenoexcept

◆ triggerLibrary()

void triggerLibrary ( slint::SharedString  path,
ui::LibraryAction  a 
)
privatenoexcept
+ Here is the call graph for this function:

◆ triggerLibraryElement()

void triggerLibraryElement ( slint::SharedString  path,
ui::LibraryElementAction  a 
)
privatenoexcept
+ Here is the call graph for this function:

◆ triggerProject()

void triggerProject ( int  index,
ui::ProjectAction  a 
)
privatenoexcept

◆ triggerSchematic()

void triggerSchematic ( int  project,
int  schematic,
ui::SchematicAction  a 
)
privatenoexcept

◆ triggerBoard()

void triggerBoard ( int  project,
int  board,
ui::BoardAction  a 
)
privatenoexcept

◆ openLibraryTab()

void openLibraryTab ( const FilePath fp,
bool  wizardMode 
)
privatenoexcept
+ Here is the call graph for this function:

◆ openComponentCategoryTab()

void openComponentCategoryTab ( LibraryEditor editor,
const FilePath fp,
bool  copyFrom 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openPackageCategoryTab()

void openPackageCategoryTab ( LibraryEditor editor,
const FilePath fp,
bool  copyFrom 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openSymbolTab()

void openSymbolTab ( LibraryEditor editor,
const FilePath fp,
bool  copyFrom 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openPackageTab()

void openPackageTab ( LibraryEditor editor,
const FilePath fp 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ openComponentTab()

void openComponentTab ( LibraryEditor editor,
const FilePath fp 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ openDeviceTab()

void openDeviceTab ( LibraryEditor editor,
const FilePath fp 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ openSchematicTab()

void openSchematicTab ( int  projectIndex,
int  index 
)
privatenoexcept

◆ openBoard2dTab()

void openBoard2dTab ( int  projectIndex,
int  index 
)
privatenoexcept

◆ openBoard3dTab()

void openBoard3dTab ( int  projectIndex,
int  index 
)
privatenoexcept

◆ splitSection()

void splitSection ( int  index,
bool  makeCurrent 
)
privatenoexcept
+ Here is the call graph for this function:

◆ updateHomeTabSection()

void updateHomeTabSection ( )
privatenoexcept

◆ addTab()

void addTab ( std::shared_ptr< WindowTab tab)
privatenoexcept

◆ switchToTab()

template<typename T >
bool switchToTab ( )
privatenoexcept

◆ switchToLibraryElementTab()

template<typename T >
bool switchToLibraryElementTab ( const FilePath fp)
privatenoexcept

◆ switchToProjectTab()

template<typename T >
bool switchToProjectTab ( int  prjIndex,
int  objIndex 
)
privatenoexcept

Friends And Related Symbol Documentation

◆ MainWindowTestAdapter

friend class MainWindowTestAdapter
friend

Member Data Documentation

◆ mId

const int mId
private

◆ mSettingsPrefix

const QString mSettingsPrefix
private

◆ mApp

GuiApplication& mApp
private

◆ mWindow

slint::ComponentHandle<ui::AppWindow> mWindow
private

◆ mWidget

QWidget* mWidget
private

◆ mSections

std::shared_ptr<UiObjectList<WindowSection, ui::WindowSectionData> > mSections
private

◆ mProjectPreviewRenderer

std::unique_ptr<ProjectReadmeRenderer> mProjectPreviewRenderer
private

◆ mTestAdapter

std::unique_ptr<MainWindowTestAdapter> mTestAdapter
private

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