HAL
hal::PythonEditor Class Reference

Main widget that combines all neccessary functionality to develop in python (for hal). More...

#include <python_editor.h>

Inheritance diagram for hal::PythonEditor:
Inheritance graph
Collaboration diagram for hal::PythonEditor:
Collaboration graph

Public Types

enum  QueryFilenamePolicy { GenericName , QueryIfEmpty , QueryAlways }
 
- Public Types inherited from QWidget
enum  RenderFlag
 
- Public Types inherited from QPaintDevice
enum  PaintDeviceMetric
 

Public Member Functions

 PythonEditor (QWidget *parent=nullptr)
 
 ~PythonEditor ()
 
virtual void setupToolbar (Toolbar *Toolbar) override
 
virtual QList< QShortcut * > createShortcuts () override
 
virtual void handleStdout (const QString &output) override
 
virtual void handleError (const QString &output) override
 
virtual void clear () override
 
void handleActionOpenFile ()
 
void handleActionSaveFile ()
 
void handleActionSaveFileAs ()
 
void handleActionRun ()
 
void handleActionNewTab ()
 
void handleActionTabMenu ()
 
void handleActionCloseTab ()
 
void handleActionCloseAllTabs ()
 
void handleActionCloseOtherTabs ()
 
void handleActionCloseLeftTabs ()
 
void handleActionCloseRightTabs ()
 
void handleActionShowFile ()
 
void tabLoadFile (u32 index, QString fileName)
 
QTabWidgetgetTabWidget ()
 
bool saveFile (bool isAutosave, QueryFilenamePolicy queryPolicy, int index=-1)
 
void saveAllTabs (const QString &genericPath, bool isAutosave)
 
void saveControl ()
 
QString unnamedFilename (int index) const
 
QString autosaveFilename (int index)
 
void discardTab (int index)
 
bool confirmDiscardForRange (int start, int end, int exclude=-1)
 
void setToolbarButtonsEnabled (bool enable)
 
- Public Member Functions inherited from hal::ContentWidget
 ContentWidget (QString name, QWidget *parent=nullptr)
 
void repolish ()
 
QString name ()
 
QIcon icon ()
 
void setAnchor (ContentAnchor *anchor)
 
void setIcon (QIcon icon)
 
void set_name (const QString &name)
 
QString iconStyle ()
 
QString iconPath ()
 
void setIconStyle (const QString &style)
 
void setIconPath (const QString &path)
 
- Public Member Functions inherited from hal::Widget
 Widget (QWidget *parent=nullptr)
 
void setParent (QWidget *parent)
 
- Public Member Functions inherited from QWidget
 QWidget (QWidget *parent, Qt::WindowFlags f)
 
virtual ~QWidget ()
 
WId winId () const const
 
WId effectiveWinId () const const
 
QStylestyle () const const
 
void setStyle (QStyle *style)
 
bool isTopLevel () const const
 
bool isWindow () const const
 
bool isModal () const const
 
Qt::WindowModality windowModality () const const
 
void setWindowModality (Qt::WindowModality windowModality)
 
bool isEnabled () const const
 
bool isEnabledTo (const QWidget *ancestor) const const
 
bool isEnabledToTLW () const const
 
void setEnabled (bool)
 
void setDisabled (bool disable)
 
void setWindowModified (bool)
 
QRect frameGeometry () const const
 
const QRectgeometry () const const
 
QRect normalGeometry () const const
 
int x () const const
 
int y () const const
 
QPoint pos () const const
 
QSize frameSize () const const
 
QSize size () const const
 
int width () const const
 
int height () const const
 
QRect rect () const const
 
QRect childrenRect () const const
 
QRegion childrenRegion () const const
 
QSize minimumSize () const const
 
QSize maximumSize () const const
 
int minimumWidth () const const
 
int minimumHeight () const const
 
int maximumWidth () const const
 
int maximumHeight () const const
 
void setMinimumSize (const QSize &)
 
void setMinimumSize (int minw, int minh)
 
void setMaximumSize (const QSize &)
 
void setMaximumSize (int maxw, int maxh)
 
void setMinimumWidth (int minw)
 
void setMinimumHeight (int minh)
 
void setMaximumWidth (int maxw)
 
void setMaximumHeight (int maxh)
 
void setupUi (QWidget *widget)
 
QSize sizeIncrement () const const
 
void setSizeIncrement (const QSize &)
 
void setSizeIncrement (int w, int h)
 
QSize baseSize () const const
 
void setBaseSize (const QSize &)
 
void setBaseSize (int basew, int baseh)
 
void setFixedSize (const QSize &s)
 
void setFixedSize (int w, int h)
 
void setFixedWidth (int w)
 
void setFixedHeight (int h)
 
QPoint mapToGlobal (const QPoint &pos) const const
 
QPoint mapFromGlobal (const QPoint &pos) const const
 
QPoint mapToParent (const QPoint &pos) const const
 
QPoint mapFromParent (const QPoint &pos) const const
 
QPoint mapTo (const QWidget *parent, const QPoint &pos) const const
 
QPoint mapFrom (const QWidget *parent, const QPoint &pos) const const
 
QWidgetwindow () const const
 
QWidgetnativeParentWidget () const const
 
QWidgettopLevelWidget () const const
 
const QPalettepalette () const const
 
void setPalette (const QPalette &)
 
void setBackgroundRole (QPalette::ColorRole role)
 
QPalette::ColorRole backgroundRole () const const
 
void setForegroundRole (QPalette::ColorRole role)
 
QPalette::ColorRole foregroundRole () const const
 
const QFontfont () const const
 
void setFont (const QFont &)
 
QFontMetrics fontMetrics () const const
 
QFontInfo fontInfo () const const
 
QCursor cursor () const const
 
void setCursor (const QCursor &)
 
void unsetCursor ()
 
void setMouseTracking (bool enable)
 
bool hasMouseTracking () const const
 
bool underMouse () const const
 
void setTabletTracking (bool enable)
 
bool hasTabletTracking () const const
 
void setMask (const QBitmap &bitmap)
 
void setMask (const QRegion &region)
 
QRegion mask () const const
 
void clearMask ()
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void render (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
QPixmap grab (const QRect &rectangle)
 
QGraphicsEffectgraphicsEffect () const const
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void grabGesture (Qt::GestureType gesture, Qt::GestureFlags flags)
 
void ungrabGesture (Qt::GestureType gesture)
 
void setWindowTitle (const QString &)
 
void setStyleSheet (const QString &styleSheet)
 
QString styleSheet () const const
 
QString windowTitle () const const
 
void setWindowIcon (const QIcon &icon)
 
QIcon windowIcon () const const
 
void setWindowIconText (const QString &)
 
QString windowIconText () const const
 
void setWindowRole (const QString &role)
 
QString windowRole () const const
 
void setWindowFilePath (const QString &filePath)
 
QString windowFilePath () const const
 
void setWindowOpacity (qreal level)
 
qreal windowOpacity () const const
 
bool isWindowModified () const const
 
void setToolTip (const QString &)
 
QString toolTip () const const
 
void setToolTipDuration (int msec)
 
int toolTipDuration () const const
 
void setStatusTip (const QString &)
 
QString statusTip () const const
 
void setWhatsThis (const QString &)
 
QString whatsThis () const const
 
QString accessibleName () const const
 
void setAccessibleName (const QString &name)
 
QString accessibleDescription () const const
 
void setAccessibleDescription (const QString &description)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
Qt::LayoutDirection layoutDirection () const const
 
void unsetLayoutDirection ()
 
void setLocale (const QLocale &locale)
 
QLocale locale () const const
 
void unsetLocale ()
 
void setFocus ()
 
bool isActiveWindow () const const
 
void activateWindow ()
 
void clearFocus ()
 
void setFocus (Qt::FocusReason reason)
 
Qt::FocusPolicy focusPolicy () const const
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
bool hasFocus () const const
 
void setFocusProxy (QWidget *w)
 
QWidgetfocusProxy () const const
 
Qt::ContextMenuPolicy contextMenuPolicy () const const
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void grabMouse ()
 
void grabMouse (const QCursor &cursor)
 
void releaseMouse ()
 
void grabKeyboard ()
 
void releaseKeyboard ()
 
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context)
 
void releaseShortcut (int id)
 
void setShortcutEnabled (int id, bool enable)
 
void setShortcutAutoRepeat (int id, bool enable)
 
bool updatesEnabled () const const
 
void setUpdatesEnabled (bool enable)
 
QGraphicsProxyWidgetgraphicsProxyWidget () const const
 
void update ()
 
void repaint ()
 
void update (int x, int y, int w, int h)
 
void update (const QRect &rect)
 
void update (const QRegion &rgn)
 
void repaint (int x, int y, int w, int h)
 
void repaint (const QRect &rect)
 
void repaint (const QRegion &rgn)
 
virtual void setVisible (bool visible)
 
void setHidden (bool hidden)
 
void show ()
 
void hide ()
 
void showMinimized ()
 
void showMaximized ()
 
void showFullScreen ()
 
void showNormal ()
 
bool close ()
 
void raise ()
 
void lower ()
 
void stackUnder (QWidget *w)
 
void move (int x, int y)
 
void move (const QPoint &)
 
void resize (int w, int h)
 
void resize (const QSize &)
 
void setGeometry (int x, int y, int w, int h)
 
void setGeometry (const QRect &)
 
QByteArray saveGeometry () const const
 
bool restoreGeometry (const QByteArray &geometry)
 
void adjustSize ()
 
bool isVisible () const const
 
bool isVisibleTo (const QWidget *ancestor) const const
 
bool isHidden () const const
 
bool isMinimized () const const
 
bool isMaximized () const const
 
bool isFullScreen () const const
 
Qt::WindowStates windowState () const const
 
void setWindowState (Qt::WindowStates windowState)
 
virtual QSize sizeHint () const const
 
virtual QSize minimumSizeHint () const const
 
QSizePolicy sizePolicy () const const
 
void setSizePolicy (QSizePolicy)
 
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
 
virtual int heightForWidth (int w) const const
 
virtual bool hasHeightForWidth () const const
 
QRegion visibleRegion () const const
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const const
 
QMargins contentsMargins () const const
 
QRect contentsRect () const const
 
QLayoutlayout () const const
 
void setLayout (QLayout *layout)
 
void updateGeometry ()
 
void setParent (QWidget *parent)
 
void setParent (QWidget *parent, Qt::WindowFlags f)
 
void scroll (int dx, int dy)
 
void scroll (int dx, int dy, const QRect &r)
 
QWidgetfocusWidget () const const
 
QWidgetnextInFocusChain () const const
 
QWidgetpreviousInFocusChain () const const
 
bool acceptDrops () const const
 
void setAcceptDrops (bool on)
 
void addAction (QAction *action)
 
void addActions (QList< QAction * > actions)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
void insertAction (QAction *before, QAction *action)
 
void removeAction (QAction *action)
 
QList< QAction * > actions () const const
 
QWidgetparentWidget () const const
 
void setWindowFlags (Qt::WindowFlags type)
 
Qt::WindowFlags windowFlags () const const
 
void setWindowFlag (Qt::WindowType flag, bool on)
 
void overrideWindowFlags (Qt::WindowFlags flags)
 
Qt::WindowType windowType () const const
 
QWidgetchildAt (int x, int y) const const
 
QWidgetchildAt (const QPoint &p) const const
 
void setAttribute (Qt::WidgetAttribute attribute, bool on)
 
bool testAttribute (Qt::WidgetAttribute attribute) const const
 
virtual QPaintEnginepaintEngine () const const override
 
void ensurePolished () const const
 
bool isAncestorOf (const QWidget *child) const const
 
bool hasEditFocus () const const
 
void setEditFocus (bool enable)
 
bool autoFillBackground () const const
 
void setAutoFillBackground (bool enabled)
 
QBackingStorebackingStore () const const
 
QWindowwindowHandle () const const
 
QScreenscreen () const const
 
void windowTitleChanged (const QString &title)
 
void windowIconChanged (const QIcon &icon)
 
void windowIconTextChanged (const QString &iconText)
 
void customContextMenuRequested (const QPoint &pos)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const const
 
Qt::InputMethodHints inputMethodHints () const const
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
 QWIDGETSIZE_MAX QWIDGETSIZE_MAX
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
 QObject (QObject *parent)
 
virtual ~QObject ()
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectListchildren () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
 Q_CLASSINFO (Name, Value)
 
 Q_INTERFACES (...)
 
 Q_PROPERTY (...)
 
 Q_ENUMS (...)
 
 Q_FLAGS (...)
 
 Q_ENUM (...)
 
 Q_FLAG (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG_NS (...)
 
 Q_OBJECT Q_OBJECT
 
 Q_GADGET Q_GADGET
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SLOTS Q_SLOTS
 
 Q_SLOT Q_SLOT
 
 Q_EMIT Q_EMIT
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
- Public Member Functions inherited from QPaintDevice
virtual ~QPaintDevice ()
 
bool paintingActive () const const
 
int width () const const
 
int height () const const
 
int widthMM () const const
 
int heightMM () const const
 
int logicalDpiX () const const
 
int logicalDpiY () const const
 
int physicalDpiX () const const
 
int physicalDpiY () const const
 
int devicePixelRatio () const const
 
qreal devicePixelRatioF () const const
 
int colorCount () const const
 
int depth () const const
 

Properties

QString disabledIconStyle
 
QString openIconPath
 
QString openIconStyle
 
QString saveIconPath
 
QString saveIconStyle
 
QString saveAsIconPath
 
QString saveAsIconStyle
 
QString runIconPath
 
QString runIconStyle
 
QString newFileIconPath
 
QString newFileIconStyle
 
QString toggleMinimapIconPath
 
QString toggleMinimapIconStyle
 
QString searchIconPath
 
QString searchIconStyle
 
QString searchActiveIconStyle
 
- Properties inherited from hal::ContentWidget
QString iconStyle
 
QString iconPath
 
- Properties inherited from QWidget
 modal
 
 windowModality
 
 enabled
 
 geometry
 
 frameGeometry
 
 normalGeometry
 
 x
 
 y
 
 pos
 
 frameSize
 
 size
 
 width
 
 height
 
 rect
 
 childrenRect
 
 childrenRegion
 
 sizePolicy
 
 minimumSize
 
 maximumSize
 
 minimumWidth
 
 minimumHeight
 
 maximumWidth
 
 maximumHeight
 
 sizeIncrement
 
 baseSize
 
 palette
 
 font
 
 cursor
 
 mouseTracking
 
 tabletTracking
 
 isActiveWindow
 
 focusPolicy
 
 focus
 
 contextMenuPolicy
 
 updatesEnabled
 
 visible
 
 minimized
 
 maximized
 
 fullScreen
 
 sizeHint
 
 minimumSizeHint
 
 acceptDrops
 
 windowTitle
 
 windowIcon
 
 windowIconText
 
 windowOpacity
 
 windowModified
 
 toolTip
 
 toolTipDuration
 
 statusTip
 
 whatsThis
 
 accessibleName
 
 accessibleDescription
 
 layoutDirection
 
 windowFlags
 
 autoFillBackground
 
 styleSheet
 
 locale
 
 windowFilePath
 
 inputMethodHints
 
- Properties inherited from QObject
 objectName
 

Q_PROPERTY Functions

QString disabledIconStyle () const
 
QString openIconPath () const
 
QString openIconStyle () const
 
QString saveIconPath () const
 
QString saveIconStyle () const
 
QString saveAsIconPath () const
 
QString saveAsIconStyle () const
 
QString runIconPath () const
 
QString runIconStyle () const
 
QString newFileIconPath () const
 
QString newFileIconStyle () const
 
QString toggleMinimapIconPath () const
 
QString toggleMinimapIconStyle () const
 
QString searchIconPath () const
 
QString searchIconStyle () const
 
QString searchActiveIconStyle () const
 
void setDisabledIconStyle (const QString &style)
 
void setOpenIconPath (const QString &path)
 
void setOpenIconStyle (const QString &style)
 
void setSaveIconPath (const QString &path)
 
void setSaveIconStyle (const QString &style)
 
void setSaveAsIconPath (const QString &path)
 
void setSaveAsIconStyle (const QString &style)
 
void setRunIconPath (const QString &path)
 
void setRunIconStyle (const QString &style)
 
void setNewFileIconPath (const QString &path)
 
void setNewFileIconStyle (const QString &style)
 
void setToggleMinimapIconPath (const QString &path)
 
void setToggleMinimapIconStyle (const QString &style)
 
void setSearchIconPath (const QString &path)
 
void setSearchIconStyle (const QString &style)
 
void setSearchActiveIconStyle (const QString &style)
 
bool handleDeserializationFromHalFile (const std::filesystem::path &path, Netlist *netlist, rapidjson::Document &document)
 
QTextDocument::FindFlags getFindFlags ()
 
void forwardStdout (const QString &output)
 
void forwardError (const QString &output)
 
void toggleSearchbar ()
 
void handleThreadFinished ()
 
void handleTabCloseRequested (int index)
 
void handleActionToggleMinimap ()
 
void handleKeyPressed ()
 
void handleTextChanged ()
 
void handleSearchbarTextEdited (const QString &text, SearchOptions opts)
 
void handleCurrentTabChanged (int index)
 
PythonCodeEditorgetPythonEditor (int tabIndex)
 
void handleTabFileChanged (QString path)
 
void handleBaseFileModifiedReload ()
 
void handleBaseFileModifiedIgnore ()
 
void handleBaseFileModifiedOk ()
 
void handleFileOpened (QString fileName)
 
void handleFileAboutToClose (const QString &fileName)
 
void updateSearchIcon ()
 
bool eventFilter (QObject *obj, QEvent *event) override
 

Additional Inherited Members

- Public Slots inherited from hal::ContentWidget
void remove ()
 
void detach ()
 
void reattach ()
 
void open ()
 
void close ()
 
void handleSearchKeysequenceChanged (QKeySequence seq)
 
virtual void restoreFromProject ()
 
- Public Slots inherited from hal::Widget
void hide ()
 
void show ()
 
- Signals inherited from hal::ContentWidget
void removed ()
 
void detached ()
 
void reattached ()
 
void opened ()
 
void closed ()
 
void name_changed (const QString &name)
 
- Signals inherited from hal::Widget
void parentSetTo (QWidget *parent)
 
void hidden ()
 
void shown ()
 
- Static Public Member Functions inherited from QWidget
void setTabOrder (QWidget *first, QWidget *second)
 
QWidgetmouseGrabber ()
 
QWidgetkeyboardGrabber ()
 
QWidgetfind (WId id)
 
QWidgetcreateWindowContainer (QWindow *window, QWidget *parent, Qt::WindowFlags flags)
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Public Attributes inherited from QWidget
typedef RenderFlags
 
 DrawWindowBackground
 
 DrawChildren
 
 IgnoreMask
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Public Attributes inherited from QPaintDevice
 PdmWidth
 
 PdmHeight
 
 PdmWidthMM
 
 PdmHeightMM
 
 PdmNumColors
 
 PdmDepth
 
 PdmDpiX
 
 PdmDpiY
 
 PdmPhysicalDpiX
 
 PdmPhysicalDpiY
 
 PdmDevicePixelRatio
 
 PdmDevicePixelRatioScaled
 
- Protected Member Functions inherited from QWidget
virtual bool event (QEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void enterEvent (QEvent *event)
 
virtual void leaveEvent (QEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void moveEvent (QMoveEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void tabletEvent (QTabletEvent *event)
 
virtual void actionEvent (QActionEvent *event)
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual void showEvent (QShowEvent *event)
 
virtual void hideEvent (QHideEvent *event)
 
virtual bool nativeEvent (const QByteArray &eventType, void *message, long *result)
 
virtual void changeEvent (QEvent *event)
 
virtual int metric (QPaintDevice::PaintDeviceMetric m) const const override
 
virtual void initPainter (QPainter *painter) const const override
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
void updateMicroFocus ()
 
void create (WId window, bool initializeWindow, bool destroyOldWindow)
 
void destroy (bool destroyWindow, bool destroySubWindows)
 
virtual bool focusNextPrevChild (bool next)
 
bool focusNextChild ()
 
bool focusPreviousChild ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice ()
 
- Protected Attributes inherited from hal::ContentWidget
QVBoxLayoutmContentLayout
 
QActionmSearchAction
 
QShortcutmSearchShortcut
 
QKeySequence mSearchKeysequence
 

Detailed Description

Main widget that combines all neccessary functionality to develop in python (for hal).

Widget that contains the python editor. It manages all CodeEditor objects (open tabs). The logic to save, open and execute scripts as well as the automatically creation of snapshot files (backups) is handles by this class.

Definition at line 98 of file python_editor.h.

Member Enumeration Documentation

◆ QueryFilenamePolicy

Query filename policy

Enumerator
GenericName 
QueryIfEmpty 
QueryAlways 

Definition at line 125 of file python_editor.h.

Constructor & Destructor Documentation

◆ PythonEditor()

◆ ~PythonEditor()

hal::PythonEditor::~PythonEditor ( )

Definition at line 466 of file python_editor.cpp.

Member Function Documentation

◆ autosaveFilename()

QString hal::PythonEditor::autosaveFilename ( int  index)

Generate a generic filename when called by autosave (given filename might be located in external directory)

Parameters
index- The tab index
Returns
Generated file name

Definition at line 738 of file python_editor.cpp.

References QString::arg(), QFileInfo::fileName(), getPythonEditor(), hal::PythonCodeEditor::getRelFilename(), QString::isEmpty(), and unnamedFilename().

Referenced by saveFile(), and hal::PythonSerializer::serialize_control().

◆ clear()

void hal::PythonEditor::clear ( )
overridevirtual

Does currently nothing.

Implements hal::PythonContextSubscriber.

Definition at line 524 of file python_editor.cpp.

◆ confirmDiscardForRange()

bool hal::PythonEditor::confirmDiscardForRange ( int  start,
int  end,
int  exclude = -1 
)

Check for a given index range, if all tabs of these indexes should be discarded. If there are no unsaved changes they can be discarded. Otherwise the user is informed about unsaved tabs an may choose whether to discard all changes or not.
The range will by passed in python style, e.g. start=1, end=5 includes indices {1,2,3,4}
Also the exclude parameter can be used to skip a certain index, e.g. start=1, end=5, exclude=2 includes indices {1,3,4}

Parameters
start- The start position. (Tab index)
end- The end position. (Tab index) (not included)
exclude- May be passed to skip a certain index. Pass -1 to not exclude any indices.
Returns
true if the tabs should be discarded.

Definition at line 780 of file python_editor.cpp.

References QMessageBox::addButton(), QString::append(), QMessageBox::ApplyRole, QString::chop(), QMessageBox::clickedButton(), QPlainTextEdit::document(), QMessageBox::exec(), QTextDocument::isModified(), QMessageBox::RejectRole, QMessageBox::setDefaultButton(), QMessageBox::setDetailedText(), QMessageBox::setInformativeText(), QWidget::setStyleSheet(), QMessageBox::setText(), QTabWidget::tabText(), and QTabWidget::widget().

Referenced by handleActionCloseAllTabs(), handleActionCloseLeftTabs(), handleActionCloseOtherTabs(), and handleActionCloseRightTabs().

◆ createShortcuts()

QList< QShortcut * > hal::PythonEditor::createShortcuts ( )
overridevirtual

◆ disabledIconStyle()

QString hal::PythonEditor::disabledIconStyle ( ) const

Q_PROPERTY READ function for the 'disabled'-icon style.

Returns
the 'disabled'-icon style

Definition at line 1485 of file python_editor.cpp.

◆ discardTab()

◆ eventFilter()

bool hal::PythonEditor::eventFilter ( QObject obj,
QEvent event 
)
overrideprotectedvirtual

QObject event filter overwritten by the python editor. Used to capture right-clicks on the tabs to open the tab menu (see handleActionTabMenu).

Parameters
obj- The watches object
event- The event to filter
Returns

Reimplemented from QObject.

Definition at line 1156 of file python_editor.cpp.

References QMouseEvent::button(), QWidget::event(), QObject::eventFilter(), handleActionTabMenu(), QEvent::MouseButtonPress, QMouseEvent::pos(), QTabBar::tabAt(), and QTabWidget::tabBar().

◆ forwardError

void hal::PythonEditor::forwardError ( const QString output)
signal

Referenced by handleError().

◆ forwardStdout

void hal::PythonEditor::forwardStdout ( const QString output)
signal

Referenced by handleStdout().

◆ getFindFlags()

◆ getPythonEditor

PythonCodeEditor * hal::PythonEditor::getPythonEditor ( int  tabIndex)
slot

Get python editor from tab no

Parameters
tabIndexThe tab index of requested python editor
Returns
The python code editor

Definition at line 608 of file python_editor.cpp.

References QTabWidget::widget().

Referenced by autosaveFilename(), handleTabFileChanged(), saveFile(), and hal::PythonSerializer::serialize_control().

◆ getTabWidget()

QTabWidget * hal::PythonEditor::getTabWidget ( )

Access the underlying QTabWidget object, this class uses to handle the PythonCodeEditor tabs.

Returns
the QTabWidget object.

Definition at line 759 of file python_editor.cpp.

Referenced by hal::SpecialLogContentManager::safePythonEditor(), and hal::PythonSerializer::serialize_control().

◆ handleActionCloseAllTabs()

void hal::PythonEditor::handleActionCloseAllTabs ( )

Action to close all opened tabs. The user will be informed about all unsaved tabs that would be closed and may cancel the action.

Definition at line 939 of file python_editor.cpp.

References confirmDiscardForRange(), QTabWidget::count, and discardTab().

Referenced by handleActionTabMenu().

◆ handleActionCloseLeftTabs()

void hal::PythonEditor::handleActionCloseLeftTabs ( )

Action to close all tabs that are positioned left from the one the mouse is on. The user will be informed about all unsaved tabs that would be closed and may cancel the action.

Definition at line 970 of file python_editor.cpp.

References confirmDiscardForRange(), and discardTab().

Referenced by handleActionTabMenu().

◆ handleActionCloseOtherTabs()

void hal::PythonEditor::handleActionCloseOtherTabs ( )

Action to close all tabs but the selected one (the mouse is on). The user will be informed about all unsaved tabs that would be closed and may cancel the action.

Definition at line 951 of file python_editor.cpp.

References confirmDiscardForRange(), QTabWidget::count, and discardTab().

Referenced by handleActionTabMenu().

◆ handleActionCloseRightTabs()

void hal::PythonEditor::handleActionCloseRightTabs ( )

Action to close all tabs that are positioned right from the one the mouse is on. The user will be informed about all unsaved tabs that would be closed and may cancel the action.

Definition at line 982 of file python_editor.cpp.

References confirmDiscardForRange(), QTabWidget::count, and discardTab().

Referenced by handleActionTabMenu().

◆ handleActionCloseTab()

void hal::PythonEditor::handleActionCloseTab ( )

Action to close the tab the mouse is on.

Definition at line 933 of file python_editor.cpp.

References handleTabCloseRequested().

Referenced by handleActionTabMenu().

◆ handleActionNewTab()

◆ handleActionOpenFile()

void hal::PythonEditor::handleActionOpenFile ( )

Action to open a file. A dialogue will appear where the user can select the .py file he want to open.
In case the user opens an already open file the user is ask whether the changes should be overwritten or not.

Definition at line 528 of file python_editor.cpp.

References QTabWidget::count, QFileDialog::getOpenFileNames(), handleActionNewTab(), QList::isEmpty(), QList::last(), QMessageBox::No, QFileInfo::path(), QMessageBox::question(), QTabWidget::setCurrentIndex(), tabLoadFile(), QTabWidget::widget(), and QMessageBox::Yes.

Referenced by PythonEditor().

◆ handleActionRun()

◆ handleActionSaveFile()

void hal::PythonEditor::handleActionSaveFile ( )

Action to save the currently selected code editor (open tab). If the current tab is a new file the user is ask for a path to save it.

Definition at line 829 of file python_editor.cpp.

References QueryIfEmpty, saveControl(), and saveFile().

Referenced by handleActionTabMenu(), and PythonEditor().

◆ handleActionSaveFileAs()

void hal::PythonEditor::handleActionSaveFileAs ( )

Action to save the currently selected code editor (open tab). The user is ask where to save it.

Definition at line 835 of file python_editor.cpp.

References QueryAlways, saveControl(), and saveFile().

Referenced by handleActionTabMenu(), and PythonEditor().

◆ handleActionShowFile()

void hal::PythonEditor::handleActionShowFile ( )

Action to open the directory of the file, the mouse is on, in the explorer.

Definition at line 995 of file python_editor.cpp.

References QFileInfo::absolutePath(), control::action, QFileInfo::exists(), log_error, QDesktopServices::openUrl(), QObject::sender(), and QUrl::TolerantMode.

Referenced by handleActionTabMenu().

◆ handleActionTabMenu()

void hal::PythonEditor::handleActionTabMenu ( )

◆ handleActionToggleMinimap

void hal::PythonEditor::handleActionToggleMinimap ( )
slot

Q_SLOT to open/close the minimap (code outline).

Definition at line 388 of file python_editor.cpp.

References QTabWidget::currentWidget().

Referenced by PythonEditor().

◆ handleBaseFileModifiedIgnore

void hal::PythonEditor::handleBaseFileModifiedIgnore ( )
slot

Q_SLOT to handle that user chooses to ignore the changes of a file that was modified from outside (outside from hal).

Definition at line 1045 of file python_editor.cpp.

References QTabWidget::currentWidget(), hal::PythonCodeEditor::setBaseFileModified(), and QWidget::setHidden().

Referenced by PythonEditor().

◆ handleBaseFileModifiedOk

void hal::PythonEditor::handleBaseFileModifiedOk ( )
slot

Q_SLOT called while closing the information bar that informs the user after the original file was moved or deleted.

Definition at line 1052 of file python_editor.cpp.

References QTabWidget::currentWidget(), hal::PythonCodeEditor::setBaseFileModified(), and QWidget::setHidden().

Referenced by PythonEditor().

◆ handleBaseFileModifiedReload

void hal::PythonEditor::handleBaseFileModifiedReload ( )
slot

Q_SLOT to handle that user chooses to reload the file that was modified from outside (outside from hal).

Definition at line 1035 of file python_editor.cpp.

References QTabWidget::currentWidget(), hal::PythonCodeEditor::getAbsFilename(), QTabWidget::indexOf(), hal::PythonCodeEditor::setBaseFileModified(), QWidget::setHidden(), and tabLoadFile().

Referenced by PythonEditor().

◆ handleCurrentTabChanged

◆ handleDeserializationFromHalFile()

bool hal::PythonEditor::handleDeserializationFromHalFile ( const std::filesystem::path &  path,
Netlist netlist,
rapidjson::Document &  document 
)

Deserialize the necessary information from the .hal file that is loaded. All tabs that appear in the .hal file were opened.

Parameters
path- Unused
netlist- The deserialization target
document- The json document of the .hal file
Returns
true on success

Definition at line 311 of file python_editor.cpp.

References QTabWidget::count, QFileInfo::filePath(), QString::fromStdString(), handleActionNewTab(), test_multiple::netlist, QString::replace(), QTabWidget::setCurrentIndex(), tabLoadFile(), and UNUSED.

◆ handleError()

void hal::PythonEditor::handleError ( const QString output)
overridevirtual

Emits the forwardError signal.

Parameters
output- The string to forward.

Implements hal::PythonContextSubscriber.

Definition at line 519 of file python_editor.cpp.

References forwardError(), hal::output, and QObject::Q_EMIT().

◆ handleFileAboutToClose

void hal::PythonEditor::handleFileAboutToClose ( const QString fileName)
slot

Slot called when a file is about to be closed. (emitted by FileManager). Used to remove snapshots.

Parameters
fileName- the absolute path of the file that is about to be closed

Definition at line 1133 of file python_editor.cpp.

References QTabWidget::count, discardTab(), and handleActionNewTab().

Referenced by PythonEditor().

◆ handleFileOpened

void hal::PythonEditor::handleFileOpened ( QString  fileName)
slot

Slot called after a .hal file (or a .v/.vhdl is parsed) (emitted by FileManager). Used to check for existing snapshots.

Parameters
fileName- the opened file

Definition at line 1059 of file python_editor.cpp.

References QFileInfo::absoluteFilePath(), QTabWidget::count, discardTab(), QString::endsWith(), QFileInfo::filePath(), hal::PythonCodeEditor::getAbsFilename(), handleActionNewTab(), QVector::isEmpty(), QMap::isEmpty(), QMap::keys(), QMap::remove(), tabLoadFile(), and QTabWidget::widget().

Referenced by PythonEditor().

◆ handleKeyPressed

void hal::PythonEditor::handleKeyPressed ( )
slot

Q_SLOT to handle key presses within any PythonCodeEditor

Definition at line 394 of file python_editor.cpp.

Referenced by handleActionNewTab().

◆ handleSearchbarTextEdited

void hal::PythonEditor::handleSearchbarTextEdited ( const QString text,
SearchOptions  opts 
)
slot

Q_SLOT to handle changes in the searchbar text. Used to update the search logic.

Definition at line 415 of file python_editor.cpp.

References QTabWidget::count, QTabWidget::currentWidget(), hal::Searchbar::filterApplied(), hal::gui_utility::getStyledSvgIcon(), hal::ContentWidget::mSearchAction, and QAction::setIcon().

Referenced by PythonEditor().

◆ handleStdout()

void hal::PythonEditor::handleStdout ( const QString output)
overridevirtual

Emits the forwardStdout signal.

Parameters
output- The string to forward.

Implements hal::PythonContextSubscriber.

Definition at line 514 of file python_editor.cpp.

References forwardStdout(), hal::output, and QObject::Q_EMIT().

◆ handleTabCloseRequested

void hal::PythonEditor::handleTabCloseRequested ( int  index)
slot

Q_SLOT to close the tab given by its index. If there are unsaved changes the user is ask whether to save the changes, discard the changes or cancel the closing.

Parameters
index

Definition at line 351 of file python_editor.cpp.

References QMessageBox::Cancel, discardTab(), QPlainTextEdit::document(), hal::PythonCodeEditor::getRelFilename(), QString::isEmpty(), QTextDocument::isModified(), QueryAlways, QueryIfEmpty, QMessageBox::Save, saveControl(), saveFile(), and QTabWidget::widget().

Referenced by handleActionCloseTab(), and PythonEditor().

◆ handleTabFileChanged

void hal::PythonEditor::handleTabFileChanged ( QString  path)
slot

Q_SLOT to handle that the original file of an opened tab was modified (outside from hal).
A bar will appear that ask the user whether to reload the file or ignore the changes.
If the original file was moved or deleted the user will be informed.

Parameters
path- The absolute path of the original file that was changed. (If the file was removed or deleted the old path is passed)

Definition at line 1015 of file python_editor.cpp.

References QFileSystemWatcher::addPath(), QString::endsWith(), hal::FileStatusManager::fileChanged(), getPythonEditor(), hal::PythonCodeEditor::getUuid(), hal::gFileStatusManager, QTabWidget::indexOf(), hal::PythonCodeEditor::setBaseFileModified(), QWidget::setHidden(), QTabWidget::setTabText(), and QTabWidget::tabText().

Referenced by PythonEditor().

◆ handleTextChanged

void hal::PythonEditor::handleTextChanged ( )
slot

◆ handleThreadFinished

void hal::PythonEditor::handleThreadFinished ( )
slot

◆ newFileIconPath()

QString hal::PythonEditor::newFileIconPath ( ) const

Q_PROPERTY READ function for the 'new file'-icon path.

Returns
the 'new file'-icon path

Definition at line 1530 of file python_editor.cpp.

◆ newFileIconStyle()

QString hal::PythonEditor::newFileIconStyle ( ) const

Q_PROPERTY READ function for the 'new file'-icon style.

Returns
the 'new file'-icon style

Definition at line 1535 of file python_editor.cpp.

◆ openIconPath()

QString hal::PythonEditor::openIconPath ( ) const

Q_PROPERTY READ function for the 'open file'-icon path.

Returns
the 'open file'-icon path

Definition at line 1490 of file python_editor.cpp.

◆ openIconStyle()

QString hal::PythonEditor::openIconStyle ( ) const

Q_PROPERTY READ function for the 'open file'-icon style.

Returns
the 'open file'-icon style

Definition at line 1495 of file python_editor.cpp.

◆ runIconPath()

QString hal::PythonEditor::runIconPath ( ) const

Q_PROPERTY READ function for the 'run'-icon path.

Returns
the 'run'-icon path

Definition at line 1520 of file python_editor.cpp.

◆ runIconStyle()

QString hal::PythonEditor::runIconStyle ( ) const

Q_PROPERTY READ function for the 'run'-icon style.

Returns
the 'run'-icon style

Definition at line 1525 of file python_editor.cpp.

◆ saveAllTabs()

void hal::PythonEditor::saveAllTabs ( const QString genericPath,
bool  isAutosave 
)

Saves all open tabs. Will use generic filenames if no name was given so far.

Parameters
isAutosaveTrue if save request was issued from autosave, false otherwise

Definition at line 745 of file python_editor.cpp.

References QTabWidget::count, GenericName, QDir::mkpath(), and saveFile().

Referenced by hal::PythonSerializer::serialize().

◆ saveAsIconPath()

QString hal::PythonEditor::saveAsIconPath ( ) const

Q_PROPERTY READ function for the 'save as'-icon path.

Returns
the 'save as'-icon path

Definition at line 1510 of file python_editor.cpp.

◆ saveAsIconStyle()

QString hal::PythonEditor::saveAsIconStyle ( ) const

Q_PROPERTY READ function for the 'save as'-icon style.

Returns
the 'save as'-icon style

Definition at line 1515 of file python_editor.cpp.

◆ saveControl()

void hal::PythonEditor::saveControl ( )

Saves state of tabs to pythoneditor.json

Definition at line 754 of file python_editor.cpp.

References hal::PythonSerializer::serialize_control().

Referenced by handleActionSaveFile(), handleActionSaveFileAs(), and handleTabCloseRequested().

◆ saveFile()

bool hal::PythonEditor::saveFile ( bool  isAutosave,
PythonEditor::QueryFilenamePolicy  queryPolicy,
int  index = -1 
)

◆ saveIconPath()

QString hal::PythonEditor::saveIconPath ( ) const

Q_PROPERTY READ function for the 'save file'-icon path.

Returns
the 'save file'-icon path

Definition at line 1500 of file python_editor.cpp.

◆ saveIconStyle()

QString hal::PythonEditor::saveIconStyle ( ) const

Q_PROPERTY READ function for the 'save file'-icon style.

Returns
the 'save file'-icon style

Definition at line 1505 of file python_editor.cpp.

◆ searchActiveIconStyle()

QString hal::PythonEditor::searchActiveIconStyle ( ) const

Q_PROPERTY READ function for the 'active search'-icon style.

Returns
the 'active search'-icon style

Definition at line 1655 of file python_editor.cpp.

◆ searchIconPath()

QString hal::PythonEditor::searchIconPath ( ) const

Q_PROPERTY READ function for the 'search'-icon path.

Returns
the 'search'-icon path

Definition at line 1645 of file python_editor.cpp.

◆ searchIconStyle()

QString hal::PythonEditor::searchIconStyle ( ) const

Q_PROPERTY READ function for the 'search'-icon style.

Returns
the 'search'-icon style

Definition at line 1650 of file python_editor.cpp.

◆ setDisabledIconStyle()

void hal::PythonEditor::setDisabledIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'disabled'-icon style.

Parameters
style- the new style

Definition at line 1550 of file python_editor.cpp.

References QWidget::style().

◆ setNewFileIconPath()

void hal::PythonEditor::setNewFileIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'new file'-icon path.

Parameters
path- the new path

Definition at line 1595 of file python_editor.cpp.

◆ setNewFileIconStyle()

void hal::PythonEditor::setNewFileIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'new file'-icon style.

Parameters
style- the new style

Definition at line 1600 of file python_editor.cpp.

References QWidget::style().

◆ setOpenIconPath()

void hal::PythonEditor::setOpenIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'open file'-icon path.

Parameters
path- the new path

Definition at line 1555 of file python_editor.cpp.

◆ setOpenIconStyle()

void hal::PythonEditor::setOpenIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'open file'-icon style.

Parameters
style- the new style

Definition at line 1560 of file python_editor.cpp.

References QWidget::style().

◆ setRunIconPath()

void hal::PythonEditor::setRunIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'run'-icon path.

Parameters
path- the new path

Definition at line 1585 of file python_editor.cpp.

◆ setRunIconStyle()

void hal::PythonEditor::setRunIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'run'-icon style.

Parameters
style- the new style

Definition at line 1590 of file python_editor.cpp.

References QWidget::style().

◆ setSaveAsIconPath()

void hal::PythonEditor::setSaveAsIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'save as'-icon path.

Parameters
path- the new path

Definition at line 1575 of file python_editor.cpp.

◆ setSaveAsIconStyle()

void hal::PythonEditor::setSaveAsIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'save as'-icon style.

Parameters
style- the new style

Definition at line 1580 of file python_editor.cpp.

References QWidget::style().

◆ setSaveIconPath()

void hal::PythonEditor::setSaveIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'save file'-icon path.

Parameters
path- the new path

Definition at line 1565 of file python_editor.cpp.

◆ setSaveIconStyle()

void hal::PythonEditor::setSaveIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'save file'-icon style.

Parameters
style- the new style

Definition at line 1570 of file python_editor.cpp.

References QWidget::style().

◆ setSearchActiveIconStyle()

void hal::PythonEditor::setSearchActiveIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'active search'-icon style.

Parameters
style- the new style

Definition at line 1670 of file python_editor.cpp.

References QWidget::style().

◆ setSearchIconPath()

void hal::PythonEditor::setSearchIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'search'-icon path.

Parameters
path- the new path

Definition at line 1660 of file python_editor.cpp.

◆ setSearchIconStyle()

void hal::PythonEditor::setSearchIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'search'-icon style.

Parameters
style- the new style

Definition at line 1665 of file python_editor.cpp.

References QWidget::style().

◆ setToggleMinimapIconPath()

void hal::PythonEditor::setToggleMinimapIconPath ( const QString path)

Q_PROPERTY WRITE function for the 'toggle minimap'-icon path.

Parameters
path- the new path

Definition at line 1605 of file python_editor.cpp.

◆ setToggleMinimapIconStyle()

void hal::PythonEditor::setToggleMinimapIconStyle ( const QString style)

Q_PROPERTY WRITE function for the 'toggle minimap'-icon style.

Parameters
style- the new style

Definition at line 1610 of file python_editor.cpp.

References QWidget::style().

◆ setToolbarButtonsEnabled()

void hal::PythonEditor::setToolbarButtonsEnabled ( bool  enable)

Enable/Disable toolbar buttons, which depend on a CodeEditor object (e.g. Save, Run, Show Minimap...)

Parameters
enable- Wether to enable or disable the buttons

Definition at line 820 of file python_editor.cpp.

References hal::enable, hal::ContentWidget::mSearchAction, and QAction::setEnabled().

Referenced by PythonEditor().

◆ setupToolbar()

void hal::PythonEditor::setupToolbar ( Toolbar Toolbar)
overridevirtual

Setups the toolbar of this content widget. Overwrites the function ContentWidget::setupToolbar.

Parameters
Toolbar- The toolbar to set up

Reimplemented from hal::ContentWidget.

Definition at line 470 of file python_editor.cpp.

References QToolBar::addAction(), and hal::ContentWidget::mSearchAction.

◆ tabLoadFile()

void hal::PythonEditor::tabLoadFile ( u32  index,
QString  fileName 
)

◆ toggleMinimapIconPath()

QString hal::PythonEditor::toggleMinimapIconPath ( ) const

Q_PROPERTY READ function for the 'toggle minimap'-icon path.

Returns
the 'toggle minimap'-icon path

Definition at line 1540 of file python_editor.cpp.

◆ toggleMinimapIconStyle()

QString hal::PythonEditor::toggleMinimapIconStyle ( ) const

Q_PROPERTY READ function for the 'toggle minimap'-icon style.

Returns
the 'toggle minimap'-icon style

Definition at line 1545 of file python_editor.cpp.

◆ toggleSearchbar

void hal::PythonEditor::toggleSearchbar ( )
slot

Q_SLOT to open/close the searchbar. (Connected to Strg+F by default)

Definition at line 1615 of file python_editor.cpp.

References QTabWidget::currentWidget(), QWidget::hide(), QAction::isEnabled(), QWidget::isHidden(), hal::ContentWidget::mSearchAction, QWidget::setFocus(), and QWidget::show().

Referenced by PythonEditor().

◆ unnamedFilename()

QString hal::PythonEditor::unnamedFilename ( int  index) const

Generate a generic filename for tabs that have not been saved to file yet

Parameters
index- The tab index
Returns
Generated file name

Definition at line 733 of file python_editor.cpp.

References QString::arg().

Referenced by autosaveFilename(), saveFile(), and hal::PythonSerializer::serialize_control().

◆ updateSearchIcon

void hal::PythonEditor::updateSearchIcon ( )
slot

Q_SLOT to update the search icon style. The search icon style indicates wether a filter is applied or not.

Definition at line 1146 of file python_editor.cpp.

References hal::Searchbar::filterApplied(), hal::gui_utility::getStyledSvgIcon(), QAction::isEnabled(), QWidget::isVisible(), hal::ContentWidget::mSearchAction, and QAction::setIcon().

Referenced by handleCurrentTabChanged(), and PythonEditor().

Property Documentation

◆ disabledIconStyle

QString hal::PythonEditor::disabledIconStyle
readwrite

Definition at line 67 of file python_editor.h.

Referenced by handleCurrentTabChanged().

◆ newFileIconPath

QString hal::PythonEditor::newFileIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ newFileIconStyle

QString hal::PythonEditor::newFileIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ openIconPath

QString hal::PythonEditor::openIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ openIconStyle

QString hal::PythonEditor::openIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ runIconPath

QString hal::PythonEditor::runIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ runIconStyle

QString hal::PythonEditor::runIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ saveAsIconPath

QString hal::PythonEditor::saveAsIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ saveAsIconStyle

QString hal::PythonEditor::saveAsIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ saveIconPath

QString hal::PythonEditor::saveIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ saveIconStyle

QString hal::PythonEditor::saveIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ searchActiveIconStyle

QString hal::PythonEditor::searchActiveIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ searchIconPath

QString hal::PythonEditor::searchIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ searchIconStyle

QString hal::PythonEditor::searchIconStyle
readwrite

Definition at line 67 of file python_editor.h.

◆ toggleMinimapIconPath

QString hal::PythonEditor::toggleMinimapIconPath
readwrite

Definition at line 67 of file python_editor.h.

◆ toggleMinimapIconStyle

QString hal::PythonEditor::toggleMinimapIconStyle
readwrite

Definition at line 67 of file python_editor.h.


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