From d20fdeb6a514ba034ca96d30da4581e7758cf975 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 18 Aug 2026 23:25:43 +0200 Subject: [PATCH] Adding standard icon getters for custom PCell parameters page; cleanup --- src/edt/edt/gsiDeclEdtPCellParametersPage.cc | 9 ++ src/layui/layui/gsiDeclLayWidgets.cc | 132 ------------------- 2 files changed, 9 insertions(+), 132 deletions(-) diff --git a/src/edt/edt/gsiDeclEdtPCellParametersPage.cc b/src/edt/edt/gsiDeclEdtPCellParametersPage.cc index 4d52473a4..af6b696ad 100644 --- a/src/edt/edt/gsiDeclEdtPCellParametersPage.cc +++ b/src/edt/edt/gsiDeclEdtPCellParametersPage.cc @@ -225,6 +225,15 @@ gsi::Class decl_PCellParametersPageImpl (decl_PCellPara "Typically this method is called in a slot attached to the value-representative widget, such as a\n" "check box or line edit. Provide the name of the changed parameter through the 'name' argument or\n" "use an empty string to signal an unspecific change." + ) + + gsi::method ("info_pixmap", &PCellParametersPageImpl::info_pixmap, + "@brief Gets the standard 'info' icon pixmap used in the standard implementation for the parameter state icon." + ) + + gsi::method ("error_pixmap", &PCellParametersPageImpl::error_pixmap, + "@brief Gets the standard 'error' icon pixmap used in the standard implementation for the parameter state icon." + ) + + gsi::method ("warning_pixmap", &PCellParametersPageImpl::warning_pixmap, + "@brief Gets the standard 'warning' icon pixmap used in the standard implementation for the parameter state icon." ), "@brief An implementation base class for custom PCell parameter pages\n" "\n" diff --git a/src/layui/layui/gsiDeclLayWidgets.cc b/src/layui/layui/gsiDeclLayWidgets.cc index 86ba978bd..475ddc3df 100644 --- a/src/layui/layui/gsiDeclLayWidgets.cc +++ b/src/layui/layui/gsiDeclLayWidgets.cc @@ -356,138 +356,6 @@ Class decl_ColorButton (QT_EXTERNAL_BASE (QComboBox) "lay", "C "This class has been introduced in version 0.30.11." ); -#if 0 - -/** - * @brief An edit box with a clear button and options menu - */ -class LAYUI_PUBLIC DecoratedLineEdit - : public QLineEdit -{ -Q_OBJECT - -public: - /** - * @brief Constructor - */ - DecoratedLineEdit (QWidget *parent); - - /** - * @brief Destructor - */ - ~DecoratedLineEdit (); - - /** - * @brief Sets a value indicating whether the clear button is enabled - * The clear button will be on the right side of the edit box. Pressing the button - * will clear the text and emit a "textEdited" and "textChanged" event. - */ - void set_clear_button_enabled (bool en); - - /** - * @brief Gets a value indicating whether the clear button is enabled - */ - bool is_clear_button_enabled () const - { - return m_clear_button_enabled; - } - - /** - * @brief Sets a value indicating whether the options button is enabled - * The options button appears to the left. Pressing the button will either show - * the options menu as set by "setOptionsMenu" or emit the "optionsButtonClicked" - * signal. - */ - void set_options_button_enabled (bool en); - - /** - * @brief Gets a value indicating whether the options button is enabled - */ - bool is_option_button_enabled () const - { - return m_options_button_enabled; - } - - /** - * @brief Sets the options menu to be shown when the options button is clicked. - * The DecoratedLineEdit object will not take ownership over the menu. - */ - void set_options_menu (QMenu *menu); - - /** - * @brief Gets the options menu - */ - QMenu *options_menu () const; - - /** - * @brief Sets a value indicating whether the widgets accepts ESC keys and sends an esc_pressed signal for this - */ - void set_escape_signal_enabled (bool f); - - /** - * @brief gets a value indicating whether the widgets accepts ESC keys and sends an esc_pressed signal for this - */ - bool escape_signal_enabled () const - { - return m_escape_signal_enabled; - } - - /** - * @brief Sets a value indicating whether the widgets accepts Tab keys and sends an tab_pressed or backtab_pressed signal for this - */ - void set_tab_signal_enabled (bool f); - - /** - * @brief gets a value indicating whether the widgets accepts Tab keys and sends an tab_pressed or backtab_pressed signal for this - */ - bool tab_signal_enabled () const - { - return m_tab_signal_enabled; - } - - /** - * @brief Sets a label in front of the line edit - */ - void set_label (const std::string &label); - - /** - * @brief Gets the label - */ - const std::string &label () const - { - return m_label; - } - -signals: - void options_button_clicked (); - void esc_pressed (); - void tab_pressed (); - void backtab_pressed (); - void clear_pressed (); - -protected: - void mousePressEvent (QMouseEvent *event); - void mouseReleaseEvent (QMouseEvent *event); - void resizeEvent (QResizeEvent *event); - void keyPressEvent (QKeyEvent *event); - bool focusNextPrevChild (bool next); - bool event (QEvent *event); - -private: - bool m_clear_button_enabled; - bool m_options_button_enabled; - bool m_escape_signal_enabled; - bool m_tab_signal_enabled; - QLabel *mp_options_label; - QLabel *mp_clear_label; - QLabel *mp_front_label; - QMenu *mp_options_menu; - int m_default_left_margin, m_default_right_margin; - std::string m_label; - - void set_margins (); -}; -#endif // @@@ } #endif