// File : SALOME_InstallWizard.hxx
// Created : Thu Dec 18 12:01:00 2002
// Author : Vadim SANDLER
-// Project : PAL/SALOME
-// Module : InstallWizard
-// Copyright : 2004 CEA
-// $Header$
+// Project : SALOME
+// Module : Installation Wizard
+// Copyright : 2004-2005 CEA
#ifndef __SALOME_InstallWizard
#define __SALOME_InstallWizard
// default constructor, necessary for map
Dependancies() {}
// constructor
- Dependancies( const QString& name, const QStringList& depend, const long Binsize, const long Sourcessize, const long tempsize )
- : smbName( name ), dependsOn( depend ), sizeSourcesTotal( Sourcessize ), sizeBinaryTotal( Binsize ), sizeTemp( tempsize ) {}
+ Dependancies( const QString& name,
+ const QStringList& depend,
+ const long Binsize,
+ const long Sourcessize,
+ const long tempsize,
+ const QString& def = QString::null,
+ const QString& descr = QString::null,
+ const QString& ctx = QString::null,
+ bool pickup = false )
+ : smbName( name ),
+ dependsOn( depend ),
+ sizeSourcesTotal( Sourcessize ),
+ sizeBinaryTotal( Binsize ),
+ sizeTemp( tempsize ),
+ defaultMode( def ),
+ description( descr ),
+ context( ctx ),
+ pickupEnv( pickup ) {}
// gets symbolic name
QString getName() const { return smbName; }
// gets dependancies
QStringList getDependancies() const { return dependsOn; }
// gets disk space required
- long getSize(bool sources = false) const {
- if (sources)
- return sizeSourcesTotal;
- else
- return sizeBinaryTotal;
- }
+ long getSize(bool sources = false) const { return ( sources ? sizeSourcesTotal : sizeBinaryTotal ); }
// gets temporary disk space required
- long getTempSize() const { return sizeTemp; }
+ long getTempSize() const { return sizeTemp; }
+ // gets product's description
+ QString getDescription() const { return description; }
+ // gets product's context
+ QString getContext() const { return context; }
+ // gets default mode
+ QString getDefault() const { return defaultMode; }
+ // returns true if this product needs to pick-up environment
+ bool pickUpEnvironment() { return pickupEnv; }
private:
QString smbName; // symbolic name
long sizeSourcesTotal; // disk space required
long sizeBinaryTotal; // disk space required
long sizeTemp; // disk space for temporary files required
+ QString defaultMode; // default installation mode
+ QString description; // product's description
+ QString context; // product's context (salome sources, binaries or prerequisite)
+ bool pickupEnv; // "Pick-up environment" flag
};
class QLineEdit;
class QProcess;
class QCheckBox;
class QSplitter;
-
+class QMyCheckBox;
+class QProcessThread;
class ProductsView;
class ProgressView;
class HelpWindow;
// set dependancies
void setDependancies( QCheckListItem* item, Dependancies dep);
+ // process validation event (<val> is validation code)
+ void processValidateEvent( const int val, void* data );
+
public slots:
// polishing of the widget
void polish();
void showChoiceInfo();
// validates page when <Next> button is clicked
bool acceptData( const QString& );
- // calculates disk space required for the installation
- void checkSize( long* totSize = 0, long* tempSize = 0 );
- // checks directories validity
- void checkDirs();
+ // calculates disk space required for the installation, returns true if any product selected to be installed (src, bin or native)
+ bool checkSize( long* totSize = 0, long* tempSize = 0 );
+ // checks products page validity (directories and products selection)
+ void checkProductPage();
// sets the product and all products this one depends on to be checked ( recursively )
- void setProductOn( QCheckListItem* item, int install = 1 );
+ void setPrerequisites( QCheckListItem* item );
// runs installation script
void launchScript();
// searches product listview item with given symbolic name
QCheckListItem* findItem( const QString& sName );
// sets progress state to Aborted
void abort();
- // clears and removes temporary directory
- void clean();
+ // clears and (optionally) removes temporary directory
+ void clean(bool rmDir = false);
protected slots:
// reject slot
// kills installation process and quits application
void onCancel();
// called when selection is changed in the products list view
- void onSelectionChanged( QListViewItem* );
+ void onSelectionChanged();
// called when user checks/unchecks any product item
void onItemToggled( QCheckListItem* );
- // <Select Sources>, <Select Binaries>, <Unselect All> buttons slot
+ // <SALOME sources>, <SALOME binaries>, <Unselect All> buttons slot
void onProdBtn();
// <More...> button slot
void onMoreBtn();
ProductsView* productsView; // products list view
QTextBrowser* productsInfo; // products info box
QCheckBox* prerequisites; // <Auto check prerequisites products> checkbox
- QPushButton* selectSrcBtn; // <Select Sources> button - NOT USED CURRENTLY
- QPushButton* selectBinBtn; // <Select Binaries> button - NOT USED CURRENTLY
+ QMyCheckBox* selectSrcBtn; // <SALOME sources> check box
+ QMyCheckBox* selectBinBtn; // <SALOME binaries> check box
QPushButton* unselectBtn; // <Unselect All> button
// --> prestart page
QWidget* prestartPage; // page itself
QWidget* readmePage; // page itself
QTextEdit* readme; // Readme information window
QPushButton* runSalomeBtn; // <Launch Salome> buttnon
+
+ QProcessThread* myThread; // validation thread
};
#endif