1 // File : SALOME_ProductsView.hxx
2 // Created : Thu Dec 18 12:01:00 2002
3 // Author : Vadim SANDLER
4 // Project : PAL/SALOME
5 // Module : InstallWizard
6 // Copyright : 2004 CEA
9 #ifndef __SALOME_ProductsView
10 #define __SALOME_ProductsView
12 #include <qlistview.h>
15 Class ProductsViewItem: to define custom products list view item
18 class ProductsViewItem : public QCheckListItem
22 ProductsViewItem( ProductsView* parent, const QString& text, Type tt );
24 ProductsViewItem( QCheckListItem* parent, const QString& text, Type tt );
27 // called when users switches item on/off
28 void stateChange( bool on );
32 Class ProductsView : Products list view
34 class ProductsView : public QListView
40 ProductsView( QWidget* parent );
42 // event filter - prevents collapsing/expanding of items
43 bool eventFilter( QObject* o, QEvent* e );
45 // adds product item(s) into the list
46 QCheckListItem* addItem( const QString& name,
47 const QString& version,
48 const QString& install,
49 const QStringList& supported,
50 const QString& script );
52 // emits signal when checkbox or radiobutton is switched
53 void itemActivated( QCheckListItem* item );
55 // returns true if "install binaries" is on for the item
56 bool isBinaries( QCheckListItem* item );
57 // returns true if "install sources" is on for the item
58 bool isSources( QCheckListItem* item );
59 // returns true if "use native" is on for the item
60 bool isNative( QCheckListItem* item );
61 // returns true if "not install" is on for the item
62 bool isNone( QCheckListItem* item );
64 // sets "install binaries" on for the item; if "binaries" item is absent, set "install sources" on if it is present
65 void setBinaries( QCheckListItem* item );
66 // sets "install sources" on for the item; if "sources" item is absent, set "install binaries" on if it is present
67 void setSources( QCheckListItem* item );
68 // sets "use native" on for the item; if "sources" item is absent, set "install binaries" on if it is present
69 void setNative( QCheckListItem* item );
70 // sets "not install" on for the item
71 void setNone( QCheckListItem* item );
74 // emitted when checkbox or radiobutton is switched
75 void itemToggled( QCheckListItem* item );