20#ifndef LIBREPCB_EDITOR_PROJECTEDITOR_H
21#define LIBREPCB_EDITOR_PROJECTEDITOR_H
26#include "../utils/uiobjectlist.h"
45class RuleCheckMessage;
52class RuleCheckMessagesModel;
75 GuiApplication& app, std::unique_ptr<Project> project,
int uiIndex,
76 const std::optional<ProjectLoader::MigrationLog>& migrationLog,
77 QObject* parent =
nullptr) noexcept;
85 const QVector<std::shared_ptr<SchematicEditor>>&
getSchematics() noexcept {
88 const QVector<std::shared_ptr<BoardEditor>>&
getBoards() noexcept {
93 ui::ProjectData
getUiData() const noexcept;
94 void setUiData(const ui::ProjectData& data) noexcept;
95 void trigger(ui::ProjectAction a) noexcept;
102 const QSet<const NetSignal*>& netSignals)
noexcept;
106 void undo() noexcept;
107 void redo() noexcept;
164 std::optional<
int> copyFromIndex) noexcept;
180 bool zoomTo,
int windowId);
218 std::shared_ptr<slint::VectorModel<ui::BusData>>
mBuses;
The Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:74
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The NetSignal class.
Definition netsignal.h:50
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
Helper to load a librepcb::Project from the file system.
Definition projectloader.h:52
The RuleCheckMessage class.
Definition rulecheckmessage.h:45
The SExpression class.
Definition sexpression.h:69
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The BoardEditor class.
Definition boardeditor.h:58
The GuiApplication class.
Definition guiapplication.h:75
The ProjectEditor class.
Definition projecteditor.h:64
std::shared_ptr< SchematicEditor > execNewSheetDialog() noexcept
Definition projecteditor.cpp:549
ui::ProjectData getUiData() const noexcept
Definition projecteditor.cpp:266
Signal< ProjectEditor > onUiDataChanged
Definition projecteditor.h:69
void projectSettingsChanged() noexcept
Definition projecteditor.cpp:761
void execLppzExportDialog(QWidget *parent) noexcept
Execute the *.lppz export dialog (blocking)
Definition projecteditor.cpp:507
std::unique_ptr< UndoStack > mUndoStack
Definition projecteditor.h:221
void redo() noexcept
Definition projecteditor.cpp:364
bool mUseIeee315Symbols
Definition projecteditor.h:216
std::shared_ptr< RuleCheckMessagesModel > mErcMessages
Definition projecteditor.h:227
void projectAboutToBeSaved()
void manualModificationsMade()
void scheduleErcRun() noexcept
Definition projecteditor.cpp:717
bool mManualModificationsMade
Modifications bypassing the undo stack.
Definition projecteditor.h:234
void execRenameSheetDialog(int index) noexcept
Definition projecteditor.cpp:581
void ercUnapprovedCountChanged()
QVector< QMetaObject::Connection > mConnections
Definition projecteditor.h:245
Workspace & getWorkspace() noexcept
Definition projecteditor.h:82
ProjectEditor(const ProjectEditor &other)=delete
UndoStack & getUndoStack() noexcept
Definition projecteditor.h:84
void ercMarkersInvalidated()
bool saveProject() noexcept
Save the whole project to the harddisc.
Definition projecteditor.cpp:395
std::unique_ptr< Project > mProject
Definition projecteditor.h:214
int mUiIndex
Definition projecteditor.h:215
void statusBarMessageChanged(const QString &message, int timeoutMs)
std::shared_ptr< const QSet< const NetSignal * > > getHighlightedNetSignals() const noexcept
Definition projecteditor.h:97
void setUiData(const ui::ProjectData &data) noexcept
Definition projecteditor.cpp:290
void projectLibraryUpdaterRequested(const FilePath &fp)
void setManualModificationsMade() noexcept
Set the flag that manual modifications (no undo stack) are made.
Definition projecteditor.cpp:472
void openMigrationLog() noexcept
Open the HTML with all project file format upgrade messages.
Definition projecteditor.cpp:698
QVector< QPointer< SchematicTab > > mActiveSchematicTabs
Definition projecteditor.h:224
GuiApplication & getApp() noexcept
Definition projecteditor.h:81
QTimer mErcTimer
Definition projecteditor.h:231
void setUiIndex(int index) noexcept
Definition projecteditor.cpp:259
void setHighlightedNetSignals(const QSet< const NetSignal * > &netSignals) noexcept
Definition projecteditor.cpp:342
void unregisterActiveSchematicTab(SchematicTab *tab) noexcept
Definition projecteditor.cpp:690
void refreshBuses() noexcept
Definition projecteditor.cpp:775
QString mErcExecutionError
Definition projecteditor.h:230
QTimer mAutoSaveTimer
Definition projecteditor.h:241
std::shared_ptr< QSet< const NetSignal * > > mHighlightedNetSignals
Definition projecteditor.h:223
bool hasUnsavedChanges() const noexcept
Definition projecteditor.cpp:350
int getUiIndex() const noexcept
Definition projecteditor.h:91
void trigger(ui::ProjectAction a) noexcept
Definition projecteditor.cpp:294
std::shared_ptr< UiObjectList< BoardEditor, ui::BoardData > > mBoards
Definition projecteditor.h:220
std::optional< ProjectLoader::MigrationLog > mMigrationLog
Definition projecteditor.h:217
void execDeleteSheetDialog(int index) noexcept
Definition projecteditor.cpp:602
Workspace & mWorkspace
Definition projecteditor.h:213
void projectSavedToDisk()
Project & getProject() noexcept
Definition projecteditor.h:83
bool autosaveProject() noexcept
Make a automatic backup of the project (save to temporary files)
Definition projecteditor.cpp:435
void undo() noexcept
Definition projecteditor.cpp:356
QSet< SExpression > mSupportedErcApprovals
Definition projecteditor.h:228
std::shared_ptr< UiObjectList< SchematicEditor, ui::SchematicData > > mSchematics
Definition projecteditor.h:219
void highlightedNetSignalsChanged()
const QVector< std::shared_ptr< SchematicEditor > > & getSchematics() noexcept
Definition projecteditor.h:85
bool requestClose() noexcept
Request to close the project.
Definition projecteditor.cpp:372
void ercMessageHighlightRequested(std::shared_ptr< const RuleCheckMessage > msg, bool zoomTo, int windowId)
void registerActiveSchematicTab(SchematicTab *tab) noexcept
Definition projecteditor.cpp:681
void execSetupDialog() noexcept
Definition projecteditor.cpp:480
std::shared_ptr< BoardEditor > execNewBoardDialog(std::optional< int > copyFromIndex) noexcept
Definition projecteditor.cpp:615
void runErc() noexcept
Definition projecteditor.cpp:721
bool getUseIeee315Symbols() const noexcept
Definition projecteditor.h:96
uint mLastAutosaveStateId
The UndoStack state ID of the last successful project (auto)save.
Definition projecteditor.h:237
QSet< SExpression > mDisappearedErcApprovals
Definition projecteditor.h:229
void abortBlockingToolsInOtherEditors(const void *source)
Abort any active (blocking) tools in other editors.
void execDeleteBoardDialog(int index) noexcept
Definition projecteditor.cpp:662
void execOutputJobsDialog(const QString &typeName=QString()) noexcept
Definition projecteditor.cpp:486
GuiApplication & mApp
Definition projecteditor.h:212
void execBomReviewDialog(const Board *board) noexcept
Definition projecteditor.cpp:499
const QVector< std::shared_ptr< BoardEditor > > & getBoards() noexcept
Definition projecteditor.h:88
std::shared_ptr< slint::VectorModel< ui::BusData > > mBuses
Definition projecteditor.h:218
The RuleCheckMessagesModel class.
Definition rulecheckmessagesmodel.h:46
The SchematicEditor class.
Definition schematiceditor.h:50
The SchematicTab class.
Definition schematictab.h:63
The UiObjectList class.
Definition uiobjectlist.h:47
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77