Salome HOME
SALOME 6.5.0 preparation: update scripts for Python (2.6.6)
[tools/install.git] / src / SALOME_ProductsView.hxx
1 //  File      : SALOME_ProductsView.hxx
2 //  Created   : Thu Dec 18 12:01:00 2002
3 //  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
4 //  Project   : SALOME
5 //  Module    : Installation Wizard
6 //  Copyright : 2002-2010 CEA
7
8 #ifndef __SALOME_ProductsView
9 #define __SALOME_ProductsView
10
11 #include <qlistview.h> 
12
13 /*! 
14   Class ProductsViewItem: to define custom products list view item
15 */
16 class ProductsView;
17 class ProductsViewItem : public QCheckListItem 
18 {
19  public:
20   // constructor
21   ProductsViewItem( ProductsView* parent, const QString& text, Type tt );
22
23  protected:
24   // called when users switches item on/off
25   void stateChange( bool on );
26 };
27
28 /*! 
29   Class ProductsView : Products list view
30 */
31 class ProductsView : public QListView 
32 {
33   Q_OBJECT
34   
35 public:
36   // constructor
37   ProductsView( QWidget* parent, const char* name = 0 );
38
39   // adds product item into the list
40   QCheckListItem* addItem( const QString& name, 
41                            const QString& version, 
42                            const QString& script );
43   // sets the given text as a heading of the given column
44   void renameColumn( int column, const QString& label );
45
46   // emits signal when checkbox or radiobutton is switched
47   void itemActivated( QCheckListItem* item );
48
49   // enable/disable item
50   void setItemEnabled( QCheckListItem* item, const bool enable );
51   
52   // find bin item which corresponds to the src item
53   QCheckListItem* findBinItem( const QString& srcName );
54
55 signals:
56   // emitted when checkbox or radiobutton is switched
57   void itemToggled( QCheckListItem* item );
58 };
59
60 #endif