20#ifndef LIBREPCB_EDITOR_PROJECTEDITOR_H
21#define LIBREPCB_EDITOR_PROJECTEDITOR_H
29#include <optional/tl/optional.hpp>
75 const tl::optional<QList<FileFormatMigration::Message>>& upgradeMessages);
223 bool closeAndDestroy(
bool askForSave, QWidget* msgBoxParent = 0) noexcept;
239 bool approve)
noexcept;
246 const QSet<const NetSignal*>& netSignals)
noexcept;
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
The NetSignal class.
Definition: netsignal.h:50
The Project class represents a whole (opened) project with all its content.
Definition: project.h:71
The RuleCheckMessage class.
Definition: rulecheckmessage.h:45
The SExpression class.
Definition: sexpression.h:69
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition: workspace.h:54
The BoardEditor class.
Definition: boardeditor.h:79
The ProjectEditor class.
Definition: projecteditor.h:62
const LengthUnit & getDefaultLengthUnit() const noexcept
Definition: projecteditor.cpp:144
BoardEditor * mBoardEditor
The board editor (GUI)
Definition: projecteditor.h:282
void setErcMessageApproved(const RuleCheckMessage &msg, bool approve) noexcept
Approve/unapprove an ERC message.
Definition: projecteditor.cpp:420
void execLppzExportDialog(QWidget *parent=nullptr) noexcept
Execute the *.lppz export dialog (blocking!)
Definition: projecteditor.cpp:267
void showTemporaryStatusBarMessage(const QString &message, int timeoutMs)
void showUpgradeMessages(QWidget *parent) noexcept
Show a dialog with all project file format upgrade messages.
Definition: projecteditor.cpp:179
void projectAboutToBeSaved()
bool mManualModificationsMade
Modifications bypassing the undo stack.
Definition: projecteditor.h:288
void showBoardEditor() noexcept
Open the board editor window and bring it to the front.
Definition: projecteditor.cpp:261
void openProjectLibraryUpdaterClicked(const FilePath &fp)
bool closeAndDestroy(bool askForSave, QWidget *msgBoxParent=0) noexcept
Close the project (this will destroy this object!)
Definition: projecteditor.cpp:383
ProjectEditor & operator=(const Project &rhs)=delete
void execOrderPcbDialog(QWidget *parent=nullptr) noexcept
Execute the PCB order dialog (blocking!)
Definition: projecteditor.cpp:306
bool saveProject() noexcept
Save the whole project to the harddisc.
Definition: projecteditor.cpp:325
std::shared_ptr< const QSet< const NetSignal * > > getHighlightedNetSignals() const noexcept
Definition: projecteditor.h:241
void setManualModificationsMade() noexcept
Set the flag that manual modifications (no undo stack) are made.
Definition: projecteditor.h:228
Workspace & getWorkspace() const noexcept
Definition: projecteditor.h:84
const QString & getUpgradeMessageLabelText() const noexcept
Definition: projecteditor.h:86
SchematicEditor * mSchematicEditor
The schematic editor (GUI)
Definition: projecteditor.h:281
void ercFinished(const RuleCheckMessageList &messages)
void setHighlightedNetSignals(const QSet< const NetSignal * > &netSignals) noexcept
Definition: projecteditor.cpp:431
Project & getProject() const noexcept
Definition: projecteditor.h:85
Project & mProject
Definition: projecteditor.h:266
QTimer mAutoSaveTimer
Definition: projecteditor.h:272
void showAllRequiredEditors() noexcept
Open the schematic and/or the board editor window.
Definition: projecteditor.cpp:238
bool windowIsAboutToClose(QMainWindow &window) noexcept
Inform the editor that a project related window is about to close.
Definition: projecteditor.cpp:163
std::shared_ptr< QSet< const NetSignal * > > mHighlightedNetSignals
Definition: projecteditor.h:278
void saveErcMessageApprovals(const QSet< SExpression > &approvals) noexcept
Definition: projecteditor.cpp:469
Workspace & mWorkspace
Definition: projecteditor.h:265
int getCountOfVisibleEditorWindows() const noexcept
Definition: projecteditor.cpp:476
void projectSavedToDisk()
bool autosaveProject() noexcept
Make a automatic backup of the project (save to temporary files)
Definition: projecteditor.cpp:353
void projectEditorClosed()
QSet< SExpression > mSupportedErcApprovals
Definition: projecteditor.h:274
QList< FileFormatMigration::Message > mUpgradeMessages
Definition: projecteditor.h:267
void clearHighlightedNetSignals() noexcept
Definition: projecteditor.cpp:439
UndoStack & getUndoStack() const noexcept
Get a reference to the undo stack of the project.
Definition: projecteditor.h:96
QString mUpgradeMessageLabelText
Definition: projecteditor.h:268
void highlightedNetSignalsChanged()
void showControlPanelClicked()
void runErc() noexcept
Definition: projecteditor.cpp:447
ProjectEditor(const Project &other)=delete
UndoStack * mUndoStack
See The undo/redo system (Command Design Pattern).
Definition: projecteditor.h:280
~ProjectEditor() noexcept
The destructor.
Definition: projecteditor.cpp:113
uint mLastAutosaveStateId
The UndoStack state ID of the last successful project (auto)save.
Definition: projecteditor.h:285
QSet< SExpression > mDisappearedErcApprovals
Definition: projecteditor.h:275
void abortBlockingToolsInOtherEditors(QWidget *editor) noexcept
Abort any active (blocking) tools in other editors.
Definition: projecteditor.cpp:152
void showSchematicEditor() noexcept
Open the schematic editor window and bring it to the front.
Definition: projecteditor.cpp:255
RuleCheckMessageList mErcMessages
Definition: projecteditor.h:276
The SchematicEditor class.
Definition: schematiceditor.h:73
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
Definition: occmodel.cpp:77
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104