20#ifndef LIBREPCB_EDITOR_PROJECTEDITOR_H
21#define LIBREPCB_EDITOR_PROJECTEDITOR_H
30#include <optional/tl/optional.hpp>
46class ComponentInstance;
79 const tl::optional<QList<FileFormatMigration::Message>>& upgradeMessages);
104 const tl::optional<Uuid>& filterDev = tl::nullopt)
const noexcept;
109 const tl::optional<Uuid>& filterDev,
110 QPointer<QWidget> editor, QMenu* root)
const noexcept;
235 bool closeAndDestroy(
bool askForSave, QWidget* msgBoxParent = 0) noexcept;
251 bool approve)
noexcept;
258 const QSet<const NetSignal*>& netSignals)
noexcept;
276 QPointer<QWidget> parent) const noexcept;
The ComponentInstance class.
Definition: componentinstance.h:54
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:66
const LengthUnit & getDefaultLengthUnit() const noexcept
Definition: projecteditor.cpp:154
BoardEditor * mBoardEditor
The board editor (GUI)
Definition: projecteditor.h:296
void setErcMessageApproved(const RuleCheckMessage &msg, bool approve) noexcept
Approve/unapprove an ERC message.
Definition: projecteditor.cpp:582
void execLppzExportDialog(QWidget *parent=nullptr) noexcept
Execute the *.lppz export dialog (blocking!)
Definition: projecteditor.cpp:429
void showTemporaryStatusBarMessage(const QString &message, int timeoutMs)
void addResourcesToMenu(MenuBuilder &mb, const ComponentInstance &cmp, const tl::optional< Uuid > &filterDev, QPointer< QWidget > editor, QMenu *root) const noexcept
Definition: projecteditor.cpp:230
ResourceList getComponentResources(const ComponentInstance &cmp, const tl::optional< Uuid > &filterDev=tl::nullopt) const noexcept
Definition: projecteditor.cpp:158
void showUpgradeMessages(QWidget *parent) noexcept
Show a dialog with all project file format upgrade messages.
Definition: projecteditor.cpp:341
void projectAboutToBeSaved()
bool mManualModificationsMade
Modifications bypassing the undo stack.
Definition: projecteditor.h:302
void showBoardEditor() noexcept
Open the board editor window and bring it to the front.
Definition: projecteditor.cpp:423
void openProjectLibraryUpdaterClicked(const FilePath &fp)
bool closeAndDestroy(bool askForSave, QWidget *msgBoxParent=0) noexcept
Close the project (this will destroy this object!)
Definition: projecteditor.cpp:545
ProjectEditor & operator=(const Project &rhs)=delete
void execOrderPcbDialog(QWidget *parent=nullptr) noexcept
Execute the PCB order dialog (blocking!)
Definition: projecteditor.cpp:468
bool saveProject() noexcept
Save the whole project to the harddisc.
Definition: projecteditor.cpp:487
std::shared_ptr< const QSet< const NetSignal * > > getHighlightedNetSignals() const noexcept
Definition: projecteditor.h:253
void setManualModificationsMade() noexcept
Set the flag that manual modifications (no undo stack) are made.
Definition: projecteditor.h:240
Workspace & getWorkspace() const noexcept
Definition: projecteditor.h:88
const QString & getUpgradeMessageLabelText() const noexcept
Definition: projecteditor.h:90
SchematicEditor * mSchematicEditor
The schematic editor (GUI)
Definition: projecteditor.h:295
void ercFinished(const RuleCheckMessageList &messages)
void setHighlightedNetSignals(const QSet< const NetSignal * > &netSignals) noexcept
Definition: projecteditor.cpp:593
Project & getProject() const noexcept
Definition: projecteditor.h:89
Project & mProject
Definition: projecteditor.h:280
QTimer mAutoSaveTimer
Definition: projecteditor.h:286
void showAllRequiredEditors() noexcept
Open the schematic and/or the board editor window.
Definition: projecteditor.cpp:400
bool windowIsAboutToClose(QMainWindow &window) noexcept
Inform the editor that a project related window is about to close.
Definition: projecteditor.cpp:325
std::shared_ptr< QSet< const NetSignal * > > mHighlightedNetSignals
Definition: projecteditor.h:292
void saveErcMessageApprovals(const QSet< SExpression > &approvals) noexcept
Definition: projecteditor.cpp:631
Workspace & mWorkspace
Definition: projecteditor.h:279
int getCountOfVisibleEditorWindows() const noexcept
Definition: projecteditor.cpp:638
void projectSavedToDisk()
bool autosaveProject() noexcept
Make a automatic backup of the project (save to temporary files)
Definition: projecteditor.cpp:515
void projectEditorClosed()
QSet< SExpression > mSupportedErcApprovals
Definition: projecteditor.h:288
QList< FileFormatMigration::Message > mUpgradeMessages
Definition: projecteditor.h:281
void clearHighlightedNetSignals() noexcept
Definition: projecteditor.cpp:601
UndoStack & getUndoStack() const noexcept
Get a reference to the undo stack of the project.
Definition: projecteditor.h:100
QString mUpgradeMessageLabelText
Definition: projecteditor.h:282
void highlightedNetSignalsChanged()
void showControlPanelClicked()
void searchAndOpenDatasheet(const QString &mpn, const QString &manufacturer, QPointer< QWidget > parent) const noexcept
Definition: projecteditor.cpp:649
void runErc() noexcept
Definition: projecteditor.cpp:609
ProjectEditor(const Project &other)=delete
UndoStack * mUndoStack
See The undo/redo system (Command Design Pattern).
Definition: projecteditor.h:294
~ProjectEditor() noexcept
The destructor.
Definition: projecteditor.cpp:123
uint mLastAutosaveStateId
The UndoStack state ID of the last successful project (auto)save.
Definition: projecteditor.h:299
QSet< SExpression > mDisappearedErcApprovals
Definition: projecteditor.h:289
void abortBlockingToolsInOtherEditors(QWidget *editor) noexcept
Abort any active (blocking) tools in other editors.
Definition: projecteditor.cpp:314
void showSchematicEditor() noexcept
Open the schematic editor window and bring it to the front.
Definition: projecteditor.cpp:417
RuleCheckMessageList mErcMessages
Definition: projecteditor.h:290
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