![]() |
LibrePCB Developers Documentation
|
The ProjectEditor class. More...
#include <projecteditor.h>
Inherits QObject.
Signals | |
void | uiIndexChanged () |
void | manualModificationsMade () |
void | projectAboutToBeSaved () |
void | projectSavedToDisk () |
void | ercUnapprovedCountChanged () |
void | highlightedNetSignalsChanged () |
void | projectLibraryUpdaterRequested (const FilePath &fp) |
void | statusBarMessageChanged (const QString &message, int timeoutMs) |
void | abortBlockingToolsInOtherEditors (const void *source) |
Abort any active (blocking) tools in other editors. | |
Public Member Functions | |
ProjectEditor ()=delete | |
ProjectEditor (const ProjectEditor &other)=delete | |
ProjectEditor (GuiApplication &app, std::unique_ptr< Project > project, int uiIndex, const std::optional< QList< FileFormatMigration::Message > > &upgradeMessages, QObject *parent=nullptr) noexcept | |
~ProjectEditor () noexcept | |
GuiApplication & | getApp () noexcept |
Workspace & | getWorkspace () noexcept |
Project & | getProject () noexcept |
UndoStack & | getUndoStack () noexcept |
const QVector< std::shared_ptr< SchematicEditor > > & | getSchematics () noexcept |
const QVector< std::shared_ptr< BoardEditor > > & | getBoards () noexcept |
int | getUiIndex () const noexcept |
void | setUiIndex (int index) noexcept |
ui::ProjectData | getUiData () const noexcept |
void | setUiData (const ui::ProjectData &data) noexcept |
void | trigger (ui::ProjectAction a) noexcept |
bool | getUseIeee315Symbols () const noexcept |
std::shared_ptr< const QSet< const NetSignal * > > | getHighlightedNetSignals () const noexcept |
void | setHighlightedNetSignals (const QSet< const NetSignal * > &netSignals) noexcept |
bool | hasUnsavedChanges () const noexcept |
void | undo () noexcept |
void | redo () noexcept |
bool | requestClose () noexcept |
Request to close the project. | |
bool | saveProject () noexcept |
Save the whole project to the harddisc. | |
bool | autosaveProject () noexcept |
Make a automatic backup of the project (save to temporary files) | |
void | setManualModificationsMade () noexcept |
Set the flag that manual modifications (no undo stack) are made. | |
void | execSetupDialog () noexcept |
void | execOutputJobsDialog (const QString &typeName=QString()) noexcept |
void | execBomGeneratorDialog (const Board *board) noexcept |
void | execLppzExportDialog (QWidget *parent) noexcept |
Execute the *.lppz export dialog (blocking) | |
std::shared_ptr< SchematicEditor > | execNewSheetDialog () noexcept |
void | execRenameSheetDialog (int index) noexcept |
void | execDeleteSheetDialog (int index) noexcept |
std::shared_ptr< BoardEditor > | execNewBoardDialog (std::optional< int > copyFromIndex) noexcept |
void | execDeleteBoardDialog (int index) noexcept |
void | registerActiveSchematicTab (SchematicTab *tab) noexcept |
void | unregisterActiveSchematicTab (SchematicTab *tab) noexcept |
ProjectEditor & | operator= (const ProjectEditor &rhs)=delete |
Public Attributes | |
Signal< ProjectEditor > | onUiDataChanged |
Private Member Functions | |
void | showUpgradeMessages () noexcept |
Show a dialog with all project file format upgrade messages. | |
void | scheduleErcRun () noexcept |
void | runErc () noexcept |
void | projectSettingsChanged () noexcept |
Private Attributes | |
GuiApplication & | mApp |
Workspace & | mWorkspace |
std::unique_ptr< Project > | mProject |
int | mUiIndex |
bool | mUseIeee315Symbols |
QList< FileFormatMigration::Message > | mUpgradeMessages |
std::shared_ptr< UiObjectList< SchematicEditor, ui::SchematicData > > | mSchematics |
std::shared_ptr< UiObjectList< BoardEditor, ui::BoardData > > | mBoards |
std::unique_ptr< UndoStack > | mUndoStack |
std::shared_ptr< QSet< const NetSignal * > > | mHighlightedNetSignals |
QVector< QPointer< SchematicTab > > | mActiveSchematicTabs |
std::shared_ptr< RuleCheckMessagesModel > | mErcMessages |
QSet< SExpression > | mSupportedErcApprovals |
QSet< SExpression > | mDisappearedErcApprovals |
QString | mErcExecutionError |
QTimer | mErcTimer |
bool | mManualModificationsMade |
Modifications bypassing the undo stack. | |
uint | mLastAutosaveStateId |
The UndoStack state ID of the last successful project (auto)save. | |
QTimer | mAutoSaveTimer |
The ProjectEditor class.
|
delete |
|
delete |
|
explicitnoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Request to close the project.
If there are unsaved changes to the project, this method will ask the user whether the changes should be saved or not. If the user clicks on "cancel" or the project could not be saved successfully, this method will return false. If there were no unsaved changes or they were successfully saved, the method returns true.
|
noexcept |
Save the whole project to the harddisc.
|
noexcept |
Make a automatic backup of the project (save to temporary files)
|
noexcept |
Set the flag that manual modifications (no undo stack) are made.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Execute the *.lppz export dialog (blocking)
parent | parent widget of the dialog |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
delete |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
Abort any active (blocking) tools in other editors.
If an undo command group is already active while starting a new tool, try to abort any active tool in other editors since it is annoying to block one editor by another editor (an error message would appear). However, do NOT abort tools in the own editor since this could lead to unexpected/wrong behavior (e.g. recursion)!
source | The calling editor (any kind of type), which will not be aborted. Typically, a librepcb::editor::WindowTab pointer is passed. Pass nullptr to abort in all editors. |
|
privatenoexcept |
Show a dialog with all project file format upgrade messages.
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
Signal<ProjectEditor> onUiDataChanged |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Modifications bypassing the undo stack.
|
private |
The UndoStack state ID of the last successful project (auto)save.
|
private |
The timer for the periodically automatic saving functionality (see also Atomic Saving Procedure)