]> SALOME platform Git repositories - modules/superv.git/blob - src/SUPERVGUI/SUPERVGUI_Notification.h
Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_Notification.h
1 //  File      : SUPERVGUI_Notification.h
2 //  Created   : 21 / 02 / 2002
3 //  Author    : Francis KLOSS
4 //  Project   : SALOME
5 //  Module    : SUPERVGUI
6 //  Copyright : CEA
7
8 #ifndef SUPERVGUI_Notification_H
9 #define SUPERVGUI_Notification_H
10
11 using namespace std;
12 #include "SUPERVGUI_Def.h"
13 #include <qdialog.h>
14 #include <qlist.h>
15 #include <qcheckbox.h>
16 #include <qlineedit.h>
17 #include <qpushbutton.h>
18 #include <qvbox.h>
19
20 class SUPERVGUI_Main;
21 class SUPERVGUI_Node;
22 class SUPERVGUI_NotifWidget;
23
24 class SUPERVGUI_Notification: public QDialog 
25 {
26   Q_OBJECT
27
28 public:
29   SUPERVGUI_Notification(SUPERVGUI_Main* m);
30   ~SUPERVGUI_Notification();
31
32   bool    getLogged();
33   void    setLogged( bool on, QString logFile = QString::null );
34   QString getLogFile();
35   bool    getFiltered();
36   void    setFiltered( bool on );
37   bool    getWarning();
38   void    setWarning( bool on );
39   bool    getStep();
40   void    setStep( bool on );
41   bool    getTrace();
42   void    setTrace( bool on );
43   bool    getVerbose();
44   void    setVerbose( bool on );
45   
46 private slots:
47   void    accept();
48   void    reject();
49   void    loggedClicked();
50   void    browseClicked();
51
52 private:
53   SUPERVGUI_Main*              myMain;
54   QScrollView*                 myView;
55   QVBox*                       myBox;
56   QPushButton*                 myOkBtn;
57   QPushButton*                 myCancelBtn;
58   QCheckBox*                   myLogCheck;
59   QCheckBox*                   myFilterCheck;
60   QLineEdit*                   myFileEdit;
61   QPushButton*                 myBrowseBtn;
62   SUPERVGUI_NotifWidget*       myMainNotif;
63   QList<SUPERVGUI_NotifWidget> myNotifList;
64 };
65
66 class SUPERVGUI_NotifWidget : public QWidget 
67 {
68 public:
69   SUPERVGUI_NotifWidget( QWidget* parent, SUPERVGUI_Node* n );
70   SUPERVGUI_NotifWidget( QWidget* parent, QString title );
71   ~SUPERVGUI_NotifWidget();
72
73   SUPERVGUI_Node* getNode() { return myNode; }
74
75   bool getWarning() { return myWarningCheck->isChecked(); }
76   bool getStep()    { return myStepCheck->isChecked();    }
77   bool getTrace()   { return myTraceCheck->isChecked();   }
78   bool getVerbose() { return myVerboseCheck->isChecked(); }
79   
80   void setWarning( bool on ) { myWarningCheck->setChecked( on ); }
81   void setStep( bool on )    { myStepCheck->setChecked( on );    }
82   void setTrace( bool on )   { myTraceCheck->setChecked( on );   }
83   void setVerbose( bool on ) { myVerboseCheck->setChecked( on ); }
84
85 private:
86   void init();
87   
88 private:
89   QString         myTitle;
90   SUPERVGUI_Node* myNode;
91   QCheckBox*      myWarningCheck;
92   QCheckBox*      myStepCheck;
93   QCheckBox*      myTraceCheck;
94   QCheckBox*      myVerboseCheck;
95 };
96
97 #endif
98
99
100
101
102
103
104