20#ifndef LIBREPCB_EDITOR_MAINWINDOW_H
21#define LIBREPCB_EDITOR_MAINWINDOW_H
39class RuleCheckMessage;
45class MainWindowTestAdapter;
47class ProjectReadmeRenderer;
67 slint::ComponentHandle<ui::AppWindow> win,
int id,
68 QObject* parent =
nullptr) noexcept;
76 void addSection(
int newIndex,
bool makeCurrent)
noexcept;
77 void addTab(std::shared_ptr<WindowTab> tab,
int section = -1,
int index = -1,
78 bool switchToTab =
true,
bool switchToSection =
true) noexcept;
80 int section,
int tab,
bool* wasCurrentTab =
nullptr,
81 bool* wasCurrentSection =
nullptr) noexcept;
87 bool zoomTo) noexcept;
103 void trigger(ui::Action a) noexcept;
104 void triggerSection(
int section, ui::WindowSectionAction a) noexcept;
105 void triggerTab(
int section,
int tab, ui::TabAction a) noexcept;
106 void triggerLibrary(slint::SharedString path, ui::LibraryAction a) noexcept;
108 ui::LibraryElementAction a) noexcept;
111 ui::SchematicAction a) noexcept;
112 void triggerBoard(
int project,
int board, ui::BoardAction a) noexcept;
115 bool copyFrom) noexcept;
117 bool copyFrom) noexcept;
119 bool copyFrom) noexcept;
121 bool copyFrom) noexcept;
123 bool copyFrom) noexcept;
125 bool copyFrom) noexcept;
127 bool copyFrom) noexcept;
130 template <typename T>
132 template <typename T>
134 template <typename T>
140 slint::ComponentHandle<ui::AppWindow>
mWindow;
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The RuleCheckMessage class.
Definition rulecheckmessage.h:45
The GuiApplication class.
Definition guiapplication.h:75
The LibraryEditor class.
Definition libraryeditor.h:56
The MainWindow class.
Definition mainwindow.h:59
void openComponentCategoryTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:974
void triggerProject(int index, ui::ProjectAction a) noexcept
Definition mainwindow.cpp:820
std::shared_ptr< WindowTab > removeTab(int section, int tab, bool *wasCurrentTab=nullptr, bool *wasCurrentSection=nullptr) noexcept
Definition mainwindow.cpp:432
slint::CloseRequestResponse closeRequested() noexcept
Definition mainwindow.cpp:508
std::unique_ptr< MainWindowTestAdapter > mTestAdapter
Definition mainwindow.h:144
void popUpNotifications() noexcept
Definition mainwindow.cpp:450
void triggerSection(int section, ui::WindowSectionAction a) noexcept
Definition mainwindow.cpp:656
void trigger(ui::Action a) noexcept
Definition mainwindow.cpp:543
void highlightErcMessage(ProjectEditor &prjEditor, std::shared_ptr< const RuleCheckMessage > msg, bool zoomTo) noexcept
Definition mainwindow.cpp:469
void showPanelPage(ui::PanelPage page) noexcept
Definition mainwindow.cpp:446
std::unique_ptr< ProjectReadmeRenderer > mProjectPreviewRenderer
Definition mainwindow.h:143
void openBoard3dTab(int projectIndex, int index) noexcept
Definition mainwindow.cpp:1476
bool isCurrentWindow() const noexcept
Definition mainwindow.cpp:369
void updateHomeTabSection() noexcept
Definition mainwindow.cpp:1486
bool switchToLibraryElementTab(const FilePath &fp) noexcept
Definition mainwindow.cpp:1503
std::shared_ptr< T > switchToProjectTab(int prjIndex, int objIndex) noexcept
Definition mainwindow.cpp:1513
int getId() const noexcept
Definition mainwindow.h:72
void openPackageCategoryTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1014
void openComponentTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1270
void triggerBoard(int project, int board, ui::BoardAction a) noexcept
Definition mainwindow.cpp:876
void openPackageTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1136
const QString mSettingsPrefix
Definition mainwindow.h:138
std::shared_ptr< SchematicTab > openSchematicTab(int projectIndex, int index) noexcept
Definition mainwindow.cpp:1450
void triggerLibraryElement(slint::SharedString path, ui::LibraryElementAction a) noexcept
Definition mainwindow.cpp:766
slint::ComponentHandle< ui::AppWindow > mWindow
Definition mainwindow.h:140
void setCurrentLibrary(int index) noexcept
Definition mainwindow.cpp:494
void triggerLibrary(slint::SharedString path, ui::LibraryAction a) noexcept
Definition mainwindow.cpp:688
void openDeviceTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1358
void openBoard2dTab(int projectIndex, int index, bool switchToTab=true) noexcept
Definition mainwindow.cpp:1464
std::shared_ptr< UiObjectList< WindowSection, ui::WindowSectionData > > mSections
Definition mainwindow.h:142
MainWindow(const MainWindow &other)=delete
void triggerTab(int section, int tab, ui::TabAction a) noexcept
Definition mainwindow.cpp:682
const int mId
Definition mainwindow.h:137
void openLibraryTab(const FilePath &fp, bool wizardMode) noexcept
Definition mainwindow.cpp:951
void makeCurrentWindow() noexcept
Definition mainwindow.cpp:373
QWidget & getWidget() noexcept
Definition mainwindow.h:75
QWidget * mWidget
Definition mainwindow.h:141
bool switchToTab() noexcept
Definition mainwindow.cpp:1493
void addTab(std::shared_ptr< WindowTab > tab, int section=-1, int index=-1, bool switchToTab=true, bool switchToSection=true) noexcept
Definition mainwindow.cpp:412
void openOrganizationTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1402
void addSection(int newIndex, bool makeCurrent) noexcept
Definition mainwindow.cpp:379
void openSymbolTab(LibraryEditor &editor, const FilePath &fp, bool copyFrom) noexcept
Definition mainwindow.cpp:1054
void triggerSchematic(int project, int schematic, ui::SchematicAction a) noexcept
Definition mainwindow.cpp:850
void setCurrentProject(int index) noexcept
Definition mainwindow.cpp:499
void showStatusBarMessage(const QString &message, int timeoutMs)
Definition mainwindow.cpp:456
GuiApplication & mApp
Definition mainwindow.h:139
Adapter class for automated GUI tests.
Definition mainwindowtestadapter.h:47
The ProjectEditor class.
Definition projecteditor.h:64
Renders a README.md or other file types as a QPixmap.
Definition projectreadmerenderer.h:44
The SchematicTab class.
Definition schematictab.h:63
The UiObjectList class.
Definition uiobjectlist.h:47
The WindowSection class.
Definition windowsection.h:57
The WindowTab class.
Definition windowtab.h:52
Definition occmodel.cpp:77