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

The EditorWidgetBase class. More...

#include <editorwidgetbase.h>

+ Inheritance diagram for EditorWidgetBase:
+ Collaboration diagram for EditorWidgetBase:

Classes

struct  Context
 

Public Types

enum  Tool
 

Public Slots

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
 

Signals

void dirtyChanged (bool dirty)
 
void elementEdited (const FilePath &fp)
 
void interfaceBrokenChanged (bool broken)
 
void errorsAvailableChanged (bool hasErrors)
 
void cursorPositionChanged (const Point &pos)
 

Public Member Functions

 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 bool hasGraphicalEditor () const noexcept
 
virtual void setUndoStackActionGroup (UndoStackActionGroup *group) noexcept
 
virtual void setToolsActionGroup (ExclusiveActionGroup *group) noexcept
 
virtual void setCommandToolBar (QToolBar *toolbar) noexcept
 
EditorWidgetBaseoperator= (const EditorWidgetBase &rhs)=delete
 

Protected Member Functions

void setupInterfaceBrokenWarningWidget (QWidget &widget) noexcept
 
void setupErrorNotificationWidget (QWidget &widget) noexcept
 
virtual bool isInterfaceBroken () const noexcept=0
 
virtual bool toolChangeRequested (Tool newTool) noexcept
 
virtual bool runChecks (LibraryElementCheckMessageList &msgs) const =0
 
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

Context mContext
 
FilePath mFilePath
 
QScopedPointer< UndoStackmUndoStack
 
UndoStackActionGroupmUndoStackActionGroup
 
ExclusiveActionGroupmToolsActionGroup
 
QScopedPointer< ToolBarProxymCommandToolBarProxy
 
bool mIsInterfaceBroken
 

Private Slots

void updateCheckMessages () noexcept
 

Private Member Functions

void toolActionGroupChangeTriggered (const QVariant &newTool) noexcept
 
void undoStackCleanChanged (bool clean) noexcept
 
void scheduleLibraryElementChecks () noexcept
 
virtual bool processCheckMessage (std::shared_ptr< const LibraryElementCheckMessage > msg, bool applyFix)=0
 
bool libraryElementCheckFixAvailable (std::shared_ptr< const LibraryElementCheckMessage > msg) noexceptoverride
 
void libraryElementCheckFixRequested (std::shared_ptr< const LibraryElementCheckMessage > msg) noexceptoverride
 
void libraryElementCheckDescriptionRequested (std::shared_ptr< const LibraryElementCheckMessage > msg) noexceptoverride
 

Detailed Description

The EditorWidgetBase class.

Author
ubruhin
Date
2016-10-17

Member Enumeration Documentation

enum Tool
Enumerator
NONE 
SELECT 
DRAW_LINE 
DRAW_RECT 
DRAW_POLYGON 
DRAW_CIRCLE 
DRAW_TEXT 
ADD_NAMES 
ADD_VALUES 
ADD_PINS 
ADD_THT_PADS 
ADD_SMT_PADS 
ADD_HOLES 

Constructor & Destructor Documentation

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

+ Here is the call graph for this function:

~EditorWidgetBase ( )
virtualnoexcept

Member Function Documentation

const FilePath& getFilePath ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isDirty ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

virtual bool hasGraphicalEditor ( ) const
inlinevirtualnoexcept

Reimplemented in PackageEditorWidget, and SymbolEditorWidget.

void setUndoStackActionGroup ( UndoStackActionGroup group)
virtualnoexcept

+ Here is the caller graph for this function:

void setToolsActionGroup ( ExclusiveActionGroup group)
virtualnoexcept

Reimplemented in PackageEditorWidget, and SymbolEditorWidget.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setCommandToolBar ( QToolBar *  toolbar)
virtualnoexcept
EditorWidgetBase& operator= ( const EditorWidgetBase rhs)
delete
bool save ( )
virtualslotnoexcept

+ Here is the caller graph for this function:

virtual bool rotateCw ( )
inlinevirtualslotnoexcept
virtual bool rotateCcw ( )
inlinevirtualslotnoexcept
virtual bool remove ( )
inlinevirtualslotnoexcept
virtual bool zoomIn ( )
inlinevirtualslotnoexcept
virtual bool zoomOut ( )
inlinevirtualslotnoexcept
virtual bool zoomAll ( )
inlinevirtualslotnoexcept
virtual bool abortCommand ( )
inlinevirtualslotnoexcept
virtual bool editGridProperties ( )
inlinevirtualslotnoexcept
void setupInterfaceBrokenWarningWidget ( QWidget &  widget)
protectednoexcept

+ Here is the caller graph for this function:

void setupErrorNotificationWidget ( QWidget &  widget)
protectednoexcept

+ Here is the caller graph for this function:

virtual bool isInterfaceBroken ( ) const
protectedpure virtualnoexcept

Implemented in PackageEditorWidget, SymbolEditorWidget, DeviceEditorWidget, ComponentEditorWidget, LibraryOverviewWidget, ComponentCategoryEditorWidget, and PackageCategoryEditorWidget.

+ Here is the caller graph for this function:

virtual bool toolChangeRequested ( Tool  newTool)
inlineprotectedvirtualnoexcept

Reimplemented in PackageEditorWidget, and SymbolEditorWidget.

virtual bool runChecks ( LibraryElementCheckMessageList msgs) const
protectedpure virtual

Implemented in PackageEditorWidget, SymbolEditorWidget, DeviceEditorWidget, ComponentEditorWidget, LibraryOverviewWidget, ComponentCategoryEditorWidget, and PackageCategoryEditorWidget.

+ Here is the caller graph for this function:

void undoStackStateModified ( )
protectednoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const QStringList & getLibLocaleOrder ( ) const
protectednoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString getWorkspaceSettingsUserName ( )
protectednoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateCheckMessages ( )
privateslotnoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void toolActionGroupChangeTriggered ( const QVariant &  newTool)
privatenoexcept

+ Here is the caller graph for this function:

void undoStackCleanChanged ( bool  clean)
privatenoexcept

+ Here is the caller graph for this function:

void scheduleLibraryElementChecks ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual bool processCheckMessage ( std::shared_ptr< const LibraryElementCheckMessage msg,
bool  applyFix 
)
privatepure virtual
bool libraryElementCheckFixAvailable ( std::shared_ptr< const LibraryElementCheckMessage msg)
overrideprivatevirtualnoexcept
void libraryElementCheckFixRequested ( std::shared_ptr< const LibraryElementCheckMessage msg)
overrideprivatevirtualnoexcept

Implements IF_LibraryElementCheckHandler.

+ Here is the call graph for this function:

void libraryElementCheckDescriptionRequested ( std::shared_ptr< const LibraryElementCheckMessage msg)
overrideprivatevirtualnoexcept
void dirtyChanged ( bool  dirty)
signal

+ Here is the caller graph for this function:

void elementEdited ( const FilePath fp)
signal

+ Here is the caller graph for this function:

void interfaceBrokenChanged ( bool  broken)
signal

+ Here is the caller graph for this function:

void errorsAvailableChanged ( bool  hasErrors)
signal

+ Here is the caller graph for this function:

void cursorPositionChanged ( const Point pos)
signal

+ Here is the caller graph for this function:

Member Data Documentation

Context mContext
protected
FilePath mFilePath
protected
QScopedPointer<UndoStack> mUndoStack
protected
UndoStackActionGroup* mUndoStackActionGroup
protected
ExclusiveActionGroup* mToolsActionGroup
protected
QScopedPointer<ToolBarProxy> mCommandToolBarProxy
protected
bool mIsInterfaceBroken
protected

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