X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ErrorMgr.h;h=72fe886a01c8d3400e5c54b8fbbfa98ef0970a5b;hb=227323fca46747847e850a1d6e3bdaac882e209e;hp=03d057c5bbda2deb004c2ed8d2e924935371fcfb;hpb=72c4913ec2fb7b25caf65d14eb1152f9625ab6ce;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ErrorMgr.h b/src/XGUI/XGUI_ErrorMgr.h index 03d057c5b..72fe886a0 100644 --- a/src/XGUI/XGUI_ErrorMgr.h +++ b/src/XGUI/XGUI_ErrorMgr.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: XGUI_ErrorMgr.h -// Created: 22 July 2015 -// Author: Sergey POKHODENKO +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef XGUI_ErrorMgr_H #define XGUI_ErrorMgr_H @@ -38,7 +51,7 @@ public: /// Update actions for the given feature /// \param theFeature a feature - void updateActions(const FeaturePtr& theFeature); + virtual void updateActions(const FeaturePtr& theFeature); /// Update enable state of AcceptAll action if the feature uses it /// \param theFeature a feature @@ -52,11 +65,14 @@ protected slots: virtual void onWidgetChanged(); private: - /// It disables the action if the error message is not empty + /// Stores initial values of accept/accept all tool/status tip to internal containers + void storeInitialActionValues(); + + /// It disables the propety panel Accept action if the error message is not empty /// The message is set to the header tool tip. /// \param theAction an action to be changed /// \param theError an error state - void updateActionState(QAction* theAction, const QString& theError); + void updateAcceptActionState(const QString& theError); /// It updates the tool tip of the widget controls according to the widget error /// \param theWidget a widget @@ -74,6 +90,10 @@ private: ModuleBase_IWorkshop* myWorkshop; /// workshop QDialog* myErrorDialog; /// contains the error message QLabel* myErrorLabel; /// contains an error information + QString myAcceptToolTip; /// cached tool tip value for enabled Accept action + QString myAcceptAllToolTip; /// cached tool tip value for enabled AcceptAll action + QString myAcceptStatusTip; /// cached status tip value for enabled Accept action + QString myAcceptAllStatusTip; /// cached status tip value for enabled AcceptAll action }; #endif // XGUI_ErrorMgr_H \ No newline at end of file