X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTOOLSGUI%2FToolsGUI_RegWidget.h;h=f1d799ddacd8fedd12913b77153cfe39d911fe18;hb=54792d6e5e44d8e6300622d356c8038eee3cf194;hp=b2ff850876ad34a25794e6c066f028d77566b41b;hpb=2b560b6cbccba3201c59a4cf24143e4c7578516a;p=modules%2Fgui.git diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h old mode 100755 new mode 100644 index b2ff85087..f1d799dda --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -1,126 +1,74 @@ -// SALOME RegistryDisplay : GUI for Registry server implementation +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003 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 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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, 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. // -// File : RegWidget.h -// Author : Pascale NOYRET, EDF -// Module : SALOME -// $Header$ +// 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 TOOLSGUI_REGWIDGET_H +#define TOOLSGUI_REGWIDGET_H + +#include "ToolsGUI.h" -# ifndef __REGWIDGET_H__ -# define __REGWIDGET_H__ -# include -# include +#include +#include #include #include CORBA_CLIENT_HEADER(SALOME_Registry) -class QTabWidget; -class QListView; -class QListViewItem; -class QWidget; +class QTreeWidget; +class QTreeWidgetItem; class QTimer; -class QCloseEvent; -class QTextView; -#if QT_VERSION > 300 -class QPushButton; -#endif - -#include - -class ToolsGUI_HelpWindow; -class ToolsGUI_IntervalWindow; - -class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow { -public: - ToolsGUI_InfoWindow( QWidget* parent = 0, const char* name = 0); - - void setText( const QString& text ); - QTextView* textView() const { return myTextView; } - -protected: - void keyPressEvent( QKeyEvent * e ); - -private: - QTextView* myTextView; -}; +class QAction; +class QTextEdit; -class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow +class TOOLSGUI_EXPORT ToolsGUI_RegWidget : public QMainWindow { - Q_OBJECT + enum { Refresh, Interval, Close }; + enum { Clients, History }; + + ToolsGUI_RegWidget( CORBA::ORB_ptr orb, QWidget* parent = 0 ); + public: - ToolsGUI_RegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 ); ~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, const char *name = 0 ); +private slots: + void refresh(); + void showDetails( QTreeWidgetItem*, int ); + void refreshInterval(); -public slots: - void slotHelp(); - void slotListeSelect(); - void slotClientChanged( QListViewItem* ); - void slotHistoryChanged( QListViewItem* ); - 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* c_info ); - void closeEvent( QCloseEvent *e); +private: + static QString getDetails( const Registry::Infos& c_info ); -protected : - QListView* _clients; - QListView* _history; - QWidget* _parent; - QTabWidget* _tabWidget; - QPushButton* _refresh; - QPushButton* _interval; - QPushButton* _close; - QTimer* _counter; - Registry::AllInfos* _serverhistory; - Registry::AllInfos* _serverclients; - ToolsGUI_InfoWindow* myInfoWindow; - ToolsGUI_HelpWindow* myHelpWindow; - ToolsGUI_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 /* # ifndef __REGWIDGET_H__ */ - - - - - - - - - +#endif // TOOLSGUI_REGWIDGET_H