1 // File : SALOME_ProductsView.hxx
2 // Created : Thu Dec 18 12:01:00 2002
3 // Author : Vadim SANDLER
5 // Module : Installation Wizard
6 // Copyright : 2005 CEA
8 #ifndef __SALOME_ProductsView
9 #define __SALOME_ProductsView
11 #include <qlistview.h>
14 Class ProductsViewItem: to define custom products list view item
17 class ProductsViewItem : public QCheckListItem
21 ProductsViewItem( ProductsView* parent, const QString& text, Type tt );
23 ProductsViewItem( QCheckListItem* parent, const QString& text, Type tt );
26 // called when users switches item on/off
27 void stateChange( bool on );
31 Class ProductsView : Products list view
33 class ProductsView : public QListView
39 ProductsView( QWidget* parent );
41 // event filter - prevents collapsing/expanding of items
42 bool eventFilter( QObject* o, QEvent* e );
44 // adds product item(s) into the list
45 QCheckListItem* addItem( const QString& name,
46 const QString& version,
47 const QString& install,
48 const QStringList& supported,
49 const QString& script );
51 // emits signal when checkbox or radiobutton is switched
52 void itemActivated( QCheckListItem* item );
54 // returns true if "install binaries" is on for the item
55 bool isBinaries( QCheckListItem* item );
56 // returns true if "install sources" is on for the item
57 bool isSources( QCheckListItem* item );
58 // returns true if "use native" is on for the item
59 bool isNative( QCheckListItem* item );
60 // returns true if "not install" is on for the item
61 bool isNone( QCheckListItem* item );
63 // sets "install binaries" on for the item; if "binaries" item is absent, set "install sources" on if it is present
64 void setBinaries( QCheckListItem* item );
65 // sets "install sources" on for the item; if "sources" item is absent, set "install binaries" on if it is present
66 void setSources( QCheckListItem* item );
67 // sets "use native" on for the item; if "sources" item is absent, set "install binaries" on if it is present
68 void setNative( QCheckListItem* item );
69 // sets "not install" on for the item
70 void setNone( QCheckListItem* item );
73 // emitted when checkbox or radiobutton is switched
74 void itemToggled( QCheckListItem* item );