LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SchematicTab Class Referencefinal

The SchematicTab class. More...

#include <schematictab.h>

+ Inheritance diagram for SchematicTab:
+ Collaboration diagram for SchematicTab:

Signals

void wireModeRequested (SchematicEditorState_DrawWire::WireMode mode)
 
void layerRequested (const Layer &layer)
 
void filledRequested (bool filled)
 
void valueRequested (const QString &value)
 
void attributeValueRequested (const QString &value)
 
void attributeUnitRequested (const AttributeUnit *unit)
 
- Signals inherited from WindowTab
void panelPageRequested (ui::PanelPage p)
 
void closeRequested ()
 
void closeEnforced ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs)
 
void cursorCoordinatesChanged (const Point &pos, const LengthUnit &unit)
 

Public Member Functions

 SchematicTab ()=delete
 
 SchematicTab (const SchematicTab &other)=delete
 
 SchematicTab (GuiApplication &app, SchematicEditor &editor, QObject *parent=nullptr) noexcept
 
 ~SchematicTab () noexcept
 
int getProjectIndex () const noexcept
 
int getProjectObjectIndex () const noexcept
 
ui::TabData getUiData () const noexcept override
 
void setUiData (const ui::TabData &data) noexcept override
 
ui::SchematicTabData getDerivedUiData () const noexcept
 
void setDerivedUiData (const ui::SchematicTabData &data) noexcept
 
void activate () noexcept override
 
void deactivate () noexcept override
 
void trigger (ui::TabAction a) noexcept override
 
slint::Image renderScene (float width, float height, int scene) noexcept override
 
bool processScenePointerEvent (const QPointF &pos, slint::private_api::PointerEvent e) noexcept override
 
