From: sbh Date: Fri, 19 Sep 2014 15:31:58 +0000 (+0400) Subject: Unused method removed from the property panel X-Git-Tag: V_0.4.4~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e183e7a3cb6e928e69b284a8b553c84799ff498;p=modules%2Fshaper.git Unused method removed from the property panel --- diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index dd3cc642d..126f87610 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -51,7 +51,6 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent) aBtn->setToolTip(tr("Ok")); aBtn->setFlat(true); aBtnLay->addWidget(aBtn); - aBtn->installEventFilter(this); aBtn = new QPushButton(QIcon(":pictures/button_cancel.png"), "", aFrm); aBtn->setToolTip(tr("Cancel")); @@ -62,8 +61,6 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent) myCustomWidget = new QWidget(aContent); myMainLayout->addWidget(myCustomWidget); myMainLayout->addStretch(1); - - aBtn->installEventFilter(this); } XGUI_PropertyPanel::~XGUI_PropertyPanel() @@ -117,24 +114,6 @@ const QList& XGUI_PropertyPanel::modelWidgets() const return myWidgets; } -bool XGUI_PropertyPanel::eventFilter(QObject *theObject, QEvent *theEvent) -{ - QPushButton* anOkBtn = findChild(XGUI::PROP_PANEL_OK); - QPushButton* aCancelBtn = findChild(XGUI::PROP_PANEL_CANCEL); - if (theObject == anOkBtn || theObject == aCancelBtn) { - if (theEvent->type() == QEvent::KeyRelease) { - QKeyEvent* aKeyEvent = (QKeyEvent*) theEvent; - if (aKeyEvent && (aKeyEvent->key() == Qt::Key_Return || - aKeyEvent->key() == Qt::Key_Enter)) { - // TODO: this is enter button processing when the focus is on "Apply" or "Cancel" buttons - //emit keyReleased("", (QKeyEvent*) theEvent); - return true; - } - } - } - return QDockWidget::eventFilter(theObject, theEvent); -} - QWidget* XGUI_PropertyPanel::contentWidget() { return myCustomWidget; diff --git a/src/XGUI/XGUI_PropertyPanel.h b/src/XGUI/XGUI_PropertyPanel.h index c29232110..a660b5484 100644 --- a/src/XGUI/XGUI_PropertyPanel.h +++ b/src/XGUI/XGUI_PropertyPanel.h @@ -25,14 +25,17 @@ Q_OBJECT XGUI_PropertyPanel(QWidget* theParent); virtual ~XGUI_PropertyPanel(); + /// Returns main widget of the property panel, which children will be created + /// by WidgetFactory using the XML definition QWidget* contentWidget(); + /// Brings back all widget created by widget factory for signal/slot + /// connections and further processing void setModelWidgets(const QList& theWidgets); + /// Returns all property panel's widget created by WidgetFactory const QList& modelWidgets() const; - + /// Removes all widgets in the widget area of the property panel void cleanContent(); - virtual bool eventFilter(QObject *theObject, QEvent *theEvent); - public slots: void updateContentWidget(FeaturePtr theFeature); /// slot to activate the next widget in the property panel @@ -56,9 +59,7 @@ signals: private: QWidget* myCustomWidget; - QList myWidgets; - QVBoxLayout* myMainLayout; };