X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_InstallWizard.hxx;h=94a6c9345aefd25b90363d255211b61fe9d92eed;hb=bd918354fe8801fcea6ba5f5ab4146756bd5c733;hp=ee7af23440509216b1f17813f48cea1419862dcc;hpb=f5cbaf142ab66ea52adb4a3303ee06dc830e5708;p=tools%2Finstall.git diff --git a/src/SALOME_InstallWizard.hxx b/src/SALOME_InstallWizard.hxx index ee7af23..94a6c93 100644 --- a/src/SALOME_InstallWizard.hxx +++ b/src/SALOME_InstallWizard.hxx @@ -1,9 +1,9 @@ // File : SALOME_InstallWizard.hxx // Created : Thu Dec 18 12:01:00 2002 -// Author : Vadim SANDLER +// Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2004-2005 CEA +// Copyright : 2002-2009 CEA #ifndef __SALOME_InstallWizard #define __SALOME_InstallWizard @@ -11,17 +11,37 @@ #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 }; +// This enum describes the possible states of a tristate parameter +enum BoolTristate { False, True, NotDefined }; + /*! 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 { @@ -33,77 +53,103 @@ class Dependancies const QStringList& depend, const long Binsize, const long Sourcessize, + const long SrcBuildsize, const long tempsize, - const QString& def = QString::null, + const QString& vers = QString::null, const QString& descr = QString::null, - const QString& ctx = QString::null, - bool pickup = false ) + const QString& tp = QString::null, + bool pickup = false, + BoolTristate woGui = NotDefined ) : smbName( name ), dependsOn( depend ), - sizeSourcesTotal( Sourcessize ), sizeBinaryTotal( Binsize ), + sizeSourcesTotal( Sourcessize ), + sizeSrcBuildTotal( SrcBuildsize ), sizeTemp( tempsize ), - defaultMode( def ), + version( vers ), description( descr ), - context( ctx ), - pickupEnv( pickup ) {} + type( tp ), + pickupEnv( pickup ), + woGuiMode( woGui ) {} // 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 + long getSize( InstallationType instType ) const { - return ( sources ? sizeSourcesTotal : sizeBinaryTotal ); + 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 context - QString getContext() const { return context; } - // returns true if product supports given context - bool hasContext( const QString& ctx ) const - { - QStringList cl = QStringList::split(",",context); - return cl.find( ctx ) != cl.end(); - } - // gets default mode - QString getDefault() const { return defaultMode; } + // gets product's type + QString getType() const { return type; } // returns true if this product needs to pick-up environment bool pickUpEnvironment() { return pickupEnv; } + // returns true if this product supports installation without GUI mode + BoolTristate supportWoGuiMode() { return woGuiMode; } 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 defaultMode; // default installation mode - QString description; // product's description - QString context; // product's context (salome sources, binaries or prerequisite) + 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 + BoolTristate woGuiMode; // support of installation without GUI flag }; -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 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 ) {} + + // 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