X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTOOLSGUI%2FToolsGUI_RegWidget.h;h=3432f0b56a6bdbec58642d6d9e7a13ea10d72e75;hb=efe3cdefadc31ad9cdaa9fd7fc368e2931cebdf1;hp=1c9b3d5492055098a73b9bdaff83ed2dc1ad1d35;hpb=1c889394b028b786898a995d38c07c8f3d564837;p=modules%2Fgui.git diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index 1c9b3d549..3432f0b56 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -1,106 +1,74 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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. +// 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 +// 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 -// -// SALOME RegistryDisplay : GUI for Registry server implementation -// File : ToolsGUI_RegWidget.h -// Author : Pascale NOYRET, EDF +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef TOOLSGUI_REGWIDGET_H #define TOOLSGUI_REGWIDGET_H #include "ToolsGUI.h" #include +#include #include #include CORBA_CLIENT_HEADER(SALOME_Registry) -class QTabWidget; class QTreeWidget; class QTreeWidgetItem; -class QWidget; class QTimer; -class QCloseEvent; class QAction; +class QTextEdit; class TOOLSGUI_EXPORT ToolsGUI_RegWidget : public QMainWindow { Q_OBJECT - class HelpWindow; - class IntervalWindow; - class InfoWindow; + enum { Refresh, Interval, Close }; + enum { Clients, History }; - ToolsGUI_RegWidget( CORBA::ORB_var& orb, QWidget* parent = 0 ); + ToolsGUI_RegWidget( CORBA::ORB_ptr orb, QWidget* parent = 0 ); public: ~ToolsGUI_RegWidget(); - void SetListe(); - void SetListeHistory(); - void InfoReg(); - void InfoHistory(); - - bool eventFilter( QObject* object, QEvent* event ); + static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_ptr orb, + QWidget* parent = 0 ); - static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_var& orb, - QWidget* parent = 0 ); +private slots: + void refresh(); + void showDetails( QTreeWidgetItem*, int ); + void refreshInterval(); - virtual QMenu* createPopupMenu(); - -public slots: - void slotHelp(); - void slotListeSelect(); - void slotClientChanged( QTreeWidgetItem*, int ); - void slotHistoryChanged( QTreeWidgetItem*, int ); - void slotSelectRefresh(); - void slotIntervalOk(); - -protected: - static QString setlongText( const Registry::Infos& c_info ); - int numitem( const QString& name, - const QString& pid, - const QString& machine, - const Registry::AllInfos* clistclient ); - void closeEvent( QCloseEvent* e ); +private: + static QString getDetails( const Registry::Infos& c_info ); -protected : - QTreeWidget* _clients; - QTreeWidget* _history; - QWidget* _parent; - QTabWidget* _tabWidget; - QAction* _refresh; - QAction* _interval; - QAction* _close; - QTimer* _counter; - Registry::AllInfos* _serverhistory; - Registry::AllInfos* _serverclients; - InfoWindow* myInfoWindow; - HelpWindow* myHelpWindow; - IntervalWindow* myIntervalWindow; - int myRefreshInterval; - private: - const Registry::Components_var _VarComponents; - static ToolsGUI_RegWidget* myRegWidgetPtr; + static ToolsGUI_RegWidget* myRegWidgetPtr; + + CORBA::ORB_var myOrb; + QMap myData; + QMap myActions; + QMap myViews; + QTextEdit* myDetails; + QTimer* myTimer; }; #endif // TOOLSGUI_REGWIDGET_H