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
 
QWidget & getWidget () noexcept
 
void addSection (int newIndex, bool makeCurrent) noexcept
 
void addTab (std::shared_ptr< WindowTab > tab, int section=-1, int index=-1, bool switchToTab=true, bool switchToSection=true) noexcept
 
std::shared_ptr< WindowTabremoveTab (int section, int tab, bool *wasCurrentTab=nullptr, bool *wasCurrentSection=nullptr) noexcept
 
void showPanelPage (ui::PanelPage page) noexcept
 
void popUpNotifications () noexcept
 
void showStatusBarMessage (const QString &message, int timeoutMs)
 
void highlightErcMessage (ProjectEditor &prjEditor, std::shared_ptr< const RuleCheckMessage > msg, bool zoomTo) noexcept
 
void setCurrentLibrary (int index) noexcept
 
void setCurrentProject (int index) noexcept
 
std::shared_ptr< SchematicTabopenSchematicTab (int projectIndex, int index) noexcept
 
void openBoard2dTab (int projectIndex, int index, bool switchToTab=true) 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, bool copyFrom) noexcept
 
void openComponentTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openDeviceTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openOrganizationTab (LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
 
void openBoard3dTab (int projectIndex, int index) noexcept
 
void updateHomeTabSection () noexcept
 
template<typename T >
bool switchToTab () noexcept
 
template<typename T >
bool switchToLibraryElementTab (const FilePath &fp) noexcept
 
template<typename T >
std::shared_ptr< T > 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

◆ getWidget()

QWidget & getWidget ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ addSection()

void addSection ( int  newIndex,
bool  makeCurrent 
)
noexcept
+ Here is the call graph for this function:

◆ addTab()

void addTab ( std::shared_ptr< WindowTab tab,
int  section = -1,
int  index = -1,
bool  switchToTab = true,
bool  switchToSection = true 
)
noexcept

◆ removeTab()

std::shared_ptr< WindowTab > removeTab ( int  section,
int  tab,
bool *  wasCurrentTab = nullptr,
bool *  wasCurrentSection = nullptr 
)
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:

◆ highlightErcMessage()

void highlightErcMessage ( ProjectEditor prjEditor,
std::shared_ptr< const RuleCheckMessage msg,
bool  zoomTo 
)
noexcept

◆ setCurrentLibrary()

void setCurrentLibrary ( int  index)
noexcept

◆ setCurrentProject()

void setCurrentProject ( int  index)
noexcept

◆ openSchematicTab()

std::shared_ptr< SchematicTab > openSchematicTab ( int  projectIndex,
int  index 
)
noexcept

◆ openBoard2dTab()

void openBoard2dTab ( int  projectIndex,
int  index,
bool  switchToTab = true 
)
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,
bool  copyFrom 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openComponentTab()

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

◆ openDeviceTab()

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

◆ openOrganizationTab()

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

◆ openBoard3dTab()

void openBoard3dTab ( int  projectIndex,
int  index 
)
privatenoexcept

◆ updateHomeTabSection()

void updateHomeTabSection ( )
privatenoexcept

◆ switchToTab()

template<typename T >
bool switchToTab ( )
privatenoexcept

◆ switchToLibraryElementTab()

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

◆ switchToProjectTab()

template<typename T >
std::shared_ptr< T > 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: