Salome HOME
a1149f8c47bad83facf84c4d6fec44fcf6c3f17e
[modules/kernel.git] / src / RegistryDisplay / RegWidget.hxx
1 //=============================================================================
2 // File      : RegWidget.hxx
3 // Created   : Mon Nov  5 17:26:23 CET 2001
4 // Author    : Pascale NOYRET, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2001
7 // $Header$
8 //=============================================================================
9
10 # ifndef __REGWIDGET_H__
11 # define __REGWIDGET_H__
12 # include <qapplication.h>
13 # include <qmainwindow.h>
14
15 #include <SALOMEconfig.h>
16 #include CORBA_CLIENT_HEADER(SALOME_Registry)
17
18 #include <IntervalWindow.hxx>
19
20 class QTabWidget;
21 class QListView;
22 class QListViewItem;
23 class QWidget;
24 class QTimer;
25 class QCloseEvent;
26 class QTextView;
27 #if QT_VERSION > 300
28 class QPushButton;
29 #endif
30 class HelpWindow;
31 class InfoWindow;
32
33 class RegWidget : public QMainWindow
34 {
35   
36   Q_OBJECT
37
38 public:
39    RegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
40   ~RegWidget();
41   void       SetListe();
42   void       SetListeHistory();
43   void       InfoReg();
44   void       InfoHistory();
45
46   bool       eventFilter( QObject* object, QEvent* event );
47
48   static RegWidget* GetRegWidget( CORBA::ORB_var &orb , QWidget *parent = 0, const char *name = 0 );
49
50 public slots:
51   void       slotHelp();
52   void       slotListeSelect();
53   void       slotClientChanged( QListViewItem* );
54   void       slotHistoryChanged( QListViewItem* );
55   void       slotSelectRefresh();
56   void       slotIntervalOk();
57 protected:  
58   static QString setlongText( const Registry::Infos &c_info );
59   int            numitem( const QString& name, const QString& pid, const QString& machine, const Registry::AllInfos* c_info );
60   void           closeEvent( QCloseEvent *e);
61    
62 protected :
63   QListView*          _clients;
64   QListView*          _history;
65   QWidget*            _parent;
66   QTabWidget*         _tabWidget;
67   QPushButton*        _refresh;
68   QPushButton*        _interval;
69   QTimer*             _counter;
70   Registry::AllInfos* _serverhistory;
71   Registry::AllInfos* _serverclients;
72   InfoWindow*         myInfoWindow;
73   HelpWindow*         myHelpWindow;
74   IntervalWindow*     myIntervalWindow;
75   int                 myRefreshInterval;
76
77 private:
78   const      Registry::Components_var _VarComponents;
79   static     RegWidget* myRegWidgetPtr;
80 };
81
82 class InfoWindow : public QMainWindow {
83 public:
84   InfoWindow( QWidget* parent = 0, const char* name = 0);
85
86   void setText( const QString& text );
87   QTextView* textView() const { return myTextView; }
88
89 private:
90   QTextView* myTextView;
91
92 };
93
94 # endif         /* # ifndef __REGWIDGET_H__ */
95
96
97
98
99
100
101
102
103