X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_InstallWizard.hxx;h=f3564b4890b0509680a472d32bc7aab7b9383b16;hb=7f20464cbfdbb123c2880002895cdbb454e63fbf;hp=ca5d313804767898c5cde7356b62a163841723fd;hpb=972b20151fc9d1119aeef80cf80dfd5abb90a272;p=tools%2Finstall.git diff --git a/src/SALOME_InstallWizard.hxx b/src/SALOME_InstallWizard.hxx index ca5d313..f3564b4 100644 --- a/src/SALOME_InstallWizard.hxx +++ b/src/SALOME_InstallWizard.hxx @@ -1,10 +1,9 @@ // File : SALOME_InstallWizard.hxx // Created : Thu Dec 18 12:01:00 2002 -// Author : Vadim SANDLER -// Project : PAL/SALOME -// Module : InstallWizard -// Copyright : 2004 CEA -// $Header$ +// Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +// Project : SALOME +// Module : Installation Wizard +// Copyright : 2002-2007 CEA #ifndef __SALOME_InstallWizard #define __SALOME_InstallWizard @@ -12,17 +11,35 @@ #include "InstallWizard.h" #include +#include #include +class QLineEdit; +class QPushButton; +class QListViewItem; +class QCheckListItem; +class QLabel; +class QTextEdit; +class QTextBrowser; +class QProcess; +class QCheckBox; +class QSplitter; +class QMyCheckBox; +class ProcessThread; +class ProductsView; +class ProgressView; +class HelpWindow; +class InstallInfo; +class QButton; +class QRadioButton; +class QButtonGroup; + +// This enum describes the possible types of the SALOME installation +enum InstallationType { Binaries, Sources, Compile }; + /*! Class Dependancies : Products info This class stores all product dependancies for correct work of installation procedure - smbName - parameter for launching install shell script (e.g. cas for CASCADE4.0). - dependsOn - list of products needed for correct installation of product - (e.g tcl is checked during installation of CASCADE 4). - sizeTotal - amount of disk space in Kbytes required for installation - of this product - sizeTemp - amount of disk space in Kbytes required for the temporary files */ class Dependancies { @@ -30,47 +47,101 @@ class Dependancies // 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 SrcBuildsize, + const long tempsize, + const QString& vers = QString::null, + const QString& descr = QString::null, + const QString& tp = QString::null, + bool pickup = false ) + : smbName( name ), + dependsOn( depend ), + sizeBinaryTotal( Binsize ), + sizeSourcesTotal( Sourcessize ), + sizeSrcBuildTotal( SrcBuildsize ), + sizeTemp( tempsize ), + version( vers ), + description( descr ), + type( tp ), + 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( InstallationType instType ) const + { + return instType == Binaries ? sizeBinaryTotal : + instType == Sources ? sizeSourcesTotal : + sizeSrcBuildTotal; } // gets temporary disk space required - long getTempSize() const { return sizeTemp; } + long getTempSize( InstallationType instType ) const + { + return ( instType == Binaries ? 0 : instType == Sources ? 0 : sizeTemp ); + } + // gets product's version + QString getVersion() const { return version; } + // gets product's description + QString getDescription() const { return description; } + // gets product's type + QString getType() const { return type; } + // returns true if this product needs to pick-up environment + bool pickUpEnvironment() { return pickupEnv; } private: - QString smbName; // symbolic name - QStringList dependsOn; // prerequisites list - long sizeSourcesTotal; // disk space required - long sizeBinaryTotal; // disk space required - long sizeTemp; // disk space for temporary files required + QString smbName; // symbolic name + QStringList dependsOn; // prerequisites list + long sizeBinaryTotal; // disk space for binaries required + long sizeSourcesTotal; // disk space for sources required + long sizeSrcBuildTotal; // disk space for compiled sources required + long sizeTemp; // disk space for temporary files required + QString version; // product's version + QString description; // product's description + QString type; // product's type (salome sources, binaries or prerequisite) + bool pickupEnv; // "Pick-up environment" flag }; -class QLineEdit; -class QPushButton; -class QListViewItem; -class QCheckListItem; -class QLabel; -class QTextEdit; -class QTextBrowser; -class QProcess; -class QCheckBox; -class QSplitter; +/*! + Class Button : Operation button info + This class stores information about the custom operation buttons which appear on + the page of the Install Wizard. +*/ +class Button +{ + public: + // default constructor, required for list + Button() : myButton( 0 ) {} + // constructor + Button( const QString& label, const QString& tooltip, const QString& script ) + : myLabel( label ), myTootip( tooltip ), myScript( script ), myButton( 0 ) {} -class ProductsView; -class ProgressView; -class HelpWindow; + // set operation button + void setButton( QButton* btn ) { myButton = btn; } + + // get label + QString label() const { return myLabel; } + // get tooltip + QString tootip() const { return myTootip; } + // get script name + QString script() const { return myScript; } + // get operation button + QButton* button() const { return myButton; } + + private: + QString myLabel; // button label + QString myTootip; // button tooltip + QString myScript; // operation script + QButton* myButton; // operation button +}; typedef QMap MapProducts; +typedef QValueList