20#ifndef LIBREPCB_EDITOR_PROJECTEDITOR_H
21#define LIBREPCB_EDITOR_PROJECTEDITOR_H
26#include "../utils/uiobjectlist.h"
51class RuleCheckMessagesModel;
74 GuiApplication& app, std::unique_ptr<Project> project,
int uiIndex,
75 const std::optional<QList<FileFormatMigration::Message>>& upgradeMessages,
76 QObject* parent =
nullptr) noexcept;
84 const QVector<std::shared_ptr<SchematicEditor>>&
getSchematics() noexcept {
87 const QVector<std::shared_ptr<BoardEditor>>&
getBoards() noexcept {
92 ui::ProjectData
getUiData() const noexcept;
93 void setUiData(const ui::ProjectData& data) noexcept;
94 void trigger(ui::ProjectAction a) noexcept;
101 const QSet<const NetSignal*>& netSignals)
noexcept;
105 void undo() noexcept;
106 void redo() noexcept;
163 std::optional<
int> copyFromIndex) noexcept;
The Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:73
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
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:61
The ProjectEditor class.
Definition projecteditor.h:63
std::shared_ptr< SchematicEditor > execNewSheetDialog() noexcept
Definition projecteditor.cpp:513
ui::ProjectData getUiData() const noexcept
Definition projecteditor.cpp:242
Signal< ProjectEditor > onUiDataChanged
Definition projecteditor.h:68
void projectSettingsChanged() noexcept
Definition projecteditor.cpp:761
void execLppzExportDialog(QWidget *parent) noexcept
Execute the *.lppz export dialog (blocking)
Definition projecteditor.cpp:473
std::unique_ptr< UndoStack > mUndoStack
Definition projecteditor.h:215
void redo() noexcept
Definition projecteditor.cpp:337
bool mUseIeee315Symbols
Definition projecteditor.h:211
std::shared_ptr< RuleCheckMessagesModel > mErcMessages
Definition projecteditor.h:221
void projectAboutToBeSaved()
void manualModificationsMade()
void scheduleErcRun() noexcept
Definition projecteditor.cpp:721
bool mManualModificationsMade
Modifications bypassing the undo stack.
Definition projecteditor.h:228
void execRenameSheetDialog(int index) noexcept
Definition projecteditor.cpp:545
void ercUnapprovedCountChanged()
Workspace & getWorkspace() noexcept
Definition projecteditor.h:81
ProjectEditor(const ProjectEditor &other)=delete
UndoStack & getUndoStack() noexcept
Definition projecteditor.h:83
bool saveProject() noexcept
Save the whole project to the harddisc.
Definition projecteditor.cpp:368
std::unique_ptr< Project > mProject
Definition projecteditor.h:209
int mUiIndex
Definition projecteditor.h:210
void statusBarMessageChanged(const QString &message, int timeoutMs)
std::shared_ptr< const QSet< const NetSignal * > > getHighlightedNetSignals() const noexcept
Definition projecteditor.h:96
void setUiData(const ui::ProjectData &data) noexcept
Definition projecteditor.cpp:265
void projectLibraryUpdaterRequested(const FilePath &fp)
void setManualModificationsMade() noexcept
Set the flag that manual modifications (no undo stack) are made.
Definition projecteditor.cpp:438
QVector< QPointer< SchematicTab > > mActiveSchematicTabs
Definition projecteditor.h:218
GuiApplication & getApp() noexcept
Definition projecteditor.h:80
QTimer mErcTimer
Definition projecteditor.h:225
void setUiIndex(int index) noexcept
Definition projecteditor.cpp:235
void setHighlightedNetSignals(const QSet< const NetSignal * > &netSignals) noexcept
Definition projecteditor.cpp:317
void unregisterActiveSchematicTab(SchematicTab *tab) noexcept
Definition projecteditor.cpp:654
QString mErcExecutionError
Definition projecteditor.h:224
QTimer mAutoSaveTimer
Definition projecteditor.h:235
std::shared_ptr< QSet< const NetSignal * > > mHighlightedNetSignals
Definition projecteditor.h:217
bool hasUnsavedChanges() const noexcept
Definition projecteditor.cpp:325
int getUiIndex() const noexcept
Definition projecteditor.h:90
void trigger(ui::ProjectAction a) noexcept
Definition projecteditor.cpp:269
std::shared_ptr< UiObjectList< BoardEditor, ui::BoardData > > mBoards
Definition projecteditor.h:214
void execDeleteSheetDialog(int index) noexcept
Definition projecteditor.cpp:566
Workspace & mWorkspace
Definition projecteditor.h:208
void projectSavedToDisk()
void showUpgradeMessages() noexcept
Show a dialog with all project file format upgrade messages.
Definition projecteditor.cpp:662
Project & getProject() noexcept
Definition projecteditor.h:82
bool autosaveProject() noexcept
Make a automatic backup of the project (save to temporary files)
Definition projecteditor.cpp:401
void undo() noexcept
Definition projecteditor.cpp:329
QSet< SExpression > mSupportedErcApprovals
Definition projecteditor.h:222
std::shared_ptr< UiObjectList< SchematicEditor, ui::SchematicData > > mSchematics
Definition projecteditor.h:213
void execBomGeneratorDialog(const Board *board) noexcept
Definition projecteditor.cpp:465
QList< FileFormatMigration::Message > mUpgradeMessages
Definition projecteditor.h:212
void highlightedNetSignalsChanged()
const QVector< std::shared_ptr< SchematicEditor > > & getSchematics() noexcept
Definition projecteditor.h:84
bool requestClose() noexcept
Request to close the project.
Definition projecteditor.cpp:345
void registerActiveSchematicTab(SchematicTab *tab) noexcept
Definition projecteditor.cpp:645
void execSetupDialog() noexcept
Definition projecteditor.cpp:446
std::shared_ptr< BoardEditor > execNewBoardDialog(std::optional< int > copyFromIndex) noexcept
Definition projecteditor.cpp:579
void runErc() noexcept
Definition projecteditor.cpp:725
bool getUseIeee315Symbols() const noexcept
Definition projecteditor.h:95
uint mLastAutosaveStateId
The UndoStack state ID of the last successful project (auto)save.
Definition projecteditor.h:231
QSet< SExpression > mDisappearedErcApprovals
Definition projecteditor.h:223
void abortBlockingToolsInOtherEditors(const void *source)
Abort any active (blocking) tools in other editors.
void execDeleteBoardDialog(int index) noexcept
Definition projecteditor.cpp:626
void execOutputJobsDialog(const QString &typeName=QString()) noexcept
Definition projecteditor.cpp:452
GuiApplication & mApp
Definition projecteditor.h:207
const QVector< std::shared_ptr< BoardEditor > > & getBoards() noexcept
Definition projecteditor.h:87
The RuleCheckMessagesModel class.
Definition rulecheckmessagesmodel.h:46
The SchematicEditor class.
Definition schematiceditor.h:50
The SchematicTab class.
Definition schematictab.h:62
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