LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackageEditorWidget Class Referencefinal

The PackageEditorWidget class. More...

#include <packageeditorwidget.h>

+ Inheritance diagram for PackageEditorWidget:
+ Collaboration diagram for PackageEditorWidget:

Public Slots

bool save () noexceptoverride
 
bool rotateCw () noexceptoverride
 
bool rotateCcw () noexceptoverride
 
bool remove () noexceptoverride
 
bool zoomIn () noexceptoverride
 
bool zoomOut () noexceptoverride
 
bool zoomAll () noexceptoverride
 
bool abortCommand () noexceptoverride
 
bool editGridProperties () noexceptoverride
 
- Public Slots inherited from EditorWidgetBase
virtual bool save () noexcept
 
virtual bool rotateCw () noexcept
 
virtual bool rotateCcw () noexcept
 
virtual bool remove () noexcept
 
virtual bool zoomIn () noexcept
 
virtual bool zoomOut () noexcept
 
virtual bool zoomAll () noexcept
 
virtual bool abortCommand () noexcept
 
virtual bool editGridProperties () noexcept
 

Public Member Functions

 PackageEditorWidget ()=delete
 
 PackageEditorWidget (const PackageEditorWidget &other)=delete
 
 PackageEditorWidget (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
 ~PackageEditorWidget () noexcept
 
virtual bool hasGraphicalEditor () const noexceptoverride
 
void setToolsActionGroup (ExclusiveActionGroup *group) noexceptoverride
 
PackageEditorWidgetoperator= (const PackageEditorWidget &rhs)=delete
 
template<>
void fixMsg (const MsgNameNotTitleCase &msg)
 
template<>
void fixMsg (const MsgMissingAuthor &msg)
 
template<>
void fixMsg (const MsgMissingCategories &msg)
 
template<>
void fixMsg (const MsgMissingFootprint &msg)
 
template<>
void fixMsg (const MsgMissingFootprintName &msg)
 
template<>
void fixMsg (const MsgMissingFootprintValue &msg)
 
template<>
void fixMsg (const MsgWrongFootprintTextLayer &msg)
 
- Public Member Functions inherited from EditorWidgetBase
 EditorWidgetBase ()=delete
 
 EditorWidgetBase (const EditorWidgetBase &other)=delete
 
 EditorWidgetBase (const Context &context, const FilePath &fp, QWidget *parent=nullptr)
 
virtual ~EditorWidgetBase () noexcept
 
const FilePathgetFilePath () const noexcept
 
bool isDirty () const noexcept
 
virtual void setUndoStackActionGroup (UndoStackActionGroup *group) noexcept
 
virtual void setCommandToolBar (QToolBar *toolbar) noexcept
 
EditorWidgetBaseoperator= (const EditorWidgetBase &rhs)=delete
 
- Public Member Functions inherited from IF_GraphicsViewEventHandler
 IF_GraphicsViewEventHandler () noexcept
 
virtual ~IF_GraphicsViewEventHandler () noexcept
 

Private Member Functions

void updateMetadata () noexcept
 
QString commitMetadata () noexcept
 
bool graphicsViewEventHandler (QEvent *event) noexceptoverride
 The event handler method. More...
 
bool toolChangeRequested (Tool newTool) noexceptoverride
 
void currentFootprintChanged (int index) noexcept
 
void memorizePackageInterface () noexcept
 
bool isInterfaceBroken () const noexceptoverride
 
bool runChecks (LibraryElementCheckMessageList &msgs) const override
 
template<typename MessageType >
void fixMsg (const MessageType &msg)
 
template<typename MessageType >
bool fixMsgHelper (std::shared_ptr< const LibraryElementCheckMessage > msg, bool applyFix)
 
bool processCheckMessage (std::shared_ptr< const LibraryElementCheckMessage > msg, bool applyFix) override
 

Private Attributes

QScopedPointer
< Ui::PackageEditorWidget > 
mUi
 
QScopedPointer
< PackageCategoryListEditorWidget
mCategoriesEditorWidget
 
QScopedPointer< GraphicsScenemGraphicsScene
 
QScopedPointer< PackagemPackage
 
QScopedPointer< PackageEditorFsmmFsm
 
QSet< UuidmOriginalPadUuids
 
FootprintList mOriginalFootprints
 

Additional Inherited Members

- Public Types inherited from EditorWidgetBase
enum  Tool
 
- Signals inherited from EditorWidgetBase
void dirtyChanged (bool dirty)
 
void elementEdited (const FilePath &fp)
 
void interfaceBrokenChanged (bool broken)
 
void errorsAvailableChanged (bool hasErrors)
 
void cursorPositionChanged (const Point &pos)
 
- Protected Member Functions inherited from EditorWidgetBase
void setupInterfaceBrokenWarningWidget (QWidget &widget) noexcept
 
void setupErrorNotificationWidget (QWidget &widget) noexcept
 
void undoStackStateModified () noexcept
 
const QStringList & getLibLocaleOrder () const noexcept
 
QString getWorkspaceSettingsUserName () noexcept
 
- Protected Member Functions inherited from IF_LibraryElementCheckHandler
 IF_LibraryElementCheckHandler () noexcept
 
 IF_LibraryElementCheckHandler (const IF_LibraryElementCheckHandler &) noexcept
 
virtual ~IF_LibraryElementCheckHandler () noexcept
 
- Protected Attributes inherited from EditorWidgetBase
Context mContext
 
FilePath mFilePath
 
QScopedPointer< UndoStackmUndoStack
 
UndoStackActionGroupmUndoStackActionGroup
 
ExclusiveActionGroupmToolsActionGroup
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mIsInterfaceBroken
 

Detailed Description

The PackageEditorWidget class.

Author
ubruhin
Date
2016-10-16

Constructor & Destructor Documentation

PackageEditorWidget ( )
delete
PackageEditorWidget ( const PackageEditorWidget other)
delete
PackageEditorWidget ( const Context context,
const FilePath fp,
QWidget *  parent = nullptr 
)

+ Here is the call graph for this function:

~PackageEditorWidget ( )
noexcept

Member Function Documentation

virtual bool hasGraphicalEditor ( ) const
inlineoverridevirtualnoexcept

Reimplemented from EditorWidgetBase.

void setToolsActionGroup ( ExclusiveActionGroup group)
overridevirtualnoexcept

Reimplemented from EditorWidgetBase.

+ Here is the call graph for this function:

PackageEditorWidget& operator= ( const PackageEditorWidget rhs)
delete
bool save ( )
overrideslotnoexcept

+ Here is the call graph for this function:

bool rotateCw ( )
overrideslotnoexcept
bool rotateCcw ( )
overrideslotnoexcept
bool remove ( )
overrideslotnoexcept
bool zoomIn ( )
overrideslotnoexcept
bool zoomOut ( )
overrideslotnoexcept
bool zoomAll ( )
overrideslotnoexcept
bool abortCommand ( )
overrideslotnoexcept
bool editGridProperties ( )
overrideslotnoexcept

+ Here is the call graph for this function:

void updateMetadata ( )
privatenoexcept

+ Here is the caller graph for this function:

QString commitMetadata ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool graphicsViewEventHandler ( QEvent *  event)
overrideprivatevirtualnoexcept

The event handler method.

Implements IF_GraphicsViewEventHandler.

bool toolChangeRequested ( Tool  newTool)
overrideprivatevirtualnoexcept

Reimplemented from EditorWidgetBase.

void currentFootprintChanged ( int  index)
privatenoexcept

+ Here is the caller graph for this function:

void memorizePackageInterface ( )
privatenoexcept

+ Here is the caller graph for this function:

bool isInterfaceBroken ( ) const
overrideprivatevirtualnoexcept

Implements EditorWidgetBase.

+ Here is the call graph for this function:

bool runChecks ( LibraryElementCheckMessageList msgs) const
overrideprivatevirtual

Implements EditorWidgetBase.

void fixMsg ( const MessageType &  msg)
private

+ Here is the caller graph for this function:

bool fixMsgHelper ( std::shared_ptr< const LibraryElementCheckMessage msg,
bool  applyFix 
)
private

+ Here is the call graph for this function:

bool processCheckMessage ( std::shared_ptr< const LibraryElementCheckMessage msg,
bool  applyFix 
)
overrideprivatevirtual

Implements EditorWidgetBase.

void fixMsg ( const MsgNameNotTitleCase msg)

+ Here is the call graph for this function:

void fixMsg ( const MsgMissingAuthor msg)

+ Here is the call graph for this function:

void fixMsg ( const MsgMissingCategories msg)
void fixMsg ( const MsgMissingFootprint msg)
void fixMsg ( const MsgMissingFootprintName msg)
void fixMsg ( const MsgMissingFootprintValue msg)
void fixMsg ( const MsgWrongFootprintTextLayer msg)

+ Here is the call graph for this function:

Member Data Documentation

QScopedPointer<Ui::PackageEditorWidget> mUi
private
QScopedPointer<PackageCategoryListEditorWidget> mCategoriesEditorWidget
private
QScopedPointer<GraphicsScene> mGraphicsScene
private
QScopedPointer<Package> mPackage
private
QScopedPointer<PackageEditorFsm> mFsm
private
QSet<Uuid> mOriginalPadUuids
private
FootprintList mOriginalFootprints
private

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