bool processSceneScrolled (const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept override
 
bool processSceneKeyEvent (const slint::private_api::KeyEvent &e) noexcept override
 
bool graphicsSceneKeyPressed (const GraphicsSceneKeyEvent &e) noexcept override
 
bool graphicsSceneKeyReleased (const GraphicsSceneKeyEvent &e) noexcept override
 
bool graphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
bool graphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
bool graphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
bool graphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override
 
bool graphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
SchematicGraphicsScenefsmGetGraphicsScene () noexcept override
 
void fsmSetViewCursor (const std::optional< Qt::CursorShape > &shape) noexcept override
 
void fsmSetViewGrayOut (bool grayOut) noexcept override
 
void fsmSetViewInfoBoxText (const QString &text) noexcept override
 
void fsmSetViewRuler (const std::optional< std::pair< Point, Point > > &pos) noexcept override
 
void fsmSetSceneCursor (const Point &pos, bool cross, bool circle) noexcept override
 
QPainterPath fsmCalcPosWithTolerance (const Point &pos, qreal multiplier) const noexcept override
 
Point fsmMapGlobalPosToScenePos (const QPoint &pos) const noexcept override
 
void fsmZoomToSceneRect (const QRectF &r) noexcept override
 
void fsmSetHighlightedNetSignals (const QSet< const NetSignal * > &sigs) noexcept override
 
void fsmAbortBlockingToolsInOtherEditors () noexcept override
 
void fsmSetStatusBarMessage (const QString &message, int timeoutMs=-1) noexcept override
 
void fsmSetFeatures (Features features) noexcept override
 
void fsmToolLeave () noexcept override
 
void fsmToolEnter (SchematicEditorState_Select &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_DrawWire &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_AddNetLabel &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_AddComponent &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_DrawPolygon &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_AddText &state) noexcept override
 
void fsmToolEnter (SchematicEditorState_Measure &state) noexcept override
 
SchematicTaboperator= (const SchematicTab &rhs)=delete
 
- Public Member Functions inherited from WindowTab
 WindowTab ()=delete
 
 WindowTab (const WindowTab &other)=delete
 
 WindowTab (GuiApplication &app, QObject *parent=nullptr) noexcept
 
virtual ~WindowTab () noexcept
 
virtual bool requestClose () noexcept
 Request to close the tab.
 
WindowTaboperator= (const WindowTab &rhs)=delete
 
- Public Member Functions inherited from IF_GraphicsViewEventHandler
 IF_GraphicsViewEventHandler () noexcept
 
virtual ~IF_GraphicsViewEventHandler () noexcept
 

Public Attributes

Signal< SchematicTabonDerivedUiDataChanged
 
- Public Attributes inherited from WindowTab
Signal< WindowTabonUiDataChanged
 

Private Member Functions

void updateMessages () noexcept
 
void execGraphicsExportDialog (GraphicsExportDialog::Output output, const QString &settingsKey) noexcept
 
void goToSymbol (const QString &name, int index) noexcept
 
void applyTheme () noexcept
 
void requestRepaint () noexcept
 

Private Attributes

ProjectEditormProjectEditor
 
ProjectmProject
 
SchematicEditormSchematicEditor
 
SchematicmSchematic
 
std::unique_ptr< GraphicsLayerListmLayers
 
std::shared_ptr< GraphicsLayermPinNumbersLayer
 
std::unique_ptr< SlintGraphicsViewmView
 
DismissableMessageContext mMsgInstallLibraries
 
DismissableMessageContext mMsgAddDrawingFrame
 
SearchContext mSearchContext
 
Theme::GridStyle mGridStyle
 
QPointF mSceneImagePos
 
int mFrameIndex
 
Features mToolFeatures
 
ui::EditorTool mTool
 
Qt::CursorShape mToolCursorShape
 
QString mToolOverlayText
 
SchematicEditorState_DrawWire::WireMode mToolWireMode
 
QVector< const Layer * > mToolLayersQt
 
std::shared_ptr< slint::VectorModel< slint::SharedString > > mToolLayers
 
const LayermToolLayer
 
LengthEditContext mToolLineWidth
 
LengthEditContext mToolSize
 
bool mToolFilled
 
QString mToolValue
 
std::shared_ptr< slint::VectorModel< slint::SharedString > > mToolValueSuggestions
 
std::optional< QString > mToolAttributeValue
 
QString mToolAttributeValuePlaceholder
 
QList< const AttributeUnit * > mToolAttributeUnitsQt
 
std::shared_ptr< slint::VectorModel< slint::SharedString > > mToolAttributeUnits
 
const AttributeUnitmToolAttributeUnit
 
QVector< QMetaObject::Connection > mFsmStateConnections
 
QScopedPointer< SchematicEditorFsmmFsm
 
std::unique_ptr< SchematicGraphicsScenemScene
 

Additional Inherited Members

- Public Types inherited from SchematicEditorFsmAdapter
enum class  Feature : quint32
 
- Protected Attributes inherited from WindowTab
GuiApplicationmApp
 

Detailed Description

The SchematicTab class.

Constructor & Destructor Documentation

◆ SchematicTab() [1/3]

SchematicTab ( )
delete

◆ SchematicTab() [2/3]

SchematicTab ( const SchematicTab other)
delete

◆ SchematicTab() [3/3]

SchematicTab ( GuiApplication app,
SchematicEditor editor,
QObject *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~SchematicTab()

~SchematicTab ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getProjectIndex()

int getProjectIndex ( ) const
noexcept
+ Here is the call graph for this function:

◆ getProjectObjectIndex()

int getProjectObjectIndex ( ) const
noexcept
+ Here is the call graph for this function:

◆ getUiData()

ui::TabData getUiData ( ) const
overridevirtualnoexcept

Implements WindowTab.

+ Here is the call graph for this function:

◆ setUiData()

void setUiData ( const ui::TabData &  data)
overridevirtualnoexcept

Reimplemented from WindowTab.

+ Here is the call graph for this function:

◆ getDerivedUiData()

ui::SchematicTabData getDerivedUiData ( ) const
noexcept
+ Here is the call graph for this function:

◆ setDerivedUiData()

void setDerivedUiData ( const ui::SchematicTabData &  data)
noexcept
+ Here is the call graph for this function:

◆ activate()

void activate ( )
overridevirtualnoexcept

Reimplemented from WindowTab.

+ Here is the call graph for this function:

◆ deactivate()

void deactivate ( )
overridevirtualnoexcept

Reimplemented from WindowTab.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigger()

void trigger ( ui::TabAction  a)
overridevirtualnoexcept

Reimplemented from WindowTab.

+ Here is the call graph for this function:

◆ renderScene()

slint::Image renderScene ( float  width,
float  height,
int  scene 
)
overridevirtualnoexcept

Reimplemented from WindowTab.

◆ processScenePointerEvent()

bool processScenePointerEvent ( const QPointF &  pos,
slint::private_api::PointerEvent  e 
)
overridevirtualnoexcept

Reimplemented from WindowTab.

◆ processSceneScrolled()

bool processSceneScrolled ( const QPointF &  pos,
slint::private_api::PointerScrollEvent  e 
)
overridevirtualnoexcept

Reimplemented from WindowTab.

◆ processSceneKeyEvent()

bool processSceneKeyEvent ( const slint::private_api::KeyEvent &  e)
overridevirtualnoexcept

Reimplemented from WindowTab.

◆ graphicsSceneKeyPressed()

bool graphicsSceneKeyPressed ( const GraphicsSceneKeyEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneKeyReleased()

bool graphicsSceneKeyReleased ( const GraphicsSceneKeyEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneMouseMoved()

bool graphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneLeftMouseButtonPressed()

bool graphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneLeftMouseButtonReleased()

bool graphicsSceneLeftMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneLeftMouseButtonDoubleClicked()

bool graphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ graphicsSceneRightMouseButtonReleased()

bool graphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from IF_GraphicsViewEventHandler.

◆ fsmGetGraphicsScene()

SchematicGraphicsScene * fsmGetGraphicsScene ( )
overridevirtualnoexcept

◆ fsmSetViewCursor()

void fsmSetViewCursor ( const std::optional< Qt::CursorShape > &  shape)
overridevirtualnoexcept

◆ fsmSetViewGrayOut()

void fsmSetViewGrayOut ( bool  grayOut)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmSetViewInfoBoxText()

void fsmSetViewInfoBoxText ( const QString &  text)
overridevirtualnoexcept

◆ fsmSetViewRuler()

void fsmSetViewRuler ( const std::optional< std::pair< Point, Point > > &  pos)
overridevirtualnoexcept

◆ fsmSetSceneCursor()

void fsmSetSceneCursor ( const Point pos,
bool  cross,
bool  circle 
)
overridevirtualnoexcept

◆ fsmCalcPosWithTolerance()

QPainterPath fsmCalcPosWithTolerance ( const Point pos,
qreal  multiplier 
) const
overridevirtualnoexcept

◆ fsmMapGlobalPosToScenePos()

Point fsmMapGlobalPosToScenePos ( const QPoint &  pos) const
overridevirtualnoexcept

◆ fsmZoomToSceneRect()

void fsmZoomToSceneRect ( const QRectF &  r)
overridevirtualnoexcept

◆ fsmSetHighlightedNetSignals()

void fsmSetHighlightedNetSignals ( const QSet< const NetSignal * > &  sigs)
overridevirtualnoexcept

◆ fsmAbortBlockingToolsInOtherEditors()

void fsmAbortBlockingToolsInOtherEditors ( )
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmSetStatusBarMessage()

void fsmSetStatusBarMessage ( const QString &  message,
int  timeoutMs = -1 
)
overridevirtualnoexcept

◆ fsmSetFeatures()

void fsmSetFeatures ( Features  features)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the caller graph for this function:

◆ fsmToolLeave()

void fsmToolLeave ( )
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmToolEnter() [1/7]

void fsmToolEnter ( SchematicEditorState_Select state)
overridevirtualnoexcept

◆ fsmToolEnter() [2/7]

void fsmToolEnter ( SchematicEditorState_DrawWire state)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmToolEnter() [3/7]

void fsmToolEnter ( SchematicEditorState_AddNetLabel state)
overridevirtualnoexcept

◆ fsmToolEnter() [4/7]

void fsmToolEnter ( SchematicEditorState_AddComponent state)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmToolEnter() [5/7]

void fsmToolEnter ( SchematicEditorState_DrawPolygon state)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmToolEnter() [6/7]

void fsmToolEnter ( SchematicEditorState_AddText state)
overridevirtualnoexcept

Implements SchematicEditorFsmAdapter.

+ Here is the call graph for this function:

◆ fsmToolEnter() [7/7]

void fsmToolEnter ( SchematicEditorState_Measure state)
overridevirtualnoexcept

◆ operator=()

SchematicTab & operator= ( const SchematicTab rhs)
delete

◆ wireModeRequested

void wireModeRequested ( SchematicEditorState_DrawWire::WireMode  mode)
signal
+ Here is the caller graph for this function:

◆ layerRequested

void layerRequested ( const Layer layer)
signal

◆ filledRequested

void filledRequested ( bool  filled)
signal

◆ valueRequested

void valueRequested ( const QString &  value)
signal
+ Here is the caller graph for this function:

◆ attributeValueRequested

void attributeValueRequested ( const QString &  value)
signal
+ Here is the caller graph for this function:

◆ attributeUnitRequested

void attributeUnitRequested ( const AttributeUnit unit)
signal

◆ updateMessages()

void updateMessages ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ execGraphicsExportDialog()

void execGraphicsExportDialog ( GraphicsExportDialog::Output  output,
const QString &  settingsKey 
)
privatenoexcept
+ Here is the call graph for this function:

◆ goToSymbol()

void goToSymbol ( const QString &  name,
int  index 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyTheme()

void applyTheme ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requestRepaint()

void requestRepaint ( )
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ onDerivedUiDataChanged

Signal<SchematicTab> onDerivedUiDataChanged

◆ mProjectEditor

ProjectEditor& mProjectEditor
private

◆ mProject

Project& mProject
private

◆ mSchematicEditor

SchematicEditor& mSchematicEditor
private

◆ mSchematic

Schematic& mSchematic
private

◆ mLayers

std::unique_ptr<GraphicsLayerList> mLayers
private

◆ mPinNumbersLayer

std::shared_ptr<GraphicsLayer> mPinNumbersLayer
private

◆ mView

std::unique_ptr<SlintGraphicsView> mView
private

◆ mMsgInstallLibraries

DismissableMessageContext mMsgInstallLibraries
private

◆ mMsgAddDrawingFrame

DismissableMessageContext mMsgAddDrawingFrame
private

◆ mSearchContext

SearchContext mSearchContext
private

◆ mGridStyle

Theme::GridStyle mGridStyle
private

◆ mSceneImagePos

QPointF mSceneImagePos
private

◆ mFrameIndex

int mFrameIndex
private

◆ mToolFeatures

Features mToolFeatures
private

◆ mTool

ui::EditorTool mTool
private

◆ mToolCursorShape

Qt::CursorShape mToolCursorShape
private

◆ mToolOverlayText

QString mToolOverlayText
private

◆ mToolWireMode

◆ mToolLayersQt

QVector<const Layer*> mToolLayersQt
private

◆ mToolLayers

std::shared_ptr<slint::VectorModel<slint::SharedString> > mToolLayers
private

◆ mToolLayer

const Layer* mToolLayer
private

◆ mToolLineWidth

LengthEditContext mToolLineWidth
private

◆ mToolSize

LengthEditContext mToolSize
private

◆ mToolFilled

bool mToolFilled
private

◆ mToolValue

QString mToolValue
private

◆ mToolValueSuggestions

std::shared_ptr<slint::VectorModel<slint::SharedString> > mToolValueSuggestions
private

◆ mToolAttributeValue

std::optional<QString> mToolAttributeValue
private

◆ mToolAttributeValuePlaceholder

QString mToolAttributeValuePlaceholder
private

◆ mToolAttributeUnitsQt

QList<const AttributeUnit*> mToolAttributeUnitsQt
private

◆ mToolAttributeUnits

std::shared_ptr<slint::VectorModel<slint::SharedString> > mToolAttributeUnits
private

◆ mToolAttributeUnit

const AttributeUnit* mToolAttributeUnit
private

◆ mFsmStateConnections

QVector<QMetaObject::Connection> mFsmStateConnections
private

◆ mFsm

QScopedPointer<SchematicEditorFsm> mFsm
private

◆ mScene

std::unique_ptr<SchematicGraphicsScene> mScene
private

The documentation for this class was generated from the following files: