![]() |
HAL
|
Main widget that combines all neccessary functionality to develop in python (for hal). More...
#include <python_editor.h>
Public Types | |
enum | QueryFilenamePolicy { GenericName , QueryIfEmpty , QueryAlways } |
![]() | |
enum | RenderFlag |
![]() | |
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) |
QTabWidget * | getTabWidget () |
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) |
![]() | |
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) |
![]() | |
Widget (QWidget *parent=nullptr) | |
void | setParent (QWidget *parent) |
![]() | |
QWidget (QWidget *parent, Qt::WindowFlags f) | |
virtual | ~QWidget () |
WId | winId () const const |
WId | effectiveWinId () const const |
QStyle * | style () 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 QRect & | geometry () 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 |
QWidget * | window () const const |
QWidget * | nativeParentWidget () const const |
QWidget * | topLevelWidget () const const |
const QPalette & | palette () 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 QFont & | font () 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 ®ion) |
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) |
QGraphicsEffect * | graphicsEffect () 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) |
QWidget * | focusProxy () 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) |
QGraphicsProxyWidget * | graphicsProxyWidget () 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 |
QLayout * | layout () 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) |
QWidget * | focusWidget () const const |
QWidget * | nextInFocusChain () const const |
QWidget * | previousInFocusChain () 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 |
QWidget * | parentWidget () 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 |
QWidget * | childAt (int x, int y) const const |
QWidget * | childAt (const QPoint &p) const const |
void | setAttribute (Qt::WidgetAttribute attribute, bool on) |
bool | testAttribute (Qt::WidgetAttribute attribute) const const |
virtual QPaintEngine * | paintEngine () 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) |
QBackingStore * | backingStore () const const |
QWindow * | windowHandle () const const |
QScreen * | screen () 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 | |
![]() | |
virtual const QMetaObject * | metaObject () 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) |
QThread * | thread () 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) |
T | 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 ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
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 | |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
void | remove () |
void | detach () |
void | reattach () |
void | open () |
void | close () |
void | handleSearchKeysequenceChanged (QKeySequence seq) |
virtual void | restoreFromProject () |
![]() | |
void | hide () |
void | show () |
![]() | |
void | removed () |
void | detached () |
void | reattached () |
void | opened () |
void | closed () |
void | name_changed (const QString &name) |
![]() | |
void | parentSetTo (QWidget *parent) |
void | hidden () |
void | shown () |
![]() | |
void | setTabOrder (QWidget *first, QWidget *second) |
QWidget * | mouseGrabber () |
QWidget * | keyboardGrabber () |
QWidget * | find (WId id) |
QWidget * | createWindowContainer (QWindow *window, QWidget *parent, Qt::WindowFlags flags) |
![]() | |
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) |
![]() | |
typedef | RenderFlags |
DrawWindowBackground | |
DrawChildren | |
IgnoreMask | |
![]() | |
typedef | QObjectList |
![]() | |
PdmWidth | |
PdmHeight | |
PdmWidthMM | |
PdmHeightMM | |
PdmNumColors | |
PdmDepth | |
PdmDpiX | |
PdmDpiY | |
PdmPhysicalDpiX | |
PdmPhysicalDpiY | |
PdmDevicePixelRatio | |
PdmDevicePixelRatioScaled | |
![]() | |
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 () |
![]() | |
QObject * | sender () 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) |
![]() | |
QPaintDevice () | |
![]() | |
QVBoxLayout * | mContentLayout |
QAction * | mSearchAction |
QShortcut * | mSearchShortcut |
QKeySequence | mSearchKeysequence |
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.
Query filename policy
Enumerator | |
---|---|
GenericName | |
QueryIfEmpty | |
QueryAlways |
Definition at line 125 of file python_editor.h.
|
explicit |
Definition at line 207 of file python_editor.cpp.
References QBoxLayout::addWidget(), QObject::connect(), QTabWidget::currentChanged(), QWidget::ensurePolished(), hal::FileManager::fileAboutToClose(), QFileSystemWatcher::fileChanged(), hal::FileManager::fileOpened(), hal::FileManager::get_instance(), hal::gui_utility::getStyledSvgIcon(), handleActionNewTab(), handleActionOpenFile(), handleActionRun(), handleActionSaveFile(), handleActionSaveFileAs(), handleActionToggleMinimap(), handleBaseFileModifiedIgnore(), handleBaseFileModifiedOk(), handleBaseFileModifiedReload(), handleCurrentTabChanged(), handleFileAboutToClose(), hal::FileModifiedBar::handleFileChanged(), handleFileOpened(), handleSearchbarTextEdited(), handleTabCloseRequested(), handleTabFileChanged(), QWidget::hide(), hal::FileModifiedBar::ignoreClicked(), QObject::installEventFilter(), hal::ContentWidget::mContentLayout, hal::ContentWidget::mSearchAction, hal::FileModifiedBar::okClicked(), hal::FileModifiedBar::reloadClicked(), hal::Searchbar::setEmitTextWithFlags(), QWidget::setHidden(), QAction::setIcon(), QTabWidget::setMovable(), hal::SettingsItemSpinbox::setRange(), QTabWidget::setTabsClosable(), QAction::setText(), hal::Action::setText(), setToolbarButtonsEnabled(), QTabWidget::tabBar(), QTabWidget::tabCloseRequested(), toggleSearchbar(), QAction::triggered(), hal::Searchbar::triggerNewSearch(), and updateSearchIcon().
hal::PythonEditor::~PythonEditor | ( | ) |
Definition at line 466 of file python_editor.cpp.
QString hal::PythonEditor::autosaveFilename | ( | int | index | ) |
Generate a generic filename when called by autosave (given filename might be located in external directory)
index | - The tab index |
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().
|
overridevirtual |
Does currently nothing.
Implements hal::PythonContextSubscriber.
Definition at line 524 of file python_editor.cpp.
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}
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. |
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().
Create the shortcuts for this content widget. Overwrites the function ContentWidget::createShortcuts.
Reimplemented from hal::ContentWidget.
Definition at line 481 of file python_editor.cpp.
References QShortcut::activated(), QList::append(), QObject::connect(), hal::SettingsItemKeybind::keySequenceChanged(), hal::ContentWidget::mSearchAction, hal::ContentWidget::mSearchKeysequence, hal::ContentWidget::mSearchShortcut, QShortcut::setKey(), QVariant::toString(), QAction::trigger(), and hal::SettingsItemKeybind::value().
QString hal::PythonEditor::disabledIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'disabled'-icon style.
Definition at line 1485 of file python_editor.cpp.
void hal::PythonEditor::discardTab | ( | int | index | ) |
Close the tab given by its index. It will discard all unsaved changes of this tab without asking.
index | - The index of the tab |
Definition at line 764 of file python_editor.cpp.
References QPlainTextEdit::document(), hal::FileStatusManager::fileSaved(), hal::PythonCodeEditor::getAbsFilename(), hal::PythonCodeEditor::getUuid(), hal::gFileStatusManager, QString::isEmpty(), QTextDocument::isModified(), QFileSystemWatcher::removePath(), QTabWidget::removeTab(), and QTabWidget::widget().
Referenced by handleActionCloseAllTabs(), handleActionCloseLeftTabs(), handleActionCloseOtherTabs(), handleActionCloseRightTabs(), handleFileAboutToClose(), handleFileOpened(), and handleTabCloseRequested().
QObject event filter overwritten by the python editor. Used to capture right-clicks on the tabs to open the tab menu (see handleActionTabMenu).
obj | - The watches object |
event | - The event to filter |
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().
|
signal |
Referenced by handleError().
|
signal |
Referenced by handleStdout().
QTextDocument::FindFlags hal::PythonEditor::getFindFlags | ( | ) |
Definition at line 1635 of file python_editor.cpp.
References QTextDocument::FindCaseSensitively, QTextDocument::FindFlags, QTextDocument::FindWholeWords, hal::Searchbar::getSearchOptions(), hal::SearchOptions::isCaseSensitive(), and hal::SearchOptions::isExactMatch().
|
slot |
Get python editor from tab no
tabIndex | The tab index of requested python editor |
Definition at line 608 of file python_editor.cpp.
References QTabWidget::widget().
Referenced by autosaveFilename(), handleTabFileChanged(), saveFile(), and hal::PythonSerializer::serialize_control().
QTabWidget * hal::PythonEditor::getTabWidget | ( | ) |
Access the underlying QTabWidget object, this class uses to handle the PythonCodeEditor tabs.
Definition at line 759 of file python_editor.cpp.
Referenced by hal::SpecialLogContentManager::safePythonEditor(), and hal::PythonSerializer::serialize_control().
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().
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().
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().
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().
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().
void hal::PythonEditor::handleActionNewTab | ( | ) |
Action to create an empty new tab.
Definition at line 876 of file python_editor.cpp.
References QTabWidget::addTab(), hal::SettingsItemCheckbox::boolChanged(), QObject::connect(), QTabWidget::count, hal::CodeEditorMinimap::document(), QPlainTextEdit::document(), handleKeyPressed(), handleTextChanged(), hal::SettingsItemSpinbox::intChanged(), hal::PythonCodeEditor::keyPressed(), hal::CodeEditor::minimap(), QString::number(), QTabWidget::setCurrentIndex(), hal::CodeEditor::setFontSize(), hal::CodeEditor::setHighlightCurrentLineEnabled(), hal::CodeEditor::setLineNumberEnabled(), hal::CodeEditor::setLineWrapEnabled(), hal::CodeEditor::setMinimapEnabled(), QTextDocument::setModified(), QPlainTextEdit::textChanged(), QVariant::toBool(), QVariant::toInt(), hal::SettingsItemCheckbox::value(), and hal::SettingsItemSpinbox::value().
Referenced by handleActionOpenFile(), handleDeserializationFromHalFile(), handleFileAboutToClose(), handleFileOpened(), PythonEditor(), and tabLoadFile().
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().
void hal::PythonEditor::handleActionRun | ( | ) |
Action to execute the python script of the currently selected code editor (open tab).
Definition at line 841 of file python_editor.cpp.
References QList::append(), QTabWidget::currentIndex, QTabWidget::currentWidget(), hal::GraphContextManager::getContexts(), hal::gGraphContextManager, hal::gPythonContext, hal::FileModifiedBar::handleScriptExecute(), QWidget::isHidden(), QWidget::setHidden(), QTabWidget::tabText(), QPlainTextEdit::toPlainText(), and QMessageBox::warning().
Referenced by PythonEditor().
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().
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().
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().
void hal::PythonEditor::handleActionTabMenu | ( | ) |
Action to create the menu when right-clicking on a tab. There the user may choose to close certain tabs or open the directory of the selected tab in the system explorer.
Definition at line 900 of file python_editor.cpp.
References control::action, QMenu::addAction(), QMenu::addSeparator(), QObject::connect(), QMenu::exec(), hal::PythonCodeEditor::getAbsFilename(), handleActionCloseAllTabs(), handleActionCloseLeftTabs(), handleActionCloseOtherTabs(), handleActionCloseRightTabs(), handleActionCloseTab(), handleActionSaveFile(), handleActionSaveFileAs(), handleActionShowFile(), QString::isEmpty(), QCursor::pos(), QAction::triggered(), and QTabWidget::widget().
Referenced by eventFilter().
|
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().
|
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().
|
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().
|
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().
|
slot |
Q_SLOT to handle that the user has selected another tab, so that the index of the current tab has changed.
index | - The index of the newly selected tab |
Definition at line 426 of file python_editor.cpp.
References QString::at(), QTabWidget::count, QTabWidget::currentWidget(), disabledIconStyle, hal::enable, QPlainTextEdit::extraSelections(), hal::Searchbar::getCurrentText(), hal::gui_utility::getStyledSvgIcon(), hal::gPythonContext, QWidget::hide(), hal::ContentWidget::iconPath, hal::ContentWidget::iconStyle, hal::PythonCodeEditor::isBaseFileModified(), QWidget::isHidden(), hal::ContentWidget::mSearchAction, hal::CodeEditor::search(), QAction::setEnabled(), QWidget::setHidden(), QAction::setIcon(), and updateSearchIcon().
Referenced by PythonEditor().
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.
path | - Unused |
netlist | - The deserialization target |
document | - The json document of the .hal file |
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.
|
overridevirtual |
Emits the forwardError signal.
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().
|
slot |
Slot called when a file is about to be closed. (emitted by FileManager). Used to remove snapshots.
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().
|
slot |
Slot called after a .hal file (or a .v/.vhdl is parsed) (emitted by FileManager). Used to check for existing snapshots.
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().
|
slot |
Q_SLOT to handle key presses within any PythonCodeEditor
Definition at line 394 of file python_editor.cpp.
Referenced by handleActionNewTab().
|
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().
|
overridevirtual |
Emits the forwardStdout signal.
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().
|
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.
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().
|
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.
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().
|
slot |
Q_SLOT to handle changed texts within any PythonCodeEditor. Used to mark that the tab was modified.
Definition at line 399 of file python_editor.cpp.
References QTabWidget::currentWidget(), QString::endsWith(), hal::FileStatusManager::fileChanged(), hal::PythonCodeEditor::getUuid(), hal::gFileStatusManager, QTabWidget::indexOf(), QTabWidget::setTabText(), and QTabWidget::tabText().
Referenced by handleActionNewTab().
|
slot |
Definition at line 864 of file python_editor.cpp.
References hal::GraphContext::endChange(), hal::GraphContextManager::getContextById(), hal::gGraphContextManager, and QWidget::setHidden().
QString hal::PythonEditor::newFileIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'new file'-icon path.
Definition at line 1530 of file python_editor.cpp.
QString hal::PythonEditor::newFileIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'new file'-icon style.
Definition at line 1535 of file python_editor.cpp.
QString hal::PythonEditor::openIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'open file'-icon path.
Definition at line 1490 of file python_editor.cpp.
QString hal::PythonEditor::openIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'open file'-icon style.
Definition at line 1495 of file python_editor.cpp.
QString hal::PythonEditor::runIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'run'-icon path.
Definition at line 1520 of file python_editor.cpp.
QString hal::PythonEditor::runIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'run'-icon style.
Definition at line 1525 of file python_editor.cpp.
void hal::PythonEditor::saveAllTabs | ( | const QString & | genericPath, |
bool | isAutosave | ||
) |
Saves all open tabs. Will use generic filenames if no name was given so far.
isAutosave | True 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().
QString hal::PythonEditor::saveAsIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'save as'-icon path.
Definition at line 1510 of file python_editor.cpp.
QString hal::PythonEditor::saveAsIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'save as'-icon style.
Definition at line 1515 of file python_editor.cpp.
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().
bool hal::PythonEditor::saveFile | ( | bool | isAutosave, |
PythonEditor::QueryFilenamePolicy | queryPolicy, | ||
int | index = -1 |
||
) |
Saves a tab given by its index. File dialog for filename will be shown upon QueryAlways or upon QueryIfEmpty no name was given before
queryPolicy | one of GenericName, QueryIfEmpty, QueryAlways |
isAutosave | True if save request was issued from autosave, false otherwise |
index | - The tab index |
Definition at line 613 of file python_editor.cpp.
References QDir::absoluteFilePath(), QFileSystemWatcher::addPath(), QString::append(), autosaveFilename(), QString::chop(), QFileInfo::completeBaseName(), QFileInfo::completeSuffix(), QStringList::contains(), QTabWidget::currentIndex, QPlainTextEdit::document(), QFileDialog::DontUseNativeDialog, QString::endsWith(), QFileSystemWatcher::files(), hal::FileStatusManager::fileSaved(), GenericName, hal::PythonCodeEditor::getAbsFilename(), getPythonEditor(), QFileDialog::getSaveFileName(), hal::PythonCodeEditor::getUuid(), hal::gFileStatusManager, QString::isEmpty(), log_error, QFileInfo::path(), QueryAlways, QueryIfEmpty, QFileSystemWatcher::removePath(), hal::PythonCodeEditor::setFilename(), QTextDocument::setModified(), QTabWidget::setTabText(), QTabWidget::tabText(), QPlainTextEdit::toPlainText(), QString::toStdString(), unnamedFilename(), and QMessageBox::warning().
Referenced by handleActionSaveFile(), handleActionSaveFileAs(), handleTabCloseRequested(), and saveAllTabs().
QString hal::PythonEditor::saveIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'save file'-icon path.
Definition at line 1500 of file python_editor.cpp.
QString hal::PythonEditor::saveIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'save file'-icon style.
Definition at line 1505 of file python_editor.cpp.
QString hal::PythonEditor::searchActiveIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'active search'-icon style.
Definition at line 1655 of file python_editor.cpp.
QString hal::PythonEditor::searchIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'search'-icon path.
Definition at line 1645 of file python_editor.cpp.
QString hal::PythonEditor::searchIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'search'-icon style.
Definition at line 1650 of file python_editor.cpp.
void hal::PythonEditor::setDisabledIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'disabled'-icon style.
style | - the new style |
Definition at line 1550 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setNewFileIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'new file'-icon path.
path | - the new path |
Definition at line 1595 of file python_editor.cpp.
void hal::PythonEditor::setNewFileIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'new file'-icon style.
style | - the new style |
Definition at line 1600 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setOpenIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'open file'-icon path.
path | - the new path |
Definition at line 1555 of file python_editor.cpp.
void hal::PythonEditor::setOpenIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'open file'-icon style.
style | - the new style |
Definition at line 1560 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setRunIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'run'-icon path.
path | - the new path |
Definition at line 1585 of file python_editor.cpp.
void hal::PythonEditor::setRunIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'run'-icon style.
style | - the new style |
Definition at line 1590 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setSaveAsIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'save as'-icon path.
path | - the new path |
Definition at line 1575 of file python_editor.cpp.
void hal::PythonEditor::setSaveAsIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'save as'-icon style.
style | - the new style |
Definition at line 1580 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setSaveIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'save file'-icon path.
path | - the new path |
Definition at line 1565 of file python_editor.cpp.
void hal::PythonEditor::setSaveIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'save file'-icon style.
style | - the new style |
Definition at line 1570 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setSearchActiveIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'active search'-icon style.
style | - the new style |
Definition at line 1670 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setSearchIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'search'-icon path.
path | - the new path |
Definition at line 1660 of file python_editor.cpp.
void hal::PythonEditor::setSearchIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'search'-icon style.
style | - the new style |
Definition at line 1665 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setToggleMinimapIconPath | ( | const QString & | path | ) |
Q_PROPERTY WRITE function for the 'toggle minimap'-icon path.
path | - the new path |
Definition at line 1605 of file python_editor.cpp.
void hal::PythonEditor::setToggleMinimapIconStyle | ( | const QString & | style | ) |
Q_PROPERTY WRITE function for the 'toggle minimap'-icon style.
style | - the new style |
Definition at line 1610 of file python_editor.cpp.
References QWidget::style().
void hal::PythonEditor::setToolbarButtonsEnabled | ( | bool | enable | ) |
Enable/Disable toolbar buttons, which depend on a CodeEditor object (e.g. Save, Run, Show Minimap...)
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().
|
overridevirtual |
Setups the toolbar of this content widget. Overwrites the function ContentWidget::setupToolbar.
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.
Open a file in the tab given by its index. Later on, all saved modification will be applied to the opened file.
index | - The index of the tab the file should opened in. |
fileName | - The absolute path of the file to open. |
Definition at line 569 of file python_editor.cpp.
References QFileSystemWatcher::addPath(), QFileInfo::completeBaseName(), QFileInfo::completeSuffix(), QTabWidget::count, QFileInfo::fileName(), hal::FileStatusManager::fileSaved(), QString::fromUtf8(), hal::gFileStatusManager, handleActionNewTab(), QTabWidget::indexOf(), QFile::open(), QIODevice::readAll(), QIODevice::ReadOnly, QPlainTextEdit::setPlainText(), QTabWidget::setTabText(), QString::startsWith(), and QTabWidget::widget().
Referenced by handleActionOpenFile(), handleBaseFileModifiedReload(), handleDeserializationFromHalFile(), and handleFileOpened().
QString hal::PythonEditor::toggleMinimapIconPath | ( | ) | const |
Q_PROPERTY READ function for the 'toggle minimap'-icon path.
Definition at line 1540 of file python_editor.cpp.
QString hal::PythonEditor::toggleMinimapIconStyle | ( | ) | const |
Q_PROPERTY READ function for the 'toggle minimap'-icon style.
Definition at line 1545 of file python_editor.cpp.
|
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().
QString hal::PythonEditor::unnamedFilename | ( | int | index | ) | const |
Generate a generic filename for tabs that have not been saved to file yet
index | - The tab index |
Definition at line 733 of file python_editor.cpp.
References QString::arg().
Referenced by autosaveFilename(), saveFile(), and hal::PythonSerializer::serialize_control().
|
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().
|
readwrite |
Definition at line 67 of file python_editor.h.
Referenced by handleCurrentTabChanged().
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.
|
readwrite |
Definition at line 67 of file python_editor.h.