-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// File : QtxSplash.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include "QtxSplash.h"
#include "QtxResourceMgr.h"
// File : QtxSplash.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include "QtxSplash.h"
#include "QtxResourceMgr.h"
if ( mySplash ) {
mySplash->setError( code );
QMessageBox::critical( mySplash,
if ( mySplash ) {
mySplash->setError( code );
QMessageBox::critical( mySplash,
fl = 0;
QStringList opts = pf.split( QRegExp( "," ), QString::SkipEmptyParts );
for ( int i = 0; i < opts.count(); i++ ) {
fl = 0;
QStringList opts = pf.split( QRegExp( "," ), QString::SkipEmptyParts );
for ( int i = 0; i < opts.count(); i++ ) {
- QString opt = opts[i].trimmed().toLower();
- if ( opt == "left" )
- fl = fl | LeftSide;
- else if ( opt == "right" )
- fl = fl | RightSide;
- else if ( opt == "top" )
- fl = fl | TopSide;
- else if ( opt == "bottom" )
- fl = fl | BottomSide;
- else if ( opt == "left_to_right" )
- fl = fl | LeftToRight;
- else if ( opt == "right_to_left" )
- fl = fl | RightToLeft;
+ QString opt = opts[i].trimmed().toLower();
+ if ( opt == "left" )
+ fl = fl | LeftSide;
+ else if ( opt == "right" )
+ fl = fl | RightSide;
+ else if ( opt == "top" )
+ fl = fl | TopSide;
+ else if ( opt == "bottom" )
+ fl = fl | BottomSide;
+ else if ( opt == "left_to_right" )
+ fl = fl | LeftToRight;
+ else if ( opt == "right_to_left" )
+ fl = fl | RightToLeft;
fl = 0;
QStringList opts = al.split( QRegExp( "," ), QString::SkipEmptyParts );
for ( int i = 0; i < opts.count(); i++ ) {
fl = 0;
QStringList opts = al.split( QRegExp( "," ), QString::SkipEmptyParts );
for ( int i = 0; i < opts.count(); i++ ) {
- QString opt = opts[i].trimmed().toLower();
- if ( opt == "left" )
- fl = fl | Qt::AlignLeft;
- else if ( opt == "right" )
- fl = fl | Qt::AlignRight;
- else if ( opt == "top" )
- fl = fl | Qt::AlignTop;
- else if ( opt == "bottom" )
- fl = fl | Qt::AlignBottom;
- else if ( opt == "hcenter" )
- fl = fl | Qt::AlignHCenter;
- else if ( opt == "vcenter" )
- fl = fl | Qt::AlignVCenter;
- else if ( opt == "justify" )
- fl = fl | Qt::AlignJustify;
- else if ( opt == "center" )
- fl = fl | Qt::AlignCenter;
+ QString opt = opts[i].trimmed().toLower();
+ if ( opt == "left" )
+ fl = fl | Qt::AlignLeft;
+ else if ( opt == "right" )
+ fl = fl | Qt::AlignRight;
+ else if ( opt == "top" )
+ fl = fl | Qt::AlignTop;
+ else if ( opt == "bottom" )
+ fl = fl | Qt::AlignBottom;
+ else if ( opt == "hcenter" )
+ fl = fl | Qt::AlignHCenter;
+ else if ( opt == "vcenter" )
+ fl = fl | Qt::AlignVCenter;
+ else if ( opt == "justify" )
+ fl = fl | Qt::AlignJustify;
+ else if ( opt == "center" )
+ fl = fl | Qt::AlignCenter;
setProgressColors( lgrad );
}
else if ( resMgr->value( resSection, "progress_color", rgrad ) ||
setProgressColors( lgrad );
}
else if ( resMgr->value( resSection, "progress_color", rgrad ) ||
// radial gradient-colored progress bar
setProgressColors( rgrad );
}
else if ( resMgr->value( resSection, "progress_color", cgrad ) ||
// radial gradient-colored progress bar
setProgressColors( rgrad );
}
else if ( resMgr->value( resSection, "progress_color", cgrad ) ||
// conical gradient-colored progress bar
setProgressColors( cgrad );
}
else if ( resMgr->value( resSection, "progress_color", pc ) ||
// conical gradient-colored progress bar
setProgressColors( cgrad );
}
else if ( resMgr->value( resSection, "progress_color", pc ) ||
// one/two-colored progress bar
QStringList colors = pc.split( "|", QString::SkipEmptyParts );
QColor c1, c2;
// one/two-colored progress bar
QStringList colors = pc.split( "|", QString::SkipEmptyParts );
QColor c1, c2;
\sa message(), constantInfo(), setConstantInfo()
*/
void QtxSplash::setMessage( const QString& msg,
\sa message(), constantInfo(), setConstantInfo()
*/
void QtxSplash::setMessage( const QString& msg,
QLinearGradient lg;
const QLinearGradient* other = static_cast<const QLinearGradient*>( progressColors() );
if ( checkGradient( other ) ) {
QLinearGradient lg;
const QLinearGradient* other = static_cast<const QLinearGradient*>( progressColors() );
if ( checkGradient( other ) ) {
- // gradient is defined in relative coordinates [0.0 - 1.0]
- lg.setStart( r.left() + r.width() * other->start().x(),
- r.top() + r.height() * other->start().y() );
- lg.setFinalStop( r.left() + r.width() * other->finalStop().x(),
- r.top() + r.height() * other->finalStop().y() );
+ // gradient is defined in relative coordinates [0.0 - 1.0]
+ lg.setStart( r.left() + r.width() * other->start().x(),
+ r.top() + r.height() * other->start().y() );
+ lg.setFinalStop( r.left() + r.width() * other->finalStop().x(),
+ r.top() + r.height() * other->finalStop().y() );
- // gradient is defined in absolute coordinates
- // according to its dimensions
- lg.setStart( r.topLeft() + other->start() );
- lg.setFinalStop( r.topLeft() + other->finalStop() );
+ // gradient is defined in absolute coordinates
+ // according to its dimensions
+ lg.setStart( r.topLeft() + other->start() );
+ lg.setFinalStop( r.topLeft() + other->finalStop() );
QRadialGradient rg;
const QRadialGradient* other = static_cast<const QRadialGradient*>( progressColors() );
if ( checkGradient( other ) ) {
QRadialGradient rg;
const QRadialGradient* other = static_cast<const QRadialGradient*>( progressColors() );
if ( checkGradient( other ) ) {
- // gradient is defined in relative coordinates [0.0 - 1.0]
- rg.setCenter( r.left() + r.width() * other->center().x(),
- r.top() + r.height() * other->center().y() );
- rg.setFocalPoint( r.left() + r.width() * other->focalPoint().x(),
- r.top() + r.height() * other->focalPoint().y() );
+ // gradient is defined in relative coordinates [0.0 - 1.0]
+ rg.setCenter( r.left() + r.width() * other->center().x(),
+ r.top() + r.height() * other->center().y() );
+ rg.setFocalPoint( r.left() + r.width() * other->focalPoint().x(),
+ r.top() + r.height() * other->focalPoint().y() );
- // gradient is defined in absolute coordinates
- // according to its dimensions
- rg.setCenter( r.topLeft() + other->center() );
- rg.setFocalPoint( r.topLeft() + other->focalPoint() );
+ // gradient is defined in absolute coordinates
+ // according to its dimensions
+ rg.setCenter( r.topLeft() + other->center() );
+ rg.setFocalPoint( r.topLeft() + other->focalPoint() );
QConicalGradient cg;
const QConicalGradient* other = static_cast<const QConicalGradient*>( progressColors() );
if ( checkGradient( other ) ) {
QConicalGradient cg;
const QConicalGradient* other = static_cast<const QConicalGradient*>( progressColors() );
if ( checkGradient( other ) ) {
- // gradient is defined in relative coordinates [0.0 - 1.0]
- cg.setCenter( r.left() + r.width() * other->center().x(),
- r.top() + r.height() * other->center().y() );
+ // gradient is defined in relative coordinates [0.0 - 1.0]
+ cg.setCenter( r.left() + r.width() * other->center().x(),
+ r.top() + r.height() * other->center().y() );
- // gradient is defined in absolute coordinates
- // according to its dimensions
- cg.setCenter( r.topLeft() + other->center() );
+ // gradient is defined in absolute coordinates
+ // according to its dimensions
+ cg.setCenter( r.topLeft() + other->center() );