$(MOC) $< -o $@
# qm-files generation
-%.qm: %.po
- $(MSG2QM) $< $@
+%.qm: %.ts
+ $(LRELEASE) $< -qm $@
-EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
+EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.ts)
mostlyclean-local:
rm -f @builddir@/*_moc.cxx
CHECK_QT
-echo
-echo ---------------------------------------------
-echo testing msg2qm
-echo ---------------------------------------------
-echo
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing msg2qm
+dnl echo ---------------------------------------------
+dnl echo
-CHECK_MSG2QM
+dnl CHECK_MSG2QM
echo
echo ---------------------------------------------
#include <fstream>
#include <strstream>
#include <vtkCellType.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
#include <memory>
#include "VISU_Convertor_impl.hxx"
#include <vtkUnstructuredGrid.h>
+#include <QDir>
+#include <QFileInfo>
+#include <QStringList>
+
+
using namespace std;
#ifdef DEBUG
for(int i = 0; i < 1; i++){
if(fi.exists()){
if(fi.isDir()){
- QDir aDir(fi.absFilePath());
- QStringList aStringList = aDir.entryList("*.med",QDir::Files);
+ QDir aDir(fi.absoluteFilePath());
+ QStringList aStringList = aDir.entryList(QStringList("*.med"),QDir::Files);
int jEnd = aStringList.count();
for(int j = 0; j < jEnd; j++){
- parseFile(aDir.filePath(aStringList[j]).latin1());
+ parseFile((const char*)aDir.filePath(aStringList[j]).toLatin1());
}
}else{
parseFile(argv[1]);
#include "VISU_Convertor.hxx"
#include "VISU_ConvertorUtils.hxx"
-#include <qstring.h>
+#include <QString>
#include <utility>
aName.sprintf("%g, -", aTime.first);
else
aName.sprintf("%g, %s", aTime.first, aTime.second.c_str());
- aName = aName.simplifyWhiteSpace();
- return aName.latin1();
+ aName = aName.simplified();
+ return (const char*)aName.toLatin1();
}
unsigned int theTimeId)
{
static QString aName;
- aName = QString(theName.c_str()).simplifyWhiteSpace();
- int iEnd = strlen(aName);
+ aName = QString(theName.c_str()).simplified();
+ int iEnd = strlen((const char*)aName.toLatin1());
static int VtkHighLevelLength = 12; //25
if(iEnd > VtkHighLevelLength) iEnd = VtkHighLevelLength;
char* aNewName = new char[iEnd+1];
aNewName[iEnd] = '\0';
- strncpy(aNewName, aName, iEnd);
+ strncpy(aNewName, (const char*)aName.toLatin1(), iEnd);
std::replace(aNewName, aNewName + iEnd, ' ', '_');
if(true || theTimeId == 0)
aName = aNewName;
else
aName.sprintf("%s_%d",aNewName,theTimeId);
delete[] aNewName;
- return aName.latin1();
+ return (const char*)aName.toLatin1();
}
#include <vtkCellLinks.h>
#include <vtkUnsignedCharArray.h>
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <QString>
+#include <QFileInfo>
#include <memory>
{
static QString aString;
aString.sprintf(fmt.c_str(),val);
- return aString.latin1();
+ return (const char*)aString.toLatin1();
}
aMeshOnEntity->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
- std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
+ std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
aFileName += aMeshName + dtos("-%d-",int(theEntity)) + "-MeshOnEntity.vtk";
VISU::WriteToFile(anAppendFilter->GetOutput(),aFileName);
aFamily->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
- std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
- std::string aFamilyName = QString(theFamilyName.c_str()).simplifyWhiteSpace().latin1();
+ std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+ std::string aFamilyName = (const char*)QString(theFamilyName.c_str()).simplified().toLatin1();
std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
aFileName += aMeshName + dtos("-%d-",int(theEntity)) + aFamilyName + "-FamilyOnEntity.vtk";
VISU::WriteToFile(aSource.GetPointer(),aFileName);
aGroup->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
- std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
- std::string aGroupName = QString(theGroupName.c_str()).simplifyWhiteSpace().latin1();
+ std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+ std::string aGroupName = (const char*)QString(theGroupName.c_str()).simplified().toLatin1();
std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
aFileName += aMeshName + "-" + aGroupName + "-MeshOnGroup.vtk";
VISU::WriteToFile(anAppendFilter->GetOutput(),aFileName);
anUnstructuredGridIDMapper->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
- std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
- std::string aFieldName = QString(theFieldName.c_str()).simplifyWhiteSpace().latin1();
+ std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+ std::string aFieldName = (const char*)QString(theFieldName.c_str()).simplified().toLatin1();
std::string aPrefix = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
std::string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) +
aFieldName + dtos("-%d", theStampsNum) + "-TimeStampOnMesh.vtk";
aGaussPtsIDFilter->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
- std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
- std::string aFieldName = QString(theFieldName.c_str()).simplifyWhiteSpace().latin1();
+ std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+ std::string aFieldName = (const char*)QString(theFieldName.c_str()).simplified().toLatin1();
std::string aPrefix = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
std::string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) +
aFieldName + dtos("-%d",theStampsNum) + "-TimeStampOnGaussPts.vtk";
myMed(theMed)
{
myFileInfo.setFile(QString(theFileName.c_str()));
- myName = myFileInfo.baseName().latin1();
+ myName = (const char*)myFileInfo.baseName().toLatin1();
}
#include "MED_GaussUtils.hxx"
#include <boost/thread/mutex.hpp>
-#include <qfileinfo.h>
+#include <QFileInfo>
namespace VISU
{
#include "LightApp_Application.h"
+#include "CAM_Module.h"
+
#include "SALOMEDSClient_Study.hxx"
#include "SALOMEDSClient_GenericAttribute.hxx"
#include "SALOMEDSClient_AttributeTableOfInteger.hxx"
#include "SALOMEDSClient_AttributeTableOfReal.hxx"
#include "SALOMEDSClient_StudyBuilder.hxx"
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtable.h>
-#include <qtabwidget.h>
-#include <qvaluelist.h>
-#include <qmemarray.h>
-#include <qinputdialog.h>
-#include <qlabel.h>
+#include <QLayout>
+#include <QValidator>
+#include <QTableWidget>
+#include <QTabWidget>
+#include <QList>
+#include <QVector>
+#include <QInputDialog>
+#include <QLabel>
+#include <QIntValidator>
+#include <QDoubleValidator>
+#include <QKeyEvent>
+#include <QHeaderView>
+
#include "utilities.h"
+
using namespace std;
#define MARGIN_SIZE 11
#define MIN_TABLE_WIDTH 200
#define MIN_TABLE_HEIGHT 200
+NumDelegateItem::NumDelegateItem( QObject* parent, NumValidator mode )
+ : QItemDelegate( parent ),
+ myMode( mode )
+{
+}
-class VisuGUI_Table : public QTable {
+NumDelegateItem::~NumDelegateItem()
+{
+}
+
+QWidget * NumDelegateItem::createEditor( QWidget * parent,
+ const QStyleOptionViewItem & option,
+ const QModelIndex & index ) const
+{
+ QLineEdit *editor = new QLineEdit(parent);
+ switch ( myMode )
+ {
+ case NV_Int:
+ editor->setValidator( new QIntValidator( editor ) );
+ break;
+ case NV_Real:
+ editor->setValidator( new QDoubleValidator( editor ) );
+ break;
+ default:
+ editor->setText( "No validator!" );
+ }
+
+ return editor;
+}
+
+void NumDelegateItem::setEditorData( QWidget * editor,
+ const QModelIndex & index ) const
+{
+ QLineEdit *aLE = qobject_cast<QLineEdit*>(editor);
+ if ( !aLE )
+ return;
+
+ switch ( myMode )
+ {
+ case NV_Int:
+ {
+ int value = index.model()->data(index, Qt::DisplayRole).toInt();
+ aLE->setText( QString("%1").arg( value ) );
+ break;
+ }
+ case NV_Real:
+ {
+ double value = index.model()->data(index, Qt::DisplayRole).toDouble();
+ aLE->setText( QString("%1").arg( value ) );
+ break;
+ }
+ default:
+ aLE->setText( "No validator!!!" );
+ }
+}
+
+
+
+
+
+/*class VisuGUI_Table : public QTableWidget {
public:
- VisuGUI_Table( Orientation orient, QWidget* parent = 0, const char* name = 0 )
- : QTable( parent, name ), myValidator( 0 ), myOrientation( orient ) {}
- VisuGUI_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0, const char* name = 0 )
- : QTable( numRows, numCols, parent, name ), myValidator( 0 ), myOrientation( orient ) {}
+ VisuGUI_Table( Orientation orient, QWidget* parent = 0 )
+ : QTableWidget( parent ), myValidator( 0 ), myOrientation( orient ) {}
+ VisuGUI_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0 )
+ : QTableWidget( numRows, numCols, parent ), myValidator( 0 ), myOrientation( orient ) {}
void setValidator( QValidator* v = 0 ) { myValidator = v; }
bool isEditing() const { return QTable::isEditing(); }
protected:
QWidget* createEditor ( int row, int col, bool initFromCell ) const
{
- bool testUnits = ( myOrientation == Horizontal && col == 0 ) || ( myOrientation == Vertical && row == 0 );
+ bool testUnits = ( myOrientation == Qt::Horizontal && col == 0 ) || ( myOrientation == Qt::Vertical && row == 0 );
QWidget* wg = QTable::createEditor( row, col, initFromCell );
if ( wg && wg->inherits("QLineEdit") && myValidator && !testUnits )
(( QLineEdit*)wg)->setValidator( myValidator );
protected:
QValidator* myValidator;
Orientation myOrientation;
-};
+ };*/
/*!
Constructor
_PTR(SObject) obj,
bool edit,
int which,
- Orientation orient,
+ Qt::Orientation orient,
bool showColumnTitles )
- : QDialog( parent, "", false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+ : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myIntTable( 0 ), myRealTable( 0 )
{
- setCaption( edit ? tr( "EDIT_TABLE_TLT" ) : tr( "VIEW_TABLE_TLT" ) );
+ setWindowTitle( edit ? tr( "EDIT_TABLE_TLT" ) : tr( "VIEW_TABLE_TLT" ) );
setSizeGripEnabled( true );
myObject = obj;
QWidget* top;
QVBoxLayout* tl;
if ( bDoInt && bDoReal ) {
- top = new QTabWidget( this, "TabWidget" );
- ( ( QTabWidget* ) top) ->setMargin( MARGIN_SIZE );
+ top = new QTabWidget( this );
+ //( ( QTabWidget* ) top) ->setMargin( MARGIN_SIZE );
}
else {
- top = new QWidget( this, "DumbWidget" );
+ top = new QWidget( this );
tl = new QVBoxLayout( top ); tl->setMargin( 0 ); tl->setSpacing( SPACING_SIZE );
}
if ( bDoInt ) {
myIntTable = new VisuGUI_TableWidget( top, "myIntTable", edit, orient, showColumnTitles );
- myIntTable->getTable()->setValidator( new QIntValidator( this ) );
+ //myIntTable->getTable()->setValidator( new QIntValidator( this ) );
+ //QAbstractItemDelegate* item = myIntTable->getTable()->itemDelegate();
+ myIntTable->getTable()->setItemDelegate( new NumDelegateItem( myIntTable, NumDelegateItem::NV_Int ) );
+ //item->deleteLater();
+
if ( bDoInt && bDoReal )
( ( QTabWidget* )top )->addTab( myIntTable, tr( "TABLE_OF_INTEGER_TLT" ) );
else
}
if ( bDoReal ) {
myRealTable = new VisuGUI_TableWidget( top, "myRealTable", edit, orient, showColumnTitles );
- myRealTable->getTable()->setValidator( new QDoubleValidator( this ) );
+ //myRealTable->getTable()->setValidator( new QDoubleValidator( this ) );
+ //QAbstractItemDelegate* item = myIntTable->getTable()->itemDelegate();
+ myIntTable->getTable()->setItemDelegate( new NumDelegateItem( myIntTable, NumDelegateItem::NV_Real ) );
+ //item->deleteLater();
if ( bDoInt && bDoReal )
( ( QTabWidget* )top )->addTab( myRealTable, tr( "TABLE_OF_REAL_TLT" ) );
else
tl->addWidget( myRealTable );
}
if ( !bDoInt && !bDoReal ) {
- QLabel *dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), top, "DumbLabel" );
- dumbLabel->setAlignment( AlignCenter );
+ QLabel *dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), top );
+ dumbLabel->setAlignment( Qt::AlignCenter );
tl->addWidget( dumbLabel );
}
}
if ( !bEmptyRow ) { // Skip rows with no data !!!
// set row title
- tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() );
+ tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : (const char*)rowTitles[ i ].toLatin1() );
// set row unit
- tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() );
+ tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() );
nRow++;
}
}
if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!!
// column titles
for ( i = 0; i < colTitles.count(); i++ )
- tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() );
+ tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : (const char*)colTitles[ i ].toLatin1() );
}
}
// title
- tblIntAttr->SetTitle( myIntTable->getTableTitle().latin1() );
+ tblIntAttr->SetTitle( (const char*)myIntTable->getTableTitle().toLatin1() );
}
if ( myRealTable ) {
builder->RemoveAttribute( myObject, "AttributeTableOfReal" );
}
if ( !bEmptyRow ) { // Skip rows with no data !!!
// set row title
- tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() );
+ tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : (const char*)rowTitles[ i ].toLatin1() );
// set row unit
- tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() );
+ tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() );
nRow++;
}
}
if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!!
// column titles
for ( i = 0; i < colTitles.count(); i++ )
- tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() );
+ tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : (const char*)colTitles[ i ].toLatin1() );
}
}
// title
- tblRealAttr->SetTitle( myRealTable->getTableTitle().latin1() );
+ tblRealAttr->SetTitle( (const char*)myRealTable->getTableTitle().toLatin1() );
}
if ( myIntTable || myRealTable)
builder->CommitCommand(); // commit transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
MESSAGE("VisuGUI_TableDlg::onOK : Exception has been caught !!!");
builder->AbortCommand(); // abort transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
done = false;
- SUIT_MessageBox::error1 ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION"), tr ("BUT_OK") );
+ SUIT_MessageBox::critical ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION") );
}
}
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
VisuGUI_TableWidget::VisuGUI_TableWidget( QWidget* parent,
const char* name,
bool edit,
- Orientation orient,
+ Qt::Orientation orient,
bool showColumnTitles )
- : QWidget( parent, name ), myOrientation( orient )
+ : QWidget( parent ), myOrientation( orient )
{
QGridLayout* mainLayout = new QGridLayout( this );
mainLayout->setMargin( 0 );
mainLayout->setSpacing( SPACING_SIZE );
- myTitleEdit = new QLineEdit( this, "TitleEdit" );
- myTitleEdit->setAlignment( AlignCenter );
+ myTitleEdit = new QLineEdit( this );
+ myTitleEdit->setAlignment( Qt::AlignCenter );
myTitleEdit->setReadOnly( !edit );
QFont fnt = myTitleEdit->font();
fnt.setBold( true );
myTitleEdit->setFont( fnt );
- myTable = new VisuGUI_Table( orient, this, "Table" );
- myTable->setNumRows( 5 );
- myTable->setNumCols( 5 );
+ //myTable = new VisuGUI_Table( orient, this );
+ myTable = new QTableWidget( 5, 5, this );
+ //myTable->setNumRows( 5 );
+ //myTable->setNumCols( 5 );
myTable->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
myTable->setMinimumSize( MIN_TABLE_WIDTH, MIN_TABLE_HEIGHT );
- myTable->setSelectionMode( QTable::Single );
+ myTable->setSelectionMode( QAbstractItemView::SingleSelection );
myTable->setShowGrid( true );
- myTable->setColumnMovingEnabled( false );
- myTable->setRowMovingEnabled( false );
- myTable->setReadOnly( !edit );
+ myTable->horizontalHeader()->setMovable( false );
+ myTable->verticalHeader()->setMovable( false );
+ //myTable->setColumnMovingEnabled( false );
+ //myTable->setRowMovingEnabled( false );
myTable->setDragEnabled( false );
+ //myTable->setReadOnly( !edit );
+ myTable->setEditTriggers( edit ? QAbstractItemView::AllEditTriggers : QAbstractItemView::NoEditTriggers );
+
setUnitsTitle( tr( "UNITS_TLT" ) );
if ( !showColumnTitles ) {
- if ( myOrientation == Horizontal ) {
+ if ( myOrientation == Qt::Horizontal ) {
myTable->horizontalHeader()->hide();
- myTable->setTopMargin( 0 );
+ //myTable->setTopMargin( 0 );
}
else {
myTable->verticalHeader()->hide();
- myTable->setLeftMargin( 0 );
+ //myTable->setLeftMargin( 0 );
}
}
mainLayout->addWidget( myTable, 1, 0 );
if ( edit ) {
- myAddRowBtn = new QPushButton( tr( "ADD_ROW_BTN" ), this, "AddRowBtn" );
- myDelRowBtn = new QPushButton( tr( "REMOVE_ROW_BTN" ), this, "DelRowBtn" );
- myAddColBtn = new QPushButton( tr( "ADD_COLUMN_BTN" ), this, "AddColBtn" );
- myDelColBtn = new QPushButton( tr( "REMOVE_COLUMN_BTN" ), this, "DelColBtn" );
- myAdjustBtn = new QPushButton( tr( "ADJUST_CELLS_BTN" ), this, "AdjustBtn" );
- mySelectAllBtn = new QPushButton( tr( "SELECT_ALL_BTN" ), this, "SelectAllBtn" );
- myClearBtn = new QPushButton( tr( "CLEAR_BTN"), this, "ClearBtn" );
+ myAddRowBtn = new QPushButton( tr( "ADD_ROW_BTN" ), this );
+ myDelRowBtn = new QPushButton( tr( "REMOVE_ROW_BTN" ), this );
+ myAddColBtn = new QPushButton( tr( "ADD_COLUMN_BTN" ), this );
+ myDelColBtn = new QPushButton( tr( "REMOVE_COLUMN_BTN" ), this );
+ myAdjustBtn = new QPushButton( tr( "ADJUST_CELLS_BTN" ), this );
+ mySelectAllBtn = new QPushButton( tr( "SELECT_ALL_BTN" ), this );
+ myClearBtn = new QPushButton( tr( "CLEAR_BTN"), this );
QVBoxLayout* btnLayout = new QVBoxLayout; btnLayout->setMargin( 0 ); btnLayout->setSpacing( SPACING_SIZE );
btnLayout->addWidget( myAddRowBtn );
btnLayout->addWidget( myDelRowBtn );
*/
void VisuGUI_TableWidget::setNumRows( const int num )
{
- myOrientation == Horizontal ? myTable->setNumRows( num ) : myTable->setNumCols( num );
+ myOrientation == Qt::Horizontal ? myTable->setRowCount( num ) : myTable->setColumnCount( num );
}
/*!
Gets total number of rows
*/
int VisuGUI_TableWidget::getNumRows()
{
- return myOrientation == Horizontal ? myTable->numRows() : myTable->numCols();
+ return myOrientation == Qt::Horizontal ? myTable->rowCount() : myTable->columnCount();
}
/*!
Sets total number of columns
void VisuGUI_TableWidget::setNumCols( const int num )
{
// !!! first column contains units !!!
- myOrientation == Horizontal ? myTable->setNumCols( num+1 ) : myTable->setNumRows( num+1 );
-// myOrientation == Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true );
+ myOrientation == Qt::Horizontal ? myTable->setColumnCount( num+1 ) : myTable->setRowCount( num+1 );
+// myOrientation == Qt::Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true );
}
/*!
Gets total number of columns
int VisuGUI_TableWidget::getNumCols()
{
// !!! first column contains units !!!
- return myOrientation == Horizontal ? myTable->numCols()-1 : myTable->numRows()-1;
+ return myOrientation == Qt::Horizontal ? myTable->columnCount()-1 : myTable->rowCount()-1;
}
/*!
Sets rows titles
*/
void VisuGUI_TableWidget::setRowTitles( QStringList& tlts )
{
- for ( int i = 0; i < tlts.count(); i++ ) {
- myOrientation == Horizontal ?
- myTable->verticalHeader()->setLabel( i, tlts[i] ) :
- myTable->horizontalHeader()->setLabel( i, tlts[i] );
- }
+ QStringList aLabels;
+ for ( int i = 0; i < tlts.count(); i++ )
+ tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+ myOrientation == Qt::Horizontal ?
+ myTable->setVerticalHeaderLabels( aLabels ) :
+ myTable->setHorizontalHeaderLabels( aLabels );
+
+ // myTable->verticalHeader()->setLabel( i, tlts[i] ) :
+ //myTable->horizontalHeader()->setLabel( i, tlts[i] );
+ //}
}
/*!
Gets rows titles
void VisuGUI_TableWidget::getRowTitles( QStringList& tlts )
{
tlts.clear();
- if ( myOrientation == Horizontal ) {
- for ( int i = 0; i < myTable->numRows(); i++ ) {
- tlts.append( myTable->verticalHeader()->label( i ) );
+ if ( myOrientation == Qt::Horizontal ) {
+ for ( int i = 0; i < myTable->rowCount(); i++ ) {
+ tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
}
}
else {
- for ( int i = 0; i < myTable->numCols(); i++ ) {
- tlts.append( myTable->horizontalHeader()->label( i ) );
+ for ( int i = 0; i < myTable->columnCount(); i++ ) {
+ tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
}
}
}
*/
void VisuGUI_TableWidget::setColTitles( QStringList& tlts )
{
- // !!! first column contains units !!!
- for ( int i = 0; i < tlts.count(); i++ ) {
- myOrientation == Horizontal ?
- myTable->horizontalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] ) :
- myTable->verticalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] );
- }
+ QStringList aLabels;
+ for ( int i = 0; i < tlts.count(); i++ )
+ tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+ myOrientation == Qt::Horizontal ?
+ myTable->setHorizontalHeaderLabels( aLabels ) :
+ myTable->setVerticalHeaderLabels( aLabels );
+
setUnitsTitle( tr( "UNITS_TLT" ) );
}
/*!
{
// !!! first column contains units !!!
tlts.clear();
- if ( myOrientation == Horizontal ) {
- for ( int i = 1; i < myTable->numCols(); i++ ) {
- tlts.append( myTable->horizontalHeader()->label( i ) );
- }
+ if ( myOrientation == Qt::Horizontal ) {
+ for ( int i = 1; i < myTable->columnCount(); i++ ) {
+ tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
+ }
}
else {
- for ( int i = 1; i < myTable->numRows(); i++ ) {
- tlts.append( myTable->verticalHeader()->label( i ) );
+ for ( int i = 1; i < myTable->rowCount(); i++ ) {
+ tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
}
}
}
*/
void VisuGUI_TableWidget::setUnitsTitle( const QString& tlt ) {
// !!! first column contains units !!!
- myOrientation == Horizontal ? myTable->horizontalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt ) : myTable->verticalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt );
+ myOrientation == Qt::Horizontal ?
+ myTable->horizontalHeaderItem(0)->setText( tlt.isNull() ? "" : tlt ) :
+ myTable->verticalHeaderItem(0)->setText( tlt.isNull() ? "" : tlt );
}
/*!
Sets units
*/
void VisuGUI_TableWidget::setUnits( QStringList& units )
{
- for ( int i = 0; i < units.count(); i++ ) {
- myOrientation == Horizontal ? myTable->setText( i, 0, units[i].isNull() ? "" : units[i] ) : myTable->setText( 0, i, units[i].isNull() ? "" : units[i] );
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ QModelIndex anIndex;
+ for ( int i = 0; i < units.count(); i++ )
+ {
+ myOrientation == Qt::Horizontal ?
+ anIndex = aModel->index( i, 0 ) :
+ anIndex = aModel->index( 0, i );
+
+ aModel->setData( anIndex, QVariant( units[i].isNull() ? "" : units[i] ) );
+ }
}
}
/*!
void VisuGUI_TableWidget::getUnits( QStringList& units )
{
units.clear();
- if ( myOrientation == Horizontal ) {
- for ( int i = 0; i < myTable->numRows(); i++ )
- units.append( myTable->text( i, 0 ).isNull() ? QString("") : myTable->text( i, 0 ) );
- }
- else {
- for ( int i = 0; i < myTable->numCols(); i++ )
- units.append( myTable->text( 0, i ).isNull() ? QString("") : myTable->text( 0, i ) );
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ if ( myOrientation == Qt::Horizontal )
+ {
+ for ( int i = 0; i < myTable->rowCount(); i++ )
+ units.append( aModel->index( i, 0 ).data().toString() );
+ }
+ else {
+ for ( int i = 0; i < myTable->columnCount(); i++ )
+ units.append( aModel->index( 0, i ).data().toString() );
+ }
}
}
/*!
*/
void VisuGUI_TableWidget::setRowData( int row, QStringList& data )
{
- if ( row >= 0 && row < getNumRows() ) {
- for ( int i = 0; i < data.count(); i++ ) {
- if ( data[i].isNull() ) {
- myOrientation == Horizontal ? myTable->clearCell( row, i+1 ) :
- myTable->clearCell( i+1, row );
- }
- else {
- myOrientation == Horizontal ? myTable->setText( row, i+1, data[i] ) :
- myTable->setText( i+1, row, data[i] );
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ QModelIndex anIndex;
+ if ( row >= 0 && row < getNumRows() ) {
+ for ( int i = 0; i < data.count(); i++ )
+ {
+ myOrientation == Qt::Horizontal ? anIndex = aModel->index( row, i+1 ) :
+ anIndex = aModel->index( i+1, row );
+ aModel->setData( anIndex, QVariant( data[i] ) );
+
}
}
}
void VisuGUI_TableWidget::getRowData( int row, QStringList& data )
{
data.clear();
- if ( row >= 0 && row < getNumRows() ) {
- if ( myOrientation == Horizontal ) {
- for ( int i = 1; i < myTable->numCols(); i++ )
- data.append( myTable->text( row, i ) );
- }
- else {
- for ( int i = 1; i < myTable->numRows(); i++ )
- data.append( myTable->text( i, row ) );
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ if ( row >= 0 && row < getNumRows() )
+ {
+ if ( myOrientation == Qt::Horizontal )
+ {
+ for ( int i = 1; i < myTable->columnCount(); i++ )
+ data.append( aModel->index( row, i ).data().toString() );
+ }
+ else {
+ for ( int i = 1; i < myTable->rowCount(); i++ )
+ data.append( aModel->index( i, row ).data().toString() );
+ }
}
}
}
*/
void VisuGUI_TableWidget::adjustTable()
{
- int i;
- for ( i = 0; i < myTable->numRows(); i++ )
- myTable->adjustRow( i );
- for ( i = 0; i < myTable->numCols(); i++ )
- myTable->adjustColumn( i );
+ myTable->resizeRowsToContents();
+ myTable->resizeColumnsToContents();
}
/*!
Called when selection changed in table
*/
void VisuGUI_TableWidget::updateButtonsState()
{
- if ( myTable->isReadOnly() )
+ if ( myTable->editTriggers() == QAbstractItemView::NoEditTriggers )
return;
bool bDR = false; // <Delete Row(s)>
bool bDC = false; // <Delete Column(s)>
bool bSA = false; // <Select All>
bool bCT = false; // <Clear>
int i;
- int c = myOrientation == Horizontal ? 0 : 1;
- for ( i = c; i < myTable->numRows(); i++ ) {
+ //TO DO column/row selection check
+ /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+ for ( i = c; i < myTable->rowCount(); i++ ) {
+
if ( myTable->isRowSelected( i, true ) )
bDR = true;
else
bSA = true;
}
- c = myOrientation == Horizontal ? 1 : 0;
- for ( i = c; i < myTable->numCols(); i++ ) {
+ c = myOrientation == Qt::Horizontal ? 1 : 0;
+ for ( i = c; i < myTable->columnCount(); i++ ) {
if ( myTable->isColumnSelected( i, true ) )
bDC = true;
else
bSA = true;
- }
- int nbSel = myTable->numSelections();
+ }*/
+ /*int nbSel = myTable->numSelections();
for ( i = 0; i < nbSel; i++ ) {
QTableSelection ts = myTable->selection( i );
for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) {
bCT = true;
}
}
+ }*/
+ QList<QTableWidgetItem*> aSelection = myTable->selectedItems();
+ QList<QTableWidgetItem*>::ConstIterator anIt = aSelection.constBegin(),
+ anEndIt = aSelection.constEnd();
+ for ( ; anIt != anEndIt; anIt++ )
+ {
+ if( *anIt )
+ {
+ bCT = true;
+ break;
+ }
}
+
if ( myTable->item( myTable->currentRow(), myTable->currentColumn() ) )
bCT = true;
myDelRowBtn->setEnabled( bDR );
*/
void VisuGUI_TableWidget::addRow()
{
- myTable->insertRows( myTable->numRows(), 1 );
+ myTable->insertRow( myTable->rowCount() );
updateButtonsState();
}
/*!
*/
void VisuGUI_TableWidget::addCol()
{
- myTable->insertColumns( myTable->numCols(), 1 );
+ myTable->insertColumn( myTable->columnCount() );
updateButtonsState();
}
/*!
*/
void VisuGUI_TableWidget::delRow()
{
- int c = myOrientation == Horizontal ? 0 : 1;
- QValueList<int> il;
+ //TODO
+ /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+ QList<int> il;
int i;
- for ( i = c; i < myTable->numRows(); i++ )
+ for ( i = c; i < myTable->rowCount(); i++ )
if ( myTable->isRowSelected( i, true ) )
il.append( i );
if ( il.count() > 0 ) {
for ( i = 0; i < il.count(); i++ )
ildel[ i ] = il[ i ];
myTable->removeRows( ildel );
- }
+ }*/
+
updateButtonsState();
}
/*!
*/
void VisuGUI_TableWidget::delCol()
{
- int c = myOrientation == Horizontal ? 1 : 0;
+ //TODO
+ /*int c = myOrientation == Qt::Horizontal ? 1 : 0;
QValueList<int> il;
int i;
for ( i = c; i < myTable->numCols(); i++ )
for ( i = 0; i < il.count(); i++ )
ildel[ i ] = il[ i ];
myTable->removeColumns( ildel );
- }
+ }*/
updateButtonsState();
}
/*!
*/
void VisuGUI_TableWidget::selectAll()
{
- myTable->clearSelection();
+ /*myTable->clearSelection();
QTableSelection ts;
ts.init( 0, 0 ); ts.expandTo( myTable->numRows()-1, myTable->numCols()-1 );
- myTable->addSelection( ts );
+ myTable->addSelection( ts );*/
+ myTable->selectAll();
updateButtonsState();
}
/*!
*/
void VisuGUI_TableWidget::clearTable()
{
- int nbSel = myTable->numSelections();
+ /*int nbSel = myTable->numSelections();
for ( int i = 0; i < nbSel; i++ ) {
QTableSelection ts = myTable->selection( i );
for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) {
- if ( myOrientation == Vertical && j == 0 ) {
+ if ( myOrientation == Qt::Vertical && j == 0 ) {
// continue; // UNITS
}
for ( int k = ts.leftCol(); k < ts.rightCol()+1; k++) {
- if ( myOrientation == Horizontal && k == 0 ) {
+ if ( myOrientation == Qt::Horizontal && k == 0 ) {
// continue; // UNITS
}
myTable->clearCell( j, k );
}
if ( nbSel == 0 )
myTable->clearCell( myTable->currentRow(), myTable->currentColumn() );
- myTable->clearSelection();
+ myTable->clearSelection();*/
+ myTable->clearContents();
updateButtonsState();
}
/*!
bool VisuGUI_TableWidget::eventFilter( QObject* o, QEvent* e )
{
if ( e->type() == QEvent::MouseButtonDblClick) {
- QMouseEvent* me = ( QMouseEvent* )e;
- if ( me->button() == LeftButton && !myTable->isReadOnly() ) {
+ //TODO
+ /*QMouseEvent* me = ( QMouseEvent* )e;
+ if ( me->button() == Qt::LeftButton && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers ) ) {
if ( o == myTable->horizontalHeader() ) {
for ( int i = 0; i < myTable->horizontalHeader()->count(); i++ ) {
QRect rect = myTable->horizontalHeader()->sectionRect( i );
rect.addCoords( 1, 1, -1, -1 );
if ( rect.contains( myTable->horizontalHeader()->mapFromGlobal( me->globalPos() ) ) ) {
- if ( myOrientation == Vertical || i != 0 ) {
+ if ( myOrientation == Qt::Vertical || i != 0 ) {
bool bOk;
QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ),
tr( "TITLE_LBL" ),
QRect rect = myTable->verticalHeader()->sectionRect( i );
rect.addCoords( 1, 1, -1, -1 );
if ( rect.contains( myTable->verticalHeader()->mapFromGlobal( me->globalPos() ) ) ) {
- if ( myOrientation == Horizontal || i != 0 ) {
+ if ( myOrientation == Qt::Horizontal || i != 0 ) {
bool bOk;
QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ),
tr( "TITLE_LBL" ),
}
}
}
- }
- }
+ }*/
+ }
else if ( e->type() == QEvent::KeyRelease && o == myTable ) {
QKeyEvent* ke = (QKeyEvent*)e;
- if ( ke->key() == Key_Delete && !myTable->isEditing() ) {
+ if ( ke->key() == Qt::Key_Delete && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
clearTable();
}
- else if ( ke->key() == Key_Backspace && !myTable->isEditing() ) {
+ else if ( ke->key() == Qt::Key_Backspace && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
clearTable();
int i = myTable->currentRow();
int j = myTable->currentColumn() - 1;
- if ( j < 0 ) { j = myTable->numCols()-1; i--; }
+ if ( j < 0 ) { j = myTable->columnCount()-1; i--; }
if ( i >= 0 && j >= 0 )
myTable->setCurrentCell( i, j );
}
}
return QWidget::eventFilter( o, e );
}
-
-
-
#ifndef VisuGUI_TABLE_DLG_H
#define VisuGUI_TABLE_DLG_H
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <QDialog>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QItemDelegate>
-class VisuGUI_Table;
+class QTableWidget;
class VisuGUI_TableWidget;
#include <SALOMEDSClient_SObject.hxx>
_PTR(SObject) obj,
bool edit = false,
int which = ttAuto,
- Orientation orient = Horizontal,
+ Qt::Orientation orient = Qt::Horizontal,
bool showColumnTitles = true );
~VisuGUI_TableDlg();
VisuGUI_TableWidget( QWidget* parent = 0,
const char* name = 0,
bool edit = false,
- Orientation orient = Horizontal,
+ Qt::Orientation orient = Qt::Horizontal,
bool showColumnTitles = true );
~VisuGUI_TableWidget();
void setRowData( int row, QStringList& data );
void getRowData( int row, QStringList& data );
- VisuGUI_Table* getTable() { return myTable; }
+ QTableWidget* getTable() { return myTable; }
QLineEdit* getTitleEdit() { return myTitleEdit; }
bool eventFilter( QObject* o, QEvent* e);
private:
QLineEdit* myTitleEdit;
- VisuGUI_Table* myTable;
+ QTableWidget* myTable;
QPushButton* myAddRowBtn;
QPushButton* myAddColBtn;
QPushButton* myDelRowBtn;
QPushButton* myAdjustBtn;
QPushButton* mySelectAllBtn;
QPushButton* myClearBtn;
- Orientation myOrientation;
+ Qt::Orientation myOrientation;
+};
+
+class NumDelegateItem: public QItemDelegate
+{
+public:
+ enum NumValidator{ NV_Int, NV_Real };
+
+ NumDelegateItem( QObject* parent, NumValidator mode = NV_Int );
+ virtual ~NumDelegateItem();
+
+ virtual QWidget * createEditor( QWidget * parent,
+ const QStyleOptionViewItem & option,
+ const QModelIndex & index ) const;
+ virtual void setEditorData( QWidget * editor,
+ const QModelIndex & index ) const;
+private:
+ int myMode;
};
#endif // VisuGUI_TABLE_DLG_H
#include "VISU_PipeLine.hxx"
#include "VTKViewer_ShrinkFilter.h"
#include "VTKViewer_GeometryFilter.h"
+#include "SALOME_InteractiveObject.hxx"
#include <stdexcept>
#include <sstream>
--- /dev/null
+<!DOCTYPE TS>
+<TS version="1.1" >
+ <context>
+ <name>@default</name>
+ <message>
+ <source>ICON_ADD</source>
+ <translation>Visu_add.png</translation>
+ </message>
+ <message>
+ <source>ICON_CUBE_AXES</source>
+ <translation>Visu_graduated_axes.png</translation>
+ </message>
+ <message>
+ <source>ICON_CUT_LINES</source>
+ <translation>Visu_cutlines.png</translation>
+ </message>
+ <message>
+ <source>ICON_CUT_PLANES</source>
+ <translation>Visu_cutplanes.png</translation>
+ </message>
+ <message>
+ <source>ICON_DEFORMED_SHAPE</source>
+ <translation>Visu_deformed.png</translation>
+ </message>
+ <message>
+ <source>ICON_ERASE_ALL</source>
+ <translation>Visu_eraseall.png</translation>
+ </message>
+ <message>
+ <source>ICON_GAUSS_NEW_VIEWER</source>
+ <translation>Visu_points.png</translation>
+ </message>
+ <message>
+ <source>ICON_GAUSS_POINTS</source>
+ <translation>Visu_gauss_points.png</translation>
+ </message>
+ <message>
+ <source>ICON_GLOBAL_SELECTION</source>
+ <translation>Visu_selectall.png</translation>
+ </message>
+ <message>
+ <source>ICON_HOLO_RENDER</source>
+ <translation>Visu_holo_render.png</translation>
+ </message>
+ <message>
+ <source>ICON_IMPORT_MED</source>
+ <translation>Visu_import_med.png</translation>
+ </message>
+ <message>
+ <source>ICON_ISO_SURFACES</source>
+ <translation>Visu_isosurfaces.png</translation>
+ </message>
+ <message>
+ <source>ICON_LOAD_TEXTURE</source>
+ <translation>Visu_load_texture.png</translation>
+ </message>
+ <message>
+ <source>ICON_MULTIPR_VIEW_FULL</source>
+ <translation>Visu_tree_multipr_full.png</translation>
+ </message>
+ <message>
+ <source>ICON_MULTIPR_VIEW_HIDE</source>
+ <translation>Visu_tree_multipr_hide.png</translation>
+ </message>
+ <message>
+ <source>ICON_MULTIPR_VIEW_LOW</source>
+ <translation>Visu_tree_multipr_low.png</translation>
+ </message>
+ <message>
+ <source>ICON_MULTIPR_VIEW_MEDIUM</source>
+ <translation>Visu_tree_multipr_medium.png</translation>
+ </message>
+ <message>
+ <source>ICON_OBJBROWSER_Visu</source>
+ <translation>Visu_tree_visu.png</translation>
+ </message>
+ <message>
+ <source>ICON_PARTIAL_SELECTION</source>
+ <translation>Visu_selectonly.png</translation>
+ </message>
+ <message>
+ <source>ICON_PLOT2D</source>
+ <translation>Visu_plot2d.png</translation>
+ </message>
+ <message>
+ <source>ICON_PLOT_3D</source>
+ <translation>Visu_plot3d.png</translation>
+ </message>
+ <message>
+ <source>ICON_POINTS</source>
+ <translation>Visu_points.png</translation>
+ </message>
+ <message>
+ <source>ICON_REMOVE</source>
+ <translation>Visu_remove.png</translation>
+ </message>
+ <message>
+ <source>ICON_SCALAR_MAP</source>
+ <translation>Visu_scalars.png</translation>
+ </message>
+ <message>
+ <source>ICON_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+ <translation>Visu_scalarmapondeformedshape.png</translation>
+ </message>
+ <message>
+ <source>ICON_SCALING</source>
+ <translation>Visu_scaling.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_AVI</source>
+ <translation>Visu_slider_avi.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_FIRST</source>
+ <translation>Visu_slider_first.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_LAST</source>
+ <translation>Visu_slider_last.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_MORE</source>
+ <translation>Visu_slider_more.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_NEXT</source>
+ <translation>Visu_slider_next.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_PAUSE</source>
+ <translation>Visu_slider_pause.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_PLAY</source>
+ <translation>Visu_slider_play.png</translation>
+ </message>
+ <message>
+ <source>ICON_SLIDER_PREVIOUS</source>
+ <translation>Visu_slider_previous.png</translation>
+ </message>
+ <message>
+ <source>ICON_STREAM_LINES</source>
+ <translation>Visu_streamlines.png</translation>
+ </message>
+ <message>
+ <source>ICON_SURFACE</source>
+ <translation>Visu_surface.png</translation>
+ </message>
+ <message>
+ <source>ICON_SWEEP</source>
+ <translation>Visu_scalars_anim.png</translation>
+ </message>
+ <message>
+ <source>ICON_TIMEANIMATION</source>
+ <translation>Visu_anim.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CONTAINER</source>
+ <translation>Visu_tree_container.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CURVE</source>
+ <translation>Visu_tree_curve.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CUT_LINES</source>
+ <translation>Visu_tree_cutlines.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CUT_LINES_GROUPS</source>
+ <translation>Visu_tree_cutlines_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CUT_PLANES</source>
+ <translation>Visu_tree_cutplanes.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_CUT_PLANES_GROUPS</source>
+ <translation>Visu_tree_cutplanes_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_DEFORMED_SHAPE</source>
+ <translation>Visu_tree_deformed.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_DEFORMED_SHAPE_GROUPS</source>
+ <translation>Visu_tree_deformed_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_GAUSS_POINTS</source>
+ <translation>Visu_tree_gauss_points.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_ISO_SURFACES</source>
+ <translation>Visu_tree_isosurfaces.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_ISO_SURFACES_GROUPS</source>
+ <translation>Visu_tree_isosurfaces_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_MESH</source>
+ <translation>Visu_tree_mesh.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_PLOT_3D</source>
+ <translation>Visu_tree_plot3d.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_PLOT_3D_GROUPS</source>
+ <translation>Visu_tree_plot3d_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_RESULT</source>
+ <translation>Visu_tree_result.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_SCALAR_MAP</source>
+ <translation>Visu_tree_scalars.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_SCALAR_MAP_GROUPS</source>
+ <translation>Visu_tree_scalars_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+ <translation>Visu_tree_scalarmapondeformedshape.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS</source>
+ <translation>Visu_tree_scalarmapondeformedshape_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_STREAM_LINES</source>
+ <translation>Visu_tree_streamlines.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_STREAM_LINES_GROUPS</source>
+ <translation>Visu_tree_streamlines_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_TABLE</source>
+ <translation>Visu_tree_table.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_VECTORS</source>
+ <translation>Visu_tree_vectors.png</translation>
+ </message>
+ <message>
+ <source>ICON_TREE_VECTORS_GROUPS</source>
+ <translation>Visu_tree_vectors_gr.png</translation>
+ </message>
+ <message>
+ <source>ICON_VECTORS</source>
+ <translation>Visu_vectors.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_INTERACTOR_STYLE_SWITCH</source>
+ <translation>Visu_vvtk_switch.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+ <translation>Visu_PlaneSegmentation.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_RECORDING_PAUSE</source>
+ <translation>Visu_recording_pause.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_RECORDING_PLAY</source>
+ <translation>Visu_recording_play.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_RECORDING_START</source>
+ <translation>Visu_recording_start.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_RECORDING_STOP</source>
+ <translation>Visu_recording_stop.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_SELECTION_MODE_SWITCH</source>
+ <translation>Visu_points.png</translation>
+ </message>
+ <message>
+ <source>ICON_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+ <translation>Visu_SphereSegmentation.png</translation>
+ </message>
+ <message>
+ <source>ICON_WIREFRAME</source>
+ <translation>Visu_wireframe.png</translation>
+ </message>
+ </context>
+</TS>
--- /dev/null
+<!DOCTYPE TS>
+<TS version="1.1" >
+ <context>
+ <name>@default</name>
+ <message>
+ <source>ASSIGNED</source>
+ <translation>Assigned</translation>
+ </message>
+ <message>
+ <source>ATTRIBUTES_LBL</source>
+ <translation>Attributes</translation>
+ </message>
+ <message>
+ <source>AXIS_LBL</source>
+ <translation>Axis</translation>
+ </message>
+ <message>
+ <source>BTN_RESET</source>
+ <translation>Reset</translation>
+ </message>
+ <message>
+ <source>DATA_LBL</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_BUILD_PRESENTATION</source>
+ <translation>The object can't be built</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_CREATE_ACTOR</source>
+ <translation>Can't create actor for this presentation</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_CREATE_ANIMATION</source>
+ <translation>Can't create animation for these fields:\n number of time stamps or number of components is not the same!</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_FIND_MED_COMPONENT</source>
+ <translation>Failed to activate MED engine!</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_FIND_VISU_COMPONENT</source>
+ <translation>Failed to activate VISU engine!</translation>
+ </message>
+ <message>
+ <source>ERR_NO_MEMORY_TO_BUILD</source>
+ <translation>Please, free %1 Mb to make the cache enlarging possible\n(for example, try to delete some holders)</translation>
+ </message>
+ <message>
+ <source>IMPORT_DONE</source>
+ <translation>Importing is done</translation>
+ </message>
+ <message>
+ <source>INF_DONE</source>
+ <translation> done</translation>
+ </message>
+ <message>
+ <source>INF_VISU</source>
+ <translation>Post-Pro Info</translation>
+ </message>
+ <message>
+ <source>NO_GROUPS</source>
+ <translation>No groups in the mesh</translation>
+ </message>
+ <message>
+ <source>PARALLEL_ANIMATION</source>
+ <translation>Parallel Animation</translation>
+ </message>
+ <message>
+ <source>PERIOD_2PI</source>
+ <translation>From -PI to PI</translation>
+ </message>
+ <message>
+ <source>PERIOD_PI</source>
+ <translation>From 0 to PI</translation>
+ </message>
+ <message>
+ <source>PRS_ON_GROUPS</source>
+ <translation>Use Only Groups</translation>
+ </message>
+ <message>
+ <source>SUCCESSIVE_ANIMATION</source>
+ <translation>Successive Animation</translation>
+ </message>
+ <message>
+ <source>TIT_OFFSETDLG</source>
+ <translation>Translate Presentation</translation>
+ </message>
+ <message>
+ <source>TLT_SETUP_PLOT2D</source>
+ <translation>Setup Plot 2d</translation>
+ </message>
+ <message>
+ <source>UNITS_LBL</source>
+ <translation>Units</translation>
+ </message>
+ <message>
+ <source>VISU_3DCACHE_PROPS</source>
+ <translation>3D Cache properties</translation>
+ </message>
+ <message>
+ <source>VISU_COLORS_AND_LABELS</source>
+ <translation>Colors && Labels</translation>
+ </message>
+ <message>
+ <source>VISU_COMPONENT</source>
+ <translation>Component</translation>
+ </message>
+ <message>
+ <source>VISU_COS_SWEEP</source>
+ <translation>Cosinusoidal ( (1 - cos(t))/2 )</translation>
+ </message>
+ <message>
+ <source>VISU_CUTLINE_PREF</source>
+ <translation>CutLine preferences</translation>
+ </message>
+ <message>
+ <source>VISU_CUT_LINES</source>
+ <translation>Cut Lines</translation>
+ </message>
+ <message>
+ <source>VISU_CUT_PLANES</source>
+ <translation>Cut Planes</translation>
+ </message>
+ <message>
+ <source>VISU_DEFORMED_SHAPE</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>VISU_DISP_ONLY</source>
+ <translation>Display only on creation</translation>
+ </message>
+ <message>
+ <source>VISU_FIELD_RANGE</source>
+ <translation>Field range</translation>
+ </message>
+ <message>
+ <source>VISU_FONT</source>
+ <translation>Font</translation>
+ </message>
+ <message>
+ <source>VISU_FONT_ARIAL</source>
+ <translation>Arial</translation>
+ </message>
+ <message>
+ <source>VISU_FONT_COURIER</source>
+ <translation>Courier</translation>
+ </message>
+ <message>
+ <source>VISU_FONT_TIMES</source>
+ <translation>Times</translation>
+ </message>
+ <message>
+ <source>VISU_HEIGHT</source>
+ <translation>Height:</translation>
+ </message>
+ <message>
+ <source>VISU_HORIZONTAL</source>
+ <translation>Horizontal</translation>
+ </message>
+ <message>
+ <source>VISU_IMPOSED_RANGE</source>
+ <translation>Imposed range</translation>
+ </message>
+ <message>
+ <source>VISU_IS2PI</source>
+ <translation>Parameter varies:</translation>
+ </message>
+ <message>
+ <source>VISU_ISO_SURFACES</source>
+ <translation>Iso Surfaces</translation>
+ </message>
+ <message>
+ <source>VISU_LABELS</source>
+ <translation>Labels</translation>
+ </message>
+ <message>
+ <source>VISU_LIMITED</source>
+ <translation>Limited</translation>
+ </message>
+ <message>
+ <source>VISU_LINEAR_SWEEP</source>
+ <translation>Linear</translation>
+ </message>
+ <message>
+ <source>VISU_LOGARITHMIC_SCALING</source>
+ <translation>Logarithmic scaling</translation>
+ </message>
+ <message>
+ <source>VISU_MAX</source>
+ <translation>Max:</translation>
+ </message>
+ <message>
+ <source>VISU_MEMORY_LIMIT</source>
+ <translation>Memory limit (Mb)</translation>
+ </message>
+ <message>
+ <source>VISU_MEMORY_MODE</source>
+ <translation>Memory mode</translation>
+ </message>
+ <message>
+ <source>VISU_MESH</source>
+ <translation>Mesh</translation>
+ </message>
+ <message>
+ <source>VISU_MIN</source>
+ <translation>Min:</translation>
+ </message>
+ <message>
+ <source>VISU_MINIMAL</source>
+ <translation>Minimal</translation>
+ </message>
+ <message>
+ <source>VISU_MINMAX_IMPOSED_RANGE</source>
+ <translation>Min and max for imposed range</translation>
+ </message>
+ <message>
+ <source>VISU_MODULUS</source>
+ <translation>Modulus</translation>
+ </message>
+ <message>
+ <source>VISU_NB_COLORS</source>
+ <translation>Nb. of colors</translation>
+ </message>
+ <message>
+ <source>VISU_NB_CYCLES</source>
+ <translation>Number of cycles</translation>
+ </message>
+ <message>
+ <source>VISU_NB_LABELS</source>
+ <translation>Nb. of labels</translation>
+ </message>
+ <message>
+ <source>VISU_NB_STEPS</source>
+ <translation>Number of steps</translation>
+ </message>
+ <message>
+ <source>VISU_ORIENTATION</source>
+ <translation>Orientation</translation>
+ </message>
+ <message>
+ <source>VISU_ORIGIN_AND_SIZE</source>
+ <translation>Origin && Size</translation>
+ </message>
+ <message>
+ <source>VISU_PLOT3D</source>
+ <translation>Plot3D</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_MED_FULL_LOAD</source>
+ <translation>Full MED loading</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_MED_IMPORT</source>
+ <translation>MED files import</translation>
+ </message>
+ <message>
+ <source>VISU_PREF_SECOND_TAB</source>
+ <translation>Scalar range, Sweep, MED import, Shading</translation>
+ </message>
+ <message>
+ <source>VISU_RANGE_TO_USE</source>
+ <translation>Range to use</translation>
+ </message>
+ <message>
+ <source>VISU_REPRESENT_PROPS</source>
+ <translation>Representation properties</translation>
+ </message>
+ <message>
+ <source>VISU_SCALAR_BAR</source>
+ <translation>Scalar Bar</translation>
+ </message>
+ <message>
+ <source>VISU_SCALAR_MAP</source>
+ <translation>Scalar Map</translation>
+ </message>
+ <message>
+ <source>VISU_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+ <translation>Scalar Map on Def. Shape</translation>
+ </message>
+ <message>
+ <source>VISU_SCALAR_MODE</source>
+ <translation>Scalar mode</translation>
+ </message>
+ <message>
+ <source>VISU_SCALAR_RANGE</source>
+ <translation>Scalar range</translation>
+ </message>
+ <message>
+ <source>VISU_SHRINK</source>
+ <translation>Shrink</translation>
+ </message>
+ <message>
+ <source>VISU_SIN_SWEEP</source>
+ <translation>Sinusoidal ( sin( t - PI/2 ) )</translation>
+ </message>
+ <message>
+ <source>VISU_STREAM_LINES</source>
+ <translation>Stream Lines</translation>
+ </message>
+ <message>
+ <source>VISU_SWEEPING_MODES</source>
+ <translation>Mode of the sweeping </translation>
+ </message>
+ <message>
+ <source>VISU_SWEEPING_PREF</source>
+ <translation>Sweeping preferences</translation>
+ </message>
+ <message>
+ <source>VISU_TIME_STEP</source>
+ <translation>Time step(second)</translation>
+ </message>
+ <message>
+ <source>VISU_TITLE</source>
+ <translation>Title</translation>
+ </message>
+ <message>
+ <source>VISU_USE_SHADING</source>
+ <translation>Use Shading</translation>
+ </message>
+ <message>
+ <source>VISU_VECTORS</source>
+ <translation>Vectors</translation>
+ </message>
+ <message>
+ <source>VISU_VERTICAL</source>
+ <translation>Vertical</translation>
+ </message>
+ <message>
+ <source>VISU_WIDTH</source>
+ <translation>Width:</translation>
+ </message>
+ <message>
+ <source>VISU_X</source>
+ <translation>X:</translation>
+ </message>
+ <message>
+ <source>VISU_Y</source>
+ <translation>Y:</translation>
+ </message>
+ <message>
+ <source>WRN_EXTRA_MEMORY_REQUIRED</source>
+ <translation>Cache need more memory to build the presentation (%1 Mb).\nDo you want to enlarge the cache?</translation>
+ </message>
+ <message>
+ <source>WRN_NO_AVAILABLE_DATA</source>
+ <translation>No Available data in selection</translation>
+ </message>
+ <message>
+ <source>WRN_STUDY_LOCKED</source>
+ <translation>Current Study is locked</translation>
+ </message>
+ <message>
+ <source>WRN_VISU</source>
+ <translation>Post-Pro Warning</translation>
+ </message>
+ <message>
+ <source>WRN_VISU_WARNING</source>
+ <translation>Warning</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_MainWindow</name>
+ <message>
+ <source>DSC_VVTK_RECORDING_PAUSE</source>
+ <translation>Pause recording</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_RECORDING_PLAY</source>
+ <translation>Play recording</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_RECORDING_START</source>
+ <translation>Start recording</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_RECORDING_STOP</source>
+ <translation>Stop recording</translation>
+ </message>
+ <message>
+ <source>LBL_TOOLBAR_RECORD_LABEL</source>
+ <translation>Recording Operations</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_RECORDING_PAUSE</source>
+ <translation>Pause recording</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_RECORDING_PLAY</source>
+ <translation>Play recording</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_RECORDING_START</source>
+ <translation>Start recording</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_RECORDING_STOP</source>
+ <translation>Stop recording</translation>
+ </message>
+ <message>
+ <source>MSG_NO_AVI_MAKER</source>
+ <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation.</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_MainWindow1</name>
+ <message>
+ <source>DSC_VVTK_INTERACTOR_STYLE_SWITCH</source>
+ <translation>Interaction Style Switch</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+ <translation>Plane Segmentation</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_SELECTION_MODE_SWITCH</source>
+ <translation>Selection Mode Switch</translation>
+ </message>
+ <message>
+ <source>DSC_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+ <translation>Sphere Segmentation</translation>
+ </message>
+ <message>
+ <source>LBL_TOOLBAR_GAUSS_LABEL</source>
+ <translation>Gauss Viewer Tools</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_INTERACTOR_STYLE_SWITCH</source>
+ <translation>Interaction Style Switch</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+ <translation>Plane Segmentation</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_SELECTION_MODE_SWITCH</source>
+ <translation>Selection Mode Switch</translation>
+ </message>
+ <message>
+ <source>MNU_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+ <translation>Sphere Segmentation</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_PickingDlg</name>
+ <message>
+ <source>BELOW_POINT</source>
+ <translation>Centered below the point</translation>
+ </message>
+ <message>
+ <source>CAMERA_TITLE</source>
+ <translation>Movement of the camera</translation>
+ </message>
+ <message>
+ <source>CURSOR_SIZE</source>
+ <translation>Size of the cursor :</translation>
+ </message>
+ <message>
+ <source>CURSOR_TITLE</source>
+ <translation>Cursor</translation>
+ </message>
+ <message>
+ <source>DISPLAY_PARENT_MESH</source>
+ <translation>Display parent mesh element</translation>
+ </message>
+ <message>
+ <source>INFO_WINDOW_TITLE</source>
+ <translation>Information window</translation>
+ </message>
+ <message>
+ <source>PARENT_MESH_TITLE</source>
+ <translation>Parent mesh element</translation>
+ </message>
+ <message>
+ <source>PICKING_DLG_TITLE</source>
+ <translation>Picking</translation>
+ </message>
+ <message>
+ <source>POINT_TOLERANCE</source>
+ <translation>Point tolerance :</translation>
+ </message>
+ <message>
+ <source>POSITION</source>
+ <translation>Position :</translation>
+ </message>
+ <message>
+ <source>PYRAMID_HEIGHT</source>
+ <translation>Height of the pyramids :</translation>
+ </message>
+ <message>
+ <source>SELECTION_COLOR</source>
+ <translation>Selection cursor color :</translation>
+ </message>
+ <message>
+ <source>STEP_NUMBER</source>
+ <translation>Number of steps between two positions :</translation>
+ </message>
+ <message>
+ <source>TOLERANCE_TITLE</source>
+ <translation>Tolerance</translation>
+ </message>
+ <message>
+ <source>TOP_LEFT_CORNER</source>
+ <translation>Top-left corner of the 3D view</translation>
+ </message>
+ <message>
+ <source>TRANSPARENCY</source>
+ <translation>Transparency :</translation>
+ </message>
+ <message>
+ <source>ZOOM_FACTOR</source>
+ <translation>Zoom at first selected point (ratio) :</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_PrimitiveBox</name>
+ <message>
+ <source>ALPHA_TEXTURE</source>
+ <translation>Alpha Channel Texture (16x16) : </translation>
+ </message>
+ <message>
+ <source>ALPHA_THRESHOLD</source>
+ <translation>Alpha Channel Threshold : </translation>
+ </message>
+ <message>
+ <source>CLAMP</source>
+ <translation>Maximum Size (Clamp) : </translation>
+ </message>
+ <message>
+ <source>FACE_LIMIT</source>
+ <translation>Notify when number of faces exceeds : </translation>
+ </message>
+ <message>
+ <source>FACE_NUMBER</source>
+ <translation>Number of faces : </translation>
+ </message>
+ <message>
+ <source>GEOMETRICAL_SPHERE</source>
+ <translation>Geometrical Sphere</translation>
+ </message>
+ <message>
+ <source>MAIN_TEXTURE</source>
+ <translation>Main Texture (16x16) : </translation>
+ </message>
+ <message>
+ <source>OPENGL_POINT</source>
+ <translation>OpenGL Point</translation>
+ </message>
+ <message>
+ <source>POINT_SPRITE</source>
+ <translation>Point Sprite</translation>
+ </message>
+ <message>
+ <source>PRIMITIVE_TITLE</source>
+ <translation>Primitive</translation>
+ </message>
+ <message>
+ <source>RESOLUTION</source>
+ <translation>Resolution : </translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_RecorderDlg</name>
+ <message>
+ <source>ALL_DISLPAYED_FRAMES</source>
+ <translation>Recording all displayed frames</translation>
+ </message>
+ <message>
+ <source>CLOSE</source>
+ <translation>Close</translation>
+ </message>
+ <message>
+ <source>DLG_RECORDER_TITLE</source>
+ <translation>Recorder</translation>
+ </message>
+ <message>
+ <source>FILE_NAME</source>
+ <translation>Save to file : </translation>
+ </message>
+ <message>
+ <source>FLT_ALL_FILES</source>
+ <translation>All Files (*.*)</translation>
+ </message>
+ <message>
+ <source>FLT_AVI_FILES</source>
+ <translation>AVI Files (*.avi)</translation>
+ </message>
+ <message>
+ <source>FPS</source>
+ <translation>FPS : </translation>
+ </message>
+ <message>
+ <source>PROGRESSIVE</source>
+ <translation>Progressive</translation>
+ </message>
+ <message>
+ <source>QUALITY</source>
+ <translation>Quality : </translation>
+ </message>
+ <message>
+ <source>RECORDING_MODE</source>
+ <translation>Mode : </translation>
+ </message>
+ <message>
+ <source>SETTINGS</source>
+ <translation>Settings</translation>
+ </message>
+ <message>
+ <source>SKIPPED_FRAMES</source>
+ <translation>Recording at a given FPS</translation>
+ </message>
+ <message>
+ <source>START</source>
+ <translation>Start</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_SegmentationCursorDlg</name>
+ <message>
+ <source>DEPTH</source>
+ <translation>Depth of the cursor: </translation>
+ </message>
+ <message>
+ <source>DEPTH_TITLE</source>
+ <translation>Depth</translation>
+ </message>
+ <message>
+ <source>DIRECTION_DX</source>
+ <translation>DX: </translation>
+ </message>
+ <message>
+ <source>DIRECTION_DY</source>
+ <translation>DY: </translation>
+ </message>
+ <message>
+ <source>DIRECTION_DZ</source>
+ <translation>DZ: </translation>
+ </message>
+ <message>
+ <source>DIRECTION_TITLE</source>
+ <translation>Direction</translation>
+ </message>
+ <message>
+ <source>GAUSS_POINTS_TAB</source>
+ <translation>Gauss Points</translation>
+ </message>
+ <message>
+ <source>INCREMENT</source>
+ <translation>+/- Ratio : </translation>
+ </message>
+ <message>
+ <source>INSIDE_GAUSS_POINTS</source>
+ <translation>Inside Cursor Gauss Points Presentation</translation>
+ </message>
+ <message>
+ <source>MAGNIFICATION</source>
+ <translation>Magnification (%) : </translation>
+ </message>
+ <message>
+ <source>MAGNIFICATION_TITLE</source>
+ <translation>Magnification</translation>
+ </message>
+ <message>
+ <source>ORIGIN_TITLE</source>
+ <translation>Origin</translation>
+ </message>
+ <message>
+ <source>ORIGIN_X</source>
+ <translation>X: </translation>
+ </message>
+ <message>
+ <source>ORIGIN_Y</source>
+ <translation>Y: </translation>
+ </message>
+ <message>
+ <source>ORIGIN_Z</source>
+ <translation>Z: </translation>
+ </message>
+ <message>
+ <source>OUTSIDE_GAUSS_POINTS</source>
+ <translation>Outside Cursor Gauss Points Presentation</translation>
+ </message>
+ <message>
+ <source>RADIUS</source>
+ <translation>Radius of the cursor :</translation>
+ </message>
+ <message>
+ <source>RADIUS_TITLE</source>
+ <translation>Radius</translation>
+ </message>
+ <message>
+ <source>RATIO</source>
+ <translation>+/- Ratio :</translation>
+ </message>
+ <message>
+ <source>SEGMENTATION_CURSOR_DLG_TITLE</source>
+ <translation>Segmentation Cursor</translation>
+ </message>
+ <message>
+ <source>SEGMENTATION_CURSOR_TAB</source>
+ <translation>Segmentation Cursor</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_SizeBox</name>
+ <message>
+ <source>COLOR</source>
+ <translation>Color : </translation>
+ </message>
+ <message>
+ <source>COLOR_TITLE</source>
+ <translation>Color</translation>
+ </message>
+ <message>
+ <source>GEOM_SIZE</source>
+ <translation>Size of points (%) : </translation>
+ </message>
+ <message>
+ <source>INCREMENT</source>
+ <translation>+/- Ratio : </translation>
+ </message>
+ <message>
+ <source>MAGNIFICATION</source>
+ <translation>Magnification (%) : </translation>
+ </message>
+ <message>
+ <source>MAX_SIZE</source>
+ <translation>max size (%) : </translation>
+ </message>
+ <message>
+ <source>MIN_SIZE</source>
+ <translation>Range values for min size (%) : </translation>
+ </message>
+ <message>
+ <source>OUTSIDE_SIZE</source>
+ <translation>Percentage of normal size(%) : </translation>
+ </message>
+ <message>
+ <source>SIZE_TITLE</source>
+ <translation>Size</translation>
+ </message>
+ <message>
+ <source>UNIFORM_COLOR</source>
+ <translation>Uniform Color</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_ViewManager</name>
+ <message>
+ <source>VTK_VIEW_TITLE</source>
+ <translation>Gauss scene:%1 - viewer:%2</translation>
+ </message>
+ </context>
+ <context>
+ <name>VVTK_ViewWindow</name>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>GAUSS viewer tools</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI</name>
+ <message>
+ <source>DLG_LINEWIDTH_CMT1</source>
+ <translation>Set value between</translation>
+ </message>
+ <message>
+ <source>DLG_LINEWIDTH_CMT2</source>
+ <translation>1 (thin) and 10 (thick)</translation>
+ </message>
+ <message>
+ <source>DLG_LINEWIDTH_TITLE</source>
+ <translation>Line Width</translation>
+ </message>
+ <message>
+ <source>DLG_OPACITY_CMT1</source>
+ <translation>Set value between</translation>
+ </message>
+ <message>
+ <source>DLG_OPACITY_CMT2</source>
+ <translation>0 (transparent) and 100 (opaque)</translation>
+ </message>
+ <message>
+ <source>DLG_OPACITY_TITLE</source>
+ <translation>Opacity</translation>
+ </message>
+ <message>
+ <source>ERR_ACTIVATE_VIEW3D</source>
+ <translation>Please activate 3D view before</translation>
+ </message>
+ <message>
+ <source>ERR_ERROR_DURING_EXPORT</source>
+ <translation>Error has been occured during exporting to file</translation>
+ </message>
+ <message>
+ <source>ERR_SCALARBAR_PARAMS</source>
+ <translation>Warning! The parameters is incorrect</translation>
+ </message>
+ <message>
+ <source>FLT_ALL_FILES</source>
+ <translation>All Files (*.*)</translation>
+ </message>
+ <message>
+ <source>FLT_MED_FILES</source>
+ <translation>MED Files (*.med)</translation>
+ </message>
+ <message>
+ <source>FLT_TABLE_FILES</source>
+ <translation>Tables (*.xls *.txt *.tab)</translation>
+ </message>
+ <message>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Import from File</translation>
+ </message>
+ <message>
+ <source>MEN_ARRANGE_ACTORS</source>
+ <translation>Arrange Actors</translation>
+ </message>
+ <message>
+ <source>MEN_CACHE_PROPERTIES</source>
+ <translation>Properties</translation>
+ </message>
+ <message>
+ <source>MEN_CELL_COLOR</source>
+ <translation>Cell color</translation>
+ </message>
+ <message>
+ <source>MEN_CLEAR_CONTAINER</source>
+ <translation>Clear</translation>
+ </message>
+ <message>
+ <source>MEN_CLIPPING</source>
+ <translation>Clipping planes</translation>
+ </message>
+ <message>
+ <source>MEN_COLOR</source>
+ <translation>Color...</translation>
+ </message>
+ <message>
+ <source>MEN_COPY_PRS</source>
+ <translation>Copy</translation>
+ </message>
+ <message>
+ <source>MEN_CREATE_CURVES</source>
+ <translation>Create Curves</translation>
+ </message>
+ <message>
+ <source>MEN_CREATE_MANY_PRS</source>
+ <translation>Create Presentations</translation>
+ </message>
+ <message>
+ <source>MEN_CREATE_PLOT2D</source>
+ <translation>Create Plot2d View</translation>
+ </message>
+ <message>
+ <source>MEN_CREATE_PRS</source>
+ <translation>Create Presentation</translation>
+ </message>
+ <message>
+ <source>MEN_CREATE_TABLE</source>
+ <translation>Create Table</translation>
+ </message>
+ <message>
+ <source>MEN_CUBE_AXES</source>
+ <translation>Graduated axes</translation>
+ </message>
+ <message>
+ <source>MEN_CURVE_PROPS</source>
+ <translation>Properties...</translation>
+ </message>
+ <message>
+ <source>MEN_CUT_LINES</source>
+ <translation>Cut Lines</translation>
+ </message>
+ <message>
+ <source>MEN_CUT_PLANES</source>
+ <translation>Cut Planes</translation>
+ </message>
+ <message>
+ <source>MEN_DEFORMED_SHAPE</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>MEN_DELETE_OBJS</source>
+ <translation>Delete</translation>
+ </message>
+ <message>
+ <source>MEN_DELETE_VIEWPARAMS</source>
+ <translation>Delete view parameters</translation>
+ </message>
+ <message>
+ <source>MEN_DISPLAY</source>
+ <translation>Display</translation>
+ </message>
+ <message>
+ <source>MEN_DISPLAY_ONLY</source>
+ <translation>Display Only</translation>
+ </message>
+ <message>
+ <source>MEN_DISPLAY_SELECTION</source>
+ <translation>Display Selection</translation>
+ </message>
+ <message>
+ <source>MEN_EDGE_COLOR</source>
+ <translation>Edge Color</translation>
+ </message>
+ <message>
+ <source>MEN_EDIT_CONTAINER</source>
+ <translation>Edit...</translation>
+ </message>
+ <message>
+ <source>MEN_EDIT_PRS</source>
+ <translation>Edit...</translation>
+ </message>
+ <message>
+ <source>MEN_ERASE</source>
+ <translation>Erase</translation>
+ </message>
+ <message>
+ <source>MEN_ERASE_ALL</source>
+ <translation>Erase All</translation>
+ </message>
+ <message>
+ <source>MEN_EXPORT_TABLE</source>
+ <translation>Export Table</translation>
+ </message>
+ <message>
+ <source>MEN_FREE_SCALAR_BARS</source>
+ <translation>Use Field Range</translation>
+ </message>
+ <message>
+ <source>MEN_GLOBAL_SELECTION</source>
+ <translation>Global Selection</translation>
+ </message>
+ <message>
+ <source>MEN_HOLO_RENDER</source>
+ <translation>Holo render</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT_FROM_FILE</source>
+ <translation>MED file</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT_MED_FIELD</source>
+ <translation>Import Field</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT_MED_STRUCTURE</source>
+ <translation>Import Structure</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT_MED_TIMESTAMP</source>
+ <translation>Import TimeStamp</translation>
+ </message>
+ <message>
+ <source>MEN_IMPORT_TABLE</source>
+ <translation>Table from file</translation>
+ </message>
+ <message>
+ <source>MEN_INSIDEFRAME</source>
+ <translation>Insideframe</translation>
+ </message>
+ <message>
+ <source>MEN_ISO_SURFACES</source>
+ <translation>Iso Surfaces</translation>
+ </message>
+ <message>
+ <source>MEN_LINE_WIDTH</source>
+ <translation>Line Width</translation>
+ </message>
+ <message>
+ <source>MEN_MERGE_SCALAR_BARS</source>
+ <translation>Merge Scalar Range</translation>
+ </message>
+ <message>
+ <source>MEN_MULTIPR_VIEW_FULL_RES</source>
+ <translation>Display at full resolution</translation>
+ </message>
+ <message>
+ <source>MEN_MULTIPR_VIEW_HIDE</source>
+ <translation>Hide</translation>
+ </message>
+ <message>
+ <source>MEN_MULTIPR_VIEW_LOW_RES</source>
+ <translation>Display at low resolution</translation>
+ </message>
+ <message>
+ <source>MEN_MULTIPR_VIEW_MEDIUM_RES</source>
+ <translation>Display at medium resolution</translation>
+ </message>
+ <message>
+ <source>MEN_NOSHADING</source>
+ <translation>Shading Off</translation>
+ </message>
+ <message>
+ <source>MEN_OPACITY</source>
+ <translation>Opacity</translation>
+ </message>
+ <message>
+ <source>MEN_PARALLEL_ANIMATION</source>
+ <translation>Parallel Animation...</translation>
+ </message>
+ <message>
+ <source>MEN_PARTIAL_SELECTION</source>
+ <translation>Partial Selection</translation>
+ </message>
+ <message>
+ <source>MEN_PLOT3D_FROM_CUTPLANE</source>
+ <translation>Plot3d</translation>
+ </message>
+ <message>
+ <source>MEN_PLOT_3D</source>
+ <translation>Plot3D</translation>
+ </message>
+ <message>
+ <source>MEN_POINTS</source>
+ <translation>Points</translation>
+ </message>
+ <message>
+ <source>MEN_PROPERTIES</source>
+ <translation>Properties</translation>
+ </message>
+ <message>
+ <source>MEN_RENAME</source>
+ <translation>Rename...</translation>
+ </message>
+ <message>
+ <source>MEN_RENAME_CONTAINER</source>
+ <translation>Rename...</translation>
+ </message>
+ <message>
+ <source>MEN_RENAME_TABLE</source>
+ <translation>Rename...</translation>
+ </message>
+ <message>
+ <source>MEN_REPRESENTATION</source>
+ <translation>Representation</translation>
+ </message>
+ <message>
+ <source>MEN_RESTORE_VIEWPARAMS</source>
+ <translation>Restore view parameters</translation>
+ </message>
+ <message>
+ <source>MEN_SAVE_VIEWPARAMS</source>
+ <translation>Save view parameters</translation>
+ </message>
+ <message>
+ <source>MEN_SCALAR_MAP</source>
+ <translation>Scalar Map</translation>
+ </message>
+ <message>
+ <source>MEN_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+ <translation>Scalar Map on Deformed Shape</translation>
+ </message>
+ <message>
+ <source>MEN_SCALING</source>
+ <translation>Scaling</translation>
+ </message>
+ <message>
+ <source>MEN_SELECTION</source>
+ <translation>Selection</translation>
+ </message>
+ <message>
+ <source>MEN_SELECTION_INFO</source>
+ <translation>Selection Info...</translation>
+ </message>
+ <message>
+ <source>MEN_SHADING</source>
+ <translation>Shading On</translation>
+ </message>
+ <message>
+ <source>MEN_SHOW_ANIMATION</source>
+ <translation>Show...</translation>
+ </message>
+ <message>
+ <source>MEN_SHOW_TABLE</source>
+ <translation>Show Table</translation>
+ </message>
+ <message>
+ <source>MEN_SHRINK</source>
+ <translation>Shrink</translation>
+ </message>
+ <message>
+ <source>MEN_STREAM_LINES</source>
+ <translation>Stream Lines</translation>
+ </message>
+ <message>
+ <source>MEN_SUCCCESSIVE_ANIMATION</source>
+ <translation>Successive Animation...</translation>
+ </message>
+ <message>
+ <source>MEN_SURFACE</source>
+ <translation>Surface</translation>
+ </message>
+ <message>
+ <source>MEN_SURFACEFRAME</source>
+ <translation>Surfaceframe</translation>
+ </message>
+ <message>
+ <source>MEN_SWEEP</source>
+ <translation>Sweep</translation>
+ </message>
+ <message>
+ <source>MEN_TRANSLATE_PRS</source>
+ <translation>Translate Presentation</translation>
+ </message>
+ <message>
+ <source>MEN_UNSHRINK</source>
+ <translation>Unshrink</translation>
+ </message>
+ <message>
+ <source>MEN_VECTORS</source>
+ <translation>Vectors</translation>
+ </message>
+ <message>
+ <source>MEN_VISUALIZATION</source>
+ <translation>Visualization</translation>
+ </message>
+ <message>
+ <source>MEN_WIREFRAME</source>
+ <translation>Wireframe</translation>
+ </message>
+ <message>
+ <source>TOOL_IMPORT</source>
+ <translation>Import Toolbar</translation>
+ </message>
+ <message>
+ <source>TOOL_REPRESENTATION</source>
+ <translation>Representation Toolbar</translation>
+ </message>
+ <message>
+ <source>TOOL_VISUALISATION</source>
+ <translation>Visualization Toolbar</translation>
+ </message>
+ <message>
+ <source>USE_BUILD_PROGRESS</source>
+ <translation>Use build progress</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_AxisWg</name>
+ <message>
+ <source>AXIS_NAME</source>
+ <translation>Axis name</translation>
+ </message>
+ <message>
+ <source>FONT</source>
+ <translation>Font</translation>
+ </message>
+ <message>
+ <source>IS_VISIBLE</source>
+ <translation>Is visible</translation>
+ </message>
+ <message>
+ <source>LABELS</source>
+ <translation>Labels</translation>
+ </message>
+ <message>
+ <source>LENGTH</source>
+ <translation>Length</translation>
+ </message>
+ <message>
+ <source>NAME</source>
+ <translation>Name</translation>
+ </message>
+ <message>
+ <source>NUMBER</source>
+ <translation>Number</translation>
+ </message>
+ <message>
+ <source>OFFSET</source>
+ <translation>Offset</translation>
+ </message>
+ <message>
+ <source>TICK_MARKS</source>
+ <translation>Tick marks</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_BuildProgressDlg</name>
+ <message>
+ <source>BUILD_ALL</source>
+ <translation>Build all</translation>
+ </message>
+ <message>
+ <source>BUILD_AT_ONCE</source>
+ <translation>Build at once</translation>
+ </message>
+ <message>
+ <source>BUILD_ENTITIES</source>
+ <translation>Build entities</translation>
+ </message>
+ <message>
+ <source>BUILD_FIELDS</source>
+ <translation>Build fields</translation>
+ </message>
+ <message>
+ <source>BUILD_GROUPS</source>
+ <translation>Build groups</translation>
+ </message>
+ <message>
+ <source>BUILD_MINMAX</source>
+ <translation>Build min/max</translation>
+ </message>
+ <message>
+ <source>CLOSE</source>
+ <translation>Close</translation>
+ </message>
+ <message>
+ <source>CLOSE_AT_FINISH</source>
+ <translation>Close dialog at finish</translation>
+ </message>
+ <message>
+ <source>DLG_BUILD_PROGRESS_TITLE</source>
+ <translation>Build progress</translation>
+ </message>
+ <message>
+ <source>ERR_ERROR_IN_THE_FILE</source>
+ <translation>Error in the file</translation>
+ </message>
+ <message>
+ <source>FILE_NAME</source>
+ <translation>Import file : </translation>
+ </message>
+ <message>
+ <source>FLT_ALL_FILES</source>
+ <translation>All Files (*.*)</translation>
+ </message>
+ <message>
+ <source>FLT_MED_FILES</source>
+ <translation>MED Files (*.med)</translation>
+ </message>
+ <message>
+ <source>HELP</source>
+ <translation>Help</translation>
+ </message>
+ <message>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Import from File</translation>
+ </message>
+ <message>
+ <source>IMPORT_PROGRESS</source>
+ <translation>Import progress</translation>
+ </message>
+ <message>
+ <source>IMPORT_SETTINGS</source>
+ <translation>Settings</translation>
+ </message>
+ <message>
+ <source>IMPORT_TIME</source>
+ <translation>Time</translation>
+ </message>
+ <message>
+ <source>START</source>
+ <translation>Start</translation>
+ </message>
+ <message>
+ <source>TIME</source>
+ <translation>Elapsed time : </translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CacheDlg</name>
+ <message>
+ <source>CACHE_TITLE</source>
+ <translation>Cache properties</translation>
+ </message>
+ <message>
+ <source>FREE</source>
+ <translation>Free</translation>
+ </message>
+ <message>
+ <source>LIMITED_MEMORY</source>
+ <translation>Limited memory</translation>
+ </message>
+ <message>
+ <source>MEMORY STATE</source>
+ <translation>Memory state</translation>
+ </message>
+ <message>
+ <source>MEMORY_MODE</source>
+ <translation>Memory mode</translation>
+ </message>
+ <message>
+ <source>MINIMAL_MEMORY</source>
+ <translation>Minimal memory</translation>
+ </message>
+ <message>
+ <source>USED_BY_CACHE</source>
+ <translation>Used by cache</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_ClippingDlg</name>
+ <message>
+ <source>AUTO_APPLY_CHK</source>
+ <translation>Auto Apply</translation>
+ </message>
+ <message>
+ <source>BUT_DELETE</source>
+ <translation>Delete</translation>
+ </message>
+ <message>
+ <source>BUT_NEW</source>
+ <translation>New</translation>
+ </message>
+ <message>
+ <source>GRP_IJK_AXIS</source>
+ <translation>Axis</translation>
+ </message>
+ <message>
+ <source>GRP_PARAMETERS</source>
+ <translation>Parameters</translation>
+ </message>
+ <message>
+ <source>GRP_PLANES</source>
+ <translation>Clipping planes</translation>
+ </message>
+ <message>
+ <source>I_RADIO_BTN</source>
+ <translation>I</translation>
+ </message>
+ <message>
+ <source>J_RADIO_BTN</source>
+ <translation>J</translation>
+ </message>
+ <message>
+ <source>K_RADIO_BTN</source>
+ <translation>K</translation>
+ </message>
+ <message>
+ <source>LBL_DISTANCE</source>
+ <translation>Distance</translation>
+ </message>
+ <message>
+ <source>LBL_IJK_INDEX</source>
+ <translation>Index (from 0 to ...)</translation>
+ </message>
+ <message>
+ <source>LBL_IJK_INDEX_TO_arg</source>
+ <translation>Index (from 0 to %1) </translation>
+ </message>
+ <message>
+ <source>LBL_ORIENTATION</source>
+ <translation>Orientation</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_XY</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_XZ</source>
+ <translation>Rotation around Y (X to Z):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_YX</source>
+ <translation>Rotation around Z (Y to X):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_YZ</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_ZX</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION_ZY</source>
+ <translation>Rotation around X (Z to Y):</translation>
+ </message>
+ <message>
+ <source>PARALLEL_XOY_COMBO_ITEM</source>
+ <translation>|| X-Y</translation>
+ </message>
+ <message>
+ <source>PARALLEL_YOZ_COMBO_ITEM</source>
+ <translation>|| Y-Z</translation>
+ </message>
+ <message>
+ <source>PARALLEL_ZOX_COMBO_ITEM</source>
+ <translation>|| Z-X</translation>
+ </message>
+ <message>
+ <source>PLANES_COMBO_ITEM_i</source>
+ <translation>Plane# %1</translation>
+ </message>
+ <message>
+ <source>PLANES_COMBO_ITEM_no</source>
+ <translation>No planes</translation>
+ </message>
+ <message>
+ <source>REVERSE_NORMAL_CHK</source>
+ <translation>Reverse normal</translation>
+ </message>
+ <message>
+ <source>SHOW_PREVIEW_CHK</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>TAB_IJK_STRUCTURED</source>
+ <translation>IJK (Structured)</translation>
+ </message>
+ <message>
+ <source>TAB_NON_STRUCTURED</source>
+ <translation>Non structured</translation>
+ </message>
+ <message>
+ <source>TITLE</source>
+ <translation>Change Clipping</translation>
+ </message>
+ <message>
+ <source>WRN_EMPTY_RESULTING_PRS</source>
+ <translation>Impossible to use given clipping planes because of VTK restrictions. \n Please, provide non-empty resulting presentation.</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CubeAxesDlg</name>
+ <message>
+ <source>CAPTION</source>
+ <translation>Graduated axes</translation>
+ </message>
+ <message>
+ <source>IS_VISIBLE</source>
+ <translation>Is visible</translation>
+ </message>
+ <message>
+ <source>X_AXIS</source>
+ <translation>X axis</translation>
+ </message>
+ <message>
+ <source>Y_AXIS</source>
+ <translation>Y axis</translation>
+ </message>
+ <message>
+ <source>Z_AXIS</source>
+ <translation>Z axis</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CursorDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>TextLabel1</source>
+ <translation>Set value between</translation>
+ </message>
+ <message>
+ <source>TextLabel2</source>
+ <translation>minimal and maximal</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CutLinesDlg</name>
+ <message>
+ <source>BASE_PLANE_POS</source>
+ <translation>Base plane position</translation>
+ </message>
+ <message>
+ <source>LBL_ABSOLUTE_LENGTH</source>
+ <translation>Use absolute length</translation>
+ </message>
+ <message>
+ <source>LBL_GENERATE_CURVES</source>
+ <translation>Generate Curves</translation>
+ </message>
+ <message>
+ <source>LBL_GENERATE_TABLE</source>
+ <translation>Generate Data Table</translation>
+ </message>
+ <message>
+ <source>LBL_INVERT_CURVES</source>
+ <translation>Invert all curves</translation>
+ </message>
+ <message>
+ <source>LBL_LINES_CUT</source>
+ <translation>Cut planes</translation>
+ </message>
+ <message>
+ <source>LBL_LINES_PLANE</source>
+ <translation>Plane of lines</translation>
+ </message>
+ <message>
+ <source>LBL_NB_PLANS</source>
+ <translation>Number of planes:</translation>
+ </message>
+ <message>
+ <source>LBL_POS</source>
+ <translation>Displacement (0...1):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION</source>
+ <translation>Rotations</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_X</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_Y</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_Z</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>LBL_SHOW_PREVIEW</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>PARALLEL_XOY</source>
+ <translation>|| X-Y</translation>
+ </message>
+ <message>
+ <source>PARALLEL_YOZ</source>
+ <translation>|| Y-Z</translation>
+ </message>
+ <message>
+ <source>PARALLEL_ZOX</source>
+ <translation>|| Z-X</translation>
+ </message>
+ <message>
+ <source>SET_DEFAULT</source>
+ <translation>Set default</translation>
+ </message>
+ <message>
+ <source>TXT_ORIENTATION</source>
+ <translation>Orientation</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CutPlanesDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_CutPlanesPane</name>
+ <message>
+ <source>LBL_NB_PLANS</source>
+ <translation>Number of planes:</translation>
+ </message>
+ <message>
+ <source>LBL_POS</source>
+ <translation>Displacement (0...1):</translation>
+ </message>
+ <message>
+ <source>LBL_ROTATION</source>
+ <translation>Rotations</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_X</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_Y</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>LBL_ROT_Z</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>LBL_SHOW_PREVIEW</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>PARALLEL_XOY</source>
+ <translation>// X-Y</translation>
+ </message>
+ <message>
+ <source>PARALLEL_YOZ</source>
+ <translation>// Y-Z</translation>
+ </message>
+ <message>
+ <source>PARALLEL_ZOX</source>
+ <translation>// Z-X</translation>
+ </message>
+ <message>
+ <source>TXT_ORIENTATION</source>
+ <translation>Orientation</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_DeformedShapeDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DEFORMED_SHAPE_TAB</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>INPUT_TAB</source>
+ <translation>Input</translation>
+ </message>
+ <message>
+ <source>MAGNITUDE_COLORING</source>
+ <translation>Magnitude coloring</translation>
+ </message>
+ <message>
+ <source>SCALAR_BAR_TAB</source>
+ <translation>Scalar Bar</translation>
+ </message>
+ <message>
+ <source>SCALE_FACTOR</source>
+ <translation>Scale Factor:</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_EditContainerDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>LBL_CONTAINER</source>
+ <translation>Container</translation>
+ </message>
+ <message>
+ <source>LBL_STUDY</source>
+ <translation>Study</translation>
+ </message>
+ <message>
+ <source>TXT_CURVE</source>
+ <translation>Curve</translation>
+ </message>
+ <message>
+ <source>TXT_TABLE</source>
+ <translation>Table</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_FileDlg</name>
+ <message>
+ <source>FULL_LOAD</source>
+ <translation>Full loading for current file</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_FontWg</name>
+ <message>
+ <source>ARIAL</source>
+ <translation>Arial</translation>
+ </message>
+ <message>
+ <source>BOLD</source>
+ <translation>Bold</translation>
+ </message>
+ <message>
+ <source>COURIER</source>
+ <translation>Courier</translation>
+ </message>
+ <message>
+ <source>ITALIC</source>
+ <translation>Italic</translation>
+ </message>
+ <message>
+ <source>SHADOW</source>
+ <translation>Shadow</translation>
+ </message>
+ <message>
+ <source>TIMES</source>
+ <translation>Times</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_GaussPointsDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DEFORMED_SHAPE</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>DEFORMED_SHAPE_TITLE</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>DLG_PREF_TITLE</source>
+ <translation>Gauss Points Preferences</translation>
+ </message>
+ <message>
+ <source>DLG_PROP_TITLE</source>
+ <translation>Gauss Points Properties</translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Gauss Points</translation>
+ </message>
+ <message>
+ <source>GAUSS_POINTS_TAB</source>
+ <translation>Gauss Points</translation>
+ </message>
+ <message>
+ <source>GEOMETRY</source>
+ <translation>Geometry</translation>
+ </message>
+ <message>
+ <source>INPUT_TAB</source>
+ <translation>Input</translation>
+ </message>
+ <message>
+ <source>PRS_TITLE</source>
+ <translation>Presentation</translation>
+ </message>
+ <message>
+ <source>RESULTS</source>
+ <translation>Results</translation>
+ </message>
+ <message>
+ <source>SCALAR_BAR_TAB</source>
+ <translation>Scalar Bar</translation>
+ </message>
+ <message>
+ <source>SCALE_FACTOR</source>
+ <translation>Scale Factor :</translation>
+ </message>
+ <message>
+ <source>WARNING</source>
+ <translation>Warning</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_GaussScalarBarPane</name>
+ <message>
+ <source>ACTIVE_BAR_GRP</source>
+ <translation>Active bar</translation>
+ </message>
+ <message>
+ <source>BICOLOR</source>
+ <translation>Bicolor</translation>
+ </message>
+ <message>
+ <source>COLORS_LABELS_GRP</source>
+ <translation>Colors and labels</translation>
+ </message>
+ <message>
+ <source>DIMENSIONS_GRP</source>
+ <translation>Dimensions</translation>
+ </message>
+ <message>
+ <source>DISPLAYED</source>
+ <translation>Displayed</translation>
+ </message>
+ <message>
+ <source>FIELD_RANGE_BTN</source>
+ <translation>Use field range</translation>
+ </message>
+ <message>
+ <source>GLOBAL</source>
+ <translation>Global</translation>
+ </message>
+ <message>
+ <source>HORIZONTAL_BTN</source>
+ <translation>Horizontal</translation>
+ </message>
+ <message>
+ <source>IMPOSED_RANGE_BTN</source>
+ <translation>Use imposed range</translation>
+ </message>
+ <message>
+ <source>LBL_HEIGHT</source>
+ <translation>Height:</translation>
+ </message>
+ <message>
+ <source>LBL_MAX</source>
+ <translation>Max:</translation>
+ </message>
+ <message>
+ <source>LBL_MIN</source>
+ <translation>Min:</translation>
+ </message>
+ <message>
+ <source>LBL_NB_COLORS</source>
+ <translation>Nb. of colors:</translation>
+ </message>
+ <message>
+ <source>LBL_NB_LABELS</source>
+ <translation>Nb. of labels:</translation>
+ </message>
+ <message>
+ <source>LBL_SPACING</source>
+ <translation>Spacing:</translation>
+ </message>
+ <message>
+ <source>LBL_WIDTH</source>
+ <translation>Width:</translation>
+ </message>
+ <message>
+ <source>LBL_X</source>
+ <translation>X:</translation>
+ </message>
+ <message>
+ <source>LBL_Y</source>
+ <translation>Y:</translation>
+ </message>
+ <message>
+ <source>LOCAL</source>
+ <translation>Local</translation>
+ </message>
+ <message>
+ <source>LOGARITHMIC_SCALING</source>
+ <translation>Logarithmic scaling</translation>
+ </message>
+ <message>
+ <source>ORIENTATION_GRP</source>
+ <translation>Orientation</translation>
+ </message>
+ <message>
+ <source>ORIGIN_GRP</source>
+ <translation>Origin</translation>
+ </message>
+ <message>
+ <source>RAINBOW</source>
+ <translation>Rainbow</translation>
+ </message>
+ <message>
+ <source>SAVE_DEFAULT_CHK</source>
+ <translation>Save as default values</translation>
+ </message>
+ <message>
+ <source>SCALAR_RANGE_GRP</source>
+ <translation>Scalar range</translation>
+ </message>
+ <message>
+ <source>VERTICAL_BTN</source>
+ <translation>Vertical</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_InputPane</name>
+ <message>
+ <source>ENTITY</source>
+ <translation>Entity :</translation>
+ </message>
+ <message>
+ <source>FIELD</source>
+ <translation>Field :</translation>
+ </message>
+ <message>
+ <source>MED_FILE</source>
+ <translation>Source File :</translation>
+ </message>
+ <message>
+ <source>MESH</source>
+ <translation>Mesh :</translation>
+ </message>
+ <message>
+ <source>PRS_DATA_SOUIRCE</source>
+ <translation>Data Source</translation>
+ </message>
+ <message>
+ <source>REINITIALIZE</source>
+ <translation>Auto Update</translation>
+ </message>
+ <message>
+ <source>TIME_STAMP</source>
+ <translation>Time Stamp :</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_IsoSurfPane</name>
+ <message>
+ <source>MAX_VALUE</source>
+ <translation>Maximum value:</translation>
+ </message>
+ <message>
+ <source>MIN_VALUE</source>
+ <translation>Minimum value:</translation>
+ </message>
+ <message>
+ <source>MSG_MINMAX_VALUES</source>
+ <translation>Min value can not be higher or equal to Max value</translation>
+ </message>
+ <message>
+ <source>NB_SURFACES</source>
+ <translation>Number of surfaces:</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_IsoSurfacesDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DEFINE_ISOSURFACES</source>
+ <translation>Iso Surfaces Definition</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_ItemContainer</name>
+ <message>
+ <source>AUTO_CHECK_LBL</source>
+ <translation>Auto assign</translation>
+ </message>
+ <message>
+ <source>CIRCLE_MARKER_LBL</source>
+ <translation>Circle</translation>
+ </message>
+ <message>
+ <source>CROSS_MARKER_LBL</source>
+ <translation>Cross</translation>
+ </message>
+ <message>
+ <source>DAHSDOTDOT_LINE_LBL</source>
+ <translation>DashDotDot</translation>
+ </message>
+ <message>
+ <source>DASHDOT_LINE_LBL</source>
+ <translation>DashDot</translation>
+ </message>
+ <message>
+ <source>DASH_LINE_LBL</source>
+ <translation>Dash</translation>
+ </message>
+ <message>
+ <source>DIAMOND_MARKER_LBL</source>
+ <translation>Diamond</translation>
+ </message>
+ <message>
+ <source>DOT_LINE_LBL</source>
+ <translation>Dot</translation>
+ </message>
+ <message>
+ <source>DTRIANGLE_MARKER_LBL</source>
+ <translation>Downward triangle</translation>
+ </message>
+ <message>
+ <source>H</source>
+ <translation> H </translation>
+ </message>
+ <message>
+ <source>LTRIANGLE_MARKER_LBL</source>
+ <translation>Leftward triangle</translation>
+ </message>
+ <message>
+ <source>NONE_LINE_LBL</source>
+ <translation>None</translation>
+ </message>
+ <message>
+ <source>NONE_MARKER_LBL</source>
+ <translation>None</translation>
+ </message>
+ <message>
+ <source>RECTANGLE_MARKER_LBL</source>
+ <translation>Rectangle</translation>
+ </message>
+ <message>
+ <source>RTRIANGLE_MARKER_LBL</source>
+ <translation>Rightward triangle</translation>
+ </message>
+ <message>
+ <source>SOLID_LINE_LBL</source>
+ <translation>Solid</translation>
+ </message>
+ <message>
+ <source>UTRIANGLE_MARKER_LBL</source>
+ <translation>Upward triangle</translation>
+ </message>
+ <message>
+ <source>V</source>
+ <translation> V </translation>
+ </message>
+ <message>
+ <source>XCROSS_MARKER_LBL</source>
+ <translation>Diagonal cross</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_Module</name>
+ <message>
+ <source>MEN_DESK_FILE_SAVE_GUI_STATE</source>
+ <translation>Save VISU state</translation>
+ </message>
+ <message>
+ <source>MEN_GAUSS</source>
+ <translation>Gauss</translation>
+ </message>
+ <message>
+ <source>MEN_GAUSS_CREATE_PRS</source>
+ <translation>Gauss Points</translation>
+ </message>
+ <message>
+ <source>MEN_GAUSS_NEW_VIEWER</source>
+ <translation>Points view</translation>
+ </message>
+ <message>
+ <source>MEN_OVERWRITE_CONFIGURATION</source>
+ <translation>Overwrite current configuration</translation>
+ </message>
+ <message>
+ <source>MEN_RESTORE_CONFIGURATION</source>
+ <translation>Restore current configuration</translation>
+ </message>
+ <message>
+ <source>MEN_SAVE_CONFIGURATION</source>
+ <translation>Store current configuration</translation>
+ </message>
+ <message>
+ <source>MEN_VISUALISATION</source>
+ <translation>Visualization</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_FILE_SAVE_GUI_STATE</source>
+ <translation>Saves current state of viewers, displayed objects, etc.</translation>
+ </message>
+ <message>
+ <source>TOOL_IMPORT</source>
+ <translation>Import Toolbar</translation>
+ </message>
+ <message>
+ <source>TOOL_VISUALISATION</source>
+ <translation>Visualization Toolbar</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_FILE_SAVE_GUI_STATE</source>
+ <translation>Save VISU state</translation>
+ </message>
+ <message>
+ <source>VISU_CAMERA_MOVE_PREF</source>
+ <translation>Number of steps between two positions</translation>
+ </message>
+ <message>
+ <source>VISU_CAMERA_PREF_GROUP_TTL</source>
+ <translation>Camera movements</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_INSIDE_CURSOR_PREF_TAB_TTL</source>
+ <translation>Inside Cursor</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL</source>
+ <translation>Outside Cursor</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_ACTIVE_BAR</source>
+ <translation>Active bar</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_ALPHA_TEXTURE</source>
+ <translation>Alpha Channel Texture (16x16)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_ALPHA_THRESHOLD</source>
+ <translation>Alpha Channel Threshold</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_BICOLOR</source>
+ <translation>Bicolor</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_CLAMP</source>
+ <translation>Maximum Size (Clamp)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_COLOR</source>
+ <translation>Color</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_COLOR_GROUP_TTL</source>
+ <translation>Color</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_DEFORMED_SHAPE_GROUP_TTL</source>
+ <translation>Deformed Shape</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_DISPLAY_GLOBAL</source>
+ <translation>Display global bar</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_FACE_LIMIT</source>
+ <translation>Notify when number of faces exceeds</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_GEOMSPHERE</source>
+ <translation>Geometrical sphere</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_GEOM_GROUP_TTL</source>
+ <translation>Geometry</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_GLOBAL</source>
+ <translation>Global</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_INCREMENT</source>
+ <translation>+/- Ratio</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_LOCAL</source>
+ <translation>Local</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_MAGNIFICATION</source>
+ <translation>Magnification (%)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_MAGNIFICATION_GROUP_TTL</source>
+ <translation>Magnification (Inside and Outside)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_MAIN_TEXTURE</source>
+ <translation>Main Texture (16x16)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_MAX_SIZE</source>
+ <translation>Range value for max size (%)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_MIN_SIZE</source>
+ <translation>Range value for min size (%)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_OPENGLPOINT</source>
+ <translation>OpenGL point</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_POINTSPRITE</source>
+ <translation>Point sprite</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL</source>
+ <translation>Primitive</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_PRIMITIVE_TYPE</source>
+ <translation>Primitive Type</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_RAINBOW</source>
+ <translation>Rainbow</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_RESOLUTION</source>
+ <translation>Geometrical sphere resolution</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_SCALAR_BAR_MODE</source>
+ <translation>Scalar bar mode</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_SCALE_FACTOR</source>
+ <translation>Scale factor</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_SIZE</source>
+ <translation>Size of points (%)</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_SIZE_GROUP_TTL</source>
+ <translation>Size</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_SPACING</source>
+ <translation>Spacing</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_TAB_TTL</source>
+ <translation>Gauss Points</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_PREF_UNIFORM_COLOR</source>
+ <translation>Uniform Color</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_SCALAR_BAR_PREF_GROUP_TTL</source>
+ <translation>Gauss Points Scalar Bar</translation>
+ </message>
+ <message>
+ <source>VISU_GAUSS_SCALAR_BAR_PREF_TAB_TTL</source>
+ <translation>Gauss Points Scalar Bar</translation>
+ </message>
+ <message>
+ <source>VISU_KEYBOARD_PREF</source>
+ <translation>[+]/[-] Speed increment</translation>
+ </message>
+ <message>
+ <source>VISU_KEYBOARD_PREF_GROUP_TTL</source>
+ <translation>Keyboard</translation>
+ </message>
+ <message>
+ <source>VISU_MOUSE_PREF</source>
+ <translation>Mouse behaviour</translation>
+ </message>
+ <message>
+ <source>VISU_MOUSE_PREF_GROUP_TLT</source>
+ <translation>Mouse</translation>
+ </message>
+ <message>
+ <source>VISU_MOUSE_PREF_KEYBOARD_FREE</source>
+ <translation>Keyboard free</translation>
+ </message>
+ <message>
+ <source>VISU_MOUSE_PREF_STANDARD</source>
+ <translation>Salome standard controls</translation>
+ </message>
+ <message>
+ <source>VISU_MOUSE_PREF_TAB_TLT</source>
+ <translation>Navigation</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_BELOW_POINT</source>
+ <translation>Centered below the point</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_CAMERA_GROUP_TTL</source>
+ <translation>Movement of the camera</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_CURSOR_GROUP_TTL</source>
+ <translation>Cursor</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_CURSOR_SIZE</source>
+ <translation>Size of the cursor</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_DISPLAY_PARENT_MESH</source>
+ <translation>Display parent mesh element</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_INFO_WINDOW_GROUP_TTL</source>
+ <translation>Information window</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_PARENT_MESH_TTL</source>
+ <translation>Parent mesh element</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_POINT_SELECTION_TOLERANCE</source>
+ <translation>Point selection tolerance</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_POSITION</source>
+ <translation>Position</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_PYRAMID_HEIGHT</source>
+ <translation>Height of the pyramids</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_SELECTION_COLOR</source>
+ <translation>Selection cursor color</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_STEP_NUMBER</source>
+ <translation>Number of steps between two positions</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_TAB_TTL</source>
+ <translation>Picking</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_TOLERANCE_GROUP_TTL</source>
+ <translation>Tolerance</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_TOP_LEFT_CORNER</source>
+ <translation>Top-left corner of the 3D view</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_TRANSPARENCY</source>
+ <translation>Transparency</translation>
+ </message>
+ <message>
+ <source>VISU_PICKING_PREF_ZOOM_FACTOR</source>
+ <translation>Zoom at first selected point (ratio)</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_ALL_DISLPAYED_FRAMES</source>
+ <translation>Recording all displayed frames</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_FPS</source>
+ <translation>FPS</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_GROUP_TTL</source>
+ <translation>Settings</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_PROGRESSIVE</source>
+ <translation>Progressive</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_QUALITY</source>
+ <translation>Quality</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_RECORDING_MODE</source>
+ <translation>Mode</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_SKIPPED_FRAMES</source>
+ <translation>Recording at a given FPS</translation>
+ </message>
+ <message>
+ <source>VISU_RECORDER_PREF_TAB_TTL</source>
+ <translation>Recorder</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF</source>
+ <translation>Spacemouse</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_1</source>
+ <translation>Decrease speed increment</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_2</source>
+ <translation>Increase speed increment</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_3</source>
+ <translation>Decrease Gauss points magnification</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_4</source>
+ <translation>Increase Gauss points magnification</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_5</source>
+ <translation>Dominant / combined switch</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_*</source>
+ <translation>Button *</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_1</source>
+ <translation>Button 1</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_10</source>
+ <translation>Button 10</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_11</source>
+ <translation>Button 11</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_2</source>
+ <translation>Button 2</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_3</source>
+ <translation>Button 3</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_4</source>
+ <translation>Button 4</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_5</source>
+ <translation>Button 5</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_6</source>
+ <translation>Button 6</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_7</source>
+ <translation>Button 7</translation>
+ </message>
+ <message>
+ <source>VISU_SPACEMOUSE_PREF_BTN_8</source>
+ <translation>Button 8</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_NameDlg</name>
+ <message>
+ <source>NAME_LBL</source>
+ <translation>Name: </translation>
+ </message>
+ <message>
+ <source>TLT_RENAME</source>
+ <translation>Rename</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_NonIsometricDlg</name>
+ <message>
+ <source>&Apply</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&Reset</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Scaling</translation>
+ </message>
+ <message>
+ <source>LBL_X</source>
+ <translation>X :</translation>
+ </message>
+ <message>
+ <source>LBL_Y</source>
+ <translation>Y :</translation>
+ </message>
+ <message>
+ <source>LBL_Z</source>
+ <translation>Z :</translation>
+ </message>
+ <message>
+ <source>O&K</source>
+ <translation></translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_Plot3DDlg</name>
+ <message>
+ <source>INPUT_TAB_TITLE</source>
+ <translation>Input</translation>
+ </message>
+ <message>
+ <source>PLOT3D_TAB_TITLE</source>
+ <translation>Plot 3D</translation>
+ </message>
+ <message>
+ <source>SCALAR_BAR_TAB_TITLE</source>
+ <translation>Scalar Bar</translation>
+ </message>
+ <message>
+ <source>TITLE</source>
+ <translation>Plot3D Definition</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_Plot3DPane</name>
+ <message>
+ <source>CONTOUR</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>NUMBER_CONTOURS</source>
+ <translation>Number of contours:</translation>
+ </message>
+ <message>
+ <source>ORIENTATION</source>
+ <translation>Orientation</translation>
+ </message>
+ <message>
+ <source>POSITION</source>
+ <translation>Position</translation>
+ </message>
+ <message>
+ <source>POSITION_VALUE</source>
+ <translation>Value: </translation>
+ </message>
+ <message>
+ <source>PRESENTATION_TYPE</source>
+ <translation>Presentation type</translation>
+ </message>
+ <message>
+ <source>PREVIEW</source>
+ <translation>Preview cutting plane</translation>
+ </message>
+ <message>
+ <source>RELATIVE</source>
+ <translation>Relative</translation>
+ </message>
+ <message>
+ <source>ROTATIONS</source>
+ <translation>Rotations</translation>
+ </message>
+ <message>
+ <source>ROTATION_X</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>ROTATION_Y</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>ROTATION_Z</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>SCALE</source>
+ <translation>Scale Factor:</translation>
+ </message>
+ <message>
+ <source>SURFACE</source>
+ <translation>Surface</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_ScalarBarDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DLG_PREF_TITLE</source>
+ <translation>Scalar Bar Preferences</translation>
+ </message>
+ <message>
+ <source>DLG_PROP_TITLE</source>
+ <translation>Scalar Bar Properties</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_ScalarBarPane</name>
+ <message>
+ <source>COLORS_LABELS_GRP</source>
+ <translation>Colors and labels</translation>
+ </message>
+ <message>
+ <source>DIMENSIONS_GRP</source>
+ <translation>Dimensions</translation>
+ </message>
+ <message>
+ <source>FIELD_RANGE_BTN</source>
+ <translation>Use field range</translation>
+ </message>
+ <message>
+ <source>HORIZONTAL_BTN</source>
+ <translation>Horizontal</translation>
+ </message>
+ <message>
+ <source>IMPOSED_RANGE_BTN</source>
+ <translation>Use imposed range</translation>
+ </message>
+ <message>
+ <source>LBL_HEIGHT</source>
+ <translation>Height:</translation>
+ </message>
+ <message>
+ <source>LBL_MAX</source>
+ <translation>Max:</translation>
+ </message>
+ <message>
+ <source>LBL_MIN</source>
+ <translation>Min:</translation>
+ </message>
+ <message>
+ <source>LBL_NB_COLORS</source>
+ <translation>Nb. of colors:</translation>
+ </message>
+ <message>
+ <source>LBL_NB_LABELS</source>
+ <translation>Nb. of labels:</translation>
+ </message>
+ <message>
+ <source>LBL_SHOW_PREVIEW</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>LBL_WIDTH</source>
+ <translation>Width:</translation>
+ </message>
+ <message>
+ <source>LBL_X</source>
+ <translation>X:</translation>
+ </message>
+ <message>
+ <source>LBL_Y</source>
+ <translation>Y:</translation>
+ </message>
+ <message>
+ <source>LOGARITHMIC_SCALING</source>
+ <translation>Logarithmic scaling</translation>
+ </message>
+ <message>
+ <source>MSG_MINMAX_VALUES</source>
+ <translation>Min value can not be higher or equal to Max value</translation>
+ </message>
+ <message>
+ <source>ORIENTATION_GRP</source>
+ <translation>Orientation</translation>
+ </message>
+ <message>
+ <source>ORIGIN_GRP</source>
+ <translation>Origin</translation>
+ </message>
+ <message>
+ <source>SAVE_DEFAULT_CHK</source>
+ <translation>Save as default values</translation>
+ </message>
+ <message>
+ <source>SCALAR_RANGE_GRP</source>
+ <translation>Scalar range</translation>
+ </message>
+ <message>
+ <source>VERTICAL_BTN</source>
+ <translation>Vertical</translation>
+ </message>
+ <message>
+ <source>WRN_LOGARITHMIC_FIELD_RANGE</source>
+ <translation>Logarithmic scaling: field range contains negative values, use imposed range instead</translation>
+ </message>
+ <message>
+ <source>WRN_LOGARITHMIC_RANGE</source>
+ <translation>Logarithmic scaling: use imposed range values > 0</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_ScalarMapOnDeformedShapeDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Scalar Map on Deformed Shape</translation>
+ </message>
+ <message>
+ <source>FIELD_ITEM</source>
+ <translation>Scalar Field:</translation>
+ </message>
+ <message>
+ <source>INPUT_TAB</source>
+ <translation>Input</translation>
+ </message>
+ <message>
+ <source>SCALAR_BAR_TAB</source>
+ <translation>Scalar Bar</translation>
+ </message>
+ <message>
+ <source>SCALAR_MAP_ON_DEFORMED_SHAPE_TAB</source>
+ <translation>Scalar Map on Deformed Shape</translation>
+ </message>
+ <message>
+ <source>SCALE_FACTOR</source>
+ <translation>Scale Factor:</translation>
+ </message>
+ <message>
+ <source>TIMESTAMP_ITEM</source>
+ <translation>Current Time Stamp:</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_SetupPlot2dDlg</name>
+ <message>
+ <source>BUT_NO</source>
+ <translation>No</translation>
+ </message>
+ <message>
+ <source>BUT_YES</source>
+ <translation>Yes</translation>
+ </message>
+ <message>
+ <source>QUE_WANT_SAME_UNITS</source>
+ <translation>Do you want to choose all items with the same units for vertical axis?</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_Slider</name>
+ <message>
+ <source>AVI</source>
+ <translation>AVI</translation>
+ </message>
+ <message>
+ <source>CACHE_MEMORY</source>
+ <translation>Cache:</translation>
+ </message>
+ <message>
+ <source>FREE_MEMORY</source>
+ <translation>Free:</translation>
+ </message>
+ <message>
+ <source>MORE</source>
+ <translation>More...</translation>
+ </message>
+ <message>
+ <source>SPEED</source>
+ <translation>Speed:</translation>
+ </message>
+ <message>
+ <source>TOOLBAR_TITLE</source>
+ <translation>Slider</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_StreamLinesDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Stream lines Preferences</translation>
+ </message>
+ <message>
+ <source>LBL_DIRECTION</source>
+ <translation>Direction</translation>
+ </message>
+ <message>
+ <source>LBL_INTEGRATION_STEP</source>
+ <translation>Integration Step</translation>
+ </message>
+ <message>
+ <source>LBL_PROPAGATION_TIME</source>
+ <translation>Propagation Time</translation>
+ </message>
+ <message>
+ <source>LBL_SOURCE_TYPE</source>
+ <translation>Source type</translation>
+ </message>
+ <message>
+ <source>LBL_STEP_LENGTH</source>
+ <translation>Step Length</translation>
+ </message>
+ <message>
+ <source>LBL_USED_POINTS</source>
+ <translation>Used points (0..1)</translation>
+ </message>
+ <message>
+ <source>MAGNITUDE_COLORING_CHK</source>
+ <translation>Magnitude coloring</translation>
+ </message>
+ <message>
+ <source>SOURCE_GRP</source>
+ <translation>Source</translation>
+ </message>
+ <message>
+ <source>USE_COLOR_BTN</source>
+ <translation>Use Color</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_SweepPrefDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Sweeping Preferences</translation>
+ </message>
+ <message>
+ <source>LBL_NB_CYCLES</source>
+ <translation>Number of cycles:</translation>
+ </message>
+ <message>
+ <source>LBL_NB_STEPS</source>
+ <translation>Number of steps:</translation>
+ </message>
+ <message>
+ <source>LBL_TIME_STEP</source>
+ <translation>Time step (second):</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_TableDlg</name>
+ <message>
+ <source>EDIT_TABLE_TLT</source>
+ <translation>Edit Table</translation>
+ </message>
+ <message>
+ <source>ERR_TABLE_NOT_AVAILABLE</source>
+ <translation>Table is not available</translation>
+ </message>
+ <message>
+ <source>TABLE_OF_INTEGER_TLT</source>
+ <translation>Table of integer</translation>
+ </message>
+ <message>
+ <source>TABLE_OF_REAL_TLT</source>
+ <translation>Table of real</translation>
+ </message>
+ <message>
+ <source>VIEW_TABLE_TLT</source>
+ <translation>View Table</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_TableWidget</name>
+ <message>
+ <source>ADD_COLUMN_BTN</source>
+ <translation>Add Column</translation>
+ </message>
+ <message>
+ <source>ADD_ROW_BTN</source>
+ <translation>Add Row</translation>
+ </message>
+ <message>
+ <source>ADJUST_CELLS_BTN</source>
+ <translation>Adjust Cells</translation>
+ </message>
+ <message>
+ <source>CLEAR_BTN</source>
+ <translation>Clear</translation>
+ </message>
+ <message>
+ <source>REMOVE_COLUMN_BTN</source>
+ <translation>Remove Column(s)</translation>
+ </message>
+ <message>
+ <source>REMOVE_ROW_BTN</source>
+ <translation>Remove Row(s)</translation>
+ </message>
+ <message>
+ <source>SELECT_ALL_BTN</source>
+ <translation>Select All</translation>
+ </message>
+ <message>
+ <source>SET_TITLE_TLT</source>
+ <translation>Set title</translation>
+ </message>
+ <message>
+ <source>TITLE_LBL</source>
+ <translation>Title:</translation>
+ </message>
+ <message>
+ <source>UNITS_TLT</source>
+ <translation>Units</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_TextPrefDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>LBL_BOLD</source>
+ <translation>Bold</translation>
+ </message>
+ <message>
+ <source>LBL_ITALIC</source>
+ <translation>Italic</translation>
+ </message>
+ <message>
+ <source>LBL_LABELS</source>
+ <translation>Labels</translation>
+ </message>
+ <message>
+ <source>LBL_SHADOW</source>
+ <translation>Shadow</translation>
+ </message>
+ <message>
+ <source>LBL_TITLE</source>
+ <translation>Title</translation>
+ </message>
+ <message>
+ <source>TIT_TEXT_PREF</source>
+ <translation>Text property</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_TimeAnimationDlg</name>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>ERROR</source>
+ <translation>Error</translation>
+ </message>
+ <message>
+ <source>MSG_NO_ANIMATIONDATA</source>
+ <translation>There is no data for animation</translation>
+ </message>
+ <message>
+ <source>MSG_NO_AVI_MAKER</source>
+ <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation.</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_TransparencyDlg</name>
+ <message>
+ <source>BUT_CLOSE</source>
+ <translation>Close</translation>
+ </message>
+ <message>
+ <source>TRANSPARENCY_OPAQUE</source>
+ <translation>Opaque</translation>
+ </message>
+ <message>
+ <source>TRANSPARENCY_TITLE</source>
+ <translation>Change Transparency</translation>
+ </message>
+ <message>
+ <source>TRANSPARENCY_TRANSPARENT</source>
+ <translation>Transparent</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_VectorsDlg</name>
+ <message>
+ <source>&Cancel</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>ARROWS_BTN</source>
+ <translation>Arrows</translation>
+ </message>
+ <message>
+ <source>CENTER_BTN</source>
+ <translation>Center</translation>
+ </message>
+ <message>
+ <source>CONES2_BTN</source>
+ <translation>Cones (2)</translation>
+ </message>
+ <message>
+ <source>CONES6_BTN</source>
+ <translation>Cones (6)</translation>
+ </message>
+ <message>
+ <source>DLG_TITLE</source>
+ <translation>Vector Field Representation</translation>
+ </message>
+ <message>
+ <source>GLYPH_POSITION_GRP</source>
+ <translation>Glyph position</translation>
+ </message>
+ <message>
+ <source>GLYPH_TYPE_GRP</source>
+ <translation>Glyph type</translation>
+ </message>
+ <message>
+ <source>HEAD_BTN</source>
+ <translation>Head</translation>
+ </message>
+ <message>
+ <source>LBL_LINE_WIDTH</source>
+ <translation>Line width:</translation>
+ </message>
+ <message>
+ <source>LBL_SCALE_FACTOR</source>
+ <translation>Scale factor:</translation>
+ </message>
+ <message>
+ <source>MAGNITUDE_COLORING_CHK</source>
+ <translation>Magnitude coloring</translation>
+ </message>
+ <message>
+ <source>SEL_COLOR_BTN</source>
+ <translation>Select Color</translation>
+ </message>
+ <message>
+ <source>TAIL_BTN</source>
+ <translation>Tail</translation>
+ </message>
+ <message>
+ <source>USE_GLYPHS_CHK</source>
+ <translation>Use glyphs</translation>
+ </message>
+ </context>
+ <context>
+ <name>VisuGUI_SelectionDlg</name>
+ <message>
+ <source>WINDOW_TITLE</source>
+ <translation>Data on elements</translation>
+ </message>
+ <message>
+ <source>MODE_TITLE</source>
+ <translation>Selection</translation>
+ </message>
+ <message>
+ <source>MODE_POINT</source>
+ <translation>Point</translation>
+ </message>
+ <message>
+ <source>MODE_CELL</source>
+ <translation>Cell</translation>
+ </message>
+ <message>
+ <source>MODE_ACTOR</source>
+ <translation>Actor</translation>
+ </message>
+ <message>
+ <source>MESH_NAME_LBL</source>
+ <translation>Mesh name:</translation>
+ </message>
+ <message>
+ <source>FIELD_NAME_LBL</source>
+ <translation>Field name:</translation>
+ </message>
+ <message>
+ <source>POINT_DATA_TITLE</source>
+ <translation>Data of Point</translation>
+ </message>
+ <message>
+ <source>DATA_SCALAR_LBL</source>
+ <translation>Scalar Value:</translation>
+ </message>
+ <message>
+ <source>DATA_VECTOR_LBL</source>
+ <translation>Vector Value:</translation>
+ </message>
+ <message>
+ <source>POINT_COORD_TITLE</source>
+ <translation>Coordinates</translation>
+ </message>
+ <message>
+ <source>CELL_DATA_TITLE</source>
+ <translation>Data of Cell</translation>
+ </message>
+ <message>
+ <source>CELL_DATA_ID_LBL</source>
+ <translation>ID:</translation>
+ </message>
+ <message>
+ <source>CELL_DATA_SCALAR_HDR</source>
+ <translation>Scalar</translation>
+ </message>
+ <message>
+ <source>CELL_DATA_VECTOR_HDR</source>
+ <translation>Vector</translation>
+ </message>
+ <message>
+ <source>ACTOR_DATA_POSITION_TITLE</source>
+ <translation>Position</translation>
+ </message>
+ <message>
+ <source>ACTOR_DATA_SIZE_TITLE</source>
+ <translation>Size</translation>
+ </message>
+ </context>
+</TS>
#include <vector>
// QT Includes
-#include <qptrlist.h>
-#include <qptrvector.h>
-#include <qcolordialog.h>
-#include <qdatetime.h>
+#include <QList>
+#include <QVector>
+#include <QColorDialog>
+#include <QDateTime>
+#include <QMenu>
// VTK Includes
#include <vtkRenderer.h>
#include "SUIT_ViewWindow.h"
#include "SUIT_ViewManager.h"
+#include "SUIT_Desktop.h"
#include "CAM_Module.h"
#include "Plot2d_SetupCurveDlg.h"
#include "Plot2d_ViewManager.h"
-#include "OB_Browser.h"
+#include "QtxPagePrefMgr.h"
+//TODO
+//#include "OB_Browser.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SalomeApp_DataModel.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_CheckFileDlg.h"
+
#include "LightApp_SelectionMgr.h"
#include "LightApp_Selection.h"
#include "LightApp_Preferences.h"
#include "QtxAction.h"
+#include "QtxFontEdit.h"
#include "VISUConfig.hh"
#include "VISU_Gen_i.hh"
bool toUseBuildProgress = aResourceMgr->booleanValue("VISU", "use_build_progress", false);
SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") );
- fd->setCaption( tr( "IMPORT_FROM_FILE" ) );
+ fd->setWindowTitle( tr( "IMPORT_FROM_FILE" ) );
fd->setFilters( aFilter );
fd->SetChecked( toUseBuildProgress );
fd->exec();
bool toBuildAll = aResourceMgr->booleanValue( "VISU", "full_med_loading", false );
bool toBuildAtOnce = aResourceMgr->booleanValue( "VISU", "build_at_once", false );
- QString anInfo("Importing From File " + aFileInfo.filePath() + "..." );
+ QString anInfo("Importing From File " + aFileInfo.absoluteFilePath() + "..." );
application()->putInfo( anInfo );
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
// MULTIPR: CreateResult
- VISU::Result_var aResult = GetVisuGen(this)->CreateResult( aFileInfo.filePath() );
+ VISU::Result_var aResult = GetVisuGen(this)->CreateResult( (const char*)aFileInfo.absoluteFilePath().toLatin1() );
if (CORBA::is_nil(aResult.in())) {
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- VisuGUI_BuildProgressDlg::tr("ERR_ERROR_IN_THE_FILE"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning(GetDesktop(this),
+ tr("WRN_VISU"),
+ VisuGUI_BuildProgressDlg::tr("ERR_ERROR_IN_THE_FILE") );
QApplication::restoreOverrideCursor();
}else{
aResult->SetBuildFields( toBuildFields, toBuildMinMax );
tr("MEN_IMPORT_TABLE"),
true);
if (aFileInfo.exists()) {
- application()->putInfo( tr("MEN_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." );
+ application()->putInfo( tr("MEN_IMPORT_TABLE") + " " + aFileInfo.absoluteFilePath() + " ..." );
- CORBA::Object_var anObject = GetVisuGen(this)->ImportTables(aFileInfo.filePath());
+ CORBA::Object_var anObject = GetVisuGen(this)->ImportTables((const char*)aFileInfo.absoluteFilePath().toLatin1());
if (CORBA::is_nil(anObject.in())) {
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_ERROR_IN_THE_FILE"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning( GetDesktop(this),
+ tr("WRN_VISU"),
+ tr("ERR_ERROR_IN_THE_FILE") );
} else {
- application()->putInfo(aFileInfo.filePath()+tr("INF_DONE"));
+ application()->putInfo(aFileInfo.absoluteFilePath()+tr("INF_DONE"));
UpdateObjBrowser(this);
}
}
if (!aTabAttr) return;
aTitle = aTabAttr->GetTitle().c_str();
}
- aTitle.simplifyWhiteSpace();
+ aTitle.simplified();
aTitle = aTitle.replace(QRegExp(" "), "_").replace(QRegExp("\\*"), "" );
// get default path for the file
aResourceMgr->setValue("VISU", "OutputDir", aDir);
try {
- GetVisuGen(this)->ExportTableToFile(GetSObject(aSObj), aFile.latin1());
+ GetVisuGen(this)->ExportTableToFile(GetSObject(aSObj), (const char*)aFile.toLatin1());
application()->putInfo(aFile + " " + tr("INF_DONE"));
} catch(std::exception& exc) {
INFOS(exc.what());
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_ERROR_DURING_EXPORT") + " " + tr(exc.what()),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning(GetDesktop(this),
+ tr("WRN_VISU"),
+ tr("ERR_ERROR_DURING_EXPORT") + " " + tr(exc.what()) );
+
} catch(...) {
- INFOS(tr("ERR_ERROR_DURING_EXPORT"));
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_ERROR_DURING_EXPORT"),
- tr("BUT_OK") );
+ INFOS((const char*)tr("ERR_ERROR_DURING_EXPORT").toLatin1());
+ SUIT_MessageBox::warning( GetDesktop(this),
+ tr("WRN_VISU"),
+ tr("ERR_ERROR_DURING_EXPORT") );
+
}
}
}
aSelectionMgr->selectedObjects(aListIO);
SALOME_ListIteratorOfListIO It (aListIO);
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
for (; It.More(); It.Next()) {
Handle(SALOME_InteractiveObject) anIO = It.Value();
SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(anIO->getEntry());
if (!aSelectionMgr)
return;
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
SALOME_ListIO aSel, aList;
aSelectionMgr->selectedObjects(aSel);
::OnErasePrs()
{
if(MYDEBUG) MESSAGE("OnErasePrs");
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
SALOME_ListIO aList, aSel;
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
return;
VisuGUI_CursorDlg* CursorDlg =
- new VisuGUI_CursorDlg (GetDesktop(this), tr("DLG_LINEWIDTH_TITLE"), TRUE);
+ new VisuGUI_CursorDlg (GetDesktop(this), (const char*)tr("DLG_LINEWIDTH_TITLE").toLatin1(), TRUE);
CursorDlg->Comment1->setText(tr("DLG_LINEWIDTH_CMT1"));
CursorDlg->Comment2->setText(tr("DLG_LINEWIDTH_CMT2"));
- CursorDlg->SpinBox1->setMinValue(1);
- CursorDlg->SpinBox1->setMaxValue(10);
+ CursorDlg->SpinBox1->setMinimum(1);
+ CursorDlg->SpinBox1->setMaximum(10);
float oldlwid = anActor->GetLineWidth();
int intlwid = int(oldlwid);
// if study is not locked - create new container, create curves and insert them
// into container, then plot container if current viewer is of VIEW_PLOT2D type
int horIndex;
- QValueList<int> verIndices, zIndices;
+ QList<int> verIndices, zIndices;
aDlg->getCurvesSource( horIndex, verIndices, zIndices );
if( horIndex >= 0 && verIndices.count() > 0 ){
CORBA::Object_var aContainerObj = GetVisuGen(this)->CreateContainer();
}
// if study is locked just get curves info and plot them
// if current viewer is of VIEW_PLOT2D type
- QPtrList<Plot2d_Curve> container;
+ QList<Plot2d_Curve*> container;
aDlg->getCurves( container );
if ( !container.isEmpty() ) {
GetPlot2dViewer( this )->getActiveViewFrame()->displayCurves( container, true );
// if study is not locked - create new table and container objects, create curves
// and insert them into container, then plot container if current viewer is of VIEW_PLOT2D type
int horIndex;
- QValueList<int> verIndices, zIndices;
+ QList<int> verIndices, zIndices;
aDlg->getCurvesSource( horIndex, verIndices, zIndices );
if ( horIndex >= 0 && verIndices.count() > 0 ) {
VISU::Table_var aTableObject = GetVisuGen(this)->CreateTable(aSObject->GetID().c_str());
aSObjectName = QString( aName->Value().c_str() );
}
// if study is locked just get curves info and plot them
- QPtrList<Plot2d_Curve> container;
+ QList<Plot2d_Curve*> container;
aDlg->getCurves( container );
if ( !container.isEmpty() ) {
GetPlot2dViewer( this )->getActiveViewFrame()->displayCurves( container, true );
if(!IsStudyLocked(GetCStudy(GetAppStudy(this)))){
Plot2d_SetupCurveDlg aDlg(GetDesktop( this ));
- aDlg.setLine( (int)aCurve->GetLine(), aCurve->GetLineWidth() );
- aDlg.setMarker( (int)aCurve->GetMarker() );
+ aDlg.setLine( (Plot2d::LineType)aCurve->GetLine(), aCurve->GetLineWidth() );
+ aDlg.setMarker( (Plot2d::MarkerType)aCurve->GetMarker() );
SALOMEDS::Color aColor = aCurve->GetColor();
aDlg.setColor( QColor( (int)(aColor.R*255.), (int)(aColor.G*255.), (int)(aColor.B*255.) ) );
if( aDlg.exec() == QDialog::Accepted ) {
return;
if (aListIO.Extent() == 0) {
- VISU::View3D_i::SaveViewParams(aViewMgr, VISU::View3D_i::GenerateViewParamsName().latin1());
+ VISU::View3D_i::SaveViewParams(aViewMgr, (const char*)VISU::View3D_i::GenerateViewParamsName().toLatin1());
} else {
const Handle(SALOME_InteractiveObject)& anIO = aListIO.First();
VISU::View3D_i::SaveViewParams(aViewMgr, anIO->getName());
_PTR(AttributeName) aName (anAttr);
QString Name = VisuGUI_NameDlg::getName( GetDesktop( this ), aName->Value().c_str() );
if (!Name.isEmpty()) {
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
// rename specific objects
if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){
switch(aBase->GetType()){
case VISU::TCURVE: { // Curve object
if(VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>(aBase))
- aCurve->SetName(Name.latin1(), true);
+ aCurve->SetName((const char*)Name.toLatin1(), true);
break;
}
case VISU::TTABLE: { // Table object
if(VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(aBase))
- aTable->SetName(Name.latin1(), true);
+ aTable->SetName((const char*)Name.toLatin1(), true);
break;
}
case VISU::TCONTAINER: { // Container object
if(VISU::Container_i* aContainer = dynamic_cast<VISU::Container_i*>(aBase))
- aContainer->SetName(Name.latin1(), true);
+ aContainer->SetName((const char*)Name.toLatin1(), true);
break;
}
default: {
if (!Name.isEmpty()) {
// rename the study object
Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO;
- aName->SetValue(Name.latin1()); // rename the SObject
- anIO->setName(Name.latin1()); // rename the InteractiveObject
+ aName->SetValue((const char*)Name.toLatin1()); // rename the SObject
+ anIO->setName((const char*)Name.toLatin1()); // rename the InteractiveObject
ViewManagerList aViewManagerList;
+ ViewManagerList::Iterator anIt;
getApp()->viewManagers(SPlot2d_Viewer::Type(), aViewManagerList);
- SUIT_ViewManager* aViewManager = aViewManagerList.first();
- for(; aViewManager; aViewManager = aViewManagerList.next()){
- if(Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(aViewManager)){
+ anIt = aViewManagerList.begin();
+ for(; anIt != aViewManagerList.end(); anIt++ )
+ {
+ if(Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(*anIt)){
if(SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aManager->getViewModel()))
- aViewer->renameAll( anIO, Name.latin1() );
+ aViewer->renameAll( anIO, (const char*)Name.toLatin1() );
}
}
VisuGUI
::OnClippingPlanes()
{
- new VisuGUI_ClippingDlg (this, "", false);
+ new VisuGUI_ClippingDlg (this, false);
}
//----------------------------------------------------------------------------
int is2Pi = aResourceMgr->integerValue("VISU", "sweeping_is2PI", 0);
// Sweep
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
for (int j = 0; j < aCycles; j++) {
for (int i = 0; i <= aSteps; i++) {
for (; It.More(); It.Next()) {
_PTR(SObject) aSObject = aCStudy->FindObjectID(It.Value()->getEntry());
if ( !aAnimationDlg->addField(aSObject) ) {
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_CANT_CREATE_ANIMATION"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning(GetDesktop(this),
+ tr("WRN_VISU"),
+ tr("ERR_CANT_CREATE_ANIMATION") );
delete aAnimationDlg;
return;
}
if (GetActiveViewWindow<SVTK_ViewWindow>(this))
(new VisuGUI_SelectionDlg(this))->show();
else
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_ACTIVATE_VIEW3D"),
- tr("BUT_OK") );
+ SUIT_MessageBox::warning(GetDesktop(this),
+ tr("WRN_VISU"),
+ tr("ERR_ACTIVATE_VIEW3D") );
}
//----------------------------------------------------------------------------
Handle(SALOME_InteractiveObject) anIO = anIter.Value();
if (anIO->hasEntry()) {
QString anEntry(anIO->getEntry());
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, anEntry);
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)anEntry.toLatin1());
if(VISU::Prs3d_i* aPrsObject = VISU::GetPrs3dFromBase(anObjectInfo.myBase))
aDlg->addPresentation(aPrsObject);
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
// Create actions
- //createAction( VISU_IMPORT_FROM_FILE, "", QIconSet(),
+ //createAction( VISU_IMPORT_FROM_FILE, "", QIcon(),
// tr("MEN_IMPORT_FROM_FILE"), "", (CTRL + Key_I), aParent, false,
// this, SLOT(OnImportFromFile()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_IMPORT_MED"));
- createAction( VISU_IMPORT_FROM_FILE, tr("IMPORT_FROM_FILE"), QIconSet(aPixmap),
- tr("MEN_IMPORT_FROM_FILE"), "", (CTRL + Key_I), aParent, false,
+ createAction( VISU_IMPORT_FROM_FILE, tr("IMPORT_FROM_FILE"), QIcon(aPixmap),
+ tr("MEN_IMPORT_FROM_FILE"), "", (Qt::CTRL + Qt::Key_I), aParent, false,
this, SLOT(OnImportFromFile()));
- createAction( VISU_IMPORT_TABLE, "", QIconSet(),
+ createAction( VISU_IMPORT_TABLE, "", QIcon(),
tr("MEN_IMPORT_TABLE"), "", 0, aParent, false,
this, SLOT(OnImportTableFromFile()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SCALAR_MAP"));
- createAction( VISU_SCALAR_MAP, tr("MEN_SCALAR_MAP"), QIconSet(aPixmap),
+ createAction( VISU_SCALAR_MAP, tr("MEN_SCALAR_MAP"), QIcon(aPixmap),
tr("MEN_SCALAR_MAP"), "", 0, aParent, false,
this, SLOT(OnCreateScalarMap()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_DEFORMED_SHAPE"));
- createAction( VISU_DEFORMED_SHAPE, tr("MEN_DEFORMED_SHAPE"), QIconSet(aPixmap),
+ createAction( VISU_DEFORMED_SHAPE, tr("MEN_DEFORMED_SHAPE"), QIcon(aPixmap),
tr("MEN_DEFORMED_SHAPE"), "", 0, aParent, false,
this, SLOT(OnCreateDeformedShape()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SCALAR_MAP_ON_DEFORMED_SHAPE"));
- createAction( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), QIconSet(aPixmap),
+ createAction( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), QIcon(aPixmap),
tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), "", 0, aParent, false,
this, SLOT(OnCreateScalarMapOnDeformedShape()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_VECTORS"));
- createAction( VISU_VECTORS, tr("MEN_VECTORS"), QIconSet(aPixmap),
+ createAction( VISU_VECTORS, tr("MEN_VECTORS"), QIcon(aPixmap),
tr("MEN_VECTORS"), "", 0, aParent, false,
this, SLOT(OnCreateVectors()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_ISO_SURFACES"));
- createAction( VISU_ISO_SURFACES, tr("MEN_ISO_SURFACES"), QIconSet(aPixmap),
+ createAction( VISU_ISO_SURFACES, tr("MEN_ISO_SURFACES"), QIcon(aPixmap),
tr("MEN_ISO_SURFACES"), "", 0, aParent, false,
this, SLOT(OnCreateIsoSurfaces()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_CUT_PLANES"));
- createAction( VISU_CUT_PLANES, tr("MEN_CUT_PLANES"), QIconSet(aPixmap),
+ createAction( VISU_CUT_PLANES, tr("MEN_CUT_PLANES"), QIcon(aPixmap),
tr("MEN_CUT_PLANES"), "", 0, aParent, false,
this, SLOT(OnCreateCutPlanes()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_STREAM_LINES"));
- createAction( VISU_STREAM_LINES, tr("MEN_STREAM_LINES"), QIconSet(aPixmap),
+ createAction( VISU_STREAM_LINES, tr("MEN_STREAM_LINES"), QIcon(aPixmap),
tr("MEN_STREAM_LINES"), "", 0, aParent, false,
this, SLOT(OnCreateStreamLines()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_CUT_LINES"));
- createAction( VISU_CUT_LINES, tr("MEN_CUT_LINES"), QIconSet(aPixmap),
+ createAction( VISU_CUT_LINES, tr("MEN_CUT_LINES"), QIcon(aPixmap),
tr("MEN_CUT_LINES"), "", 0, aParent, false,
this, SLOT(OnCreateCutLines()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D"));
- createAction( VISU_PLOT_3D, tr("MEN_PLOT_3D"), QIconSet(aPixmap),
+ createAction( VISU_PLOT_3D, tr("MEN_PLOT_3D"), QIcon(aPixmap),
tr("MEN_PLOT_3D"), "", 0, aParent, false,
this, SLOT(OnCreatePlot3D()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT2D"));
- createAction( VISU_PLOT2D, tr("MEN_CREATE_PLOT2D"), QIconSet(aPixmap),
+ createAction( VISU_PLOT2D, tr("MEN_CREATE_PLOT2D"), QIcon(aPixmap),
tr("MEN_CREATE_PLOT2D"), "", 0, aParent, false,
this, SLOT(OnCreatePlot2dView()));
- createAction( VISU_DELETE_OBJS, tr("MEN_DELETE_OBJS"), QIconSet(),
+ createAction( VISU_DELETE_OBJS, tr("MEN_DELETE_OBJS"), QIcon(),
tr("MEN_DELETE_OBJS"), "", 0, aParent, false,
this, SLOT(OnDeleteObjects()));
- createAction( VISU_SHOW_TABLE, tr("MEN_SHOW_TABLE"), QIconSet(),
+ createAction( VISU_SHOW_TABLE, tr("MEN_SHOW_TABLE"), QIcon(),
tr("MEN_SHOW_TABLE"), "", 0, aParent, false,
this, SLOT(OnShowTable()));
- createAction( VISU_CREATE_CURVES, tr("MEN_CREATE_CURVES"), QIconSet(),
+ createAction( VISU_CREATE_CURVES, tr("MEN_CREATE_CURVES"), QIcon(),
tr("MEN_CREATE_CURVES"), "", 0, aParent, false,
this, SLOT(OnPlotData()));
- createAction( VISU_EXPORT_TABLE, tr("MEN_EXPORT_TABLE"), QIconSet(),
+ createAction( VISU_EXPORT_TABLE, tr("MEN_EXPORT_TABLE"), QIcon(),
tr("MEN_EXPORT_TABLE"), "", 0, aParent, false,
this, SLOT(OnExportTableToFile()));
- createAction( VISU_IMPORT_MED_STRUCTURE, tr("MEN_IMPORT_MED_STRUCTURE"), QIconSet(),
+ createAction( VISU_IMPORT_MED_STRUCTURE, tr("MEN_IMPORT_MED_STRUCTURE"), QIcon(),
tr("MEN_IMPORT_MED_STRUCTURE"), "", 0, aParent, false,
this, SLOT(OnImportMedField()));
- createAction( VISU_IMPORT_MED_TIMESTAMP, tr("MEN_IMPORT_MED_TIMESTAMP"), QIconSet(),
+ createAction( VISU_IMPORT_MED_TIMESTAMP, tr("MEN_IMPORT_MED_TIMESTAMP"), QIcon(),
tr("MEN_IMPORT_MED_TIMESTAMP"), "", 0, aParent, false,
this, SLOT(OnImportMedField()));
- createAction( VISU_IMPORT_MED_FIELD, tr("MEN_IMPORT_MED_FIELD"), QIconSet(),
+ createAction( VISU_IMPORT_MED_FIELD, tr("MEN_IMPORT_MED_FIELD"), QIcon(),
tr("MEN_IMPORT_MED_FIELD"), "", 0, aParent, false,
this, SLOT(OnImportMedField()));
- createAction( VISU_CREATE_PRS, tr("MEN_CREATE_PRS"), QIconSet(),
+ createAction( VISU_CREATE_PRS, tr("MEN_CREATE_PRS"), QIcon(),
tr("MEN_CREATE_PRS"), "", 0, aParent, false,
this, SLOT(OnCreateMesh()));
- createAction( VISU_CREATE_MANY_PRS, tr("MEN_CREATE_MANY_PRS"), QIconSet(),
+ createAction( VISU_CREATE_MANY_PRS, tr("MEN_CREATE_MANY_PRS"), QIcon(),
tr("MEN_CREATE_MANY_PRS"), "", 0, aParent, false,
this, SLOT(OnCreateManyMesh()));
- createAction( VISU_TRANSLATE_PRS, tr("MEN_TRANSLATE_PRS"), QIconSet(),
+ createAction( VISU_TRANSLATE_PRS, tr("MEN_TRANSLATE_PRS"), QIcon(),
tr("MEN_TRANSLATE_PRS"), "", 0, aParent, false,
this, SLOT(OnTranslatePrs()));
- createAction( VISU_MERGE_SCALAR_BARS, tr("MEN_MERGE_SCALAR_BARS"), QIconSet(),
+ createAction( VISU_MERGE_SCALAR_BARS, tr("MEN_MERGE_SCALAR_BARS"), QIcon(),
tr("MEN_MERGE_SCALAR_BARS"), "", 0, aParent, false,
this, SLOT(OnMergeScalarBars()));
- createAction( VISU_FREE_SCALAR_BARS, tr("MEN_FREE_SCALAR_BARS"), QIconSet(),
+ createAction( VISU_FREE_SCALAR_BARS, tr("MEN_FREE_SCALAR_BARS"), QIcon(),
tr("MEN_FREE_SCALAR_BARS"), "", 0, aParent, false,
this, SLOT(OnFreeScalarBars()));
- createAction( VISU_ERASE, tr("MEN_ERASE"), QIconSet(),
+ createAction( VISU_ERASE, tr("MEN_ERASE"), QIcon(),
tr("MEN_ERASE"), "", 0, aParent, false,
this, SLOT(OnErasePrs()));
- createAction( VISU_DISPLAY, tr("MEN_DISPLAY"), QIconSet(),
+ createAction( VISU_DISPLAY, tr("MEN_DISPLAY"), QIcon(),
tr("MEN_DISPLAY"), "", 0, aParent, false,
this, SLOT(OnDisplayPrs()));
- createAction( VISU_DISPLAY_ONLY, tr("MEN_DISPLAY_ONLY"), QIconSet(),
+ createAction( VISU_DISPLAY_ONLY, tr("MEN_DISPLAY_ONLY"), QIcon(),
tr("MEN_DISPLAY_ONLY"), "", 0, aParent, false,
this, SLOT(OnDisplayOnlyPrs()));
- createAction( VISU_COPY_PRS, tr("MEN_COPY_PRS"), QIconSet(),
+ createAction( VISU_COPY_PRS, tr("MEN_COPY_PRS"), QIcon(),
tr("MEN_COPY_PRS"), "", 0, aParent, false,
this, SLOT(OnCopyPresentation()));
- createAction( VISU_CURVE_PROPS, tr("MEN_CURVE_PROPS"), QIconSet(),
+ createAction( VISU_CURVE_PROPS, tr("MEN_CURVE_PROPS"), QIcon(),
tr("MEN_CURVE_PROPS"), "", 0, aParent, false,
this, SLOT(OnCurveProperties()));
- createAction( VISU_RENAME, tr("MEN_RENAME"), QIconSet(), tr("MEN_RENAME"), "", 0, aParent, false,
+ createAction( VISU_RENAME, tr("MEN_RENAME"), QIcon(), tr("MEN_RENAME"), "", 0, aParent, false,
this, SLOT(OnRename()));
- createAction( VISU_EDIT_CONTAINER, tr("MEN_EDIT_CONTAINER"), QIconSet(),
+ createAction( VISU_EDIT_CONTAINER, tr("MEN_EDIT_CONTAINER"), QIcon(),
tr("MEN_EDIT_CONTAINER"), "", 0, aParent, false,
this, SLOT(OnEditContainer()));
- createAction( VISU_CLEAR_CONTAINER, tr("MEN_CLEAR_CONTAINER"), QIconSet(),
+ createAction( VISU_CLEAR_CONTAINER, tr("MEN_CLEAR_CONTAINER"), QIcon(),
tr("MEN_CLEAR_CONTAINER"), "", 0, aParent, false,
this, SLOT(OnClearContainer()));
- createAction( VISU_SAVE_VIEW_PARAMS, tr("MEN_SAVE_VIEWPARAMS"), QIconSet(),
+ createAction( VISU_SAVE_VIEW_PARAMS, tr("MEN_SAVE_VIEWPARAMS"), QIcon(),
tr("MEN_SAVE_VIEWPARAMS"), "", 0, aParent, false,
this, SLOT(OnSaveViewParams()));
- createAction( VISU_SAVE_VIEW_PARAMS_1, tr("MEN_SAVE_VIEWPARAMS"), QIconSet(),
+ createAction( VISU_SAVE_VIEW_PARAMS_1, tr("MEN_SAVE_VIEWPARAMS"), QIcon(),
tr("MEN_SAVE_VIEWPARAMS"), "", 0, aParent, false,
this, SLOT(OnSaveViewParams()));
- createAction( VISU_RESTORE_VIEW_PARAMS, tr("MEN_RESTORE_VIEWPARAMS"), QIconSet(),
+ createAction( VISU_RESTORE_VIEW_PARAMS, tr("MEN_RESTORE_VIEWPARAMS"), QIcon(),
tr("MEN_RESTORE_VIEWPARAMS"), "", 0, aParent, false,
this, SLOT(OnRestoreViewParams()));
- //createAction( VISU_DELETE_VIEW_PARAMS, tr("MEN_DELETE_VIEWPARAMS"), QIconSet(),
+ //createAction( VISU_DELETE_VIEW_PARAMS, tr("MEN_DELETE_VIEWPARAMS"), QIcon(),
// tr("MEN_DELETE_VIEWPARAMS"), "", 0, aParent, false,
// this, SLOT(OnDeleteObjects()));
- createAction( VISU_ARRANGE_ACTORS, tr("MEN_ARRANGE_ACTORS"), QIconSet(),
+ createAction( VISU_ARRANGE_ACTORS, tr("MEN_ARRANGE_ACTORS"), QIcon(),
tr("MEN_ARRANGE_ACTORS"), "", 0, aParent, false,
this, SLOT(OnArrangeActors()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_POINTS"));
- createAction( VISU_POINTS, tr("MEN_POINTS"), QIconSet(aPixmap),
+ createAction( VISU_POINTS, tr("MEN_POINTS"), QIcon(aPixmap),
tr("MEN_POINTS"), "", 0, aParent, false,
this, SLOT(OnMakePoints()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_WIREFRAME"));
- createAction( VISU_WIREFRAME, tr("MEN_WIREFRAME"), QIconSet(aPixmap),
+ createAction( VISU_WIREFRAME, tr("MEN_WIREFRAME"), QIcon(aPixmap),
tr("MEN_WIREFRAME"), "", 0, aParent, false,
this, SLOT(OnMakeWireframe()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SURFACE"));
- createAction( VISU_SURFACE, tr("MEN_SURFACE"), QIconSet(aPixmap),
+ createAction( VISU_SURFACE, tr("MEN_SURFACE"), QIcon(aPixmap),
tr("MEN_SURFACE"), "", 0, aParent, false,
this, SLOT(OnMakeSurface()));
- createAction( VISU_INSIDEFRAME, tr("MEN_INSIDEFRAME"), QIconSet(),
+ createAction( VISU_INSIDEFRAME, tr("MEN_INSIDEFRAME"), QIcon(),
tr("MEN_INSIDEFRAME"), "", 0, aParent, false,
this, SLOT(OnMakeInsideframe()));
- createAction( VISU_SURFACEFRAME, tr("MEN_SURFACEFRAME"), QIconSet(),
+ createAction( VISU_SURFACEFRAME, tr("MEN_SURFACEFRAME"), QIcon(),
tr("MEN_SURFACEFRAME"), "", 0, aParent, false,
this, SLOT(OnMakeSurfaceframe()));
- createAction( VISU_SHRINK, tr("MEN_SHRINK"), QIconSet(),
+ createAction( VISU_SHRINK, tr("MEN_SHRINK"), QIcon(),
tr("MEN_SHRINK"), "", 0, aParent, false,
this, SLOT(OnMakeShrink()));
- createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIconSet(),
+ createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIcon(),
tr("MEN_UNSHRINK"), "", 0, aParent, false,
this, SLOT(OnMakeShrink()));
- createAction( VISU_SHADING, tr("MEN_SHADING"), QIconSet(),
+ createAction( VISU_SHADING, tr("MEN_SHADING"), QIcon(),
tr("MEN_SHADING"), "", 0, aParent, false,
this, SLOT(OnSetShadingOn()));
- createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIconSet(),
+ createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIcon(),
tr("MEN_NOSHADING"), "", 0, aParent, false,
this, SLOT(OnSetShadingOff()));
- createAction( VISU_CELL_COLOR, tr("MEN_CELL_COLOR"), QIconSet(),
+ createAction( VISU_CELL_COLOR, tr("MEN_CELL_COLOR"), QIcon(),
tr("MEN_CELL_COLOR"), "", 0, aParent, false,
this, SLOT(OnChangeColor()));
- createAction( VISU_COLOR, tr("MEN_COLOR"), QIconSet(),
+ createAction( VISU_COLOR, tr("MEN_COLOR"), QIcon(),
tr("MEN_COLOR"), "", 0, aParent, false,
this, SLOT(OnChangeColor()));
- createAction( VISU_EDGE_COLOR, tr("MEN_EDGE_COLOR"), QIconSet(),
+ createAction( VISU_EDGE_COLOR, tr("MEN_EDGE_COLOR"), QIcon(),
tr("MEN_EDGE_COLOR"), "", 0, aParent, false,
this, SLOT(OnChangeWireframeColor()));
- createAction( VISU_OPACITY, tr("MEN_OPACITY"), QIconSet(),
+ createAction( VISU_OPACITY, tr("MEN_OPACITY"), QIcon(),
tr("MEN_OPACITY"), "", 0, aParent, false,
this, SLOT(OnChangeOpacity()));
- createAction( VISU_LINE_WIDTH, tr("MEN_LINE_WIDTH"), QIconSet(),
+ createAction( VISU_LINE_WIDTH, tr("MEN_LINE_WIDTH"), QIcon(),
tr("MEN_LINE_WIDTH"), "", 0, aParent, false,
this, SLOT(OnChangeLines()));
- createAction( VISU_EDIT_SCALARMAP, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_SCALARMAP, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditScalarMap()));
- createAction( VISU_EDIT_DEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_DEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditDeformedShape()));
- createAction( VISU_EDIT_CUTPLANES, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_CUTPLANES, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditCutPlanes()));
- createAction( VISU_EDIT_CUTLINES, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_CUTLINES, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditCutLines()));
- createAction( VISU_EDIT_ISOSURFACE, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_ISOSURFACE, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditIsoSurfaces()));
- createAction( VISU_EDIT_VECTORS, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_VECTORS, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditVectors()));
- createAction( VISU_EDIT_STREAMLINES, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_STREAMLINES, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditStreamLines()));
- createAction( VISU_EDIT_PLOT3D, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_PLOT3D, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditPlot3D()));
- createAction( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIcon(),
tr("MEN_EDIT_PRS"), "", 0, aParent, false,
this, SLOT(OnEditScalarMapOnDeformedShape()));
- createAction( VISU_CREATE_TABLE, tr("MEN_CREATE_TABLE"), QIconSet(),
+ createAction( VISU_CREATE_TABLE, tr("MEN_CREATE_TABLE"), QIcon(),
tr("MEN_CREATE_TABLE"), "", 0, aParent, false,
this, SLOT(OnCreateTable()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SWEEP"));
- createAction( VISU_SWEEP, tr("MEN_SWEEP"), QIconSet(aPixmap),
+ createAction( VISU_SWEEP, tr("MEN_SWEEP"), QIcon(aPixmap),
tr("MEN_SWEEP"), "", 0, aParent, false,
this, SLOT(OnSweep()));
- createAction( VISU_CLIPPING, tr("MEN_CLIPPING"), QIconSet(),
+ createAction( VISU_CLIPPING, tr("MEN_CLIPPING"), QIcon(),
tr("MEN_CLIPPING"), "", 0, aParent, false,
this, SLOT(OnClippingPlanes()));
- createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIconSet(),
+ createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIcon(),
tr("MEN_SELECTION_INFO"), "", 0, aParent, false,
this, SLOT(OnSelectionInfo()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
- createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIconSet(aPixmap),
+ createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIcon(aPixmap),
tr("MEN_PARALLEL_ANIMATION"), "", 0, aParent, false,
this, SLOT(OnParallelTimeAnimation()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
- createAction( VISU_SUCCCESSIVEANIMATION, tr("MEN_SUCCCESSIVE_ANIMATION"), QIconSet(aPixmap),
+ createAction( VISU_SUCCCESSIVEANIMATION, tr("MEN_SUCCCESSIVE_ANIMATION"), QIcon(aPixmap),
tr("MEN_SUCCCESSIVE_ANIMATION"), "", 0, aParent, false,
this, SLOT(OnSucccessiveTimeAnimation()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_ERASE_ALL"));
- createAction( VISU_ERASE_ALL, tr("MEN_ERASE_ALL"), QIconSet(aPixmap),
+ createAction( VISU_ERASE_ALL, tr("MEN_ERASE_ALL"), QIcon(aPixmap),
tr("MEN_ERASE_ALL"), "", 0, aParent, false,
this, SLOT(OnEraseAll()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GLOBAL_SELECTION"));
- createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIconSet(aPixmap),
+ createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIcon(aPixmap),
tr("MEN_GLOBAL_SELECTION"), "", 0, aParent, false,
this);
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PARTIAL_SELECTION"));
- createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIconSet(aPixmap),
+ createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIcon(aPixmap),
tr("MEN_PARTIAL_SELECTION"), "", 0, aParent, false,
this);
- createAction( VISU_SHOW_ANIMATION, tr("MEN_SHOW_ANIMATION"), QIconSet(),
+ createAction( VISU_SHOW_ANIMATION, tr("MEN_SHOW_ANIMATION"), QIcon(),
tr("MEN_SHOW_ANIMATION"), "", 0, aParent, false,
this, SLOT(OnShowAnimation()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D"));
- createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIconSet(aPixmap),
+ createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIcon(aPixmap),
tr("MEN_PLOT3D_FROM_CUTPLANE"), "", 0, aParent, false,
this, SLOT(OnPlot3dFromCutPlane()));
- createAction( VISU_CACHE_PROPERTIES, tr("MEN_CACHE_PROPERTIES"), QIconSet(),
+ createAction( VISU_CACHE_PROPERTIES, tr("MEN_CACHE_PROPERTIES"), QIcon(),
tr("MEN_CACHE_PROPERTIES"), "", 0, aParent, false,
this, SLOT(OnCacheProperties()));
#ifdef ENABLE_MULTIPR
// MULTIPR
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_FULL"));
- createAction( VISU_MULTIPR_FULL_RES, tr("MEN_MULTIPR_VIEW_FULL_RES"), QIconSet(aPixmap),
+ createAction( VISU_MULTIPR_FULL_RES, tr("MEN_MULTIPR_VIEW_FULL_RES"), QIcon(aPixmap),
tr("MEN_MULTIPR_VIEW_FULL_RES"), "", 0, aParent, false,
this, SLOT(OnMultiprViewFullRes()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_MEDIUM"));
- createAction( VISU_MULTIPR_MED_RES, tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), QIconSet(aPixmap),
+ createAction( VISU_MULTIPR_MED_RES, tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), QIcon(aPixmap),
tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), "", 0, aParent, false,
this, SLOT(OnMultiprViewMediumRes()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_LOW"));
- createAction( VISU_MULTIPR_LOW_RES, tr("MEN_MULTIPR_VIEW_LOW_RES"), QIconSet(aPixmap),
+ createAction( VISU_MULTIPR_LOW_RES, tr("MEN_MULTIPR_VIEW_LOW_RES"), QIcon(aPixmap),
tr("MEN_MULTIPR_VIEW_LOW_RES"), "", 0, aParent, false,
this, SLOT(OnMultiprViewLowRes()));
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_HIDE"));
- createAction( VISU_MULTIPR_HIDE, tr("MEN_MULTIPR_VIEW_HIDE"), QIconSet(aPixmap),
+ createAction( VISU_MULTIPR_HIDE, tr("MEN_MULTIPR_VIEW_HIDE"), QIcon(aPixmap),
tr("MEN_MULTIPR_VIEW_HIDE"), "", 0, aParent, false,
this, SLOT(OnMultiprViewHide()));
#endif
// VISU root commands
QString aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TVISUGEN'";
- mgr->setRule( action( VISU_IMPORT_FROM_FILE ), aRule, true );
- mgr->setRule( action( VISU_IMPORT_TABLE ), aRule, true );
- mgr->setRule( action( VISU_PLOT2D ), aRule, true );
+ mgr->setRule( action( VISU_IMPORT_FROM_FILE ), aRule );
+ mgr->setRule( action( VISU_IMPORT_TABLE ), aRule );
+ mgr->setRule( action( VISU_PLOT2D ), aRule );
// timestamp commands
aRule = "client='ObjectBrowser' and selcount=1 and type in {'VISU::TTIMESTAMP' 'VISU::TFIELD'}";
- mgr->setRule( action( VISU_SCALAR_MAP ), aRule, true );
- mgr->setRule( action( VISU_ISO_SURFACES ), aRule, true );
- mgr->setRule( action( VISU_CUT_PLANES ), aRule, true );
- mgr->setRule( action( VISU_CUT_LINES ), aRule, true );
- mgr->setRule( action( VISU_PLOT_3D ), aRule, true );
+ mgr->setRule( action( VISU_SCALAR_MAP ), aRule );
+ mgr->setRule( action( VISU_ISO_SURFACES ), aRule );
+ mgr->setRule( action( VISU_CUT_PLANES ), aRule );
+ mgr->setRule( action( VISU_CUT_LINES ), aRule );
+ mgr->setRule( action( VISU_PLOT_3D ), aRule );
aRule += " and nbComponents>1";
- mgr->setRule( action( VISU_DEFORMED_SHAPE ), aRule, true );
- mgr->setRule( action( VISU_VECTORS ), aRule, true );
- mgr->setRule( action( VISU_STREAM_LINES ), aRule, true );
- mgr->setRule( action( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE ), aRule, true );
+ mgr->setRule( action( VISU_DEFORMED_SHAPE ), aRule );
+ mgr->setRule( action( VISU_VECTORS ), aRule );
+ mgr->setRule( action( VISU_STREAM_LINES ), aRule );
+ mgr->setRule( action( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE ), aRule );
// display/erase commands
QString andInvisible = " and (((not isVisible) and isActiveView) or (not isActiveView))";
" or (client='ObjectBrowser' and ((type='VISU::TTABLE' and nbChildren>0) or"
" ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'})))) ) or" + aComponent;
- mgr->setRule( action( VISU_ERASE ), anEraseRule, true );
- mgr->setRule( action( VISU_DISPLAY ), aDisplayRule, true );
- mgr->setRule( action( VISU_DISPLAY_ONLY ), aDOnlyRule, true );
+ mgr->setRule( action( VISU_ERASE ), anEraseRule );
+ mgr->setRule( action( VISU_DISPLAY ), aDisplayRule );
+ mgr->setRule( action( VISU_DISPLAY_ONLY ), aDOnlyRule );
aRule = "selcount>0 and $type in {'VISU::TMESH' " + aPrsAll + "}";
- mgr->setRule( action( VISU_TRANSLATE_PRS ), aRule, true );
+ mgr->setRule( action( VISU_TRANSLATE_PRS ), aRule );
aRule = "selcount>1 and $type in {'VISU::TMESH' " + aPrsAll + "}";
- mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule, true );
- mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule, true );
+ mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule );
+ mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule );
// view parameters
aRule = "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'";
- mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule, true );
- mgr->setRule( action( VISU_SAVE_VIEW_PARAMS ), "client='VTKViewer' and selcount=0 and activeView='VTKViewer'", true );
- mgr->setRule( action( VISU_RESTORE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'", true );
+ mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule );
+ mgr->setRule( action( VISU_SAVE_VIEW_PARAMS ), "client='VTKViewer' and selcount=0 and activeView='VTKViewer'" );
+ mgr->setRule( action( VISU_RESTORE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'" );
//mgr->setRule( action( VISU_DELETE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D'", true );
- mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'VVTK'} and selcount=0", true );
+ mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'VVTK'} and selcount=0" );
// 3D presentations commands
QString aPrsType = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
"'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' }";
aRule = "selcount=1";
- mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType, true );
+ mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType );
// "Representation" submenu
QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME'}";
QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}";
- mgr->setRule( action( VISU_POINTS ) , aRule + aPrsType + aNotPoints, true );
- mgr->setRule( action( VISU_WIREFRAME ) , aRule + aPrsType + aNotWirefr, true );
- mgr->setRule( action( VISU_SURFACE ) , aRule + aSurfType + aNotSurfac, true );
- mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + aInsideType + aNotInside, true );
- mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr, true );
+ mgr->setRule( action( VISU_POINTS ) , aRule + aPrsType + aNotPoints );
+ mgr->setRule( action( VISU_WIREFRAME ) , aRule + aPrsType + aNotWirefr );
+ mgr->setRule( action( VISU_SURFACE ) , aRule + aSurfType + aNotSurfac );
+ mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + aInsideType + aNotInside );
+ mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr );
- mgr->setRule( action( VISU_SHRINK ) , aRule + aShrinkType + " and isShrunk=0", true );
- mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1", true );
+ mgr->setRule( action( VISU_SHRINK ) , aRule + aShrinkType + " and isShrunk=0" );
+ mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1" );
- mgr->setRule( action( VISU_SHADING ) , aRule + " and isScalarMapAct=1 and isShading=0", true );
- mgr->setRule( action( VISU_NOSHADING ), aRule + " and isScalarMapAct=1 and isShading=1", true );
+ mgr->setRule( action( VISU_SHADING ) , aRule + " and isScalarMapAct=1 and isShading=0" );
+ mgr->setRule( action( VISU_NOSHADING ), aRule + " and isScalarMapAct=1 and isShading=1" );
// "Properties" submenu
- mgr->setRule( action( VISU_CELL_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true );
- mgr->setRule( action( VISU_EDGE_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true );
+ mgr->setRule( action( VISU_CELL_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'" );
+ mgr->setRule( action( VISU_EDGE_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'" );
mgr->setRule( action( VISU_COLOR ), aRule + " and ((type='VISU::TMESH'"
" and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}) "
- "or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))", true );
- mgr->setRule( action( VISU_OPACITY ), aRule + aShrinkType + " and hasActor=1", true );
- mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1", true );
+ "or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))" );
+ mgr->setRule( action( VISU_OPACITY ), aRule + aShrinkType + " and hasActor=1" );
+ mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1" );
// rename command
QString aCurveAll = "'VISU::TTABLE' 'VISU::TCURVE' 'VISU::TCONTAINER'";
aRule = "selcount=1 and ($type in {'VISU::TVIEW3D' 'VISU::TMESH' " + aCurveAll + " " + aPrsAll + "})";
- mgr->setRule( action( VISU_RENAME ), aRule, true );
+ mgr->setRule( action( VISU_RENAME ), aRule );
// copy presentation command
aRule = "selcount=1 and ($type in {" + aPrsAll + "})";
- mgr->setRule( action( VISU_COPY_PRS ), aRule, true );
+ mgr->setRule( action( VISU_COPY_PRS ), aRule );
// curve commands
aRule = "selcount=1 and type='VISU::TCURVE'";
- mgr->setRule( action( VISU_CURVE_PROPS ), aRule, true );
+ mgr->setRule( action( VISU_CURVE_PROPS ), aRule );
// curve container commands
aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TCONTAINER'";
- mgr->setRule( action( VISU_EDIT_CONTAINER ), aRule, true );
- mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule, true );
+ mgr->setRule( action( VISU_EDIT_CONTAINER ), aRule );
+ mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule );
mgr->setRule( action( VISU_EDIT_SCALARMAP ),
- "selcount=1 and type='VISU::TSCALARMAP'", true );
+ "selcount=1 and type='VISU::TSCALARMAP'" );
mgr->setRule( action( VISU_EDIT_DEFORMEDSHAPE ),
- "selcount=1 and type='VISU::TDEFORMEDSHAPE'", true );
+ "selcount=1 and type='VISU::TDEFORMEDSHAPE'" );
mgr->setRule( action( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE ),
- "selcount=1 and type='VISU::TSCALARMAPONDEFORMEDSHAPE'", true );
+ "selcount=1 and type='VISU::TSCALARMAPONDEFORMEDSHAPE'" );
mgr->setRule( action( VISU_EDIT_CUTPLANES ),
- "selcount=1 and type='VISU::TCUTPLANES'", true );
+ "selcount=1 and type='VISU::TCUTPLANES'" );
mgr->setRule( action( VISU_EDIT_CUTLINES ),
- "selcount=1 and type='VISU::TCUTLINES'", true );
+ "selcount=1 and type='VISU::TCUTLINES'" );
mgr->setRule( action( VISU_EDIT_ISOSURFACE ),
- "selcount=1 and type='VISU::TISOSURFACE'", true );
+ "selcount=1 and type='VISU::TISOSURFACE'" );
mgr->setRule( action( VISU_EDIT_VECTORS ),
- "selcount=1 and type='VISU::TVECTORS'", true );
+ "selcount=1 and type='VISU::TVECTORS'" );
mgr->setRule( action( VISU_EDIT_STREAMLINES ),
- "selcount=1 and type='VISU::TSTREAMLINES'", true );
+ "selcount=1 and type='VISU::TSTREAMLINES'" );
mgr->setRule( action( VISU_EDIT_PLOT3D ),
- "selcount=1 and type='VISU::TPLOT3D'", true );
+ "selcount=1 and type='VISU::TPLOT3D'" );
aRule = "selcount=1 and type='VISU::TCUTLINES' and nbNamedChildren=0";
- mgr->setRule( action( VISU_CREATE_TABLE ), aRule, true );
+ mgr->setRule( action( VISU_CREATE_TABLE ), aRule );
aRule = "selcount=1 and ($type in {" + aPrsAll + "})";
- mgr->setRule( action( VISU_SWEEP ), aRule, true );
+ mgr->setRule( action( VISU_SWEEP ), aRule );
// "Selection info" popup item
aRule = "client='VTKViewer' and selcount=1" + aInsideType;
- mgr->setRule( action( VISU_SELECTION_INFO ), aRule, true );
+ mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
aRule = "client='ObjectBrowser' and selcount>0";
aRule += " and $type in {'VISU::TFIELD'}";
aRule += " and nbTimeStamps>1";
aRule += " and activeView in {'VTKViewer' 'VVTK'}";
- mgr->setRule( action( VISU_PARALLELANIMATION ), aRule, true );
+ mgr->setRule( action( VISU_PARALLELANIMATION ), aRule );
aRule = "client='ObjectBrowser' and selcount>0";
aRule += " and $type in {'VISU::TFIELD'}";
aRule += " and nbTimeStamps>0";
aRule += " and activeView in {'VTKViewer' 'VVTK'}";
- mgr->setRule( action( VISU_SUCCCESSIVEANIMATION ), aRule, true );
+ mgr->setRule( action( VISU_SUCCCESSIVEANIMATION ), aRule );
aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
- mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1", true );
- mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1", true );
+ mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1" );
+ mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1" );
mgr->setRule( action( VISU_EDIT_PLOT3D ),
- "selcount=1 and type='VISU::TPLOT3D'", true );
+ "selcount=1 and type='VISU::TPLOT3D'" );
//aRule = "client='ObjectBrowser' and type='MEDFIELD'";
//mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
#ifdef ENABLE_MULTIPR
// MULTIPR
aRule = "client='ObjectBrowser' and $type in {'VISU::TPART'}";
- mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aRule + " and selcount>=1", true );
- mgr->setRule( action( VISU_MULTIPR_MED_RES ), aRule + " and selcount>=1", true );
- mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aRule + " and selcount>=1", true );
- mgr->setRule( action( VISU_MULTIPR_HIDE), aRule + " and selcount>=1", true );
+ mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aRule + " and selcount>=1" );
+ mgr->setRule( action( VISU_MULTIPR_MED_RES ), aRule + " and selcount>=1" );
+ mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aRule + " and selcount>=1" );
+ mgr->setRule( action( VISU_MULTIPR_HIDE), aRule + " and selcount>=1" );
#endif
}
//***************************************************************************
-void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle )
+void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle )
{
SalomeApp_Module::contextMenuPopup(theClient, theMenu, theTitle);
- OB_Browser* ob = getApp()->objectBrowser();
- bool isOBClient = (ob && theClient == ob->popupClientType());
+ //TODO: object Browser
+ //OB_Browser* ob = getApp()->objectBrowser();
+ //bool isOBClient = (ob && theClient == ob->popupClientType());
+ bool isOBClient = false;
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
SALOME_ListIO aListIO;
}
}
if (nbPrs > 1) {
- theMenu->insertSeparator();
- action( VISU_MERGE_SCALAR_BARS )->addTo(theMenu);
- action( VISU_FREE_SCALAR_BARS )->addTo(theMenu);
+ theMenu->addSeparator();
+ theMenu->addAction( action( VISU_MERGE_SCALAR_BARS ) );
+ theMenu->addAction( action( VISU_FREE_SCALAR_BARS ) );
}
// Check if some curves selected (for bug PAL10611)
}
if (isOneCutPlane)
- action( VISU_PLOT3D_FROM_CUTPLANE )->addTo(theMenu);
+ theMenu->addAction( action( VISU_PLOT3D_FROM_CUTPLANE ) );
VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this);
if(aSelectionInfo.empty())
if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){
if(aBase->GetType() == VISU::TCOLOREDPRS3DCACHE)
- action( VISU_CACHE_PROPERTIES )->addTo(theMenu);
+ theMenu->addAction( action( VISU_CACHE_PROPERTIES ) );
}
- theMenu->insertSeparator();
+ theMenu->addSeparator();
// Check if some (nb > 0) removable objects selected
if (isOBClient && IsRemovableSelected(this)) {
- action( VISU_DELETE_OBJS )->addTo(theMenu);
+ theMenu->addAction( action( VISU_DELETE_OBJS ) );
}
if (isCurves) {
- action( myDisplay )->removeFrom(theMenu);
- action( myErase )->removeFrom(theMenu);
- action( myDisplayOnly )->removeFrom(theMenu);
- action( myEraseAll )->removeFrom(theMenu);
+ theMenu->removeAction( action( myDisplay ) );
+ theMenu->removeAction( action( myErase ) );
+ theMenu->removeAction( action( myDisplayOnly ) );
+ theMenu->removeAction( action( myEraseAll ) );
}
// Check single selection
VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
if (aType == VISU::TANIMATION) {
- action( VISU_SHOW_ANIMATION )->addTo(theMenu);
+ theMenu->addAction( action( VISU_SHOW_ANIMATION ) );
} else if (isOBClient) {
if (IsSObjectTable(aSObject)) {
- action( VISU_SHOW_TABLE )->addTo(theMenu);
- action( VISU_CREATE_CURVES )->addTo(theMenu);
- action( VISU_EXPORT_TABLE )->addTo(theMenu);
- theMenu->insertSeparator();
+ theMenu->addAction( action( VISU_SHOW_TABLE ) );
+ theMenu->addAction( action( VISU_CREATE_CURVES ) );
+ theMenu->addAction( action( VISU_EXPORT_TABLE ) );
+ theMenu->addSeparator();
} else {
if (!CORBA::is_nil(anObject)) {
SALOME_MED::MED_var aMED = SALOME_MED::MED::_narrow(anObject);
if (!CORBA::is_nil(aMED.in())) {
- action( VISU_IMPORT_MED_STRUCTURE )->addTo(theMenu);
+ theMenu->addAction( action( VISU_IMPORT_MED_STRUCTURE ) );
}
SALOME_MED::FIELD_var aField = SALOME_MED::FIELD::_narrow(anObject); // "Import Structure"
if (!CORBA::is_nil(aField)) {
- action( VISU_IMPORT_MED_TIMESTAMP )->addTo(theMenu); // "Import TimeStamp"
+ theMenu->addAction( action( VISU_IMPORT_MED_TIMESTAMP ) ); // "Import TimeStamp"
}
} else {
_PTR(SObject) aSFather = aSObject->GetFather();
_PTR(AttributeName) aName (anAttr);
std::string aValue = aName->Value();
if (strcmp(aValue.c_str(), "MEDFIELD") == 0) {
- action( VISU_IMPORT_MED_FIELD )->addTo(theMenu); // "Import Field"
+ theMenu->addAction( action( VISU_IMPORT_MED_FIELD ) ); // "Import Field"
}
}
}
::windows( QMap<int, int>& theMap ) const
{
theMap.clear();
- theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft );
- theMap.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom );
+ theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+ theMap.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
}
setToolShown( true );
// Reset actions accelerator keys
- action(VISU_IMPORT_FROM_FILE)->setAccel(QKeySequence(CTRL + Key_I));
+ QList<QKeySequence> shortcuts;
+ shortcuts.append( QKeySequence(Qt::CTRL + Qt::Key_I) );
+ action(VISU_IMPORT_FROM_FILE)->setShortcuts(shortcuts);
return true;
}
setToolShown( false );
// Unset actions accelerator keys
- action(VISU_IMPORT_FROM_FILE)->setAccel(QKeySequence());
+ action(VISU_IMPORT_FROM_FILE)->setShortcuts(QKeySequence::UnknownKey);
SalomeApp_Module::deactivateModule( theStudy );
return true;
LightApp_Selection*
VisuGUI
-::createSelection() const
+::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
{
- return new VisuGUI_Selection( (SalomeApp_Module*)this );
+ return new VisuGUI_Selection( (SalomeApp_Module*)this, client, mgr );
}
//******************************************************************
{
// TAB: "MED import"
int importTab = addPreference( tr( "MED import" ) );
+ //printf( "Tab index %d\n", importTab );
+
+ //int importFrame = addPreference( tr( "MED FRAME" ), importTab );
+ //printf( "Frame index %d\n", importFrame );
+
// group: "MED files import"
int importGr = addPreference( tr( "MED files import" ), importTab );
+ //printf( "Group index %d\n", importGr );
setPreferenceProperty( importGr, "columns", 1 );
addPreference( tr( "Use build progress" ), importGr, LightApp_Preferences::Bool, "VISU", "use_build_progress" );
addPreference( tr( "Full MED loading" ), importGr, LightApp_Preferences::Bool, "VISU", "full_med_loading" );
modes.append( tr( "VISU_COMPONENT" ) + tr("1") );
modes.append( tr( "VISU_COMPONENT" ) + tr("2") );
modes.append( tr( "VISU_COMPONENT" ) + tr("3") );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
indices.append( 2 );
fam.append( tr( "VISU_FONT_ARIAL" ) );
fam.append( tr( "VISU_FONT_COURIER" ) );
fam.append( tr( "VISU_FONT_TIMES" ) );
- int wflag = ( QtxListResourceEdit::FontItem::All &
- ( ~( QtxListResourceEdit::FontItem::Size |
- QtxListResourceEdit::FontItem::UserSize ) ) );
+ int wflag = ( QtxFontEdit::All & ( ~( QtxFontEdit::Size | QtxFontEdit::UserSize ) ) );
setPreferenceProperty( tfont, "families", fam );
setPreferenceProperty( tfont, "system", false );
mesh_modes.append( "Insideframe" );
mesh_modes.append( "Surfaceframe" );
mesh_modes.append( "Surface" );
- QValueList<QVariant> mesh_indices;
+ QList<QVariant> mesh_indices;
mesh_indices.append( 0 );
mesh_indices.append( 1 );
mesh_indices.append( 3 );
mesh_indices.append( 2 );
QStringList modes1 = mesh_modes;
- modes1.remove( "Insideframe" );
- QValueList<QVariant> indices1 = mesh_indices;
- indices1.remove( 3 );
+ modes1.removeAll( "Insideframe" );
+ QList<QVariant> indices1 = mesh_indices;
+ indices1.removeAll( 3 );
QStringList modes2 = modes1;
- modes2.remove( "Surfaceframe" );
- QValueList<QVariant> indices2 = indices1;
- indices2.remove( 4 );
+ modes2.removeAll( "Surfaceframe" );
+ QList<QVariant> indices2 = indices1;
+ indices2.removeAll( 4 );
QStringList modes3 = modes2;
- modes3.remove( "Surface" );
- QValueList<QVariant> indices3 = indices2;
- indices3.remove( 2 );
+ modes3.removeAll( "Surface" );
+ QList<QVariant> indices3 = indices2;
+ indices3.removeAll( 2 );
int mesh_represent = addPreference( tr( "VISU_MESH" ), representGr, LightApp_Preferences::Selector, "VISU", "mesh_represent" );
}
if (aWarning.size() != 0){
aWarning += "The default values are applied instead.";
- SUIT_MessageBox::warn1(GetDesktop(this),
- tr("ERR_SCALARBAR_PARAMS"),
- tr(aWarning.c_str()),
- tr("BUT_OK") );
+ SUIT_MessageBox::warning(GetDesktop(this),
+ tr("ERR_SCALARBAR_PARAMS"),
+ tr(aWarning.c_str()) );
}
}
if (!isExist || aType.toInt() != TTIMESTAMP )
return;
- QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1();
- QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1();
- QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1();
- QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1();
+ QString aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName",&isExist).toLatin1();
+ QString anEntity = (const char*)Storable::FindValue(aMap,"myEntityId",&isExist).toLatin1();
+ QString aFieldName = (const char*)Storable::FindValue(aMap,"myFieldName",&isExist).toLatin1();
+ QString aTimeStampId = (const char*)Storable::FindValue(aMap,"myTimeStampId",&isExist).toLatin1();
int aPos;
SUIT_ViewWindow* aViewWindow = 0;
VISU::Plot3D_i* aPrs3d =
CreatePrs3dFromFactory<VISU::Plot3D_i>(this,
aTimeStampSObj,
- aMeshName.latin1(),
+ (const char*)aMeshName.toLatin1(),
(Entity)anEntity.toInt(),
- aFieldName.latin1(),
+ (const char*)aFieldName.toLatin1(),
aTimeStampId.toInt(),
ColoredPrs3d_i::EPublishUnderTimeStamp);
if (aPrs3d) {
#ifndef VisuGUI_HeaderFile
#define VisuGUI_HeaderFile
+#include <map>
+#include <set>
+
#include "SalomeApp_Module.h"
#include "SALOME_ListIO.hxx"
-#include <map>
-#include <set>
+
class SUIT_ViewManager;
class SVTK_ViewWindow;
virtual void studyActivated();
- virtual void contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle );
+ virtual void contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle );
virtual void createPreferences();
virtual void preferencesChanged( const QString&, const QString& );
void OnMultiprChangeRes(char resolution);
protected:
- virtual LightApp_Selection* createSelection() const;
+ virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const;
void OnTimeAnimation(int theMode);
#include "LightApp_Application.h"
+#include <QtxColorButton.h>
+
#include <vtkTimerLog.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlcdnumber.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLCDNumber>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QTimer>
+#include <QKeyEvent>
/*!
* Constructor
*/
VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
- QDialog( theParent,
- "VisuGUI_BuildProgressBar",
- false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+ QDialog( theParent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
myIsRaiseColor( false )
{
- setCaption( tr( "DLG_BUILD_PROGRESS_TITLE" ) );
+ setAttribute( Qt::WA_DeleteOnClose );
+ setWindowTitle( tr( "DLG_BUILD_PROGRESS_TITLE" ) );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
QVBoxLayout* aTopLayout = new QVBoxLayout( this );
aTopLayout->setSpacing( 6 );
aTopLayout->setMargin( 6 );
- aTopLayout->setAutoAdd( true );
+ //aTopLayout->setAutoAdd( true );
// Settings
mySettingsBox = new QGroupBox( tr( "IMPORT_SETTINGS" ), this );
- mySettingsBox->setColumnLayout( 0, Qt::Vertical );
- mySettingsBox->layout()->setSpacing( 0 );
- mySettingsBox->layout()->setMargin( 0 );
+ aTopLayout->addWidget( mySettingsBox );
+ //mySettingsBox->setColumnLayout( 0, Qt::Vertical );
+ //mySettingsBox->layout()->setSpacing( 0 );
+ //mySettingsBox->layout()->setMargin( 0 );
- QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox->layout() );
+ QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox );
aSettingsLayout->setSpacing( 6 );
aSettingsLayout->setMargin( 11 );
myCloseCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "close_at_finish", true ) );
aSettingsLayout->addWidget( aFileNameLabel, 0, 0 );
- aSettingsLayout->addMultiCellWidget( myFileNameLineEdit, 1, 1, 0, 1 );
+ aSettingsLayout->addWidget( myFileNameLineEdit, 1, 0, 1, 2 );
//aSettingsLayout->addWidget( aFileNameButton, 1, 2 );
aSettingsLayout->addWidget( myBuildAllCheckBox, 2, 0 );
aSettingsLayout->addWidget( myBuildAtOnceCheckBox, 3, 0 );
// Progress
myProgressBox = new QGroupBox( tr( "IMPORT_PROGRESS" ), this );
- myProgressBox->setColumnLayout( 0, Qt::Vertical );
- myProgressBox->layout()->setSpacing( 0 );
- myProgressBox->layout()->setMargin( 0 );
+ aTopLayout->addWidget( myProgressBox );
+ //myProgressBox->setColumnLayout( 0, Qt::Vertical );
+ //myProgressBox->layout()->setSpacing( 0 );
+ //myProgressBox->layout()->setMargin( 0 );
- QGridLayout* aProgressLayout = new QGridLayout( myProgressBox->layout() );
+ QGridLayout* aProgressLayout = new QGridLayout( myProgressBox );
aProgressLayout->setSpacing( 6 );
aProgressLayout->setMargin( 11 );
QLabel* aBuildEntitiesLabel = new QLabel( tr( "BUILD_ENTITIES" ), myProgressBox );
- myBuildEntitiesButton = new QPushButton( myProgressBox );
+ myBuildEntitiesButton = new QtxColorButton( myProgressBox );
myBuildEntitiesButton->setEnabled( false );
myBuildEntitiesButton->setFixedSize( 30, 30 );
- myBuildEntitiesButton->setPaletteBackgroundColor( Qt::red );
+ //QPalette aPal = myBuildEntitiesButton->palette();
+ //aPal.setColor( myBuildEntitiesButton->backgroundRole(), Qt::red );
+ //myBuildEntitiesButton->setPalette( aPal );
+ myBuildEntitiesButton->setColor( Qt::red );
myBuildFieldsCheckBox = new QCheckBox( tr( "BUILD_FIELDS" ), myProgressBox );
myBuildFieldsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_fields", true ) );
- myBuildFieldsButton = new QPushButton( myProgressBox );
+ myBuildFieldsButton = new QtxColorButton( myProgressBox );
myBuildFieldsButton->setEnabled( false );
myBuildFieldsButton->setFixedSize( 30, 30 );
- myBuildFieldsButton->setPaletteBackgroundColor( Qt::red );
+ //aPal = myBuildFieldsButton->palette();
+ //aPal.setColor( myBuildFieldsButton->backgroundRole(), Qt::red );
+ //myBuildFieldsButton->setPalette( aPal );
+ myBuildFieldsButton->setColor( Qt::red );
+
connect( myBuildFieldsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
myBuildMinMaxCheckBox = new QCheckBox( tr( "BUILD_MINMAX" ), myProgressBox );
myBuildMinMaxCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_min_max", true ) );
- myBuildMinMaxButton = new QPushButton( myProgressBox );
+ myBuildMinMaxButton = new QtxColorButton( myProgressBox );
myBuildMinMaxButton->setEnabled( false );
myBuildMinMaxButton->setFixedSize( 30, 30 );
- myBuildMinMaxButton->setPaletteBackgroundColor( Qt::red );
+ //aPal = myBuildMinMaxButton->palette();
+ //aPal.setColor( myBuildMinMaxButton->backgroundRole(), Qt::red );
+ //myBuildMinMaxButton->setPalette( aPal );
+ myBuildMinMaxButton->setColor( Qt::red );
+
connect( myBuildMinMaxCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
myBuildGroupsCheckBox = new QCheckBox( tr( "BUILD_GROUPS" ), myProgressBox );
myBuildGroupsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_groups", true ) );
- myBuildGroupsButton = new QPushButton( myProgressBox );
+ myBuildGroupsButton = new QtxColorButton( myProgressBox );
myBuildGroupsButton->setEnabled( false );
myBuildGroupsButton->setFixedSize( 30, 30 );
- myBuildGroupsButton->setPaletteBackgroundColor( Qt::red );
+ //aPal = myBuildGroupsButton->palette();
+ //aPal.setColor( myBuildGroupsButton->backgroundRole(), Qt::red );
+ //myBuildGroupsButton->setPalette( aPal );
+ myBuildGroupsButton->setColor( Qt::red );
+
connect( myBuildGroupsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
aProgressLayout->addWidget( aBuildEntitiesLabel, 0, 0 );
// Time
myTimeBox = new QGroupBox( tr( "IMPORT_TIME" ), this );
- myTimeBox->setColumnLayout( 0, Qt::Vertical );
- myTimeBox->layout()->setSpacing( 0 );
- myTimeBox->layout()->setMargin( 0 );
+ aTopLayout->addWidget( myTimeBox );
+ //myTimeBox->setColumnLayout( 0, Qt::Vertical );
+ //myTimeBox->layout()->setSpacing( 0 );
+ //myTimeBox->layout()->setMargin( 0 );
- QGridLayout* aTimeLayout = new QGridLayout( myTimeBox->layout() );
+ QGridLayout* aTimeLayout = new QGridLayout( myTimeBox );
aTimeLayout->setSpacing( 6 );
aTimeLayout->setMargin( 11 );
myTimeLCDNumber = new QLCDNumber( myTimeBox );
myTimeLCDNumber->setSegmentStyle( QLCDNumber::Filled );
- myTimeLCDNumber->setPaletteBackgroundColor( Qt::black );
- myTimeLCDNumber->setPaletteForegroundColor( Qt::white );
+ QPalette aPal = myTimeLCDNumber->palette();
+ aPal.setColor( myTimeLCDNumber->backgroundRole(), Qt::black );
+ aPal.setColor( myTimeLCDNumber->foregroundRole(), Qt::white );
+ myTimeLCDNumber->setPalette( aPal );
myTimeLCDNumber->setNumDigits( 8 );
myTimeLCDNumber->display( myTime.toString( "hh:mm:ss.zzz" ) );
// Start / Close
QGroupBox* CommonGroup = new QGroupBox( this );
- CommonGroup->setColumnLayout(0, Qt::Vertical );
- CommonGroup->layout()->setSpacing( 0 );
- CommonGroup->layout()->setMargin( 0 );
- QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup->layout() );
+ aTopLayout->addWidget( CommonGroup );
+ //CommonGroup->setColumnLayout(0, Qt::Vertical );
+ //CommonGroup->layout()->setSpacing( 0 );
+ //CommonGroup->layout()->setMargin( 0 );
+ QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup );
CommonGroupLayout->setAlignment( Qt::AlignTop );
CommonGroupLayout->setSpacing( 6 );
CommonGroupLayout->setMargin( 11 );
if( myFileName.isNull() )
return;
- myResult = myGenerator->CreateResult( myFileName );
+ myResult = myGenerator->CreateResult( (const char*)myFileName.toLatin1() );
if (CORBA::is_nil(myResult.in())) {
- SUIT_MessageBox::warn1(this,
- tr("WRN_VISU"),
- tr("ERR_ERROR_IN_THE_FILE"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning(this,
+ tr("WRN_VISU"),
+ tr("ERR_ERROR_IN_THE_FILE"),
+ tr("BUT_OK"));
onClose();
}else{
myResult->SetBuildFields( myBuildFieldsCheckBox->isChecked(), myBuildMinMaxCheckBox->isChecked() );
bool aBuildAtOnce = myBuildAtOnceCheckBox->isChecked();
if( aBuildAtOnce )
{
- QApplication::setOverrideCursor( Qt::waitCursor );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
myCurrentTime = vtkTimerLog::GetCurrentTime();
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, ("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if( myCloseCheckBox->isChecked() )
done( 0 );
else
- SUIT_MessageBox::warn1( this, tr( "INF_VISU" ), tr( "IMPORT_DONE" ), tr( "BUT_OK" ) );
+ SUIT_MessageBox::warning( this,
+ tr( "INF_VISU" ),
+ tr( "IMPORT_DONE" ),
+ tr( "BUT_OK" ) );
}
}
catch( ... ) {
}
}
-void VisuGUI_BuildProgressDlg::updateButton( QPushButton* theButton, bool theIsDone )
+void VisuGUI_BuildProgressDlg::updateButton( QtxColorButton* theButton, bool theIsDone )
{
- QColor aCurrentColor = theButton->paletteBackgroundColor();
+ //QPalette aPal = theButton->palette();
+ QColor aCurrentColor = theButton->color();
if( aCurrentColor == Qt::gray || aCurrentColor == Qt::green )
return;
int gNew = g + ( myIsRaiseColor ? 1 : -1 ) * 51;
- aNewColor.setRgb( 255, gNew, 0 );
+ aNewColor.setRgb( 255, gNew, 0 );
}
-
- theButton->setPaletteBackgroundColor( aNewColor );
+ //aPal.setColor( theButton->backgroundRole(), aNewColor );
+ theButton->setColor( aNewColor );
}
void VisuGUI_BuildProgressDlg::done( int r )
}
else if( aCheckBox == myBuildFieldsCheckBox )
{
- myBuildFieldsButton->setPaletteBackgroundColor( aColor );
+ QPalette aPal = myBuildFieldsButton->palette();
+ aPal.setColor( myBuildFieldsButton->backgroundRole(), aColor );
+ myBuildFieldsButton->setPalette( aPal );
if( !anIsChecked && myBuildMinMaxCheckBox->isChecked() )
myBuildMinMaxCheckBox->animateClick();
}
else if( aCheckBox == myBuildMinMaxCheckBox )
{
- myBuildMinMaxButton->setPaletteBackgroundColor( aColor );
+ QPalette aPal = myBuildMinMaxButton->palette();
+ aPal.setColor( myBuildMinMaxButton->backgroundRole(), aColor );
+ myBuildMinMaxButton->setPalette( aPal );
if( anIsChecked && !myBuildFieldsCheckBox->isChecked() )
myBuildFieldsCheckBox->animateClick();
}
else if( aCheckBox == myBuildGroupsCheckBox )
- myBuildGroupsButton->setPaletteBackgroundColor( aColor );
+ {
+ QPalette aPal = myBuildGroupsButton->palette();
+ aPal.setColor( myBuildGroupsButton->backgroundRole(), aColor );
+ myBuildGroupsButton->setPalette( aPal );
+ }
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VISU_Gen_i.hh"
-#include <qdatetime.h>
-#include <qdialog.h>
+#include <QDateTime>
+#include <QDialog>
class QCheckBox;
class QGroupBox;
class QPushButton;
class QTimer;
+class QtxColorButton;
+
//! Build Progress Dialog.
class VisuGUI_BuildProgressDlg : public QDialog
{
void onBuildCheckBoxClicked();
private:
- void updateButton( QPushButton*, bool );
+ void updateButton( QtxColorButton*, bool );
private:
VISU::Result_var myResult;
QGroupBox* myProgressBox;
- QPushButton* myBuildEntitiesButton;
+ QtxColorButton* myBuildEntitiesButton;
QCheckBox* myBuildFieldsCheckBox;
- QPushButton* myBuildFieldsButton;
+ QtxColorButton* myBuildFieldsButton;
QCheckBox* myBuildMinMaxCheckBox;
- QPushButton* myBuildMinMaxButton;
+ QtxColorButton* myBuildMinMaxButton;
QCheckBox* myBuildGroupsCheckBox;
- QPushButton* myBuildGroupsButton;
+ QtxColorButton* myBuildGroupsButton;
QGroupBox* myTimeBox;
QLCDNumber* myTimeLCDNumber;
#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
#include "SUIT_Session.h"
+#include "SUIT_ResourceMgr.h"
#include "SalomeApp_Module.h"
#include "LightApp_Application.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
VisuGUI_CacheDlg::VisuGUI_CacheDlg( VISU::ColoredPrs3dCache_var theCache,
SalomeApp_Module* theModule )
- : QDialog( VISU::GetDesktop( theModule ), "VisuGUI_CacheDlg", true,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
+ : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myCache( theCache )
{
- setCaption( tr( "CACHE_TITLE" ) );
+ setModal( true );
+ setWindowTitle( tr( "CACHE_TITLE" ) );
+ setAttribute( Qt::WA_DeleteOnClose );
QVBoxLayout* aTopLayout = new QVBoxLayout( this );
aTopLayout->setSpacing( 6 );
aTopLayout->setMargin( 6 );
- aTopLayout->setAutoAdd( true );
+ //aTopLayout->setAutoAdd( true );
long aMb = 1024 * 1024;
bool isLimitedMemory = myCache->GetMemoryMode() == VISU::ColoredPrs3dCache::LIMITED;
double aLimitedMemoryMax = std::max(anUsedMemory + aFreeMemory, aLimitedMemory);
// Settings
- QButtonGroup* aMemoryGroup = new QButtonGroup( 2, Qt::Vertical, tr( "MEMORY_MODE" ), this );
- aMemoryGroup->setRadioButtonExclusive( true );
+ QButtonGroup* aMemoryGroup = new QButtonGroup( this );
+ QGroupBox* aGB = new QGroupBox( tr( "MEMORY_MODE" ), this );
+ aTopLayout->addWidget( aGB );
+ QGridLayout* aGridLay = new QGridLayout( aGB );
+ //aMemoryGroup->setRadioButtonExclusive( true );
- myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aMemoryGroup );
+ myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aGB );
myLimitedMemoryButton->setChecked( isLimitedMemory );
+ aGridLay->addWidget( myLimitedMemoryButton, 0, 0 );
- myMimimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aMemoryGroup );
+ myMimimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aGB );
myMimimalMemoryButton->setChecked( !isLimitedMemory );
+ aGridLay->addWidget( myMimimalMemoryButton, 1, 0 );
- myLimitedMemory = new QtxDblSpinBox( 1.0, aLimitedMemoryMax, 10.0, aMemoryGroup );
+ myLimitedMemory = new QtxDoubleSpinBox( 1.0, aLimitedMemoryMax, 10.0, aGB );
myLimitedMemory->setSuffix( " Mb" );
myLimitedMemory->setValue( aLimitedMemory );
myLimitedMemory->setEnabled( isLimitedMemory );
+ aGridLay->addWidget( myLimitedMemory, 0, 1 );
+
connect( myLimitedMemoryButton, SIGNAL( toggled( bool ) ), myLimitedMemory, SLOT( setEnabled( bool ) ) );
// Current state
QGroupBox* aStateGroup = new QGroupBox( tr( "MEMORY STATE" ), this );
- aStateGroup->setColumnLayout( 0, Qt::Vertical );
- aStateGroup->layout()->setSpacing( 0 );
- aStateGroup->layout()->setMargin( 0 );
+ aTopLayout->addWidget( aStateGroup );
+ //aStateGroup->setColumnLayout( 0, Qt::Vertical );
+ //aStateGroup->layout()->setSpacing( 0 );
+ //aStateGroup->layout()->setMargin( 0 );
- QGridLayout* aStateLayout = new QGridLayout( aStateGroup->layout(), 2, 2 );
+ QGridLayout* aStateLayout = new QGridLayout( aStateGroup );
aStateLayout->setSpacing(6);
aStateLayout->setMargin(6);
myUsedMemory->setText( QString::number( anUsedMemory ) + " Mb" );
myUsedMemory->setReadOnly( true );
myUsedMemory->setEnabled( false );
- myUsedMemory->setPaletteForegroundColor( Qt::black );
+ QPalette aPal = myUsedMemory->palette();
+ aPal.setColor( myUsedMemory->foregroundRole(), Qt::black );
+ myUsedMemory->setPalette( aPal );
+ //myUsedMemory->setPaletteForegroundColor( Qt::black );
QLabel* aFreeMemoryLabel = new QLabel( tr( "FREE" ), aStateGroup );
myFreeMemory = new QLineEdit( aStateGroup );
myFreeMemory->setText( QString::number( aFreeMemory ) + " Mb" );
myFreeMemory->setReadOnly( true );
myFreeMemory->setEnabled( false );
- myFreeMemory->setPaletteForegroundColor( Qt::black );
+ aPal = myFreeMemory->palette();
+ aPal.setColor( myFreeMemory->foregroundRole(), Qt::black );
+ myFreeMemory->setPalette( aPal );
+ //myFreeMemory->setPaletteForegroundColor( Qt::black );
aStateLayout->addWidget( aUsedMemoryLabel, 0, 0 );
aStateLayout->addWidget( myUsedMemory, 0, 1 );
aStateLayout->addWidget( myFreeMemory, 1, 1 );
// Ok / Cancel
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
app->onHelpContextModule(app->activeModule() ?
app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
else {
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(VISU_Gen)
-#include <qdialog.h>
+#include <QDialog>
class QLineEdit;
class QRadioButton;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class SalomeApp_Module;
QRadioButton* myMimimalMemoryButton;
QRadioButton* myLimitedMemoryButton;
- QtxDblSpinBox* myLimitedMemory;
+ QtxDoubleSpinBox* myLimitedMemory;
QLineEdit* myUsedMemory;
QLineEdit* myFreeMemory;
#include "SALOME_Actor.h"
// QT Includes
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <QLabel>
+#include <QComboBox>
+#include <QCheckBox>
+#include <QLayout>
+#include <QGroupBox>
+#include <QButtonGroup>
+#include <QValidator>
+#include <QTabWidget>
+#include <QRadioButton>
+#include <QSpinBox>
+#include <QKeyEvent>
+#include <QPushButton>
// VTK Includes
#include <vtkMath.h>
}
}
- void RangeStepAndValidator (QtxDblSpinBox* theSpinBox, double min, double max,
+ void RangeStepAndValidator (QtxDoubleSpinBox* theSpinBox, double min, double max,
double step, unsigned short decimals)
{
theSpinBox->setRange(min, max);
- theSpinBox->setLineStep(step);
- ((QDoubleValidator*)theSpinBox->validator())->setRange(min, max, decimals);
+ theSpinBox->setSingleStep(step);
+ theSpinBox->setRange(min, max );
+ theSpinBox->setDecimals( decimals);
}
};
//
//=================================================================================
VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
- const char* name,
- bool modal,
- WFlags fl)
- : QDialog(VISU::GetDesktop(theModule), name, modal, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+ bool modal )
+ : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
mySelectionMgr(VISU::GetSelectionMgr(theModule)),
myVisuGUI(theModule),
myPrs3d(0),
myIsSelectPlane(false)
{
- if (!name)
- setName("VisuGUI_ClippingDlg");
- setCaption(tr("TITLE"));
+ setWindowTitle(tr("TITLE"));
setSizeGripEnabled(TRUE);
QGridLayout* VisuGUI_ClippingDlgLayout = new QGridLayout(this);
VisuGUI_ClippingDlgLayout->setSpacing(6);
VisuGUI_ClippingDlgLayout->setMargin(11);
// Controls for selecting, creating, deleting planes
- QGroupBox* GroupPlanes = new QGroupBox (this, "GroupPlanes");
- GroupPlanes->setTitle(tr("GRP_PLANES"));
- GroupPlanes->setColumnLayout(0, Qt::Vertical);
- GroupPlanes->layout()->setSpacing(0);
- GroupPlanes->layout()->setMargin(0);
- QGridLayout* GroupPlanesLayout = new QGridLayout (GroupPlanes->layout());
+ QGroupBox* GroupPlanes = new QGroupBox (tr("GRP_PLANES"), this);
+ //GroupPlanes->setColumnLayout(0, Qt::Vertical);
+ //GroupPlanes->layout()->setSpacing(0);
+ //GroupPlanes->layout()->setMargin(0);
+ QGridLayout* GroupPlanesLayout = new QGridLayout (GroupPlanes);
GroupPlanesLayout->setAlignment(Qt::AlignTop);
GroupPlanesLayout->setSpacing(6);
GroupPlanesLayout->setMargin(11);
- ComboBoxPlanes = new QComboBox (GroupPlanes, "ComboBoxPlanes");
+ ComboBoxPlanes = new QComboBox (GroupPlanes);
GroupPlanesLayout->addWidget(ComboBoxPlanes, 0, 0);
QSpacerItem* spacerGP = new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
GroupPlanesLayout->addItem(spacerGP, 0, 1);
- buttonNew = new QPushButton (GroupPlanes, "buttonNew");
+ buttonNew = new QPushButton (GroupPlanes );
buttonNew->setText(tr("BUT_NEW"));
GroupPlanesLayout->addWidget(buttonNew, 0, 2);
- buttonDelete = new QPushButton(GroupPlanes, "buttonDelete");
+ buttonDelete = new QPushButton(GroupPlanes);
buttonDelete->setText(tr("BUT_DELETE"));
GroupPlanesLayout->addWidget(buttonDelete, 0, 3);
// Controls for defining plane parameters
// Tab pane
- QGroupBox* GroupParameters = new QGroupBox(this, "GroupParameters");
- GroupParameters->setTitle(tr("GRP_PARAMETERS"));
- GroupParameters->setColumnLayout(0, Qt::Vertical);
- GroupParameters->layout()->setSpacing(0);
- GroupParameters->layout()->setMargin(0);
- QGridLayout* GroupParametersLayout = new QGridLayout (GroupParameters->layout());
+ QGroupBox* GroupParameters = new QGroupBox(tr("GRP_PARAMETERS"), this);
+ //GroupParameters->setColumnLayout(0, Qt::Vertical);
+ //GroupParameters->layout()->setSpacing(0);
+ //GroupParameters->layout()->setMargin(0);
+ QGridLayout* GroupParametersLayout = new QGridLayout (GroupParameters);
GroupParametersLayout->setAlignment(Qt::AlignTop);
GroupParametersLayout->setSpacing(6);
GroupParametersLayout->setMargin(11);
AutoApplyCheckBox->setChecked(false);
// Controls for "Ok", "Apply" and "Close" button
- QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
- GroupButtons->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7,
- (QSizePolicy::SizeType)0, 0, 0,
- GroupButtons->sizePolicy().hasHeightForWidth()));
+ QGroupBox* GroupButtons = new QGroupBox (this);
+ QSizePolicy aSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Fixed );
+ aSizePolicy.setHeightForWidth( GroupButtons->sizePolicy().hasHeightForWidth() );
+ aSizePolicy.setHorizontalStretch( 0 );
+ aSizePolicy.setVerticalStretch( 0 );
+ GroupButtons->setSizePolicy( aSizePolicy );
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
- //GroupButtons->setTitle(tr(""));
- GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
GroupButtons->layout()->setSpacing(0);
GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+ QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- buttonHelp = new QPushButton (GroupButtons, "buttonHelp");
+ buttonHelp = new QPushButton (GroupButtons);
buttonHelp->setText(tr("BUT_HELP"));
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
- buttonCancel = new QPushButton (GroupButtons, "buttonCancel");
+ buttonCancel = new QPushButton (GroupButtons);
buttonCancel->setText(tr("BUT_CLOSE"));
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
- buttonApply = new QPushButton (GroupButtons, "buttonApply");
+ buttonApply = new QPushButton (GroupButtons);
buttonApply->setText(tr("BUT_APPLY"));
buttonApply->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonApply, 0, 1);
QSpacerItem* spacer_9 = new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
GroupButtonsLayout->addItem(spacer_9, 0, 2);
- buttonOk = new QPushButton (GroupButtons, "buttonOk");
+ buttonOk = new QPushButton (GroupButtons);
buttonOk->setText(tr("BUT_OK"));
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
- VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupPlanes, 0, 0, 0, 1);
- VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupParameters, 1, 1, 0, 1);
- VisuGUI_ClippingDlgLayout->addWidget(PreviewCheckBox, 2, 0);
- VisuGUI_ClippingDlgLayout->addWidget(AutoApplyCheckBox, 2, 1);
- VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupButtons, 3, 3, 0, 1);
+ VisuGUI_ClippingDlgLayout->addWidget(GroupPlanes, 0, 0, 1, 2);
+ VisuGUI_ClippingDlgLayout->addWidget(GroupParameters, 1, 0, 1, 2);
+ VisuGUI_ClippingDlgLayout->addWidget(PreviewCheckBox, 2, 0);
+ VisuGUI_ClippingDlgLayout->addWidget(AutoApplyCheckBox, 2, 1);
+ VisuGUI_ClippingDlgLayout->addWidget(GroupButtons, 3, 0, 3, 2);
// Initial state
VISU::RangeStepAndValidator(SpinBoxDistance, 0.0, 1.0, 0.01, 3);
VISU::RangeStepAndValidator(SpinBoxRot1, -180.0, 180.0, 1, 3);
VISU::RangeStepAndValidator(SpinBoxRot2, -180.0, 180.0, 1, 3);
- ComboBoxOrientation->insertItem(tr("PARALLEL_XOY_COMBO_ITEM"));
- ComboBoxOrientation->insertItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
- ComboBoxOrientation->insertItem(tr("PARALLEL_ZOX_COMBO_ITEM"));
+ ComboBoxOrientation->addItem(tr("PARALLEL_XOY_COMBO_ITEM"));
+ ComboBoxOrientation->addItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
+ ComboBoxOrientation->addItem(tr("PARALLEL_ZOX_COMBO_ITEM"));
SpinBoxDistance->setValue(0.5);
GroupParametersLayout->setSpacing(6);
GroupParametersLayout->setMargin(11);
- TextLabelOrientation = new QLabel(GroupParameters, "TextLabelOrientation");
+ TextLabelOrientation = new QLabel(GroupParameters);
TextLabelOrientation->setText(tr("LBL_ORIENTATION"));
GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
- ComboBoxOrientation = new QComboBox(GroupParameters, "ComboBoxOrientation");
+ ComboBoxOrientation = new QComboBox(GroupParameters);
GroupParametersLayout->addWidget(ComboBoxOrientation, 0, 1);
- TextLabelDistance = new QLabel(GroupParameters, "TextLabelDistance");
+ TextLabelDistance = new QLabel(GroupParameters);
TextLabelDistance->setText(tr("LBL_DISTANCE"));
GroupParametersLayout->addWidget(TextLabelDistance, 1, 0);
- SpinBoxDistance = new QtxDblSpinBox(GroupParameters, "SpinBoxDistance");
+ SpinBoxDistance = new QtxDoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxDistance, 1, 1);
- TextLabelRot1 = new QLabel(GroupParameters, "TextLabelRot1");
+ TextLabelRot1 = new QLabel(GroupParameters);
TextLabelRot1->setText(tr("LBL_ROTATION_YZ"));
GroupParametersLayout->addWidget(TextLabelRot1, 2, 0);
- SpinBoxRot1 = new QtxDblSpinBox(GroupParameters, "SpinBoxRot1");
+ SpinBoxRot1 = new QtxDoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot1, 2, 1);
- TextLabelRot2 = new QLabel(GroupParameters, "TextLabelRot2");
+ TextLabelRot2 = new QLabel(GroupParameters);
TextLabelRot2->setText(tr("LBL_ROTATION_XZ"));
GroupParametersLayout->addWidget(TextLabelRot2, 3, 0);
- SpinBoxRot2 = new QtxDblSpinBox(GroupParameters, "SpinBoxRot2");
+ SpinBoxRot2 = new QtxDoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot2, 3, 1);
return GroupParameters;
IJKParametersLayout->setMargin(11);
// Axis group
- ButtonGroupIJKAxis = new QHButtonGroup (tr("GRP_IJK_AXIS"), WidgetIJKTab);
- new QRadioButton (tr("I_RADIO_BTN"), ButtonGroupIJKAxis); // 0
- new QRadioButton (tr("J_RADIO_BTN"), ButtonGroupIJKAxis); // 1
- new QRadioButton (tr("K_RADIO_BTN"), ButtonGroupIJKAxis); // 2
- ButtonGroupIJKAxis->setButton(0);
+ ButtonGroupIJKAxis = new QButtonGroup ( WidgetIJKTab);
+ QGroupBox* aGBGroupBoxIJKAxis= new QGroupBox(tr("GRP_IJK_AXIS"), WidgetIJKTab );
+ QHBoxLayout* aHBLay = new QHBoxLayout( GroupBoxIJKAxis );
+ ButtonGroupIJKAxis->addButton( new QRadioButton (tr("I_RADIO_BTN"), GroupBoxIJKAxis) ); // 0
+ ButtonGroupIJKAxis->addButton( new QRadioButton (tr("J_RADIO_BTN"), GroupBoxIJKAxis) ); // 1
+ ButtonGroupIJKAxis->addButton( new QRadioButton (tr("K_RADIO_BTN"), GroupBoxIJKAxis) ); // 2
+ ButtonGroupIJKAxis->button(0)->setChecked(true);
+ aHBLay->addWidget( ButtonGroupIJKAxis->button(0) );
+ aHBLay->addWidget( ButtonGroupIJKAxis->button(1) );
+ aHBLay->addWidget( ButtonGroupIJKAxis->button(2) );
// Index
- TextLabelIJKIndex = new QLabel(WidgetIJKTab, "TextLabelIJKIndex");
+ TextLabelIJKIndex = new QLabel(WidgetIJKTab);
TextLabelIJKIndex->setText(tr("LBL_IJK_INDEX"));
- SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab, "SpinBoxIJKIndex");
+ SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab);
// Orientation
CheckBoxIJKPlaneReverse = new QCheckBox (tr("REVERSE_NORMAL_CHK"), WidgetIJKTab);
CheckBoxIJKPlaneReverse->setChecked(false);
- IJKParametersLayout->addMultiCellWidget(ButtonGroupIJKAxis, 0, 0, 0, 1);
+ IJKParametersLayout->addWidget(aGBGroupBoxIJKAxis, 0, 0, 1, 2);
IJKParametersLayout->addWidget(TextLabelIJKIndex, 1, 0);
IJKParametersLayout->addWidget(SpinBoxIJKIndex, 1, 1);
IJKParametersLayout->addWidget(CheckBoxIJKPlaneReverse, 2, 0);
myPrs3d->AddClippingPlane(anOldIter->GetPointer());
}
- SUIT_MessageBox::warn1(VISU::GetDesktop(myVisuGUI),
- tr("WRN_VISU"),
- tr("WRN_EMPTY_RESULTING_PRS"),
- tr("BUT_OK") );
+ SUIT_MessageBox::warning(VISU::GetDesktop(myVisuGUI),
+ tr("WRN_VISU"),
+ tr("WRN_EMPTY_RESULTING_PRS"),
+ tr("BUT_OK") );
}
//VISU::RenderViewWindow(aViewWindow);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
}
// enable/disable IJK tab
- TabPane->setTabEnabled(WidgetIJKTab, isStructured());
+ TabPane->setTabEnabled(TabPane->indexOf(WidgetIJKTab), isStructured());
Sinchronize();
VISU::RenderViewWindow(aViewWindow);
}
case VISU::YZ: item = 1; break;
case VISU::ZX: item = 2; break;
}
- ComboBoxOrientation->setCurrentItem(item);
+ ComboBoxOrientation->setCurrentIndex(item);
- bool isIJK = (TabPane->currentPage() == WidgetIJKTab);
+ bool isIJK = (TabPane->currentWidget() == WidgetIJKTab);
if (isIJK)
setIJKByNonStructured();
else
if (!myPrs3d || myPlanes.empty())
return;
- int aPlaneIndex = ComboBoxPlanes->currentItem();
+ int aPlaneIndex = ComboBoxPlanes->currentIndex();
VISU::TPlanes::iterator anIter = myPlanes.begin() + aPlaneIndex;
anIter->GetPointer()->myActor->SetVisibility(false);
QString aName;
for (int i = 1; i<=aNbPlanes; i++) {
aName = QString(tr("PLANES_COMBO_ITEM_i")).arg(i);
- ComboBoxPlanes->insertItem(aName);
+ ComboBoxPlanes->addItem(aName);
}
int aPos = ComboBoxPlanes->count() - 1;
- ComboBoxPlanes->setCurrentItem(aPos);
+ ComboBoxPlanes->setCurrentIndex(aPos);
bool anIsControlsEnable = (aPos >= 0);
if (anIsControlsEnable) {
onSelectPlane(aPos);
} else {
- ComboBoxPlanes->insertItem(tr("PLANES_COMBO_ITEM_no"));
+ ComboBoxPlanes->addItem(tr("PLANES_COMBO_ITEM_no"));
SpinBoxRot1->setValue(0.0);
SpinBoxRot2->setValue(0.0);
SpinBoxDistance->setValue(0.5);
SpinBoxRot1 ->setEnabled(anIsControlsEnable);
SpinBoxRot2 ->setEnabled(anIsControlsEnable);
- ButtonGroupIJKAxis ->setEnabled(anIsControlsEnable);
+ GroupBoxIJKAxis ->setEnabled(anIsControlsEnable);
SpinBoxIJKIndex ->setEnabled(anIsControlsEnable);
CheckBoxIJKPlaneReverse->setEnabled(anIsControlsEnable);
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
VISU::TIdTypeVector aVec = anIDMapper->GetStructure();
switch(aVec.size()){
case 1:
- ButtonGroupIJKAxis->find(0)->setEnabled(true);
- ButtonGroupIJKAxis->find(1)->setEnabled(false);
- ButtonGroupIJKAxis->find(2)->setEnabled(false);
+ ButtonGroupIJKAxis->button(0)->setEnabled(true);
+ ButtonGroupIJKAxis->button(1)->setEnabled(false);
+ ButtonGroupIJKAxis->button(2)->setEnabled(false);
break;
case 2:
- ButtonGroupIJKAxis->find(0)->setEnabled(true);
- ButtonGroupIJKAxis->find(1)->setEnabled(true);
- ButtonGroupIJKAxis->find(2)->setEnabled(false);
+ ButtonGroupIJKAxis->button(0)->setEnabled(true);
+ ButtonGroupIJKAxis->button(1)->setEnabled(true);
+ ButtonGroupIJKAxis->button(2)->setEnabled(false);
break;
case 3:
- ButtonGroupIJKAxis->find(0)->setEnabled(true);
- ButtonGroupIJKAxis->find(1)->setEnabled(true);
- ButtonGroupIJKAxis->find(2)->setEnabled(true);
+ ButtonGroupIJKAxis->button(0)->setEnabled(true);
+ ButtonGroupIJKAxis->button(1)->setEnabled(true);
+ ButtonGroupIJKAxis->button(2)->setEnabled(true);
break;
}
}
if (myPlanes.empty() || myIsSelectPlane)
return;
- int aCurPlaneIndex = ComboBoxPlanes->currentItem();
+ int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
aV[0] = aRot[0] > 0? aV[0]: -aV[0];
aV[1] = aRot[1] > 0? aV[1]: -aV[1];
- switch (ComboBoxOrientation->currentItem()) {
+ switch (ComboBoxOrientation->currentIndex()) {
case 0:
anOrientation = VISU::XY;
setIJKByNonStructured();
else {
// set correct labels of rotation spin boxes
- onSelectOrientation(ComboBoxOrientation->currentItem());
+ onSelectOrientation(ComboBoxOrientation->currentIndex());
}
}
return;
// get axis data
- int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->selected());
+ int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->checkedButton());
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
gp_Dir dir;
CORBA::String_var aMeshName = myPrs3d->GetMeshName();
// set paramerets
myIsSelectPlane = true;
- ComboBoxOrientation->setCurrentItem(axId);
+ ComboBoxOrientation->setCurrentIndex(axId);
setRotation(-angle[0], -angle[1]);
setDistance(distance);
myIsSelectPlane = false;
return;
// get plane normal
- int planeIndex = ComboBoxPlanes->currentItem();
+ int planeIndex = ComboBoxPlanes->currentIndex();
OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
vtkPlaneSource* planeSource = plane->myPlaneSource;
vtkFloatingPointType * planeNormal = planeSource->GetNormal();
myIsSelectPlane = true;
CheckBoxIJKPlaneReverse->setChecked(normal * axDir < 0);
SpinBoxIJKIndex->setValue(i);
- ButtonGroupIJKAxis->setButton(gridAxId);
+ ButtonGroupIJKAxis->button(gridAxId)->setChecked( true );
onIJKAxisChanged(gridAxId); // update label and range of index
myIsSelectPlane = false;
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
ClickOnHelp();
#include "SALOME_InteractiveObject.hxx"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
// QT Includes
-#include <qdialog.h>
-#include <qguardedptr.h>
-#include <qtable.h>
+#include <QDialog>
+#include <QPointer>
// VTK Includes
#include <vtkSmartPointer.h>
class QLabel;
class QPushButton;
-class QTable;
class QCheckBox;
+class QGroupBox;
class QComboBox;
-class QHButtonGroup;
+class QButtonGroup;
class QSpinBox;
class QTabWidget;
class SALOME_Actor;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class SVTK_ViewWindow;
//=================================================================================
class OrientedPlane: public vtkPlane
{
- QGuardedPtr<SVTK_ViewWindow> myViewWindow;
+ QPointer<SVTK_ViewWindow> myViewWindow;
vtkDataSetMapper* myMapper;
public:
public:
VisuGUI_ClippingDlg( VisuGUI* theModule,
- const char* name = 0,
- bool modal = false,
- WFlags fl = 0 );
+ bool modal = false );
float getDistance() { return (float)SpinBoxDistance->value(); }
void setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
QTabWidget* TabPane;
QComboBox* ComboBoxOrientation;
- QtxDblSpinBox* SpinBoxDistance;
- QtxDblSpinBox* SpinBoxRot1;
- QtxDblSpinBox* SpinBoxRot2;
+ QtxDoubleSpinBox* SpinBoxDistance;
+ QtxDoubleSpinBox* SpinBoxRot1;
+ QtxDoubleSpinBox* SpinBoxRot2;
QWidget* WidgetIJKTab;
- QHButtonGroup* ButtonGroupIJKAxis;
+ QButtonGroup* ButtonGroupIJKAxis;
+ QGroupBox* GroupBoxIJKAxis;
QLabel* TextLabelIJKIndex;
QSpinBox* SpinBoxIJKIndex;
QCheckBox* CheckBoxIJKPlaneReverse;
#include "LightApp_Application.h"
-#include <qlayout.h>
+#include <QLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QSpinBox>
+#include <QGroupBox>
+#include <QKeyEvent>
/*!
Constructor
*/
-VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent, const char* name, bool modal )
+ : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )//WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
{
- if ( !name )
- setName( "VisuGUI_CursorDlg" );
- setCaption( name );
+ setWindowTitle( name );
+ setModal( modal );
setSizeGripEnabled( TRUE );
QGridLayout* TopLayout = new QGridLayout( this );
TopLayout->setSpacing( 6 );
TopLayout->setMargin( 11 );
- TopGroupBox = new QGroupBox( this, "TopGroupBox" );
- TopGroupBox->setColumnLayout(0, Qt::Vertical );
- TopGroupBox->layout()->setSpacing( 0 );
- TopGroupBox->layout()->setMargin( 0 );
- QGridLayout* TopGroupBoxLayout = new QGridLayout( TopGroupBox->layout() );
+ TopGroupBox = new QGroupBox( this );
+ //TopGroupBox->setColumnLayout(0, Qt::Vertical );
+ //TopGroupBox->layout()->setSpacing( 0 );
+ //TopGroupBox->layout()->setMargin( 0 );
+ QGridLayout* TopGroupBoxLayout = new QGridLayout( TopGroupBox );
TopGroupBoxLayout->setAlignment( Qt::AlignTop );
TopGroupBoxLayout->setSpacing( 6 );
TopGroupBoxLayout->setMargin( 11 );
- Comment1 = new QLabel( tr( "TextLabel1" ), TopGroupBox, "Comment1" );
- Comment1->setAlignment( QLabel::AlignCenter );
+ Comment1 = new QLabel( tr( "TextLabel1" ), TopGroupBox );
+ Comment1->setAlignment( Qt::AlignCenter );
TopGroupBoxLayout->addWidget( Comment1, 0, 0 );
- Comment2 = new QLabel( tr( "TextLabel2" ), TopGroupBox, "Comment2" );
- Comment2->setAlignment( QLabel::AlignCenter );
+ Comment2 = new QLabel( tr( "TextLabel2" ), TopGroupBox );
+ Comment2->setAlignment( Qt::AlignCenter );
TopGroupBoxLayout->addWidget( Comment2, 1, 0 );
- SpinBox1 = new QSpinBox( 1, 100, 1, TopGroupBox, "SpinBox1" );
+ SpinBox1 = new QSpinBox( TopGroupBox );
+ SpinBox1->setMinimum( 0 );
+ SpinBox1->setMaximum(100 );
+ SpinBox1->setSingleStep( 1 );
SpinBox1->setValue( 100 );
SpinBox1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox1->setMinimumSize( 70, 0 );
SLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
TopGroupBoxLayout->addLayout( SLayout, 2, 0 );
- GroupButtons = new QGroupBox (this, "GroupButtons");
+ GroupButtons = new QGroupBox (this);
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+ buttonOk = new QPushButton (tr("&OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
- buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+ buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+ buttonHelp = new QPushButton(tr("&Help") , GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VISUGUI_CURSORDLG_H
#define VISUGUI_CURSORDLG_H
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qgroupbox.h>
+#include <QDialog>
+class QLabel;
+class QPushButton;
+class QSpinBox;
+class QGroupBox;
class VisuGUI_CursorDlg : public QDialog
{
Q_OBJECT
public:
- VisuGUI_CursorDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ VisuGUI_CursorDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
~VisuGUI_CursorDlg();
QGroupBox* TopGroupBox;
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include "OB_Browser.h"
-
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qtabwidget.h>
-#include <qhgroupbox.h>
-#include <qlineedit.h>
+//TO DO
+//#include "OB_Browser.h"
+
+#include "VisuGUI_TableDlg.h"
+
+#include <QLayout>
+#include <QTabWidget>
+#include <QLineEdit>
+#include <QValidator>
+#include <QButtonGroup>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QPushButton>
+#include <QHeaderView>
+#include <QRadioButton>
+#include <QTableWidget>
#include <vtkRenderer.h>
#include <vtkPolyData.h>
VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule),
- myPreviewActor(0),myPreviewActorGlyphs(0)
+ myPreviewActor(0),
+ myPreviewActorGlyphs(0)
{
- setCaption("Cut Lines Definition");
+ setWindowTitle("Cut Lines Definition");
setSizeGripEnabled(true);
- QVBoxLayout* aMainLayout = new QVBoxLayout (this, 7, 6);
+ QVBoxLayout* aMainLayout = new QVBoxLayout (this);
+ aMainLayout->setMargin( 7 );
aMainLayout->setSpacing(5);
- hasInit = false;
+ hasInit = false;
// Tab pane
myTabBox = new QTabWidget(this);
// Plane of lines
QFrame* aPlanePane = new QFrame(this);
- QVBoxLayout* aPlaneLayout = new QVBoxLayout(aPlanePane, 5, 6);
-
- mySelPlane = new QHButtonGroup( tr( "TXT_ORIENTATION" ), aPlanePane);
- mySelPlane->setInsideSpacing( 5 );
- mySelPlane->setInsideMargin( 5 );
+ QVBoxLayout* aPlaneLayout = new QVBoxLayout(aPlanePane);
+ aPlaneLayout->setMargin( 5 );
+ aPlaneLayout->setSpacing(6);
+
+ mySelPlane = new QButtonGroup( aPlanePane);
+ QGroupBox* aGB = new QGroupBox( tr( "TXT_ORIENTATION" ), aPlanePane );
+ QHBoxLayout* aHBLay = new QHBoxLayout( aGB );
+ //mySelPlane->setInsideSpacing( 5 );
+ //mySelPlane->setInsideMargin( 5 );
+
+ QRadioButton* aBxy = new QRadioButton( tr( "PARALLEL_XOY" ), aGB); // 0
+ QRadioButton* aByz = new QRadioButton( tr( "PARALLEL_YOZ" ), aGB); // 1
+ QRadioButton* aBzx = new QRadioButton( tr( "PARALLEL_ZOX" ), aGB); // 2
+ //aBxy->setChecked(false);
+ //aByz->setChecked(false);
+ aHBLay->addWidget( aBxy );
+ aHBLay->addWidget( aByz );
+ aHBLay->addWidget( aBzx );
+
+ mySelPlane->addButton( aBxy, 0 );
+ mySelPlane->addButton( aByz, 1 );
+ mySelPlane->addButton( aBzx, 2 );
- QRadioButton* aBxy = new QRadioButton( tr( "PARALLEL_XOY" ), mySelPlane); // 0
- QRadioButton* aByz = new QRadioButton( tr( "PARALLEL_YOZ" ), mySelPlane); // 1
- QRadioButton* aBzx = new QRadioButton( tr( "PARALLEL_ZOX" ), mySelPlane); // 2
- aBxy->setChecked(false);
- aByz->setChecked(false);
aBzx->setChecked(true);
- aPlaneLayout->addWidget( mySelPlane );
+ aPlaneLayout->addWidget( aGB );
QGroupBox* aRotBox = new QGroupBox( tr( "LBL_ROTATION" ), aPlanePane );
- aRotBox->setColumnLayout(2, Qt::Horizontal );
+ //aRotBox->setColumnLayout(2, Qt::Horizontal );
+ QGridLayout* aGridLay = new QGridLayout( aRotBox );
myRotXLbl = new QLabel( tr( "LBL_ROT_X" ), aRotBox);
- myRotXSpn = new QtxDblSpinBox( -45, 45, 5, aRotBox );
+ aGridLay->addWidget( myRotXLbl, 0, 0 );
+ myRotXSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ aGridLay->addWidget( myRotXSpn, 0, 1 );
myRotXSpn->setValue( 0 );
myRotYLbl = new QLabel( tr( "LBL_ROT_Y" ), aRotBox );
- myRotYSpn = new QtxDblSpinBox( -45, 45, 5, aRotBox );
- myRotYSpn->setValue( 0 );
+ aGridLay->addWidget( myRotYLbl, 1, 0 );
+ myRotYSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ aGridLay->addWidget( myRotXSpn, 1, 1 );
+ myRotYSpn->setValue( 0 );
aPlaneLayout->addWidget( aRotBox );
- QHGroupBox* aBaseBox = new QHGroupBox (tr("BASE_PLANE_POS"), aPlanePane);
+ QGroupBox* aBaseBox = new QGroupBox (tr("BASE_PLANE_POS"), aPlanePane);
+ aHBLay = new QHBoxLayout( aBaseBox );
myBasePlanePos = new QLineEdit (aBaseBox);
+ aHBLay->addWidget( myBasePlanePos );
mydvalidator = new QDoubleValidator(this);
mydvalidator->setDecimals(32);
myBasePlanePos->setValidator(mydvalidator);
myCBSetDef = new QCheckBox (tr("SET_DEFAULT"),aBaseBox);
+ aHBLay->addWidget( myCBSetDef );
aPlaneLayout->addWidget(aBaseBox);
- QHBox* aPosBox = new QHBox (aPlanePane);
- aPosBox->setSpacing(5);
- new QLabel (tr("LBL_POS"), aPosBox);
- myPosSpn = new QtxDblSpinBox (0, 1, 0.1, aPosBox);
+ QWidget* aPosBox = new QWidget (aPlanePane);
+ aHBLay = new QHBoxLayout( aPosBox );
+ aHBLay->setSpacing(5);
+
+ aHBLay->addWidget( new QLabel (tr("LBL_POS"), aPosBox) );
+ myPosSpn = new QtxDoubleSpinBox (0, 1, 0.1, aPosBox);
myPosSpn->setValue(0.5);
+ aHBLay->addWidget( myPosSpn );
aPlaneLayout->addWidget(aPosBox);
myPreviewCheck = new QCheckBox (tr("LBL_SHOW_PREVIEW"), aPlanePane);
myCreateTable->setChecked(true);
aPlaneLayout->addWidget( myCreateTable );
- QHBox* aCheckPane = new QHBox(aPlanePane);
+ QWidget* aCheckPane = new QWidget(aPlanePane);
+ aHBLay = new QHBoxLayout( aCheckPane );
QLabel* aLbl = new QLabel(" ", aCheckPane);
- aCheckPane->setStretchFactor(aLbl, 0);
+ aHBLay->addWidget( aLbl );
+ aHBLay->setStretchFactor(aLbl, 0);
myCurvesCheck = new QCheckBox(tr("LBL_GENERATE_CURVES"), aCheckPane);
- aCheckPane->setStretchFactor(aCheckPane, 0);
+ aHBLay->addWidget( myCurvesCheck );
+ aHBLay->setStretchFactor(aCheckPane, 0);
myCurvesCheck->setChecked(true);
myCurvesCheck->setEnabled(true);
QLabel* aLbl2 = new QLabel(" ", aCheckPane);
- aCheckPane->setStretchFactor(aLbl2, 1);
+ aHBLay->setStretchFactor(aLbl2, 1);
aPlaneLayout->addWidget( aCheckPane );
aPlaneLayout->addStretch();
-
myTabBox->addTab( aPlanePane, tr("LBL_LINES_PLANE") );
// Number of lines
QFrame* aLinesPane = new QFrame(this);
- QVBoxLayout* aLinesLayout = new QVBoxLayout( aLinesPane, 5, 6 );
-
- mySelPlane2 = new QHButtonGroup( tr( "TXT_ORIENTATION" ), aLinesPane);
- mySelPlane2->setInsideSpacing( 5 );
- mySelPlane2->setInsideMargin( 5 );
-
- QRadioButton* aBxy2 = new QRadioButton( tr( "PARALLEL_XOY" ), mySelPlane2); // 0
- QRadioButton* aByz2 = new QRadioButton( tr( "PARALLEL_YOZ" ), mySelPlane2); // 1
- QRadioButton* aBzx2 = new QRadioButton( tr( "PARALLEL_ZOX" ), mySelPlane2); // 2
+ QVBoxLayout* aLinesLayout = new QVBoxLayout( aLinesPane );
+ aLinesLayout->setMargin( 5 );
+ aLinesLayout->setSpacing( 6 );
+
+ mySelPlane2 = new QButtonGroup( aLinesPane);
+ aGB = new QGroupBox( tr( "TXT_ORIENTATION" ), aLinesPane );
+ aHBLay = new QHBoxLayout( aGB );
+ //mySelPlane2->setInsideSpacing( 5 );
+ //mySelPlane2->setInsideMargin( 5 );
+
+ QRadioButton* aBxy2 = new QRadioButton( tr( "PARALLEL_XOY" ), aGB); // 0
+ QRadioButton* aByz2 = new QRadioButton( tr( "PARALLEL_YOZ" ), aGB); // 1
+ QRadioButton* aBzx2 = new QRadioButton( tr( "PARALLEL_ZOX" ), aGB); // 2
+
+ aHBLay->addWidget( aBxy2 );
+ aHBLay->addWidget( aByz2 );
+ aHBLay->addWidget( aBzx2 );
+
+ mySelPlane2->addButton( aBxy2, 0 );
+ mySelPlane2->addButton( aByz2, 1 );
+ mySelPlane2->addButton( aBzx2, 2 );
+
aBzx2->setEnabled(false);
aByz2->setChecked(true);
- aLinesLayout->addWidget( mySelPlane2 );
+ aLinesLayout->addWidget( aGB );
QGroupBox* aRotBox2 = new QGroupBox( tr( "LBL_ROTATION" ), aLinesPane );
- aRotBox2->setColumnLayout(2, Qt::Horizontal );
+ //aRotBox2->setColumnLayout(2, Qt::Horizontal );
+ aGridLay = new QGridLayout( aRotBox2 );
myRotXLbl2 = new QLabel( tr( "LBL_ROT_X" ), aRotBox2);
- myRotXSpn2 = new QtxDblSpinBox( -45, 45, 5, aRotBox2 );
+ aGridLay->addWidget( myRotXLbl2, 0, 0 );
+ myRotXSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ aGridLay->addWidget( myRotXSpn2, 0, 1 );
myRotXSpn2->setValue( 0 );
myRotYLbl2 = new QLabel( tr( "LBL_ROT_Y" ), aRotBox2 );
- myRotYSpn2 = new QtxDblSpinBox( -45, 45, 5, aRotBox2 );
+ aGridLay->addWidget( myRotYLbl2, 1, 0 );
+ myRotYSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ aGridLay->addWidget( myRotYSpn2, 1, 1 );
myRotYSpn2->setValue( 0 );
aLinesLayout->addWidget( aRotBox2 );
- QHBox* aNbBox = new QHBox(aLinesPane);
- aNbBox->setSpacing(5);
- new QLabel( tr( "LBL_NB_PLANS" ), aNbBox );
- myNbSpn = new QtxDblSpinBox( 1, 100, 1, aNbBox );
+ QWidget* aNbBox = new QWidget(aLinesPane);
+ aHBLay = new QHBoxLayout( aNbBox );
+ aHBLay->setSpacing(5);
+ aHBLay->addWidget( new QLabel( tr( "LBL_NB_PLANS" ), aNbBox ) );
+ myNbSpn = new QtxDoubleSpinBox( 1, 100, 1, aNbBox );
myNbSpn->setValue( 10 );
+ aHBLay->addWidget( myNbSpn );
aLinesLayout->addWidget( aNbBox );
- myPosTable = new QTable(aLinesPane, "Positions of cut planes" );
+ myPosTable = new QTableWidget(aLinesPane );
myPosTable->setMaximumHeight( 227 );
myPosTable->setMinimumWidth( 294 );
- myPosTable->setNumCols(2);
- myPosTable->setNumRows(0);
+ myPosTable->setColumnCount(2);
+ myPosTable->setRowCount(0);
- QHeader *th = myPosTable->horizontalHeader();
- th->setLabel( 0, "Position" );
- th->setLabel( 1, "Set default" );
+ myPosTable->setItemDelegateForColumn( 0,
+ new NumDelegateItem( myPosTable, NumDelegateItem::NV_Real) );
+ myPosTable->setEditTriggers( (QAbstractItemView::EditTriggers)(QAbstractItemView::AllEditTriggers &(~QAbstractItemView::CurrentChanged)));
+
+ QStringList aLabels;
+ aLabels.append( "Position" );
+ aLabels.append( "Set default" );
+ myPosTable->setHorizontalHeaderLabels( aLabels );
+
aLinesLayout->addWidget( myPosTable );
- QHBox* aPosBox2 = new QHBox(aLinesPane);
- aPosBox2->setSpacing(5);
- new QLabel( tr( "LBL_POS" ), aPosBox2 );
- myPosSpn2 = new QtxDblSpinBox( 0, 1, 0.1, aPosBox2 );
+ QWidget* aPosBox2 = new QWidget(aLinesPane);
+ aHBLay = new QHBoxLayout( aPosBox2 );
+ aHBLay->setSpacing(5);
+ aHBLay->addWidget( new QLabel( tr( "LBL_POS" ), aPosBox2 ) );
+ myPosSpn2 = new QtxDoubleSpinBox( 0, 1, 0.1, aPosBox2 );
myPosSpn2->setValue( 0.5 );
+ aHBLay->addWidget( myPosSpn2 );
+
+
aLinesLayout->addWidget( aPosBox2 );
aLinesLayout->addStretch();
myTabBox->addTab( aLinesPane, tr("LBL_LINES_CUT") );
myScalarPane = new VisuGUI_ScalarBarPane(this, false);
- myScalarPane->setMargin( 5 );
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin( 5 );
+
myInputPane = new VisuGUI_InputPane(VISU::TCUTLINES, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
aMainLayout->addWidget(myTabBox);
// Dialog buttons
- QHBox* aBtnBox = new QHBox(this);
+ QFrame* aBtnBox = new QFrame(this);
+ aHBLay = new QHBoxLayout( aBtnBox );
aBtnBox->setFrameStyle(QFrame::Box | QFrame::Sunken);
aBtnBox->setLineWidth( 1 );
- QHBoxLayout* aBtnLayout = (QHBoxLayout*) aBtnBox->layout();
- aBtnLayout->setAutoAdd( false );
- aBtnLayout->setSpacing( 5 );
- aBtnLayout->setMargin( 11 );
+ //aHBLay->setAutoAdd( false );
+ aHBLay->setSpacing( 5 );
+ aHBLay->setMargin( 11 );
QPushButton* aOkBtn = new QPushButton (tr("BUT_OK"), aBtnBox);
aOkBtn->setAutoDefault( TRUE );
aOkBtn->setDefault( true );
- aBtnLayout->addWidget(aOkBtn);
+ aHBLay->addWidget(aOkBtn);
- aBtnLayout->addStretch();
+ aHBLay->addStretch();
QPushButton* aCloseBtn = new QPushButton(tr("BUT_CANCEL"), aBtnBox);
- aBtnLayout->addWidget(aCloseBtn);
+ aHBLay->addWidget(aCloseBtn);
QPushButton* aHelpBtn = new QPushButton(tr("BUT_HELP"), aBtnBox);
- aBtnLayout->addWidget(aHelpBtn);
+ aHBLay->addWidget(aHelpBtn);
aMainLayout->addWidget(aBtnBox);
myCutLines = NULL;
// signals and slots connections
- connect(mySelPlane , SIGNAL(clicked(int)) , this, SLOT(onPlaneSelect(int)));
+ connect(mySelPlane , SIGNAL(buttonClicked(int)) , this, SLOT(onPlaneSelect(int)));
connect(myCBSetDef , SIGNAL(toggled(bool)) , this, SLOT(setBaseDefault()));
connect(myPosSpn , SIGNAL(valueChanged(double)) , this, SLOT(setBaseDefault()));
- connect(mySelPlane2 , SIGNAL(clicked(int)) , this, SLOT(onCutSelect(int)));
+ connect(mySelPlane2 , SIGNAL(buttonClicked(int)) , this, SLOT(onCutSelect(int)));
connect(myNbSpn , SIGNAL(valueChanged(double)) , this, SLOT(DrawTable()));
- connect(th , SIGNAL(clicked(int)) , this, SLOT(setDefault(int)));
+ connect(myPosTable->horizontalHeader(), SIGNAL(sectionClicked(int)) , this, SLOT(setDefault(int)));
connect(myPosSpn2 , SIGNAL(valueChanged(double)) , this, SLOT(DrawTable()));
connect(myPreviewCheck, SIGNAL(toggled(bool)) , this, SLOT(onPreviewCheck(bool)));
connect(myAllCurvesInvertedCheck, SIGNAL(toggled(bool)),this, SLOT(onAllCurvesInvertedCheck(bool)));
- connect(myPosTable , SIGNAL(valueChanged(int, int)), this, SLOT(onValueChanged(int, int)));
+ connect(myPosTable , SIGNAL(cellChanged(int, int)), this, SLOT(onValueChanged(int, int)));
connect(myRotXSpn , SIGNAL(valueChanged(double)) , this, SLOT(onRotation(double)));
connect(myRotYSpn , SIGNAL(valueChanged(double)) , this, SLOT(onRotation(double)));
connect(myRotXSpn2 , SIGNAL(valueChanged(double)) , this, SLOT(onRotation(double)));
connect(aOkBtn, SIGNAL(clicked()), this, SLOT(accept()));
connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
+
//connect(myMgr, SIGNAL(closeAllViews()), this, SLOT(reject()));
//connect(VisuGUI::application()->desktop(),
// SIGNAL(windowActivated(SUIT_ViewWindow*)),
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
//------------------------------------------------------------------------------
myPrsCopy->SetBasePlanePosition(myBasePlanePos->text().toDouble());
else myPrsCopy->SetDefault();
- for (int i = 0; i < (int)myNbSpn->value(); ++i) {
- if (!((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked())
- myPrsCopy->SetLinePosition( i, myPosTable->text( i, 0 ).toDouble() );
- else myPrsCopy->SetDefaultPosition(i);
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( aModel )
+ {
+ for (int i = 0; i < (int)myNbSpn->value(); ++i)
+ {
+ if ( myPosTable->item( i, 1 )->checkState() != Qt::Checked )
+ {
+ QVariant aVar = aModel->index( i, 0 ).data();
+ myPrsCopy->SetLinePosition( i, aVar.toDouble() );
+ }
+ else
+ myPrsCopy->SetDefaultPosition(i);
+ }
}
if (myAllCurvesInvertedCheck->isChecked())
myPrsCopy->SetAllCurvesInverted(true);
//------------------------------------------------------------------------------
void VisuGUI_CutLinesDlg::onPlaneSelect (int theId)
{
- for (int i = 0; i < mySelPlane2->count(); i++)
- mySelPlane2->find(i)->setEnabled(true);
- QButton* aBtn = mySelPlane2->find(theId);
+ QList<QAbstractButton*> aBtns = mySelPlane2->buttons();
+ for (QList<QAbstractButton*>::Iterator it = aBtns.begin();
+ it != aBtns.end(); it++ )
+ (*it)->setEnabled(true);
+
+ QAbstractButton* aBtn = mySelPlane2->button(theId);
aBtn->setEnabled(false);
switch (theId) {
case 0:
myRotXLbl->setText( tr("LBL_ROT_X"));
myRotYLbl->setText( tr("LBL_ROT_Y"));
- ((QRadioButton*)mySelPlane2->find(1))->setChecked(true);
+ mySelPlane2->button(1)->setChecked(true);
onCutSelect(1, false);
break;
case 1:
myRotXLbl->setText( tr("LBL_ROT_Y"));
myRotYLbl->setText( tr("LBL_ROT_Z"));
- ((QRadioButton*)mySelPlane2->find(2))->setChecked(true);
+ mySelPlane2->button(2)->setChecked(true);
onCutSelect(2, false);
break;
case 2:
myRotXLbl->setText( tr("LBL_ROT_Z"));
myRotYLbl->setText( tr("LBL_ROT_X"));
- ((QRadioButton*)mySelPlane2->find(0))->setChecked(true);
+ mySelPlane2->button(0)->setChecked(true);
onCutSelect(0, false);
}
setBaseDefault(false);
{
if (!hasInit) return;
- int aNbRows = myPosTable->numRows();
+ int aNbRows = myPosTable->rowCount();
int aNbPlanes = (int)myNbSpn->value();
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( !aModel )
+ return;
+
myCutLines->SetOrientation(getOrientaion(),
myRotXSpn->value()*PI/180.,
myRotYSpn->value()*PI/180.);
myRotYSpn2->value()*PI/180.);
if (aNbRows>0)
- for (int i = 0; i < aNbRows; ++i) {
- QCheckTableItem* aItem = (QCheckTableItem*)myPosTable->item( i, 1 );
+ for (int i = 0; i < aNbRows; ++i)
+ {
+ QTableWidgetItem* aItem = myPosTable->item( i, 1 );
if (aItem == 0) break;
- if (!aItem->isChecked())
- myCutLines->SetLinePosition(i, myPosTable->text(i, 0).toDouble());
+ if (aItem->checkState() != Qt::Checked )
+ {
+ QVariant aVar = aModel->index( i, 0 ).data();
+ myCutLines->SetLinePosition(i, aVar.toDouble());
+ }
}
+ //if (aNbPlanes > aNbRows)
+ // myPosTable->addRows(aNbRows, aNbPlanes - aNbRows );
+ //else if (aNbPlanes < aNbRows)
+ //myPosTable->setRowCount(aNbPlanes);
if (aNbPlanes > aNbRows)
- myPosTable->insertRows(aNbRows, aNbPlanes - aNbRows );
+ while( aNbPlanes > myPosTable->rowCount() )
+ myPosTable->insertRow( myPosTable->rowCount() );
else if (aNbPlanes < aNbRows)
- myPosTable->setNumRows(aNbPlanes);
+ myPosTable->setRowCount(aNbPlanes);
int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes;
- for (int i = 0; i<aMin; i++) {
- myPosTable->setText(i, 0, QString::number(myCutLines->GetLinePosition(i)));
- ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(myCutLines->IsDefaultPosition(i));
+ for (int i = 0; i<aMin; i++)
+ {
+ QModelIndex anIndex = aModel->index( i, 0 );
+ aModel->setData( anIndex, QVariant( myCutLines->GetLinePosition(i) ), Qt::DisplayRole );
+ //myPosTable->setText(i, 0, QString::number(myCutLines->GetLinePosition(i)));
+ myPosTable->item( i, 1 )->setCheckState(myCutLines->IsDefaultPosition(i) ? Qt::Checked : Qt::Unchecked );
}
- QHeader *vh = myPosTable->verticalHeader();
+ //QHeader *vh = myPosTable->verticalHeader();
QString str("Plane# %1");
+ QStringList aLabels;
for (int i=aMin; i<aNbPlanes; i++) {
- VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem
- (myPosTable, QTableItem::OnTyping, QString::number(myCutLines->GetLinePosition(i)));
- aEditItem->setReplaceable(false);
- aEditItem->setEnabled(!myCutLines->IsDefaultPosition(i));
+ /*VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem
+ (myPosTable, QTableItem::OnTyping, QString::number(myCutLines->GetLinePosition(i)));*/
+ QTableWidgetItem* aEditItem = new QTableWidgetItem();
+ aEditItem->setText( QString::number(myCutLines->GetLinePosition(i)) );
+ //aEditItem->setReplaceable(false);
+ //aEditItem->setEnabled(!myCutLines->IsDefaultPosition(i));
+ Qt::ItemFlags aFlags = aEditItem->flags();
+ if ( myCutLines->IsDefaultPosition(i) )
+ aFlags |= Qt::ItemIsEnabled;
+ else
+ aFlags &= (~Qt::ItemIsEnabled);
+
myPosTable->setItem(i, 0, aEditItem);
- QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
+ /*QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
aCheck->setChecked(myCutLines->IsDefaultPosition(i));
aCheck->setReplaceable(false);
+ myPosTable->setItem(i, 1, aCheck);*/
+
+ QTableWidgetItem* aCheck = new QTableWidgetItem();
+ aCheck->setCheckState( myCutLines->IsDefaultPosition(i) ?
+ Qt::Checked : Qt::Unchecked );
myPosTable->setItem(i, 1, aCheck);
- vh->setLabel( i, str.arg(i+1) );
+ //vh->setLabel( i, str.arg(i+1) );
+ aLabels.append( str.arg(i+1) );
}
+ myPosTable->setVerticalHeaderLabels( aLabels );
// Update preview
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
//------------------------------------------------------------------------------
void VisuGUI_CutLinesDlg::setDefault (int all)
{
- myPosTable->setCurrentCell(-1, 1);
+ myPosTable->setCurrentCell(0, 0);
myPosTable->clearSelection();
+
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( !aModel )
+ return;
+
if (all == 0) return;
if (all == 1)
for (int i = 0; i < (int)myNbSpn->value(); ++i)
- ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
+ myPosTable->item( i, 1 )->setCheckState(Qt::Checked);
- for (int i = 0; i < (int)myNbSpn->value(); ++i) {
- if ( ((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked() ) {
+ for (int i = 0; i < (int)myNbSpn->value(); ++i)
+ {
+ if ( myPosTable->item( i, 1 )->checkState() == Qt::Checked )
+ {
myCutLines->SetDefaultPosition(i);
- myPosTable->setText( i, 0, QString::number(myCutLines->GetLinePosition(i)));
- myPosTable->item( i, 0 )->setEnabled(false);
- } else
- myPosTable->item( i, 0 )->setEnabled(true);
+ QModelIndex anIndex = aModel->index( i, 0 );
+ aModel->setData( anIndex, QVariant( myCutLines->GetLinePosition(i) ), Qt::DisplayRole );
+ //myPosTable->setText( i, 0, QString::number(myCutLines->GetLinePosition(i)));
+ //myPosTable->item( i, 0 )->setEnabled(false);
+ myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+ }
+ else
+ myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() | Qt::ItemIsEnabled );
}
}
//------------------------------------------------------------------------------
VISU::CutPlanes::Orientation VisuGUI_CutLinesDlg::getOrientaion (bool IsBasePlane)
{
- QHButtonGroup* aBG;
+ QButtonGroup* aBG;
if (IsBasePlane)
aBG = mySelPlane;
aBG = mySelPlane2;
VISU::CutPlanes::Orientation orient;
- switch (aBG->id(aBG->selected())) {
+ switch (aBG->id(aBG->checkedButton())) {
case 0:
orient = VISU::CutPlanes::XY;
break;
{
switch (orient) {
case VISU::CutPlanes::XY:
- ((QRadioButton*)mySelPlane->find(0))->setChecked(true);
+ mySelPlane->button(0)->setChecked(true);
onPlaneSelect(0);
break;
case VISU::CutPlanes::YZ:
- ((QRadioButton*)mySelPlane->find(1))->setChecked(true);
+ mySelPlane->button(1)->setChecked(true);
onPlaneSelect(1);
break;
case VISU::CutPlanes::ZX:
- ((QRadioButton*)mySelPlane->find(2))->setChecked(true);
+ mySelPlane->button(2)->setChecked(true);
onPlaneSelect(2);
}
}
{
switch (orient) {
case VISU::CutPlanes::XY:
- ((QRadioButton*)mySelPlane2->find(0))->setChecked(true);
+ mySelPlane2->button(0)->setChecked(true);
onCutSelect(0);
break;
case VISU::CutPlanes::YZ:
- ((QRadioButton*)mySelPlane2->find(1))->setChecked(true);
+ mySelPlane2->button(1)->setChecked(true);
onCutSelect(1);
break;
case VISU::CutPlanes::ZX:
- ((QRadioButton*)mySelPlane2->find(2))->setChecked(true);
+ mySelPlane2->button(2)->setChecked(true);
onCutSelect(2);
}
}
void VisuGUI_CutLinesDlg::onValueChanged (int theRow, int theCol)
{
- if (theCol == 0) {
- QString aTxt = myPosTable->text(theRow, 0);
- bool isChanged = !aTxt.isEmpty();
- ((QCheckTableItem*)myPosTable->item(theRow, 1))->setChecked(!isChanged);
+ /*QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( !aModel )
+ return;
+
+ QModelIndex anIndex = aModel->index( theRow, theCol );
+
+ if (theCol == 0)
+ {
+ bool isChanged = !anIndex.data().isNull();
+ myPosTable->item(theRow, 1)->setCheckState(!isChanged ? Qt::Checked : Qt::Unchecked);
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
- if (aView) {
- if (myPreviewCheck->isChecked()) {
+ if (aView)
+ {
+ if (myPreviewCheck->isChecked())
+ {
//Update Preview
//myCutLines->SetLinePosition( theRow, aTxt.toDouble());
// myCutLines->GetPipeLine()->Update();
//aView->Repaint();
}
}
- } else if (theCol == 1){
- bool isDefault = ((QCheckTableItem*)myPosTable->item(theRow, theCol))->isChecked();
- if (isDefault) {
+ }
+ else if (theCol == 1)
+ {
+ bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+ if (isDefault)
+ {
//myCutLines->SetDefaultPosition(theRow);
// myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
- if (aView) {
- if (myPreviewCheck->isChecked()) {
+ if (aView)
+ {
+ if (myPreviewCheck->isChecked())
+ {
//Update Preview
// myCutLines->GetPipeLine()->Update();
deletePlanes();
//aView->Repaint();
}
}
- myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
+ //myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
+ aModel->setData( anIndex, myCutLines->GetLinePosition(theRow), Qt::DisplayRole );
+ myPosTable->item( theRow, 0 )->setFlags( myPosTable->item( theRow, 0 )->flags() | Qt::ItemIsEnabled );
+ }
+ else
+ myPosTable->item( theRow, 0 )->setFlags( myPosTable->item( theRow, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+ }*/
+
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( !aModel )
+ return;
+
+ if ( !myPosTable->item(theRow, 1) || !myPosTable->item(theRow, 0) )
+ return;
+
+ QModelIndex anIndex;
+
+ QTableWidgetItem* anItem = myPosTable->item(theRow, theCol);
+ if (!anItem )
+ return;
+
+ bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+ if (theCol == 0 )
+ {
+ anIndex = aModel->index( theRow, 0 );
+ //if ( !isDefault)
+ //myCutLines->SetLinePosition( theRow, anIndex.data().toDouble());
+
+
+ if ( myPreviewCheck->isChecked() )
+ {
+ //Update Preview
+ if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+ {
+ //myCutLines->GetPipeLine()->Update();
+ deletePlanes();
+ createPlanes();
+ //vf->Repaint();
+ }
}
- myPosTable->item(theRow, 0)->setEnabled(!isDefault);
+ }
+ else
+ {
+ anItem = myPosTable->item(theRow, 0);
+ Qt::ItemFlags flags = anItem->flags();
+ if ( isDefault )
+ {
+ myCutLines->SetDefaultPosition(theRow);
+ anIndex = aModel->index( theRow, 0 );
+ aModel->setData( anIndex, myCutLines->GetLinePosition(theRow), Qt::DisplayRole );
+
+ /*if ( myPreviewCheck->isChecked() )
+ {
+ //not needed update presentation, because item->setFlags generates signal cellChanged() again
+ }*/
+ flags &= (~Qt::ItemIsEnabled );
+ }
+ else
+ flags |= Qt::ItemIsEnabled;
+
+ anItem->setFlags( flags );
}
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_CutPlanesDlg.h"
-#include <qhbuttongroup.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
+#include <QCheckBox>
class QLineEdit;
+class QTabWidget;
class SUIT_ViewManager;
class SalomeApp_Module;
void deletePlanes();
void updateGlyphs(bool update);
- QHButtonGroup* mySelPlane;
- QtxDblSpinBox* myRotXSpn;
- QtxDblSpinBox* myRotYSpn;
+ QButtonGroup* mySelPlane;
+ QtxDoubleSpinBox* myRotXSpn;
+ QtxDoubleSpinBox* myRotYSpn;
QLabel* myRotXLbl;
QLabel* myRotYLbl;
- QtxDblSpinBox* myPosSpn;
+ QtxDoubleSpinBox* myPosSpn;
QLineEdit* myBasePlanePos;
QCheckBox* myCBSetDef;
QCheckBox* myCreateTable;
QCheckBox* myCurvesCheck;
- QHButtonGroup* mySelPlane2;
- QtxDblSpinBox* myNbSpn;
- QtxDblSpinBox* myRotXSpn2;
- QtxDblSpinBox* myRotYSpn2;
+ QButtonGroup* mySelPlane2;
+ QtxDoubleSpinBox* myNbSpn;
+ QtxDoubleSpinBox* myRotXSpn2;
+ QtxDoubleSpinBox* myRotYSpn2;
QLabel* myRotXLbl2;
QLabel* myRotYLbl2;
- QtxDblSpinBox* myPosSpn2;
- QTable* myPosTable;
+ QtxDoubleSpinBox* myPosSpn2;
+ QTableWidget* myPosTable;
bool hasInit;
QDoubleValidator *mydvalidator;
#include "VISU_CutPlanes_i.hh"
#include "VISU_CutPlanesPL.hxx"
-#include "OB_Browser.h"
+//#include "OB_Browser.h"
+
+#include "VisuGUI_TableDlg.h"
#include "SVTK_ViewWindow.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qstyle.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QLabel>
+#include <QButtonGroup>
+#include <QCheckBox>
+#include <QStyle>
+#include <QValidator>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QKeyEvent>
+#include <QSpinBox>
+#include <QRadioButton>
+#include <QTableWidget>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QHeaderView>
#include <vtkRenderer.h>
#include <vtkPolyData.h>
TopLayout->setSpacing( 6 );
TopLayout->setMargin( 10 );
- QButtonGroup* SelPlane = new QButtonGroup (tr("TXT_ORIENTATION"), this, "SelPlane");
+ QButtonGroup* SelPlane = new QButtonGroup ( this );
+ QGroupBox* aGB = new QGroupBox( tr("TXT_ORIENTATION"), this );
//SelPlane->setTitle(tr("TXT_ORIENTATION"));
- SelPlane->setColumnLayout(0, Qt::Vertical);
- SelPlane->layout()->setSpacing( 0 );
- SelPlane->layout()->setMargin( 0 );
- QGridLayout* SelPlaneLayout = new QGridLayout( SelPlane->layout() );
+ //SelPlane->setColumnLayout(0, Qt::Vertical);
+ //SelPlane->layout()->setSpacing( 0 );
+ //SelPlane->layout()->setMargin( 0 );
+ QGridLayout* SelPlaneLayout = new QGridLayout( aGB );
SelPlaneLayout->setAlignment( Qt::AlignTop );
SelPlaneLayout->setSpacing( 6 );
SelPlaneLayout->setMargin( 11 );
- RBxy = new QRadioButton (tr("PARALLEL_XOY"), SelPlane, "RBxy");
- RByz = new QRadioButton (tr("PARALLEL_YOZ"), SelPlane, "RByz");
- RBzx = new QRadioButton (tr("PARALLEL_ZOX"), SelPlane, "RBzx");
+ RBxy = new QRadioButton (tr("PARALLEL_XOY"), aGB);
+ RByz = new QRadioButton (tr("PARALLEL_YOZ"), aGB);
+ RBzx = new QRadioButton (tr("PARALLEL_ZOX"), aGB);
SelPlaneLayout->addWidget( RBxy, 0, 0 );
SelPlaneLayout->addWidget( RByz, 0, 1 );
SelPlaneLayout->addWidget( RBzx, 0, 2 );
+ SelPlane->addButton( RBxy );
+ SelPlane->addButton( RByz );
+ SelPlane->addButton( RBzx );
- QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this, "LabelPosi_3");
+ QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this);
- nbPlan = new QSpinBox( 1, 100, 1, this, "nbPlan" );
+ nbPlan = new QSpinBox( this );
+ nbPlan->setMinimum( 1 );
+ nbPlan->setMaximum(100);
+ nbPlan->setSingleStep( 1 );
nbPlan->setValue( 1 );
nbPlan->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myPosTable = new QTable (this, "Positions of planes");
+ myPosTable = new QTableWidget (this);
myPosTable->setMaximumHeight( 227 );
myPosTable->setMinimumWidth( 294 );
- myPosTable->setNumCols(2);
- myPosTable->setNumRows(0);
- connect( myPosTable, SIGNAL(valueChanged(int, int)), this, SLOT(onValueChanged(int, int)) );
-
- QHeader *th = myPosTable->horizontalHeader();
- th->setLabel( 0, "Position" );
- th->setLabel( 1, "Set default" );
- th->setStyle("QStyle::CE_PushButton");
-
- QGroupBox* GBrot = new QGroupBox (tr("LBL_ROTATION"), this, "GBrot");
- GBrot->setColumnLayout(0, Qt::Vertical);
- GBrot->layout()->setSpacing( 0 );
- GBrot->layout()->setMargin( 0 );
- QGridLayout* GBrotLayout = new QGridLayout( GBrot->layout() );
+ myPosTable->setColumnCount(2);
+ myPosTable->setRowCount(0);
+ connect( myPosTable, SIGNAL(cellChanged(int, int)), this, SLOT(onValueChanged(int, int)) );
+
+ myPosTable->setItemDelegateForColumn( 0,
+ new NumDelegateItem( myPosTable, NumDelegateItem::NV_Real) );
+
+ myPosTable->setEditTriggers(
+ (QAbstractItemView::EditTriggers)(QAbstractItemView::AllEditTriggers &(~QAbstractItemView::CurrentChanged)));
+
+ QStringList aLabels;
+ aLabels.append( "Position" );
+ aLabels.append( "Set default" );
+
+ myPosTable->setHorizontalHeaderLabels( aLabels );
+
+ QGroupBox* GBrot = new QGroupBox (tr("LBL_ROTATION"), this);
+ //GBrot->setColumnLayout(0, Qt::Vertical);
+ //GBrot->layout()->setSpacing( 0 );
+ //GBrot->layout()->setMargin( 0 );
+ QGridLayout* GBrotLayout = new QGridLayout( GBrot );
GBrotLayout->setAlignment( Qt::AlignTop );
GBrotLayout->setSpacing( 6 );
GBrotLayout->setMargin( 11 );
- LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot, "LabelRot1");
+ LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot );
GBrotLayout->addWidget( LabelRot1, 0, 0 );
- Rot1 = new QtxDblSpinBox( -180, 180, 10, GBrot );
+ Rot1 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
Rot1->setValue( 0 );
Rot1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot1, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
GBrotLayout->addWidget( Rot1, 0, 1 );
- LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot, "LabelRot2");
+ LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot );
GBrotLayout->addWidget( LabelRot2, 1, 0 );
- Rot2 = new QtxDblSpinBox( -180, 180, 10, GBrot );
+ Rot2 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
Rot2->setValue( 0 );
Rot2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot2, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
GBrotLayout->addWidget( Rot2, 1, 1 );
QLabel* aPosLbl = new QLabel(tr( "LBL_POS" ), this);
- myPosSpn = new QtxDblSpinBox( 0, 1, 0.1, this );
+ myPosSpn = new QtxDoubleSpinBox( 0, 1, 0.1, this );
myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), this);
myPreviewCheck->setChecked(false);
connect( myPreviewCheck, SIGNAL( toggled( bool )), this, SLOT( onPreviewCheck( bool ) ) );
- TopLayout->addMultiCellWidget( SelPlane, 0, 0, 0, 1 );
- TopLayout->addMultiCellWidget( GBrot, 1, 1, 0, 1 );
+ TopLayout->addWidget( aGB, 0, 0, 1, 2 );
+ TopLayout->addWidget( GBrot, 1, 0, 1, 2 );
TopLayout->addWidget( LabelPosi_3, 2, 0 );
TopLayout->addWidget( nbPlan, 2, 1 );
- TopLayout->addMultiCellWidget( myPosTable, 3, 3, 0, 1 );
+ TopLayout->addWidget( myPosTable, 3, 0, 1, 2 );
TopLayout->setRowStretch ( 3, 3 );
TopLayout->addWidget(aPosLbl, 4, 0 );
TopLayout->addWidget(myPosSpn, 4, 1 );
- TopLayout->addMultiCellWidget( myPreviewCheck, 5, 5, 0, 1 );
+ TopLayout->addWidget( myPreviewCheck, 5, 0, 1, 2 );
// signals and slots connections
- connect( SelPlane, SIGNAL( clicked( int )), this, SLOT( orientationChanged( int ) ) );
+ connect( SelPlane, SIGNAL( buttonClicked( int )), this, SLOT( orientationChanged( int ) ) );
connect( nbPlan, SIGNAL( valueChanged( int )), this, SLOT( DrawTable( ) ) );
connect( myPosSpn, SIGNAL( valueChanged( double )), this, SLOT( DrawTable( ) ) );
- connect( th, SIGNAL( clicked(int)), this, SLOT( setDefault(int) ) );
+ connect( myPosTable->horizontalHeader(), SIGNAL( sectionClicked(int)), this, SLOT( setDefault(int) ) );
// default values
myCutPlanes = NULL;
thePrs->SetNbPlanes(getNbPlanes());
thePrs->SetDisplacement(myPosSpn->value());
for (int i = 0; i < getNbPlanes(); ++i) {
- QCheckTableItem* anItem = (QCheckTableItem*)myPosTable->item(i, 1);
+ QTableWidgetItem* anItem = myPosTable->item(i, 1);
if (!anItem)
break;
- if (!anItem->isChecked())
- thePrs->SetPlanePosition(i, myPosTable->text(i, 0).toDouble());
+ if (anItem->checkState() != Qt::Checked )
+ thePrs->SetPlanePosition(i, myPosTable->item(i, 0)->text().toDouble());
else
thePrs->SetDefault(i);
}
if (myCutPlanes == NULL) return;
if (!hasInit) return;
- int aNbRows = myPosTable->numRows();
+ int aNbRows = myPosTable->rowCount();
int aNbPlanes = getNbPlanes();
myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
myCutPlanes->SetDisplacement(myPosSpn->value());
if (aNbRows>0)
for (int i = 0; i < aNbRows; ++i) {
- QCheckTableItem* aItem = (QCheckTableItem*)myPosTable->item( i, 1 );
+ QTableWidgetItem* aItem = myPosTable->item( i, 1 );
if (aItem == 0) break;
- if (!aItem->isChecked())
- myCutPlanes->SetPlanePosition(i, myPosTable->text(i, 0).toDouble());
+ if (aItem->checkState() != Qt::Checked )
+ myCutPlanes->SetPlanePosition(i, myPosTable->item(i, 0)->text().toDouble());
}
if (aNbPlanes > aNbRows)
- myPosTable->insertRows(aNbRows, aNbPlanes - aNbRows );
+ while( aNbPlanes > myPosTable->rowCount() )
+ myPosTable->insertRow( myPosTable->rowCount() );
else if (aNbPlanes < aNbRows)
- myPosTable->setNumRows(aNbPlanes);
+ myPosTable->setRowCount(aNbPlanes);
int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes;
for (int i = 0; i<aMin; i++) {
- myPosTable->setText(i, 0, QString::number(myCutPlanes->GetPlanePosition(i)));
- ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(myCutPlanes->IsDefault(i));
+ myPosTable->item( i, 0 )->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+ myPosTable->item( i, 1 )->setCheckState( myCutPlanes->IsDefault(i) ? Qt::Checked : Qt::Unchecked);
}
- QHeader *vh = myPosTable->verticalHeader();
+ //QHeader *vh = myPosTable->verticalHeader();
+ QStringList aLabels;
QString str("Plane# %1");
for (int i=aMin; i<aNbPlanes; i++) {
- VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem(myPosTable,
- QTableItem::OnTyping,
- QString::number(myCutPlanes->GetPlanePosition(i)));
- aEditItem->setReplaceable(false);
- aEditItem->setEnabled(!myCutPlanes->IsDefault(i));
+ QTableWidgetItem* aEditItem = new QTableWidgetItem();
+ aEditItem->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+ //aEditItem->setReplaceable(false);
+ //aEditItem->setEnabled(!myCutPlanes->IsDefault(i));
+ Qt::ItemFlags aFlags = aEditItem->flags();
+ if ( myCutPlanes->IsDefault(i) )
+ aFlags |= Qt::ItemIsEnabled;
+ else
+ aFlags &= (~Qt::ItemIsEnabled);
myPosTable->setItem(i, 0, aEditItem);
- QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
+ /*QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
aCheck->setChecked(myCutPlanes->IsDefault(i));
- aCheck->setReplaceable(false);
+ aCheck->setReplaceable(false);*/
+ QTableWidgetItem* aCheck = new QTableWidgetItem();
+ aFlags = aCheck->flags();
+ //aFlags |= Qt::ItemIsUserCheckable;
+ aFlags &= (~Qt::ItemIsEditable);
+ aCheck->setFlags( aFlags );
+ aCheck->setCheckState( myCutPlanes->IsDefault(i) ?
+ Qt::Checked : Qt::Unchecked );
myPosTable->setItem(i, 1, aCheck);
- vh->setLabel( i, str.arg(i+1) );
+ //vh->setLabel( i, str.arg(i+1) );
+ aLabels.append( str.arg(i+1) );
}
+ myPosTable->setVerticalHeaderLabels( aLabels );
// Update preview
if (myPreviewCheck->isChecked()) {
if (all == 0) return;
if (all == 1)
for (int i = 0; i < getNbPlanes(); ++i)
- ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
+ myPosTable->item( i, 1 )->setCheckState(Qt::Checked);
+ //((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
for (int i = 0; i < getNbPlanes(); ++i) {
- if ( ((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked() ) {
+ if ( myPosTable->item( i, 1 )->checkState() == Qt::Checked )
+ {
myCutPlanes->SetDefault(i);
- myPosTable->setText( i, 0, QString::number(myCutPlanes->GetPlanePosition(i)));
- myPosTable->item( i, 0 )->setEnabled(false);
- } else
- myPosTable->item( i, 0 )->setEnabled(true);
+ myPosTable->item( i, 0)->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+ myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+ }
+ else
+ myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() | Qt::ItemIsEnabled );
}
}
void VisuGUI_CutPlanesPane::onValueChanged (int theRow, int theCol)
{
- if (theCol == 0) {
- QString aTxt = myPosTable->text(theRow, 0);
- bool isChanged = !aTxt.isEmpty();
- ((QCheckTableItem*)myPosTable->item(theRow, 1))->setChecked(!isChanged);
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+ if ( !aModel )
+ return;
+
+ if ( !myPosTable->item(theRow, 1) || !myPosTable->item(theRow, 0) )
+ return;
+
+ QModelIndex anIndex;
+
+ QTableWidgetItem* anItem = myPosTable->item(theRow, theCol);
+ if (!anItem )
+ return;
+
+ bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+ if (theCol == 0 )
+ {
+ anIndex = aModel->index( theRow, 0 );
+ if ( !isDefault)
+ myCutPlanes->SetPlanePosition( theRow, anIndex.data().toDouble());
+
+
+ if ( myPreviewCheck->isChecked() )
+ {
+ //Update Preview
+ if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+ {
+ myCutPlanes->GetPipeLine()->Update();
+ deletePlanes();
+ createPlanes();
+ vf->Repaint();
+ }
+ }
+ }
+ else
+ {
+ anItem = myPosTable->item(theRow, 0);
+ Qt::ItemFlags flags = anItem->flags();
+ if ( isDefault )
+ {
+ myCutPlanes->SetDefault(theRow);
+ anIndex = aModel->index( theRow, 0 );
+ aModel->setData( anIndex, myCutPlanes->GetPlanePosition(theRow), Qt::DisplayRole );
+
+ /*if ( myPreviewCheck->isChecked() )
+ {
+ //not needed update presentation, because item->setFlags generates signal cellChanged() again
+ }*/
+ flags &= (~Qt::ItemIsEnabled );
+ }
+ else
+ flags |= Qt::ItemIsEnabled;
+
+ anItem->setFlags( flags );
+ }
+
+ /*if (theCol == 0) {
+ bool isChanged = !anIndex.data().isNull();
+ QTableWidgetItem* anItem = myPosTable->item(theRow, 1);
+ if ( !anItem )
+ {
+ anItem = new QTableWidgetItem();
+ myPosTable->setItem( theRow, 1, anItem );
+ Qt::ItemFlags flags = anItem->flags();
+ //flags |= Qt::ItemIsUserCheckable;
+ flags &= (~Qt::ItemIsEditable);
+ anItem->setFlags( flags );
+ }
+ anItem->setCheckState(!isChanged ? Qt::Checked : Qt::Unchecked);
if (myPreviewCheck->isChecked()) {
//Update Preview
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
- myCutPlanes->SetPlanePosition( theRow, aTxt.toDouble());
+ myCutPlanes->SetPlanePosition( theRow, anIndex.data().toDouble());
myCutPlanes->GetPipeLine()->Update();
deletePlanes();
createPlanes();
}
}
} else {
- bool isDefault = ((QCheckTableItem*)myPosTable->item(theRow, theCol))->isChecked();
+ bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+ QTableWidgetItem* anItem = myPosTable->item(theRow, 0);
+ if ( !anItem )
+ {
+ anItem = new QTableWidgetItem();
+ myPosTable->setItem( theRow, 0, anItem );
+ }
+
if (isDefault) {
myCutPlanes->SetDefault(theRow);
- myPosTable->setText(theRow, 0, QString::number(myCutPlanes->GetPlanePosition(theRow)));
-
+ //myPosTable->setText(theRow, 0, QString::number(myCutPlanes->GetPlanePosition(theRow)));
+ anIndex = aModel->index( theRow, 0 );
+ aModel->setData( anIndex, myCutPlanes->GetPlanePosition(theRow), Qt::DisplayRole );
+ anItem->setFlags( anItem->flags() | Qt::ItemIsEnabled );
if (myPreviewCheck->isChecked()) {
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
//Update Preview
}
}
}
- myPosTable->item(theRow, 0)->setEnabled(!isDefault);
- }
+ //myPosTable->item(theRow, 0)->setEnabled(!isDefault);
+ anItem->setFlags( anItem->flags() &(~Qt::ItemIsEnabled ) );
+ }*/
}
void VisuGUI_CutPlanesPane::deletePlanes()
VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule)
{
- setCaption("Cut Planes Definition");
+ setWindowTitle("Cut Planes Definition");
setSizeGripEnabled(true);
QVBoxLayout* TopLayout = new QVBoxLayout (this);
myCutPane = new VisuGUI_CutPlanesPane(this/*, myMgr*/);
myTabBox->addTab(myCutPane, "Cut Planes");
myScalarPane = new VisuGUI_ScalarBarPane(this, false);
- myScalarPane->setMargin(5);
+ if (myScalarPane->layout())
+ myScalarPane->layout()->setMargin(5);
myInputPane = new VisuGUI_InputPane(VISU::TCUTPLANES, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
TopLayout->addWidget(myTabBox);
- QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
+ QGroupBox* GroupButtons = new QGroupBox(this);
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
GroupButtons->setTitle("");
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton(tr("BUT_OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonCancel = new QPushButton(tr("&Cancel"), GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton(tr("BUT_CANCEL"), GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- QPushButton* buttonHelp = new QPushButton(tr("&Help"), GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton(tr("BUT_HELP"), GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
myCutPane->initFromPrsObject(myPrsCopy);
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
int VisuGUI_CutPlanesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
//###################################################################
-QWidget* VisuGUI_NumEditItem::createEditor() const
+/*QWidget* VisuGUI_NumEditItem::createEditor() const
{
QLineEdit *editline = new QLineEdit(text(), table()->viewport());
QDoubleValidator *dvalidator = new QDoubleValidator(table()->viewport());
dvalidator->setDecimals(32);
editline->setValidator(dvalidator);
return editline;
-}
+}*/
void VisuGUI_CutPlanesDlg::keyPressEvent( QKeyEvent* e )
{
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include <SALOME_Actor.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qtabwidget.h>
+#include <QtxDoubleSpinBox.h>
+
+#include <QFrame>
+
+class QSpinBox;
+class QRadioButton;
+class QTabWidget;
+class QTableWidget;
+class QCheckBox;
+
-#include <QtxDblSpinBox.h>
#include "SALOMEconfig.h"
#include CORBA_CLIENT_HEADER(VISU_Gen)
QLabel* LabelRot1;
QLabel* LabelRot2;
QSpinBox* nbPlan;
- QtxDblSpinBox* Rot1;
- QtxDblSpinBox* Rot2;
+ QtxDoubleSpinBox* Rot1;
+ QtxDoubleSpinBox* Rot2;
QRadioButton* RBzx;
QRadioButton* RByz;
QRadioButton* RBxy;
- QtxDblSpinBox* myPosSpn;
- QTable* myPosTable;
+ QtxDoubleSpinBox* myPosSpn;
+ QTableWidget* myPosTable;
VISU::CutPlanes_i* myCutPlanes;
QCheckBox* myPreviewCheck;
double X1, X2;
};
-class VisuGUI_NumEditItem: public QTableItem
+/*class VisuGUI_NumEditItem: public QTableItem
{
public:
- VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
+ VisuGUI_NumEditItem(QTableWidget* table, const QString& text ):
QTableItem(table, et, text) {};
~VisuGUI_NumEditItem() {};
QWidget* createEditor() const;
-};
+};*/
#endif // VISUGUI_CUTPLANESDLG_H
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QDialog>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QTabWidget>
+#include <QKeyEvent>
using namespace std;
VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule)
{
- setCaption(tr("DLG_TITLE"));
+ setWindowTitle(tr("DLG_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout (this);
myTabBox = new QTabWidget (this);
// Deformed shape pane
- QVBox* aBox = new QVBox (this);
- aBox->setMargin(11);
- QFrame* TopGroup = new QFrame (aBox, "TopGroup");
+ QWidget* aBox = new QWidget (this);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+ aVBLay->setMargin(11);
+ QFrame* TopGroup = new QFrame ( aBox );
+ aVBLay->addWidget( TopGroup );
TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
TopGroup->setLineWidth(1);
QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
TopGroupLayout->setMargin(11);
// Scale factor
- QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup, "ScaleLabel");
+ QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup );
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
+ ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- ScalFact->setPrecision(38);
+ ScalFact->setDecimals(38);
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
// Magnitude coloring
- UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING"), TopGroup, "UseMagn");
+ UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING"), TopGroup);
UseMagn->setChecked(true);
- TopGroupLayout->addMultiCellWidget(UseMagn, 1, 1, 0, 1);
+ TopGroupLayout->addWidget(UseMagn, 1, 0, 1, 2);
myTabBox->addTab(aBox, tr("DEFORMED_SHAPE_TAB"));
// Scalar bar pane
myScalarPane = new VisuGUI_ScalarBarPane (this, false);
- myScalarPane->setMargin(5);
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin(5);
myInputPane = new VisuGUI_InputPane(VISU::TDEFORMEDSHAPE, theModule, this);
myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB"));
myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
// Buttons
- QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+ QGroupBox* GroupButtons = new QGroupBox (this);
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+ //oupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding,
QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
int VisuGUI_DeformedShapeDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
-#include <qdialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include <QCheckBox>
+
+class QTabWidget;
+
+
+
+class QtxDoubleSpinBox;
class SalomeApp_Module;
class VisuGUI_InputPane;
void onHelp();
private:
- QtxDblSpinBox* ScalFact;
+ QtxDoubleSpinBox* ScalFact;
QCheckBox* UseMagn;
QTabWidget* myTabBox;
VisuGUI_ScalarBarPane* myScalarPane;
#include "VisuGUI_DialogRunner.h"
-#include <qdialog.h>
-#include <qapplication.h>
+#include <QDialog>
+#include <QEventLoop>
+#include <QEvent>
VisuGUI_DialogRunner::VisuGUI_DialogRunner( QDialog* dlg )
: QObject(),
- myDlg( dlg ),
- myInLoop( false )
+ myDlg( dlg )
{
if( myDlg )
{
connect( myDlg, SIGNAL( destroyed() ), this, SLOT( onDialogDelete() ) );
myDlg->installEventFilter( this );
+ myEventLoop = new QEventLoop( this );
}
}
int VisuGUI_DialogRunner::run( const bool modal )
{
- if( myInLoop || !myDlg )
+ if( myEventLoop->isRunning() || !myDlg )
return -1;
if( modal )
return myDlg->exec();
- myInLoop = true;
myDlg->show();
- qApp->enter_loop();
+ myEventLoop->exec();
return myDlg->result();
}
void VisuGUI_DialogRunner::onDialogDelete()
{
- if( myInLoop )
- qApp->exit_loop();
+ if( myEventLoop->isRunning() )
+ myEventLoop->quit();
myDlg = 0;
- myInLoop = false;
}
bool VisuGUI_DialogRunner::eventFilter( QObject* o, QEvent* e )
{
if( o==myDlg && e && ( e->type()==QEvent::Close || e->type()==QEvent::Hide ) )
{
- if( myInLoop && !myDlg->isMinimized() )
- {
- myInLoop = false;
- qApp->exit_loop();
- }
+ if( myEventLoop->isRunning() && !myDlg->isMinimized() )
+ myEventLoop->quit();
return false;
}
else
#ifndef DIALOG_RUNNER_HEADER
#define DIALOG_RUNNER_HEADER
-#include <qobject.h>
+#include <QObject>
class QDialog;
+class QEventLoop;
class VisuGUI_DialogRunner : public QObject
{
void onDialogDelete();
private:
- QDialog* myDlg;
- bool myInLoop;
+ QDialog* myDlg;
+ QEventLoop* myEventLoop;
};
#endif
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
+#include <SUIT_ViewManager.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_Desktop.h>
VisuGUI_Displayer::VisuGUI_Displayer( SalomeApp_Application* app )
: LightApp_Displayer(),
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if(aStudy && aView){
- _PTR(SObject) aSObject = aStudy->studyDS()->FindObjectID( theEntry.latin1() );
+ _PTR(SObject) aSObject = aStudy->studyDS()->FindObjectID( (const char*)theEntry.toLatin1() );
CORBA::Object_var anObject = VISU::ClientSObjectToObject( aSObject );
if( CORBA::is_nil( anObject ) )
return 0;
Handle(SALOME_InteractiveObject) anIO = aPrs3d->GetIO();
if(anIO->hasEntry()){
std::string anEntry = anIO->getEntry();
- aPrs = LightApp_Displayer::buildPresentation( anEntry, aView );
+ aPrs = LightApp_Displayer::buildPresentation( anEntry.c_str(), aView );
}
}
}
thePrs3d->RemoveActors();
INFOS(exc.what());
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(myApp->desktop(), QObject::tr("WRN_VISU"),
QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
if( !vv )
return false;
- SPlot2d_Curve* curve = vv->getCurveByIO( vv->FindIObject( entry.latin1() ) );
+ SPlot2d_Curve* curve = vv->getCurveByIO( vv->FindIObject( (const char*)entry.toLatin1() ) );
if( !curve )
{
curve = c->CreatePresentation();
if( !study )
return false;
- _PTR(SObject) obj = study->studyDS()->FindObjectID( entry.latin1() );
+ _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() );
CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
if( CORBA::is_nil( anObj ) )
return false;
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <QLayout>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QLabel>
+#include <QTreeWidget>
+#include <QToolButton>
+#include <QKeyEvent>
+
using namespace std;
VisuGUI_EditContainerDlg::VisuGUI_EditContainerDlg (VisuGUI* theModule, bool theIsModal)
- : QDialog(VISU::GetDesktop(theModule), "VisuGUI_EditContainerDlg", theIsModal,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+ : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myVisuGUI(theModule)
{
+ setModal( theIsModal );
if (!theIsModal) {
- setWFlags(getWFlags() | WDestructiveClose);
+ setAttribute( Qt::WA_DeleteOnClose, true );
}
- setCaption("Edit Plot 2D Presentation");
+ setWindowTitle("Edit Plot 2D Presentation");
setSizeGripEnabled(true);
- QVBoxLayout* TopLayout = new QVBoxLayout (this, 6, 11);
+ QVBoxLayout* TopLayout = new QVBoxLayout (this );
+ TopLayout->setMargin( 6 );
+ TopLayout->setSpacing( 11);
/***************************************************************/
QFrame* aControlFrame = new QFrame (this);
QGridLayout* aControlLay = new QGridLayout (aControlFrame);
aControlLay->setSpacing(6);
aControlLay->setMargin(11);
- aControlLay->addRowSpacing(1, 30);
- aControlLay->addRowSpacing(4, 30);
+ //aControlLay->addRowSpacing(1, 30);
+ //aControlLay->addRowSpacing(4, 30);
aControlLay->setRowStretch(1, 1);
aControlLay->setRowStretch(4, 1);
- aControlLay->addColSpacing(0, 180);
- aControlLay->addColSpacing(2, 180);
+ //aControlLay->addColSpacing(0, 180);
+ //aControlLay->addColSpacing(2, 180);
QLabel* aSelectLbl = new QLabel (tr("LBL_STUDY"), aControlFrame);
aControlLay->addWidget(aSelectLbl, 0, 0);
- myStudyLst = new QListView (aControlFrame);
- myStudyLst->setSelectionMode(QListView::Extended);
- myStudyLst->addColumn(tr("TXT_TABLE"), 80);
- myStudyLst->addColumn(tr("TXT_CURVE"), 50);
- myStudyLst->addColumn(tr(""), 0);
+ myStudyLst = new QTreeWidget (aControlFrame);
+ myStudyLst->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ myStudyLst->setColumnCount( 3 );
+ QStringList aLabels;
+ aLabels.append( tr("TXT_TABLE") );
+ aLabels.append( tr("TXT_CURVE") );
+ aLabels.append( "" );
+ myStudyLst->setHeaderLabels( aLabels );
+ myStudyLst->setColumnWidth( 0, 80 );
+ myStudyLst->setColumnWidth( 1, 50 );
+ myStudyLst->setColumnWidth( 2, 0 );
+
+ //myStudyLst->addColumn(tr("TXT_TABLE"), 80);
+ //myStudyLst->addColumn(tr("TXT_CURVE"), 50);
+ //myStudyLst->addColumn(tr(""), 0);
+
myStudyLst->setAllColumnsShowFocus(true);
myStudyLst->setMinimumHeight(130);
- connect(myStudyLst, SIGNAL(selectionChanged()), this, SLOT(onLeftSelected()));
- aControlLay->addMultiCellWidget(myStudyLst, 1, 4, 0, 0);
+ connect(myStudyLst, SIGNAL(itemSelectionChanged()), this, SLOT(onLeftSelected()));
+ aControlLay->addWidget(myStudyLst, 1, 0, 5, 1);
myRightBtn = new QToolButton (aControlFrame);
- myRightBtn->setIconSet(MYRightPix);
+ myRightBtn->setIcon(MYRightPix);
myRightBtn->setEnabled(false);
connect(myRightBtn, SIGNAL(clicked()), this, SLOT(onRightClicked()));
aControlLay->addWidget(myRightBtn, 2, 1);
myLeftBtn = new QToolButton(aControlFrame);
- myLeftBtn->setIconSet(MYLeftPix);
+ myLeftBtn->setIcon(MYLeftPix);
myLeftBtn->setEnabled(false);
connect(myLeftBtn, SIGNAL(clicked()), this, SLOT(onLeftClicked()));
aControlLay->addWidget(myLeftBtn, 3, 1);
QLabel* aForceLbl = new QLabel (tr("LBL_CONTAINER"), aControlFrame);
aControlLay->addWidget(aForceLbl, 0, 2);
- myContainerLst = new QListView(aControlFrame);
- myContainerLst->setSelectionMode(QListView::Extended);
- myContainerLst->addColumn(tr("TXT_TABLE"), 80);
- myContainerLst->addColumn(tr("TXT_CURVE"), 50);
- myContainerLst->addColumn(tr(""), 0);
+ myContainerLst = new QTreeWidget(aControlFrame);
+ myContainerLst->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ //myContainerLst->addColumn(tr("TXT_TABLE"), 80);
+ //myContainerLst->addColumn(tr("TXT_CURVE"), 50);
+ //myContainerLst->addColumn(tr(""), 0);
+ myContainerLst->setColumnCount( 3 );
+ myContainerLst->setHeaderLabels( aLabels );
+ myContainerLst->setColumnWidth( 0, 80 );
+ myContainerLst->setColumnWidth( 1, 50 );
+ myContainerLst->setColumnWidth( 2, 0 );
+
+
myContainerLst->setMinimumWidth(130);
- connect(myContainerLst, SIGNAL(selectionChanged()), this, SLOT(onRightSelected()));
- aControlLay->addMultiCellWidget(myContainerLst, 1, 4, 2, 2);
+ connect(myContainerLst, SIGNAL(itemSelectionChanged()), this, SLOT(onRightSelected()));
+ aControlLay->addWidget(myContainerLst, 1, 2, 3, 1);
TopLayout->addWidget(aControlFrame);
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+ QGroupBox* GroupButtons = new QGroupBox(this);
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding,
QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
if (!aVisuSO) {
return;
}
- QValueList<CurveStruct> aStudyCurves;
- QValueList<CurveStruct> aContainerCurves;
+ QList<CurveStruct> aStudyCurves;
+ QList<CurveStruct> aContainerCurves;
// Find curves in container
for (int i = 1; i <= theContainer->GetNbCurves(); i++) {
VISU::Curve_i* aCurve = theContainer->GetCurve(i);
if (aCurve == NULL) continue;
CurveStruct aEntry;
aEntry.CurveName = aCurve->GetTitle();
- aEntry.CurveEntry = aCurve->GetEntry();
+ aEntry.CurveEntry = aCurve->GetEntry().c_str();
_PTR(SObject) aTableSO = aStudy->FindObjectID(aCurve->GetTableID());
if (!aTableSO) continue;
aEntry.TableName = getSObjectName(aTableSO);
aContainerCurves.append(aEntry);
- new QListViewItem(myContainerLst, aEntry.TableName, aEntry.CurveName, aEntry.CurveEntry);
+ QStringList aList;
+ aList.append( aEntry.TableName );
+ aList.append( aEntry.CurveName );
+ aList.append( aEntry.CurveEntry );
+ new QTreeWidgetItem(myContainerLst, aList);
}
// Find curves in study
_PTR(ChildIterator) aIter = aStudy->NewChildIterator(aVisuSO);
}
}
//Show Curves which are not in Curve
- QValueList<CurveStruct>::iterator it;
- QValueList<CurveStruct>::iterator it2;
+ QList<CurveStruct>::iterator it;
+ QList<CurveStruct>::iterator it2;
bool isExist = false;
for (it = aStudyCurves.begin(); it != aStudyCurves.end(); ++it) {
for (it2 = aContainerCurves.begin(); it2 != aContainerCurves.end(); ++it2) {
break;
}
if (!isExist)
- new QListViewItem(myStudyLst, (*it).TableName, (*it).CurveName, (*it).CurveEntry);
+ {
+ QStringList aList;
+ aList.append( (*it).TableName );
+ aList.append( (*it).CurveName );
+ aList.append( (*it).CurveEntry );
+ new QTreeWidgetItem(myStudyLst, aList );
+ }
}
}
theContainer->Clear();
_PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI));
- QListViewItem* anItem = myContainerLst->firstChild();
- while (anItem) {
- _PTR(SObject) aCurveSO = aStudy->FindObjectID(anItem->text(2).latin1());
+ QTreeWidgetItem* anItem;
+ for ( int i= 0; i< myContainerLst->topLevelItemCount(); i++ )
+ {
+ anItem = myContainerLst->topLevelItem( i );
+ if ( !anItem )
+ continue;
+ _PTR(SObject) aCurveSO = aStudy->FindObjectID((const char*)anItem->text(2).toLatin1());
if (aCurveSO) {
CORBA::Object_var aObject = VISU::ClientSObjectToObject(aCurveSO);
if (!CORBA::is_nil(aObject)) {
if (aCurve) theContainer->AddCurve(aCurve->_this());
}
}
- anItem = anItem->nextSibling();
}
}
void VisuGUI_EditContainerDlg::onLeftClicked()
{
- QListViewItem* anItem = myContainerLst->firstChild();
+ /*QListViewItem* anItem = myContainerLst->firstChild();
while (anItem) {
if (anItem->isSelected()) {
QListViewItem* anTmpItem = anItem;
} else {
anItem = anItem->nextSibling();
}
+ }*/
+ QList<QTreeWidgetItem*> selItem = myContainerLst->selectedItems();
+ QList<QTreeWidgetItem*>::Iterator anIt = selItem.begin();
+
+ QList<QTreeWidgetItem*> topSelectedItems;
+ for ( ; anIt != selItem.end(); anIt++ )
+ {
+ int index = myContainerLst->indexOfTopLevelItem( *anIt );
+ if ( index != -1 )
+ topSelectedItems.append( myContainerLst->takeTopLevelItem( index ) );
}
+
+ myStudyLst->addTopLevelItems(topSelectedItems);
}
void VisuGUI_EditContainerDlg::onRightClicked()
{
- QListViewItem* anItem = myStudyLst->firstChild();
+ /*QListViewItem* anItem = myStudyLst->firstChild();
while (anItem) {
if (anItem->isSelected()) {
QListViewItem* anTmpItem = anItem;
} else {
anItem = anItem->nextSibling();
}
+ }*/
+ QList<QTreeWidgetItem*> selItem = myStudyLst->selectedItems();
+ QList<QTreeWidgetItem*>::Iterator anIt = selItem.begin();
+
+ QList<QTreeWidgetItem*> topSelectedItems;
+ for ( ; anIt != selItem.end(); anIt++ )
+ {
+ int index = myStudyLst->indexOfTopLevelItem( *anIt );
+ if ( index != -1 )
+ topSelectedItems.append( myStudyLst->takeTopLevelItem( index ) );
}
+
+ myContainerLst->addTopLevelItems(topSelectedItems);
}
void VisuGUI_EditContainerDlg::onLeftSelected()
{
- QListViewItem* anItem = myStudyLst->firstChild();
- bool isSelected = false;
- while (anItem) {
- if (anItem->isSelected()) {
- isSelected = true;
- break;
- }
- anItem = anItem->nextSibling();
- }
- myRightBtn->setEnabled(isSelected);
+ myRightBtn->setEnabled( myStudyLst->selectedItems().count() > 0 );
}
void VisuGUI_EditContainerDlg::onRightSelected()
{
- QListViewItem* anItem = myContainerLst->firstChild();
- bool isSelected = false;
- while (anItem) {
- if (anItem->isSelected()) {
- isSelected = true;
- break;
- }
- anItem = anItem->nextSibling();
- }
- myLeftBtn->setEnabled(isSelected);
+ myRightBtn->setEnabled( myContainerLst->selectedItems().count() > 0 );
}
void VisuGUI_EditContainerDlg::onHelp()
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VISUGUI_EDITCONTAINER_H
#define VISUGUI_EDITCONTAINER_H
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qvaluevector.h>
-#include <qtoolbutton.h>
+#include <QDialog>
+#include <QVector>
+
+class QTreeWidget;
+class QToolButton;
+
#include "SALOMEDSClient_SObject.hxx"
private:
QString getSObjectName (_PTR(SObject) theSObject);
- QListView* myStudyLst;
- QListView* myContainerLst;
+ QTreeWidget* myStudyLst;
+ QTreeWidget* myContainerLst;
QToolButton* myLeftBtn;
QToolButton* myRightBtn;
return true;
_PTR(Study) aStudy = anAppStudy->studyDS();
- _PTR(SObject) aSObject = aStudy->FindObjectID( anOwner->entry() );
+ _PTR(SObject) aSObject = aStudy->FindObjectID( (const char*)anOwner->entry().toLatin1() );
if (!aSObject)
return false;
VISU::ColoredPrs3dHolder::BasicInput anInput;
anInput.myResult = aResult;
- anInput.myMeshName = CORBA::string_dup( aMeshName.latin1() );
+ anInput.myMeshName = CORBA::string_dup( (const char*)aMeshName.toLatin1() );
anInput.myEntity = (VISU::Entity)anEntity;
- anInput.myFieldName = CORBA::string_dup( aFieldName.latin1() );
+ anInput.myFieldName = CORBA::string_dup( (const char*)aFieldName.toLatin1() );
anInput.myTimeStampNumber = 1;
size_t isOk = VISU::CheckIsPossible( myType, anInput, true );
// $Header: /dn05/salome/CVS/SALOME_ROOT/SALOME/src/VISUGUI/Visu_FileDlg.cxx
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstring.h>
-#include <qlabel.h>
+#include <QApplication>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QString>
+#include <QLabel>
#include "VISUConfig.hh"
#include "VisuGUI_FileDlg.h"
SUIT_FileDlg(parent, open, showQuickDir, modal)
{
myCBuildAll = new QCheckBox (tr("FULL_LOAD"), this);
+
QLabel* label = new QLabel("", this);
label->setMaximumWidth(0);
QPushButton* pb = new QPushButton(this);
pb->setMaximumWidth(0);
addWidgets( label, myCBuildAll, pb );
+
bool toBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
if (toBuildAll) myCBuildAll->setChecked(true);
}
QFileInfo fi( path );
if ( fi.exists() ) {
if ( fi.isFile() )
- setSelection( path );
+ {
+ setDirectory( fi.absoluteDir().absolutePath() );
+ selectFile( fi.fileName() );
+ }
else if ( fi.isDir() )
- setDir( path );
+ setDirectory( path );
return true;
}
else {
- if ( QFileInfo( fi.dirPath() ).exists() ) {
- setDir( fi.dirPath() );
+ if ( QFileInfo( fi.absoluteDir().absolutePath() ).exists() ) {
+ setDirectory( fi.absoluteDir().absolutePath() );
return true;
}
}
{
VisuGUI_FileDlg* fd = new VisuGUI_FileDlg( parent, open, showQuickDir, true );
if ( !caption.isEmpty() )
- fd->setCaption( caption );
+ fd->setWindowTitle( caption );
if ( !initial.isEmpty() ) {
fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug
}
#include "SUIT_MessageBox.h"
#include "SVTK_FontWidget.h"
-#include "QtxDblSpinBox.h"
-
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qfiledialog.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qtabwidget.h>
+#include "QtxDoubleSpinBox.h"
+
+#include <QLayout>
+#include <QTabWidget>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QFileDialog>
+#include <QValidator>
+#include <QColorDialog>
+#include <QGroupBox>
+#include <QCheckBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QComboBox>
+#include <QToolButton>
+#include <QTabWidget>
+#include <QKeyEvent>
#include <vtkPolyData.h>
#include <vtkDataSet.h>
using namespace std;
VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool SetPref):
- QVBox(parent)
+ QWidget(parent)
{
myVerX = 0.01; myVerY = 0.10; myVerW = 0.10; myVerH = 0.80;
myHorX = 0.20; myHorY = 0.01; myHorW = 0.60; myHorH = 0.12;
Imin = 0.0; Imax = 0.0;
myRangeMode = -1;
- setSpacing(6);
+ QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+ aMainLayout->setSpacing(6);
//setMargin(11);
// Active bar ========================================================
- QGroupBox* ActiveBarGroup = new QGroupBox (tr("ACTIVE_BAR_GRP"), this, "ActiveBarGroup");
- ActiveBarGroup->setColumnLayout(0, Qt::Vertical );
- ActiveBarGroup->layout()->setSpacing( 0 );
- ActiveBarGroup->layout()->setMargin( 0 );
- QGridLayout* ActiveBarGroupLayout = new QGridLayout( ActiveBarGroup->layout() );
+ QGroupBox* ActiveBarGroup = new QGroupBox (tr("ACTIVE_BAR_GRP"), this );
+ aMainLayout->addWidget(ActiveBarGroup);
+ //ActiveBarGroup->setColumnLayout(0, Qt::Vertical );
+ //ActiveBarGroup->layout()->setSpacing( 0 );
+ //ActiveBarGroup->layout()->setMargin( 0 );
+ QGridLayout* ActiveBarGroupLayout = new QGridLayout( ActiveBarGroup );
ActiveBarGroupLayout->setAlignment( Qt::AlignTop );
ActiveBarGroupLayout->setSpacing( 6 );
ActiveBarGroupLayout->setMargin( 11 );
- QButtonGroup* BarTypeGroup = new QButtonGroup( 2, Qt::Vertical, ActiveBarGroup, "BarTypeGroup" );
- BarTypeGroup->setRadioButtonExclusive( true );
- BarTypeGroup->setFrameStyle( QFrame::NoFrame );
- BarTypeGroup->layout()->setMargin( 0 );
+ QButtonGroup* BarTypeGroup = new QButtonGroup( ActiveBarGroup );
+ QGroupBox* aGB = new QGroupBox( ActiveBarGroup );
+ QVBoxLayout* aVBLay = new QVBoxLayout( aGB );
+
+ BarTypeGroup->setExclusive( true );
+ //aGB->setFrameStyle( QFrame::NoFrame );
+ aVBLay->setMargin( 0 );
+
+ myRBLocal = new QRadioButton( tr( "LOCAL" ), aGB );
+ myRBGlobal = new QRadioButton( tr( "GLOBAL" ), aGB );
+ aVBLay->addWidget( myRBLocal );
+ aVBLay->addWidget( myRBGlobal );
- myRBLocal = new QRadioButton( tr( "LOCAL" ), BarTypeGroup );
- myRBGlobal = new QRadioButton( tr( "GLOBAL" ), BarTypeGroup );
+ BarTypeGroup->addButton( myRBLocal );
+ BarTypeGroup->addButton( myRBGlobal );
myCBDisplayed = new QCheckBox( tr( "DISPLAYED" ), ActiveBarGroup );
- ActiveBarGroupLayout->addMultiCellWidget( BarTypeGroup, 0, 1, 0, 0 );
+ ActiveBarGroupLayout->addWidget( aGB, 0, 0, 2, 1 );
ActiveBarGroupLayout->addWidget( myCBDisplayed, 1, 1 );
// Range ============================================================
- RangeGroup = new QButtonGroup (tr("SCALAR_RANGE_GRP"), this, "RangeGroup");
- RangeGroup->setColumnLayout(0, Qt::Vertical );
- RangeGroup->layout()->setSpacing( 0 );
- RangeGroup->layout()->setMargin( 0 );
- QGridLayout* RangeGroupLayout = new QGridLayout( RangeGroup->layout() );
+ RangeGroup = new QButtonGroup ( this );
+ aGB = new QGroupBox( tr("SCALAR_RANGE_GRP"), this );
+ aMainLayout->addWidget(aGB);
+ //RangeGroup->setColumnLayout(0, Qt::Vertical );
+ //RangeGroup->layout()->setSpacing( 0 );
+ //RangeGroup->layout()->setMargin( 0 );
+ QGridLayout* RangeGroupLayout = new QGridLayout( aGB );
RangeGroupLayout->setAlignment( Qt::AlignTop );
RangeGroupLayout->setSpacing( 6 );
RangeGroupLayout->setMargin( 11 );
- myModeLbl = new QLabel("Scalar Mode", RangeGroup);
+ myModeLbl = new QLabel("Scalar Mode", aGB);
- myModeCombo = new QComboBox(RangeGroup);
+ myModeCombo = new QComboBox(aGB);
RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
RangeGroupLayout->addWidget( myModeCombo, 0, 1 );
//TopLayout->addWidget( RangeGroup );
// Colors and Labels ========================================================
- QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this, "ColLabGroup");
- ColLabGroup->setColumnLayout(0, Qt::Vertical );
- ColLabGroup->layout()->setSpacing( 0 );
- ColLabGroup->layout()->setMargin( 0 );
- QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup->layout() );
+ QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this );
+ aMainLayout->addWidget(ColLabGroup);
+ //ColLabGroup->setColumnLayout(0, Qt::Vertical );
+ //ColLabGroup->layout()->setSpacing( 0 );
+ //ColLabGroup->layout()->setMargin( 0 );
+ QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup );
ColLabGroupLayout->setAlignment( Qt::AlignTop );
ColLabGroupLayout->setSpacing( 6 );
ColLabGroupLayout->setMargin( 11 );
- QButtonGroup* TypeGroup = new QButtonGroup( 2, Qt::Vertical, ColLabGroup, "TypeGroup" );
- TypeGroup->setRadioButtonExclusive( true );
- TypeGroup->setFrameStyle( QFrame::NoFrame );
- TypeGroup->layout()->setMargin( 0 );
-
- BicolorButton = new QRadioButton( tr( "BICOLOR" ), TypeGroup );
- RainbowButton = new QRadioButton( tr( "RAINBOW" ), TypeGroup );
-
- ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup, "ColorLabel");
- ColorSpin = new QSpinBox( 2, 256, 1, ColLabGroup );
+ QButtonGroup* TypeGroup = new QButtonGroup( ColLabGroup );
+ aGB = new QGroupBox ( ColLabGroup );
+ aVBLay = new QVBoxLayout( aGB );
+ TypeGroup->setExclusive( true );
+ //aGB->setFrameStyle( QFrame::NoFrame );
+ aVBLay->setMargin( 0 );
+
+ BicolorButton = new QRadioButton( tr( "BICOLOR" ), aGB );
+ aVBLay->addWidget( BicolorButton );
+ TypeGroup->addButton( BicolorButton );
+ RainbowButton = new QRadioButton( tr( "RAINBOW" ), aGB );
+ aVBLay->addWidget( RainbowButton );
+ TypeGroup->addButton( RainbowButton );
+
+ ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup );
+ ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin->setMaximum( 2 );
+ ColorSpin->setMinimum( 256 );
+ ColorSpin->setSingleStep( 1 );
+
+
ColorSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ColorSpin->setMinimumWidth( 70 );
ColorSpin->setValue( 64 );
- LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup, "LabelLabel");
- LabelSpin = new QSpinBox( 2, 65, 1, ColLabGroup );
+ LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
+ LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin->setMaximum( 2 );
+ LabelSpin->setMinimum( 65 );
+ LabelSpin->setSingleStep( 1 );
LabelSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
LabelSpin->setMinimumWidth( 70 );
LabelSpin->setValue( 5 );
- ColLabGroupLayout->addMultiCellWidget( TypeGroup, 0, 1, 0, 0);
+ ColLabGroupLayout->addWidget( aGB, 0, 0, 2, 1);
ColLabGroupLayout->addWidget( ColorLabel, 1, 1);
ColLabGroupLayout->addWidget( ColorSpin, 1, 2);
ColLabGroupLayout->addWidget( LabelLabel, 1, 3);
//TopLayout->addWidget( ColLabGroup );
// Orientation ==========================================================
- QButtonGroup* OrientGroup = new QButtonGroup (tr("ORIENTATION_GRP"), this, "OrientGroup");
- OrientGroup->setColumnLayout(0, Qt::Vertical );
- OrientGroup->layout()->setSpacing( 0 );
- OrientGroup->layout()->setMargin( 0 );
- QGridLayout* OrientGroupLayout = new QGridLayout( OrientGroup->layout() );
+ QButtonGroup* OrientGroup = new QButtonGroup ( this );
+ aGB = new QGroupBox( tr("ORIENTATION_GRP"), this );
+ aMainLayout->addWidget(aGB);
+ //OrientGroup->setColumnLayout(0, Qt::Vertical );
+ //OrientGroup->layout()->setSpacing( 0 );
+ //OrientGroup->layout()->setMargin( 0 );
+ QGridLayout* OrientGroupLayout = new QGridLayout( aGB );
OrientGroupLayout->setAlignment( Qt::AlignTop );
OrientGroupLayout->setSpacing( 6 );
OrientGroupLayout->setMargin( 11 );
- RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGroup, "RBvert");
+ RBvert = new QRadioButton (tr("VERTICAL_BTN"), aGB );
RBvert->setChecked( true );
- RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGroup, "RBhori");
+ OrientGroup->addButton( RBvert );
+ RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), aGB);
+ OrientGroup->addButton( RBhori
+ );
OrientGroupLayout->addWidget( RBvert, 0, 0 );
OrientGroupLayout->addWidget( RBhori, 0, 1 );
// TopLayout->addWidget( OrientGroup );
// Origin ===============================================================
- QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this, "OriginGroup");
- OriginGroup->setColumnLayout(0, Qt::Vertical );
- OriginGroup->layout()->setSpacing( 0 );
- OriginGroup->layout()->setMargin( 0 );
- QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup->layout() );
+ QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this );
+ aMainLayout->addWidget( OriginGroup );
+ //OriginGroup->setColumnLayout(0, Qt::Vertical );
+ //OriginGroup->layout()->setSpacing( 0 );
+ //OriginGroup->layout()->setMargin( 0 );
+ QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup );
OriginGroupLayout->setAlignment( Qt::AlignTop );
OriginGroupLayout->setSpacing( 6 );
OriginGroupLayout->setMargin( 11 );
- QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup, "XLabel");
- XSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup );
+ XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
- QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup, "YLabel");
- YSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup );
+ YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.01 );
//TopLayout->addWidget( OriginGroup );
// Dimensions =========================================================
- QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this, "DimGroup");
- DimGroup->setColumnLayout(0, Qt::Vertical );
- DimGroup->layout()->setSpacing( 0 );
- DimGroup->layout()->setMargin( 0 );
- QGridLayout* DimGroupLayout = new QGridLayout( DimGroup->layout() );
+ QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this );
+ aMainLayout->addWidget( DimGroup );
+ //DimGroup->setColumnLayout(0, Qt::Vertical );
+ //DimGroup->layout()->setSpacing( 0 );
+ //DimGroup->layout()->setMargin( 0 );
+ QGridLayout* DimGroupLayout = new QGridLayout( DimGroup );
DimGroupLayout->setAlignment( Qt::AlignTop );
DimGroupLayout->setSpacing( 6 );
DimGroupLayout->setMargin( 11 );
- QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup, "WidthLabel");
- WidthSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup );
+ WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
- QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup, "HeightLabel");
- HeightSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup );
+ HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
- QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup, "SpacingLabel");
- SpacingSpin = new QtxDblSpinBox( 0.0, 1.0, 0.01, DimGroup );
+ QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup );
+ SpacingSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.01, DimGroup );
SpacingSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpacingSpin->setMinimumWidth( 70 );
SpacingSpin->setValue( 0.01 );
//TopLayout->addWidget( DimGroup );
// Save check box ===========================================================
- QHBox* aSaveBox = new QHBox(this);
+ QWidget* aSaveBox = new QWidget(this);
+ aMainLayout->addWidget( aSaveBox );
+
+ QHBoxLayout* aHBoxLay = new QHBoxLayout( aSaveBox );
+
if (!SetPref) {
- CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox, "CBSave");
- //TopLayout->addWidget(CBSave);
+ CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox);
+ aHBoxLay->addWidget(CBSave);
}
else {
CBSave = 0;
}
myTextBtn = new QPushButton("Text properties...", aSaveBox);
+ aHBoxLay->addWidget( myTextBtn );
+
myTextDlg = new VisuGUI_TextPrefDlg(this);
+ aMainLayout->addWidget( myTextDlg );
myTextDlg->setTitleVisible(!SetPref);
// signals and slots connections ===========================================
* Initialise dialog box from presentation object
*/
void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs) {
- myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+ myModeCombo->setCurrentIndex(thePrs->GetScalarMode());
setPosAndSize( thePrs->GetPosX(),
thePrs->GetPosY(),
thePrs->GetWidth(),
int aNbComp = thePrs->GetField()->myNbComp;
bool isScalarMode = (aNbComp > 1);
myModeCombo->clear();
- myModeCombo->insertItem("<Modulus>");
+ myModeCombo->addItem("<Modulus>");
const VISU::PField& aField = thePrs->GetField();
const VISU::TNames& aCompNames = aField->myCompNames;
const VISU::TNames& aUnitNames = aField->myUnitNames;
for(int i = 0; i < aNbComp; i++){
- QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
+ QString aComponent = QString(aCompNames[i].c_str()).simplified();
if(aComponent.isNull() || aComponent == "")
aComponent = "Component " + QString::number(i+1);
else
aComponent = "[" + QString::number(i+1) + "] " + aComponent;
- QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
+ QString anUnit = QString(aUnitNames[i].c_str()).simplified();
if(anUnit.isNull() || anUnit == "")
anUnit = "-";
aComponent = aComponent + ", " + anUnit;
- myModeCombo->insertItem(aComponent);
+ myModeCombo->addItem(aComponent);
}
//
- myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+ myModeCombo->setCurrentIndex(thePrs->GetScalarMode());
if (aNbComp==1){
- myModeCombo->setCurrentItem(1);
+ myModeCombo->setCurrentIndex(1);
}
//
myModeLbl->setEnabled(isScalarMode);
* Store values to presentation object
*/
int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) {
- thePrs->SetScalarMode(myModeCombo->currentItem());
+ thePrs->SetScalarMode(myModeCombo->currentIndex());
thePrs->SetPosition(XSpin->value(), YSpin->value());
thePrs->SetSize(WidthSpin->value(), HeightSpin->value());
thePrs->SetSpacing(SpacingSpin->value());
if (myIsStoreTextProp) {
// "Title"
- thePrs->SetTitle(myTextDlg->getTitleText().latin1());
+ thePrs->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
QColor aTitColor (255, 255, 255);
int aTitleFontFamily = VTK_ARIAL;
*/
void VisuGUI_GaussScalarBarPane::XYChanged( double )
{
- QtxDblSpinBox* snd = (QtxDblSpinBox*)sender();
+ QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
if ( snd == XSpin ) {
- WidthSpin->setMaxValue( 1.0 - XSpin->value() );
+ WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
if ( snd == YSpin ) {
- HeightSpin->setMaxValue( 1.0 - YSpin->value() );
+ HeightSpin->setMaximum( 1.0 - YSpin->value() );
}
}
VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool SetPref):
VisuGUI_Prs3dDlg(theModule)
{
- setName("VisuGUI_ScalarBarDlg");
- setCaption(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
+ //setName("VisuGUI_ScalarBarDlg");
+ setWindowTitle(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout(this);
// Presentation
- QButtonGroup* PrsGroup = new QButtonGroup( 3, Qt::Horizontal, tr( "PRS_TITLE" ), this, "PrimitiveTypeGroup" );
- PrsGroup->setRadioButtonExclusive( true );
- PrsGroup->layout()->setMargin( 11 );
- PrsGroup->layout()->setSpacing(6);
-
- myResultsButton = new QRadioButton( tr( "RESULTS" ), PrsGroup );
- myGeometryButton = new QRadioButton( tr( "GEOMETRY" ), PrsGroup );
- myDefShapeButton = new QRadioButton( tr( "DEFORMED_SHAPE" ), PrsGroup );
+ QButtonGroup* PrsGroup = new QButtonGroup( this );
+ QGroupBox* aGB = new QGroupBox( tr( "PRS_TITLE" ), this );
+ QHBoxLayout* aHBLay = new QHBoxLayout( aGB );
+ PrsGroup->setExclusive( true );
+ aHBLay->setMargin( 11 );
+ aHBLay->setSpacing(6);
+
+ myResultsButton = new QRadioButton( tr( "RESULTS" ), aGB );
+ myGeometryButton = new QRadioButton( tr( "GEOMETRY" ), aGB );
+ myDefShapeButton = new QRadioButton( tr( "DEFORMED_SHAPE" ), aGB );
+ aHBLay->addWidget( myResultsButton );
+ aHBLay->addWidget( myGeometryButton );
+ aHBLay->addWidget( myDefShapeButton );
+
+ PrsGroup->addButton( myResultsButton );
+ PrsGroup->addButton( myGeometryButton );
+ PrsGroup->addButton( myDefShapeButton );
+
myTabBox = new QTabWidget (this);
// Gauss points pane
- QVBox* aBox = new QVBox (this);
- aBox->setMargin(11);
- aBox->setSpacing(6);
+ QWidget* aBox = new QWidget (this);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+ aVBLay->setMargin(11);
+ aVBLay->setSpacing(6);
// Primitive
myPrimitiveBox = new VVTK_PrimitiveBox( aBox );
+ aVBLay->addWidget( myPrimitiveBox );
// Size
mySizeBox = new VVTK_SizeBox( aBox );
+ aVBLay->addWidget( mySizeBox );
// Deformed Shape
myDefShapeBox = new QGroupBox( tr( "DEFORMED_SHAPE_TITLE" ), aBox );
- myDefShapeBox->setColumnLayout(0, Qt::Vertical );
- myDefShapeBox->layout()->setSpacing( 0 );
- myDefShapeBox->layout()->setMargin( 0 );
+ aVBLay->addWidget( myDefShapeBox );
+ //myDefShapeBox->setColumnLayout(0, Qt::Vertical );
+ //myDefShapeBox->layout()->setSpacing( 0 );
+ //myDefShapeBox->layout()->setMargin( 0 );
- QGridLayout* aDefShapeLayout = new QGridLayout( myDefShapeBox->layout() );
+ QGridLayout* aDefShapeLayout = new QGridLayout( myDefShapeBox );
aDefShapeLayout->setAlignment(Qt::AlignTop);
aDefShapeLayout->setSpacing(6);
aDefShapeLayout->setMargin(11);
QLabel* aScaleLabel = new QLabel( tr( "SCALE_FACTOR" ), myDefShapeBox );
- myScaleSpinBox = new QtxDblSpinBox( 0.0, 10.0, 0.1, myDefShapeBox );
+ myScaleSpinBox = new QtxDoubleSpinBox( 0.0, 10.0, 0.1, myDefShapeBox );
aDefShapeLayout->addWidget( aScaleLabel, 0, 0 );
aDefShapeLayout->addWidget( myScaleSpinBox, 0, 1 );
// Scalar Bar pane
myScalarPane = new VisuGUI_GaussScalarBarPane(this, SetPref);
- myScalarPane->setMargin(5);
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin(5);
// Input pane
myInputPane = new VisuGUI_InputPane(VISU::TGAUSSPOINTS, theModule, this);
myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
- TopLayout->addWidget( PrsGroup );
+ TopLayout->addWidget( aGB );
TopLayout->addWidget( myTabBox );
TopLayout->addWidget( GroupButtons );
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs )
QString aWarning = "The number of faces needed to perform the 'Geometrical Sphere' primitive\n";
aWarning.append( "presentation might be too important to ensure an acceptable frame rate.\n\n" );
aWarning.append( "Can you please confirm that you want to continue anyway?" );
- if( SUIT_MessageBox::warn2( this, tr( "Warning" ), aWarning, tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 1 )
+ if( SUIT_MessageBox::warning( this, tr( "Warning" ), aWarning, tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 1 )
return;
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include <qvbox.h>
-
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class SalomeApp_Module;
class VVTK_PrimitiveBox;
//! Specific Scalar Bar tab.
/*! Uses for set up Gauss Points Scalar Bars preferenses. */
-class VisuGUI_GaussScalarBarPane : public QVBox
+class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
{
Q_OBJECT
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDblSpinBox* XSpin;
- QtxDblSpinBox* YSpin;
+ QtxDoubleSpinBox* XSpin;
+ QtxDoubleSpinBox* YSpin;
- QtxDblSpinBox* WidthSpin;
- QtxDblSpinBox* HeightSpin;
- QtxDblSpinBox* SpacingSpin;
+ QtxDoubleSpinBox* WidthSpin;
+ QtxDoubleSpinBox* HeightSpin;
+ QtxDoubleSpinBox* SpacingSpin;
QRadioButton* BicolorButton;
QRadioButton* RainbowButton;
VVTK_SizeBox* mySizeBox;
QGroupBox* myDefShapeBox;
- QtxDblSpinBox* myScaleSpinBox;
+ QtxDoubleSpinBox* myScaleSpinBox;
SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
};
#include "SALOMEDSClient_AttributeString.hxx"
#include "SALOMEDSClient_AttributeName.hxx"
-#include "QtxListBox.h"
+//#include "QtxListBox.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QToolButton>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QKeyEvent>
+#include <QListWidget>
//---------------------------------------------------------------
-class VisuGUI_ListBox: public QtxListBox
+class VisuGUI_ListWidget: public QListWidget
{
public:
- VisuGUI_ListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ):
- QtxListBox(parent, name, f)
+ VisuGUI_ListWidget( QWidget * parent = 0 ):
+ QListWidget(parent )
{};
virtual QSize sizeHint() const
myDialog( theDialog ),
myPrs( NULL )
{
- setFrameStyle( QFrame::NoFrame );
+ //setFrameStyle( QFrame::NoFrame );
LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(theModule);
connect( aSelectionMgr, SIGNAL( selectionChanged() ), SLOT( onSelectionChanged() ) );
- QGridLayout* aMainLayout = new QGridLayout( this, 1, 1, 11, 6 );
+ QGridLayout* aMainLayout = new QGridLayout( this );
+ aMainLayout->setMargin( 11 );
+ aMainLayout->setSpacing( 6 );
// Definition of data source
myDataSourceGroupBox = new QGroupBox( this );
myDataSourceGroupBox->setTitle( tr( "PRS_DATA_SOUIRCE" ) );
{
QGroupBox* aGroupBox = myDataSourceGroupBox;
- aGroupBox->setColumnLayout(0, Qt::Vertical );
- aGroupBox->layout()->setSpacing( 6 );
- aGroupBox->layout()->setMargin( 11 );
+ //aGroupBox->setColumnLayout(0, Qt::Vertical );
+ //aGroupBox->layout()->setSpacing( 6 );
+ //aGroupBox->layout()->setMargin( 11 );
- QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox->layout() );
+ QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox );
aGroupBoxLayout->setAlignment( Qt::AlignTop );
{
QLabel* aLabel = new QLabel( tr( "MED_FILE" ), aGroupBox );
myMedFile = new QLineEdit( aGroupBox );
myMedFile->setReadOnly( true );
myMedFile->setEnabled( false );
- myMedFile->setPaletteForegroundColor( Qt::black );
+ QPalette aPal = myMedFile->palette();
+ aPal.setColor( myMedFile->backgroundRole(), Qt::black );
+ myMedFile->setPalette( aPal );
+ //myMedFile->setPaletteForegroundColor( Qt::black );
aGroupBoxLayout->addWidget( myMedFile, 0, 1 );
}
{
myMeshName = new QLineEdit( aGroupBox );
myMeshName->setReadOnly( true );
myMeshName->setEnabled( false );
- myMeshName->setPaletteForegroundColor( Qt::black );
+ QPalette aPal = myMeshName->palette();
+ aPal.setColor( myMeshName->backgroundRole(), Qt::black );
+ myMeshName->setPalette( aPal );
+ //myMeshName->setPaletteForegroundColor( Qt::black );
aGroupBoxLayout->addWidget( myMeshName, 1, 1 );
}
{
myEntityName = new QLineEdit( aGroupBox );
myEntityName->setReadOnly( true );
myEntityName->setEnabled( false );
- myEntityName->setPaletteForegroundColor( Qt::black );
+ QPalette aPal = myEntityName->palette();
+ aPal.setColor( myEntityName->backgroundRole(), Qt::black );
+ myEntityName->setPalette( aPal );
+ //myEntityName->setPaletteForegroundColor( Qt::black );
aGroupBoxLayout->addWidget( myEntityName, 2, 1 );
}
{
myUseGroupsGroupBox->setCheckable( TRUE );
{
QGroupBox* aGroupBox = myUseGroupsGroupBox;
- aGroupBox->setColumnLayout(0, Qt::Vertical );
- aGroupBox->layout()->setSpacing( 6 );
- aGroupBox->layout()->setMargin( 11 );
+ //aGroupBox->setColumnLayout(0, Qt::Vertical );
+ //aGroupBox->layout()->setSpacing( 6 );
+ //aGroupBox->layout()->setMargin( 11 );
- QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox->layout() );
+ QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox );
aGroupBoxLayout->setAlignment( Qt::AlignTop );
{
- myAllGroups = new VisuGUI_ListBox(aGroupBox, "myAllGroups");
- myAllGroups->setSelectionMode(QListBox::Extended);
- aGroupBoxLayout->addMultiCellWidget( myAllGroups, 0, 3, 0, 0 );
+ myAllGroups = new VisuGUI_ListWidget(aGroupBox);
+ myAllGroups->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ aGroupBoxLayout->addWidget( myAllGroups, 0, 0, 4, 1 );
}
{
- mySelectedGroups = new VisuGUI_ListBox(aGroupBox, "mySelectedGroups");
- mySelectedGroups->setSelectionMode(QListBox::Extended);
+ mySelectedGroups = new VisuGUI_ListWidget(aGroupBox );
+ mySelectedGroups->setSelectionMode(QAbstractItemView::ExtendedSelection);
mySelectedGroups->installEventFilter(this);
- aGroupBoxLayout->addMultiCellWidget( mySelectedGroups, 0, 3, 2, 2 );
+ aGroupBoxLayout->addWidget( mySelectedGroups, 0, 2, 4, 1 );
}
{
myAddButton = new QToolButton(aGroupBox);
- myAddButton->setPixmap( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_ADD")) );
+ myAddButton->setIcon( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_ADD")) );
aGroupBoxLayout->addWidget( myAddButton, 1, 1 );
}
{
myRemoveButton = new QToolButton(aGroupBox);
- myRemoveButton->setPixmap( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_REMOVE")) );
+ myRemoveButton->setIcon( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_REMOVE")) );
aGroupBoxLayout->addWidget( myRemoveButton, 2, 1 );
}
{
connect( myReInit, SIGNAL( toggled( bool ) ), SLOT( onReInitialize( bool ) ) );
connect( myUseGroupsGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( onTypeChanged() ) );
- connect( myAllGroups, SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
- connect( mySelectedGroups, SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
+ connect( myAllGroups, SIGNAL( itemDoubleClicked( QListWidgetItem* ) ), this, SLOT( onListDoubleClicked( QListWidgetItem* ) ) );
+ connect( mySelectedGroups, SIGNAL( itemDoubleClicked( QListWidgetItem* ) ), this, SLOT( onListDoubleClicked( QListWidgetItem* ) ) );
connect( myAddButton, SIGNAL(clicked()), this, SLOT(onAdd()));
connect( myRemoveButton, SIGNAL(clicked()), this, SLOT(onRemove()));
{
if (event->type() == QEvent::KeyPress) {
QKeyEvent* aKeyEvent = (QKeyEvent*)event;
- if (object == mySelectedGroups && aKeyEvent->key() == Key_Delete)
+ if (object == mySelectedGroups && aKeyEvent->key() == Qt::Key_Delete)
onRemove();
}
return QObject::eventFilter(object, event);
{
QStringList aList;
- for (int i = 0; i < myAllGroups->count(); i++)
- if (myAllGroups->isSelected(i))
- aList.append(myAllGroups->text(i));
-
+ //for (int i = 0; i < myAllGroups->count(); i++)
+ // if (myAllGroups->isSelected(i))
+ // aList.append(myAllGroups->text(i));
+ QList<QListWidgetItem*> aItemList = myAllGroups->selectedItems();
+ QList<QListWidgetItem*>::Iterator it = aItemList.begin();
+ for ( ; it != aItemList.end(); it++ )
+ aList.append( (*it)->text() );
+
for (int i = 0; i < mySelectedGroups->count(); i++)
- aList.remove(mySelectedGroups->text(i));
+ aList.removeAll(mySelectedGroups->item(i)->text());
- mySelectedGroups->insertStringList(aList);
+ mySelectedGroups->insertItems( mySelectedGroups->count(), aList);
}
*/
void VisuGUI_InputPane::onRemove()
{
- QPtrList<QListBoxItem> aList;
- aList.setAutoDelete(false);
- for (int i = 0; i < mySelectedGroups->count(); i++)
- if (mySelectedGroups->isSelected(i))
- aList.append(mySelectedGroups->item(i));
+ QList<QListWidgetItem*> aList = mySelectedGroups->selectedItems();
+
+ //aList.setAutoDelete(false);
+ //for (int i = 0; i < mySelectedGroups->count(); i++)
+ // if (mySelectedGroups->isSelected(i))
+ // aList.append(mySelectedGroups->item(i));
for (int i = 0; i < aList.count(); i++)
delete aList.at(i);
/*!
Called when an item of listbox is double-clicked
*/
-void VisuGUI_InputPane::onListDoubleClicked( QListBoxItem* theItem )
+void VisuGUI_InputPane::onListDoubleClicked( QListWidgetItem* theItem )
{
- QListBox* aListBox = theItem->listBox();
+ QListWidget* aListWidget = theItem->listWidget();
- if (aListBox == myAllGroups)
+ if (aListWidget == myAllGroups)
{
- if (!mySelectedGroups->findItem( theItem->text(), Qt::ExactMatch ))
- mySelectedGroups->insertItem(theItem->text());
+ QList<QListWidgetItem*> aList = mySelectedGroups->findItems( theItem->text(), Qt::MatchExactly );
+ if ( aList.isEmpty() )
+ mySelectedGroups->insertItem( mySelectedGroups->count(), theItem->text() );
}
- else if (aListBox == mySelectedGroups)
+ else if (aListWidget == mySelectedGroups)
delete theItem;
}
if( VISU::getValue(aChildObj, "myComment") == "TIMESTAMP" )
{
aTimeStampName = aChildObj->GetName().c_str();
- myTimeStamps->insertItem( aTimeStampName );
+ myTimeStamps->addItem( aTimeStampName );
}
}
myMeshName->setText( aMeshName );
myEntityName->setText( anEntityName );
myFieldName->setText( aFieldName );
- myTimeStamps->setCurrentItem( 0 );
+ myTimeStamps->setCurrentIndex( 0 );
if( myReInit->isChecked() && myPrs )
{
myPrs->SetResultObject( myResult );
- myPrs->SetMeshName( aMeshName.latin1() );
+ myPrs->SetMeshName( (const char*)aMeshName.toLatin1() );
myPrs->SetEntity( VISU::Entity( myEntity ) );
- myPrs->SetFieldName( aFieldName.latin1() );
+ myPrs->SetFieldName( (const char*)aFieldName.toLatin1() );
myPrs->SetTimeStampNumber( myPrs->GetTimeStampNumberByIndex( 0 ) );
myPrs->Apply( true );
{
VISU::ColoredPrs3d::TimeStampInfo anInfo = aTimeStampsRange[ index ];
QString aTime = anInfo.myTime.in();
- myTimeStamps->insertItem( aTime );
+ myTimeStamps->addItem( aTime );
}
myResult = thePrs->GetResultObject();
myMeshName->setText( thePrs->GetMeshName() );
myFieldName->setText( thePrs->GetFieldName() );
- myTimeStamps->setCurrentItem( thePrs->GetTimeStampIndexByNumber( aTimeStampNumber ) );
+ myTimeStamps->setCurrentIndex( thePrs->GetTimeStampIndexByNumber( aTimeStampNumber ) );
- myFieldFilter->setPrs3dEntry( thePrs->GetHolderEntry() );
+ myFieldFilter->setPrs3dEntry( thePrs->GetHolderEntry().c_str() );
bool anIsTimeStampFixed = myPrs->IsTimeStampFixed();
myDataSourceGroupBox->setEnabled(!anIsTimeStampFixed);
if(!anIsTimeStampFixed)
VISU::TGroupMap::const_iterator aGroupIter = aGroupMap.begin();
for(; aGroupIter != aGroupMap.end(); aGroupIter++){
const std::string& aGroupName = aGroupIter->first;
- myAllGroups->insertItem(QString(aGroupName));
+ myAllGroups->insertItem( myAllGroups->count(), aGroupName.c_str());
}
}
if(myAllGroups->count() < 1){
- myAllGroups->insertItem( tr("NO_GROUPS") );
+ myAllGroups->insertItem( myAllGroups->count(), tr("NO_GROUPS") );
myUseGroupsGroupBox->setEnabled(false);
}else if(VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(thePrs)){
const VISU::ScalarMap_i::TGroupNames& aGroupNames = aPrs->GetGroupNames();
VISU::ScalarMap_i::TGroupNames::const_iterator anIter = aGroupNames.begin();
for(; anIter != aGroupNames.end(); anIter++){
const std::string aGroupName = *anIter;
- mySelectedGroups->insertItem(QString(aGroupName));
+ mySelectedGroups->insertItem(mySelectedGroups->count(), aGroupName.c_str());
}
}
myUseGroupsGroupBox->setChecked(mySelectedGroups->count() > 0);
if(myUseGroupsGroupBox->isChecked()){
aPrs->RemoveAllGeom();
for(int i = 0; i < mySelectedGroups->count(); i++)
- aPrs->AddMeshOnGroup(mySelectedGroups->text(i) );
+ aPrs->AddMeshOnGroup( (const char*)mySelectedGroups->item(i)->text().toLatin1() );
}else
aPrs->SetSourceGeometry();
}
thePrs->SetResultObject( myResult );
- thePrs->SetMeshName( myMeshName->text().latin1() );
+ thePrs->SetMeshName( (const char*)myMeshName->text().toLatin1() );
thePrs->SetEntity( VISU::Entity( myEntity ) );
- thePrs->SetFieldName( myFieldName->text().latin1() );
- thePrs->SetTimeStampNumber( thePrs->GetTimeStampNumberByIndex( myTimeStamps->currentItem() ) );
+ thePrs->SetFieldName( (const char*)myFieldName->text().toLatin1() );
+ thePrs->SetTimeStampNumber( thePrs->GetTimeStampNumberByIndex( myTimeStamps->currentIndex() ) );
return ( int )thePrs->Apply( false );
}
#include "SALOME_ListIO.hxx"
-#include <qgroupbox.h>
+#include <QGroupBox>
class QCheckBox;
class QComboBox;
class QLineEdit;
-class QListBoxItem;
+class QListWidgetItem;
class QToolButton;
class SalomeApp_Module;
class LightApp_SelectionMgr;
-class VisuGUI_ListBox;
+class VisuGUI_ListWidget;
class VisuGUI_Prs3dDlg;
class VisuGUI_FieldFilter;
private slots:
void onTypeChanged();
- void onListDoubleClicked( QListBoxItem* theItem );
+ void onListDoubleClicked( QListWidgetItem* theItem );
void onAdd();
void onRemove();
VISU::ColoredPrs3d_i* myPrs;
QGroupBox* myUseGroupsGroupBox;
- VisuGUI_ListBox* myAllGroups;
- VisuGUI_ListBox* mySelectedGroups;
+ VisuGUI_ListWidget* myAllGroups;
+ VisuGUI_ListWidget* mySelectedGroups;
QToolButton* myAddButton;
QToolButton* myRemoveButton;
#include <limits.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QValidator>
+#include <QLabel>
+#include <QGroupBox>
+#include <QSpinBox>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QKeyEvent>
+
+
using namespace std;
VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent)
- : QVBox(parent)
+ : QWidget(parent)
{
- QFrame* TopGroup = new QFrame( this, "TopGroup" );
+ QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+ QFrame* TopGroup = new QFrame( this );
+ aMainLayout->addWidget( TopGroup );
+
TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
TopGroup->setLineWidth(1);
TopGroupLayout->setSpacing( 6 );
TopGroupLayout->setMargin( 11 );
- QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup, "LabelNbr");
+ QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup);
TopGroupLayout->addWidget( LabelNbr, 0, 0 );
- NbrIso = new QSpinBox( 1, 100, 1, TopGroup, "NbrIso" );
+ NbrIso = new QSpinBox( TopGroup );
+ NbrIso->setMaximum( 100 );
+ NbrIso->setMinimum( 1 );
+ NbrIso->setSingleStep( 1 );
NbrIso->setValue( 1 );
TopGroupLayout->addWidget( NbrIso, 0, 1 );
- QLabel* LabelMin = new QLabel (tr("MIN_VALUE"), TopGroup, "LabelMin");
+ QLabel* LabelMin = new QLabel (tr("MIN_VALUE"), TopGroup );
TopGroupLayout->addWidget(LabelMin, 1, 0);
- //MinIso = new QtxDblSpinBox( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
+ //MinIso = new QtxDoubleSpinBox( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
MinIso = new QLineEdit( TopGroup );
MinIso->setValidator( new QDoubleValidator(TopGroup) );
MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
LabelMin->setBuddy(MinIso);
TopGroupLayout->addWidget( MinIso, 1, 1 );
- QLabel* LabelMax = new QLabel (tr("MAX_VALUE"), TopGroup, "LabelMax");
+ QLabel* LabelMax = new QLabel (tr("MAX_VALUE"), TopGroup );
TopGroupLayout->addWidget( LabelMax, 2, 0 );
//MaxIso = new QtxSpinBoxDbl( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
MaxIso = new QLineEdit( TopGroup );
// TopGroupLayout->addMultiCellWidget( CBUpdate, 4, 4, 0, 1);
// CBUpdate->setChecked(false);
QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup);
- TopGroupLayout->addMultiCellWidget( aUpdateBtn, 3, 3, 0, 1);
+ TopGroupLayout->addWidget( aUpdateBtn, 3, 0, 1, 2);
connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );
// CBLog = new QCheckBox ( tr( "Logarithmic scaling" ), TopGroup);
bool VisuGUI_IsoSurfPane::check()
{
if (MinIso->text().toDouble() >= MaxIso->text().toDouble()) {
- MESSAGE(tr("MSG_MINMAX_VALUES"));
- SUIT_MessageBox::warn1( this,tr("WRN_VISU"),
- tr("MSG_MINMAX_VALUES"),
- tr("BUT_OK"));
+ MESSAGE((const char*)tr("MSG_MINMAX_VALUES").toLatin1());
+ SUIT_MessageBox::warning( this,tr("WRN_VISU"),
+ tr("MSG_MINMAX_VALUES"),
+ tr("BUT_OK"));
return false;
} // else if (/* CBUpdate->isChecked() && CBLog->isChecked() && */
// (MinIso->text().toDouble() <=0 || MaxIso->text().toDouble() <=0) ) {
VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule)
{
- setCaption(tr("DEFINE_ISOSURFACES"));
+ setWindowTitle(tr("DEFINE_ISOSURFACES"));
setSizeGripEnabled( TRUE );
QVBoxLayout* TopLayout = new QVBoxLayout(this);
myTabBox = new QTabWidget(this);
myIsoPane = new VisuGUI_IsoSurfPane(this);
- myIsoPane->setMargin( 5 );
+ if ( myIsoPane->layout() )
+ myIsoPane->layout()->setMargin( 5 );
myTabBox->addTab(myIsoPane, "Iso Surface");
myScalarPane = new VisuGUI_ScalarBarPane(this, false);
myIsoPane->setScalarBarPane(myScalarPane);
- myScalarPane->setMargin( 5 );
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin( 5 );
myInputPane = new VisuGUI_InputPane(VISU::TISOSURFACE, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
TopLayout->addWidget(myTabBox);
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
+ QGroupBox* GroupButtons = new QGroupBox( this );
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
int VisuGUI_IsoSurfacesDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
+class QTabWidget;
+class QLineEdit;
+class QSpinBox;
namespace VISU
{
class SalomeApp_Module;
class VisuGUI_InputPane;
-class VisuGUI_IsoSurfPane : public QVBox
+class VisuGUI_IsoSurfPane : public QWidget
{
Q_OBJECT;
#include "CAM_Module.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include "LightApp_VTKSelector.h"
#endif
#endif
-#include <qaction.h>
+#include <QAction>
#include <vtkRenderer.h>
#include <vtkCamera.h>
for( ; anIt!=aLast; anIt++ )
if( SUIT_ViewManager* aViewManager = *anIt )
{
- QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
int aSize = aViews.size();
for(int anId = 0; anId < aSize; anId++)
{
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
// "Save VISU State" command is moved from SalomeApp_Applicaiton
- createAction( SAVE_VISU_STATE, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIconSet(),
+ createAction( SAVE_VISU_STATE, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIcon(),
tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
0, getApp()->desktop(), false, getApp(), SLOT( onSaveGUIState() ) );
int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
aPixmap,
tr("MEN_GAUSS_NEW_VIEWER"),
tr("MEN_GAUSS_NEW_VIEWER"),
- ALT+Key_S,
+ Qt::ALT+Qt::Key_S,
this,
false,
this,
QString aViewerType = VVTK_Viewer::Type();
SUIT_Accel* accel = getApp()->accel();
- accel->setActionKey( SUIT_Accel::PanLeft, Key_Left, aViewerType );
- accel->setActionKey( SUIT_Accel::PanRight, Key_Right, aViewerType );
- accel->setActionKey( SUIT_Accel::PanUp, Key_Up, aViewerType );
- accel->setActionKey( SUIT_Accel::PanDown, Key_Down, aViewerType );
- accel->setActionKey( SUIT_Accel::ZoomIn, Key_PageUp, aViewerType );
- accel->setActionKey( SUIT_Accel::ZoomOut, Key_PageDown, aViewerType );
- accel->setActionKey( SUIT_Accel::RotateLeft, CTRL+Key_Left, aViewerType );
- accel->setActionKey( SUIT_Accel::RotateRight, CTRL+Key_Right, aViewerType );
- accel->setActionKey( SUIT_Accel::RotateUp, CTRL+Key_Up, aViewerType );
- accel->setActionKey( SUIT_Accel::RotateDown, CTRL+Key_Down, aViewerType );
- accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Key_Plus, aViewerType );
- accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Key_Minus, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanLeft, Qt::Key_Left, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanRight, Qt::Key_Right, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanUp, Qt::Key_Up, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanDown, Qt::Key_Down, aViewerType );
+ accel->setActionKey( SUIT_Accel::ZoomIn, Qt::Key_PageUp, aViewerType );
+ accel->setActionKey( SUIT_Accel::ZoomOut, Qt::Key_PageDown, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateLeft, Qt::CTRL+Qt::Key_Left, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateRight, Qt::CTRL+Qt::Key_Right, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateUp, Qt::CTRL+Qt::Key_Up, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateDown, Qt::CTRL+Qt::Key_Down, aViewerType );
+ accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Qt::Key_Plus, aViewerType );
+ accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Qt::Key_Minus, aViewerType );
connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) );
"client='ObjectBrowser' and selcount=1 "
"and type in {'VISU::TTIMESTAMP' 'VISU::TFIELD'} "
"and $medEntity in {'EDGE_ENTITY' 'FACE_ENTITY' 'CELL_ENTITY'} "
- "and $medSource in {'eImportFile' 'eCopyAndImportFile'} ",
- true );
+ "and $medSource in {'eImportFile' 'eCopyAndImportFile'}" );
createMenu( action( GAUSS_CREATE_PRS ), createMenu( tr( "MEN_VISUALISATION" ), -1 ), -1 );
createTool( GAUSS_CREATE_PRS, createTool( tr( "TOOL_VISUALISATION" ) ), -1 );
- createAction( GAUSS_RENAME, VisuGUI::tr("MEN_RENAME"), QIconSet(),
+ createAction( GAUSS_RENAME, VisuGUI::tr("MEN_RENAME"), QIcon(),
VisuGUI::tr("MEN_RENAME"), "", 0, this, false,
this, SLOT(OnRename()));
mgr->insert( action( GAUSS_RENAME ), -1, 0, -1 );
mgr->setRule( action( GAUSS_RENAME ),
- "selcount=1 and type='VISU::TGAUSSPOINTS'",
- true );
+ "selcount=1 and type='VISU::TGAUSSPOINTS'" );
- createAction( GAUSS_EDIT_PRS, VisuGUI::tr("MEN_EDIT_PRS"), QIconSet(),
+ createAction( GAUSS_EDIT_PRS, VisuGUI::tr("MEN_EDIT_PRS"), QIcon(),
VisuGUI::tr("MEN_EDIT_PRS"), "", 0, this, false,
this, SLOT(OnEditGaussPoints()));
mgr->insert( action( GAUSS_EDIT_PRS ), -1, 0, -1 );
mgr->setRule( action( GAUSS_EDIT_PRS ),
- "selcount=1 and type='VISU::TGAUSSPOINTS'",
- true );
+ "selcount=1 and type='VISU::TGAUSSPOINTS'" );
- createAction( GAUSS_COPY_PRS, VisuGUI::tr("MEN_COPY_PRS"), QIconSet(),
+ createAction( GAUSS_COPY_PRS, VisuGUI::tr("MEN_COPY_PRS"), QIcon(),
VisuGUI::tr("MEN_COPY_PRS"), "", 0, this, false,
this, SLOT(OnCopyPresentation()));
mgr->insert( action( GAUSS_COPY_PRS ), -1, 0, -1 );
mgr->setRule( action( GAUSS_COPY_PRS ),
- "selcount=1 and type='VISU::TGAUSSPOINTS'",
- true );
+ "selcount=1 and type='VISU::TGAUSSPOINTS'" );
+
action( GAUSS_COPY_PRS )->setEnabled(false);
QStringList viewers;
for( ; anIt!=aLast; anIt++ )
strViewers+=temp.arg( *anIt );
strViewers+="}";
- mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ), true );
+ mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ) );
}
aRule = "(selcount>0 and type='VISU::TGAUSSPOINTS')";
- createAction( GAUSS_ERASE_PRS, VisuGUI::tr("MEN_ERASE"), QIconSet(),
+ createAction( GAUSS_ERASE_PRS, VisuGUI::tr("MEN_ERASE"), QIcon(),
VisuGUI::tr("MEN_ERASE"), "", 0, this, false,
this, SLOT(OnErasePrs()));
mgr->insert( action( GAUSS_ERASE_PRS ), -1, -1, -1 ); // erase
mgr->setRule( action( GAUSS_ERASE_PRS ),
- aRule + " and ({true} in $canBeDisplayed) and (isVisible=true)", true );
+ aRule + " and ({true} in $canBeDisplayed) and (isVisible=true)" );
- createAction( GAUSS_DISPLAY_PRS, VisuGUI::tr("MEN_DISPLAY"), QIconSet(),
+ createAction( GAUSS_DISPLAY_PRS, VisuGUI::tr("MEN_DISPLAY"), QIcon(),
VisuGUI::tr("MEN_DISPLAY"), "", 0, this, false,
this, SLOT(OnDisplayPrs()));
mgr->insert( action( GAUSS_DISPLAY_PRS ), -1, -1, -1 ); // display
mgr->setRule( action( GAUSS_DISPLAY_PRS ),
- aRule + " and ({true} in $canBeDisplayed) and (isVisible=false)", true );
+ aRule + " and ({true} in $canBeDisplayed) and (isVisible=false)" );
- createAction( GAUSS_DISPLAY_ONLY_PRS, VisuGUI::tr("MEN_DISPLAY_ONLY"), QIconSet(),
+ createAction( GAUSS_DISPLAY_ONLY_PRS, VisuGUI::tr("MEN_DISPLAY_ONLY"), QIcon(),
VisuGUI::tr("MEN_DISPLAY_ONLY"), "", 0, this, false,
this, SLOT(OnDisplayOnlyPrs()));
mgr->insert( action( GAUSS_DISPLAY_ONLY_PRS ), -1, -1, -1 ); // display only
mgr->setRule( action( GAUSS_DISPLAY_ONLY_PRS ),
- aRule + " and ({true} in $canBeDisplayed)", true );
+ aRule + " and ({true} in $canBeDisplayed)" );
- createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIconSet(),
+ createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIcon(),
VisuGUI::tr("MEN_RENAME"), "", 0, this, false,
this, SLOT(OnRename()));
mgr->insert( action( GAUSS_RENAME_CONFIGURATION ), -1, -1, -1 );
- mgr->setRule( action( GAUSS_RENAME_CONFIGURATION ), "selcount=1 and type='VISU::TGAUSSVIEW'", true );
+ mgr->setRule( action( GAUSS_RENAME_CONFIGURATION ), "selcount=1 and type='VISU::TGAUSSVIEW'" );
- createAction( GAUSS_SAVE_CONFIGURATION, tr("MEN_SAVE_CONFIGURATION"), QIconSet(),
+ createAction( GAUSS_SAVE_CONFIGURATION, tr("MEN_SAVE_CONFIGURATION"), QIcon(),
tr("MEN_SAVE_CONFIGURATION"), "", 0, this, false,
this, SLOT(OnSaveConfiguration()));
mgr->insert( action( GAUSS_SAVE_CONFIGURATION ), -1, -1, -1 );
mgr->setRule( action( GAUSS_SAVE_CONFIGURATION ),
- "selcount>=0 and client='VVTK' and activeView='VVTK'", true );
+ "selcount>=0 and client='VVTK' and activeView='VVTK'" );
- createAction( GAUSS_OVERWRITE_CONFIGURATION, tr("MEN_OVERWRITE_CONFIGURATION"), QIconSet(),
+ createAction( GAUSS_OVERWRITE_CONFIGURATION, tr("MEN_OVERWRITE_CONFIGURATION"), QIcon(),
tr("MEN_OVERWRITE_CONFIGURATION"), "", 0, this, false,
this, SLOT(OnOverwriteConfiguration()));
mgr->insert( action( GAUSS_OVERWRITE_CONFIGURATION ), -1, -1, -1 );
mgr->setRule( action( GAUSS_OVERWRITE_CONFIGURATION ),
- "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='VVTK'", true );
+ "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='VVTK'" );
- createAction( GAUSS_RESTORE_CONFIGURATION, tr("MEN_RESTORE_CONFIGURATION"), QIconSet(),
+ createAction( GAUSS_RESTORE_CONFIGURATION, tr("MEN_RESTORE_CONFIGURATION"), QIcon(),
tr("MEN_RESTORE_CONFIGURATION"), "", 0, this, false,
this, SLOT(OnRestoreConfiguration()));
mgr->insert( action( GAUSS_RESTORE_CONFIGURATION ), -1, -1, -1 );
mgr->setRule( action( GAUSS_RESTORE_CONFIGURATION ),
- "selcount=1 and type='VISU::TGAUSSVIEW'", true );
+ "selcount=1 and type='VISU::TGAUSSVIEW'" );
}
//---------------------------------------------------------------
values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
indices.append( 2 );
values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
indices.append( 2 );
values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
indices.append( 2 );
QStringList values;
values.append( tr( "VISU_PICKING_PREF_BELOW_POINT" ) );
values.append( tr( "VISU_PICKING_PREF_TOP_LEFT_CORNER" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
setPreferenceProperty( positionPref, "strings", values );
QStringList values;
values.append( tr( "VISU_MOUSE_PREF_STANDARD" ) );
values.append( tr( "VISU_MOUSE_PREF_KEYBOARD_FREE" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
setPreferenceProperty( mousePref, "strings", values );
QStringList values;
values.append( tr( "VISU_RECORDER_PREF_SKIPPED_FRAMES" ) );
values.append( tr( "VISU_RECORDER_PREF_ALL_DISLPAYED_FRAMES" ) );
- QValueList<QVariant> indices;
+ QList<QVariant> indices;
indices.append( 0 );
indices.append( 1 );
setPreferenceProperty( modePref, "strings", values );
if ( !vm )
return;
- QPtrVector<SUIT_ViewWindow> windows = vm->getViews();
+ QVector<SUIT_ViewWindow*> windows = vm->getViews();
for ( int n = windows.count(), i = 0; i < n; i++ )
setProperty( dynamic_cast<SVTK_ViewWindow*>( windows[i] ), prop );
}
_PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy);
static int myNbConfigs = 0;
- std::string aName = VISU::GenerateName("Config.", ++myNbConfigs).latin1();
+ std::string aName = (const char*)VISU::GenerateName("Config.", ++myNbConfigs).toLatin1();
std::string aSComponentEntry = aSComponent->GetID();
anEntry = CreateAttributes(aCStudy,
aMainWindow->SetPlanesSegementation(false);
aMainWindow->SetSphereSegementation(false);
VISU_WidgetCtrl* aWidgetCtrl = aMainWindow->GetWidgetCtrl();
- aSegmentationMode = Storable::FindValue(aMap,"mySegmentationMode").latin1();
+ aSegmentationMode = (const char*)Storable::FindValue(aMap,"mySegmentationMode").toLatin1();
if(aSegmentationMode == "Planes"){
VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
if( !study || !study->studyDS() )
return;
_PTR(Study) studyDS = study->studyDS();
- _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
+ _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", (const char*)moduleName().toLatin1(), savePoint);
_PTR(IParameters) ip = ClientFactory::getIParameters(ap);
// viewers counters are used for storing view_numbers in IParameters
_PTR(SComponent) visuEng = ClientFindOrCreateVisuComponent( studyDS );
std::string componentName = visuEng->ComponentDataType();
- QPtrList<SUIT_ViewManager> lst;
+ QList<SUIT_ViewManager*> lst;
+ QList<SUIT_ViewManager*>::Iterator it;
// saving VVTK viewer parameters. VVTK (Gauss Viewers) are NOT created by SalomeApp since
// VVTK is declared in VISU, so here we store VVTK view window parameters.
// VisuGUI_Module::restoreVisualParameters() creates VVTK_Views and restores its parameters.
ip->setProperty( "ActiveGaussViewer", "-1" );
getApp()->viewManagers( VVTK_Viewer::Type(), lst );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
- SUIT_ViewManager* vman = it.current();
- if ( SUIT_ViewWindow* vwin = vman->getActiveView() ) {
+ for ( it = lst.begin(); it != lst.end(); it++ ) {
+ if ( SUIT_ViewWindow* vwin = (*it)->getActiveView() ) {
// using predefined string "GaussViewer" as "entry".. it's a hardcoded "workaround".
// gauss viewer parameters are retrieved using this "entry" string.
// name of parameter = caption of gauss ViewWindow
// value of parameter = ViewWindow's visual parameters
- ip->setParameter( "GaussViewer", vwin->caption().latin1(), vwin->getVisualParameters().latin1() );
+ ip->setParameter( "GaussViewer",
+ (const char*)vwin->windowTitle().toLatin1(),
+ (const char*)vwin->getVisualParameters().toLatin1() );
if ( application()->desktop()->activeWindow() == vwin )
- ip->setProperty( "ActiveGaussViewer", QString::number( vvtkViewers ).latin1() );
+ ip->setProperty( "ActiveGaussViewer", (const char*)QString::number( vvtkViewers ).toLatin1() );
vvtkViewers++;
}
}
lst.clear();
getApp()->viewManagers( lst );
vvtkViewers = svtkViewers = plotViewers = 0;
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
- SUIT_ViewManager* vman = it.current();
+ for ( it = lst.begin(); it != lst.end(); it++ ) {
+ SUIT_ViewManager* vman = *it;
QString vType = vman->getType();
int* viewsCounter = vType == SVTK_Viewer::Type() ? &svtkViewers :
vType == VVTK_Viewer::Type() ? &vvtkViewers :
if ( vType == SVTK_Viewer::Type() || // processing SVTK and VVTK viewers in the same
vType == VVTK_Viewer::Type() ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow)
- QPtrVector<SUIT_ViewWindow> views = vman->getViews();
+ QVector<SUIT_ViewWindow*> views = vman->getViews();
for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
if ( SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>( views[i] ) ) {
vtkActorCollection* allActors = vtkView->getRenderer()->GetActors();
// subject to change on next component loading
std::string entry = ip->encodeEntry( io->getEntry(), componentName );
- std::string param, vtkParam = vType.latin1(); vtkParam += gSeparator;
- vtkParam += QString::number( *viewsCounter ).latin1(); vtkParam += gSeparator;
+ std::string param, vtkParam = (const char*)vType.toLatin1();
+ vtkParam += gSeparator;
+ vtkParam += (const char*)QString::number( *viewsCounter ).toLatin1();
+ vtkParam += gSeparator;
param = vtkParam + "Visibility";
ip->setParameter( entry, param, "On" );
param = vtkParam + "Name";
ip->setParameter( entry, param, vActor->getName() );
param = vtkParam + "RepresentationMode";
- ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
+ ip->setParameter( entry, param, (const char*)QString::number( vActor->GetRepresentation() ).toLatin1() );
param = vtkParam + "Opacity";
- ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
+ ip->setParameter( entry, param, (const char*)QString::number( vActor->GetOpacity() ).toLatin1() );
vtkFloatingPointType r, g, b;
vActor->GetColor(r, g, b);
QString colorStr = QString::number( r ); colorStr += gDigitsSep;
colorStr += QString::number( g ); colorStr += gDigitsSep;
colorStr += QString::number( b );
param = vtkParam + "Color";
- ip->setParameter( entry, param, colorStr.latin1() );
+ ip->setParameter( entry, param, (const char*)colorStr.toLatin1() );
param = vtkParam + "LineWidth";
- ip->setParameter( entry, param, QString::number( vActor->GetLineWidth() ).latin1() );
+ ip->setParameter( entry, param, (const char*)QString::number( vActor->GetLineWidth() ).toLatin1() );
if ( vActor->IsShrunkable() && vActor->IsShrunk() ) {
param = vtkParam + "ShrinkMode";
ip->setParameter( entry, param, "On" );
param = vtkParam + "ShrinkFactor";
- ip->setParameter( entry, param, QString::number( vActor->GetShrinkFactor() ).latin1() );
+ ip->setParameter( entry, param, (const char*)QString::number( vActor->GetShrinkFactor() ).toLatin1() );
}
VISU_ScalarMapAct* scalarMapActor = dynamic_cast<VISU_ScalarMapAct*>( vActor );
if ( scalarMapActor && scalarMapActor->IsShading() ) {
vtkFloatingPointType normal[3], origin[3];
plane->GetNormal( normal );
plane->GetOrigin( origin );
- std::string planeValue = QString::number( normal[0] ).latin1(); planeValue += gDigitsSep;
- planeValue += QString::number( normal[1] ).latin1(); planeValue += gDigitsSep;
- planeValue += QString::number( normal[2] ).latin1(); planeValue += gDigitsSep;
- planeValue += QString::number( origin[0] ).latin1(); planeValue += gDigitsSep;
- planeValue += QString::number( origin[1] ).latin1(); planeValue += gDigitsSep;
- planeValue += QString::number( origin[2] ).latin1();
- param = QString( "%1ClippingPlane_%2" ).arg( vtkParam.c_str() ).arg( p+1 ).latin1();
+ std::string planeValue = (const char*)QString::number( normal[0] ).toLatin1(); planeValue += gDigitsSep;
+ planeValue += (const char*)QString::number( normal[1] ).toLatin1(); planeValue += gDigitsSep;
+ planeValue += (const char*)QString::number( normal[2] ).toLatin1(); planeValue += gDigitsSep;
+ planeValue += (const char*)QString::number( origin[0] ).toLatin1(); planeValue += gDigitsSep;
+ planeValue += (const char*)QString::number( origin[1] ).toLatin1(); planeValue += gDigitsSep;
+ planeValue += (const char*)QString::number( origin[2] ).toLatin1();
+ param = (const char*)QString( "%1ClippingPlane_%2" ).arg( vtkParam.c_str() ).arg( p+1 ).toLatin1();
ip->setParameter( entry, param, planeValue );
}
}
(*viewsCounter)++;
} // if ( SVTK view model )
else if ( vType == SPlot2d_Viewer::Type() ) { // processing Plot2d viewers
- QPtrVector<SUIT_ViewWindow> views = vman->getViews();
+ QVector<SUIT_ViewWindow*> views = vman->getViews();
for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
if ( Plot2d_ViewWindow* plotView = dynamic_cast<Plot2d_ViewWindow*>( views[i] ) ) {
Plot2d_ViewFrame* plotVF = plotView->getViewFrame();
- QPtrList<Plot2d_Curve> curves;
+ QList<Plot2d_Curve*> curves;
+ QList<Plot2d_Curve*>::Iterator itCurve;
plotVF->getCurves( curves );
Plot2d_Curve* curve;
- for ( curve = curves.first(); curve; curve = curves.next() ) {
- if ( SPlot2d_Curve* sCurve = dynamic_cast<SPlot2d_Curve*>( curve ) ) {
+ for ( itCurve = curves.begin(); itCurve != curves.end(); itCurve++ ) {
+ if ( SPlot2d_Curve* sCurve = dynamic_cast<SPlot2d_Curve*>( *itCurve ) ) {
if ( sCurve->hasIO() ) {
Handle(SALOME_InteractiveObject) io = sCurve->getIO();
// subject to change on next component loading
std::string entry = ip->encodeEntry( io->getEntry(), componentName );
- std::string param, plotParam = vType.latin1(); plotParam += gSeparator;
- plotParam += QString::number( *viewsCounter ).latin1(); plotParam += gSeparator;
+ std::string param, plotParam = (const char*)vType.toLatin1(); plotParam += gSeparator;
+ plotParam += (const char*)QString::number( *viewsCounter ).toLatin1(); plotParam += gSeparator;
param = plotParam + "Visibility";
ip->setParameter( entry, param, "On" );
// return viewer type substring from parameter name
std::string getParam( const std::string& paramName, const int index )
{
- QStringList lst = QStringList::split( gSeparator, QString( paramName.c_str() ) );
+ QStringList lst = QString( paramName.c_str() ).split( gSeparator, QString::SkipEmptyParts );
if ( !lst.isEmpty() && index < lst.size() )
- return lst[index].latin1();
+ return (const char*)lst[index].toLatin1();
return "";
}
if( !study || !study->studyDS() )
return;
_PTR(Study) studyDS = study->studyDS();
- _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
+ _PTR(AttributeParameter) ap =
+ studyDS->GetModuleParameters("Interface Applicative", (const char*)moduleName().toLatin1(), savePoint);
_PTR(IParameters) ip = ClientFactory::getIParameters(ap);
// actors are stored in a map after displaying of them for quicker access in future
for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
SUIT_ViewManager* vman = onCreateViewManager();
SUIT_ViewWindow* vwin = vman->getActiveView();
- vwin->setCaption( (*namesIt).c_str() );
+ vwin->setWindowTitle( (*namesIt).c_str() );
// wait untill the window is really shown. This step fixes MANY bugs..
while ( !vwin->isVisible() )
//SRN: Added a check that the entry corresponds to Standard_Real object in the Study
// as the object may be deleted or modified after the visual state is saved.
- _PTR(SObject) so = studyDS->FindObjectID(entry.latin1());
+ _PTR(SObject) so = studyDS->FindObjectID((const char*)entry.toLatin1());
if(!so) continue; //Skip the not existent entry
for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
// cout << " -- " << viewerType << ": entry = " << entry.latin1() << ", paramName = " << paramName << endl;
- if ( viewerType == SVTK_Viewer::Type().latin1() ||
- viewerType == VVTK_Viewer::Type().latin1() ) {
+ if ( viewerType == (const char*)SVTK_Viewer::Type().toLatin1() ||
+ viewerType == (const char*)VVTK_Viewer::Type().toLatin1() ) {
// used as inner map key for locating the actor.
QString viewerTypeIndex = QString( viewerType.c_str() ) + QString::number( viewIndex );
if ( paramName == "Visibility" && displayer() ) {
// if VVTK, then we must create viewer first, because
- QPtrList<SUIT_ViewManager> lst;
+ QList<SUIT_ViewManager*> lst;
getApp()->viewManagers( viewerType.c_str(), lst );
// SVTK/VVTK ViewManager always has 1 ViewWindow, so view index is index of view manager
QString val( (*valuesIt).c_str() );
if ( paramName == "Name" )
- vActor->setName( val.latin1() );
+ vActor->setName( (const char*)val.toLatin1() );
else if ( paramName == "RepresentationMode" )
vActor->SetRepresentation( val.toInt() );
vActor->SetOpacity( val.toFloat() );
else if ( paramName == "Color" ) {
- QStringList colors = QStringList::split( gDigitsSep, val );
+ QStringList colors = val.split( gDigitsSep, QString::SkipEmptyParts );
if ( colors.count() == 3 )
vActor->SetColor( colors[0].toFloat(), colors[1].toFloat(), colors[2].toFloat() );
}
prs->RemoveAllClippingPlanes();
if ( val != "Off" ) {
- QStringList vals = QStringList::split( gDigitsSep, val );
+ QStringList vals = val.split( gDigitsSep, QString::SkipEmptyParts );
if ( vals.count() == 6 ) { // format check: 6 float values
vtkFloatingPointType normal[3], origin[3];
for (int x = 0; x < 3; x++ ) {
} // else ..
} // if SVTK
- else if ( viewerType == SPlot2d_Viewer::Type().latin1() ) {
+ else if ( viewerType == (const char*)SPlot2d_Viewer::Type().toLatin1() ) {
if ( paramName == "Visibility" && displayer() ) {
- QPtrList<SUIT_ViewManager> lst;
+ QList<SUIT_ViewManager*> lst;
getApp()->viewManagers( viewerType.c_str(), lst );
if ( viewIndex >= 0 && viewIndex < lst.count() ) {
} // for entries iterator
// [ update all SVTK/VVTK/Plot2D views
- QPtrList<SUIT_ViewManager> lst;
+ QList<SUIT_ViewManager*> lst;
getApp()->viewManagers( lst );
- for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
- SUIT_ViewManager* vman = it.current();
- SUIT_ViewModel* vmodel = vman->getViewModel();
+ for ( QList<SUIT_ViewManager*>::Iterator it = lst.begin(); it != lst.end(); it++ ) {
+ SUIT_ViewModel* vmodel = (*it)->getViewModel();
if ( !vmodel )
continue;
if ( vmodel->getType() == SVTK_Viewer::Type() || // processing SVTK and VVTK viewers
vmodel->getType() == VVTK_Viewer::Type() ) { // in the same way
- SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) vman->getActiveView();
+ SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) (*it)->getActiveView();
vtkView->getRenderer()->ResetCameraClippingRange();
vtkView->Repaint();
}
- else if ( vmodel->getType() == SPlot2d_Viewer::Type().latin1() ) {
- Plot2d_ViewWindow* plotView = (Plot2d_ViewWindow*) vman->getActiveView();
+ else if ( vmodel->getType() == (const char*)SPlot2d_Viewer::Type().toLatin1() ) {
+ Plot2d_ViewWindow* plotView = (Plot2d_ViewWindow*) (*it)->getActiveView();
plotView->getViewFrame()->Repaint();
}
} // ] end of update views
if ( activeGaussViewer >= 0 && activeGaussViewer < lst.count() ) {
SUIT_ViewWindow* activeView = lst.at( activeGaussViewer )->getActiveView();
if ( activeView ) {
- activeView->setActiveWindow();
- activeView->setFocus();
+ activeView->activateWindow();
+ //activeView->setFocus();
}
}
}
#include <LightApp_Application.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QLayout>
+#include <QKeyEvent>
using namespace std;
/*!
*/
VisuGUI_NameDlg::VisuGUI_NameDlg( QWidget* parent )
: QDialog( parent ? parent : SUIT_Session::session()->activeApplication()->desktop(),
- "VisuGUI_NameDlg",
- true,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint )//,WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
{
- setCaption( tr("TLT_RENAME") );
+ setWindowTitle( tr("TLT_RENAME") );
setSizeGripEnabled( TRUE );
QVBoxLayout* topLayout = new QVBoxLayout( this );
topLayout->setMargin( 11 ); topLayout->setSpacing( 6 );
/***************************************************************/
- QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
- GroupC1->setColumnLayout(0, Qt::Vertical );
- GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 );
- QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1->layout() );
+ QGroupBox* GroupC1 = new QGroupBox( this );
+ //GroupC1->setColumnLayout(0, Qt::Vertical );
+ //GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 );
+ QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1 );
GroupC1Layout->setAlignment( Qt::AlignTop );
GroupC1Layout->setMargin( 11 ); GroupC1Layout->setSpacing( 6 );
- QLabel* TextLabel = new QLabel( GroupC1, "TextLabel1" );
- TextLabel->setText( tr( "NAME_LBL" ) );
+ QLabel* TextLabel = new QLabel( tr( "NAME_LBL" ), GroupC1 );
GroupC1Layout->addWidget( TextLabel );
- myLineEdit = new QLineEdit( GroupC1, "LineEdit1" );
+ myLineEdit = new QLineEdit( GroupC1 );
myLineEdit->setMinimumSize( 250, 0 );
GroupC1Layout->addWidget( myLineEdit );
/***************************************************************/
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 );
- QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 );
+ QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setMargin( 11 ); GroupButtonsLayout->setSpacing( 6 );
- myButtonOk = new QPushButton( GroupButtons, "buttonOk" );
+ myButtonOk = new QPushButton( GroupButtons );
myButtonOk->setText( tr( "BUT_OK" ) );
myButtonOk->setAutoDefault( TRUE ); myButtonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( myButtonOk );
GroupButtonsLayout->addStretch();
- myButtonCancel = new QPushButton( GroupButtons, "buttonCancel" );
+ myButtonCancel = new QPushButton( GroupButtons );
myButtonCancel->setText( tr( "BUT_CANCEL" ) );
myButtonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( myButtonCancel );
- myButtonHelp = new QPushButton( GroupButtons, "buttonHelp" );
+ myButtonHelp = new QPushButton( GroupButtons );
myButtonHelp->setText( tr( "BUT_HELP" ) );
myButtonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( myButtonHelp );
void VisuGUI_NameDlg::accept()
{
- if ( name().stripWhiteSpace().isEmpty() )
+ if ( name().trimmed().isEmpty() )
return;
QDialog::accept();
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VisuGUI_NAMEDLG_H
#define VisuGUI_NAMEDLG_H
-#include <qdialog.h>
+#include <QDialog>
class QLineEdit;
class QPushButton;
#include "SalomeApp_Application.h"
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
+#include "SUIT_ViewManager.h"
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
// VTK Includes
#include "vtkRenderer.h"
// QT Includes
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <QLabel>
+#include <QLayout>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QKeyEvent>
#define MAXVAL 1e10
VisuGUI_OffsetDlg::VisuGUI_OffsetDlg (VisuGUI* theModule)
-: QDialog(VISU::GetDesktop(theModule), 0, false, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
-myModule(theModule)
+: QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
+ myModule(theModule)
{
- myPrsList.setAutoDelete(false);
+ //myPrsList.setAutoDelete(false);
- setName("VisuGUI_OffsetDlg");
- setCaption(tr("TIT_OFFSETDLG"));
+ setWindowTitle(tr("TIT_OFFSETDLG"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout (this);
TopLayout->setSpacing(6);
TopLayout->setMargin(11);
- QHBox* anOffsetsPane = new QHBox (this);
- anOffsetsPane->setSpacing(6);
+ QWidget* anOffsetsPane = new QWidget (this);
+ QHBoxLayout* aHBLay = new QHBoxLayout( anOffsetsPane );
+ aHBLay->setSpacing(6);
- new QLabel ("dX:", anOffsetsPane);
- myDxEdt = new QtxDblSpinBox (anOffsetsPane, "myDxEdt");
+ aHBLay->addWidget( new QLabel ("dX:", anOffsetsPane) );
+ aHBLay->addWidget( myDxEdt = new QtxDoubleSpinBox (anOffsetsPane) );
myDxEdt->setRange(-MAXVAL, MAXVAL);
- new QLabel("dY:", anOffsetsPane);
- myDyEdt = new QtxDblSpinBox (anOffsetsPane, "myDyEdt");
+ aHBLay->addWidget( new QLabel("dY:", anOffsetsPane) );;
+ aHBLay->addWidget( myDyEdt = new QtxDoubleSpinBox (anOffsetsPane) );
myDyEdt->setRange(-MAXVAL, MAXVAL);
- new QLabel("dZ:", anOffsetsPane);
- myDzEdt = new QtxDblSpinBox (anOffsetsPane, "myDzEdt");
+ aHBLay->addWidget( new QLabel("dZ:", anOffsetsPane) );
+ aHBLay->addWidget( myDzEdt = new QtxDoubleSpinBox (anOffsetsPane) );
myDzEdt->setRange(-MAXVAL, MAXVAL);
QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
+ aHBLay->addWidget( aResetBtn );
connect(aResetBtn, SIGNAL(clicked()), this, SLOT(onReset()));
TopLayout->addWidget(anOffsetsPane);
}
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+ QGroupBox* GroupButtons = new QGroupBox(this);
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonApply = new QPushButton(tr("&Apply"), GroupButtons, "buttonApply");
+ QPushButton* buttonApply = new QPushButton(tr("&Apply"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonApply, 0, 2);
GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 3);
- QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 4);
GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 5);
- QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons );
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 6);
if (myPrsList.count() == 0)
return;
- if (isToSave())
+ if (isToSave())
thePrs->SetOffset(theOffset[0],theOffset[1],theOffset[2]);
ViewManagerList aViewManagerList;
SalomeApp_Application* anApp = myModule->getApp();
anApp->viewManagers(aViewManagerList);
- QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
- for (; anVMIter.current(); ++anVMIter) {
- SUIT_ViewManager* aViewManager = anVMIter.current();
- QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+ for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
+ QVector<SUIT_ViewWindow*> aViews = (*anVMIter)->getViews();
for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
vw->onAdjustTrihedron();
-
if (VISU_Actor* anActor = VISU::FindActor(vw, thePrs)) {
anActor->SetPosition(theOffset);
vw->highlight(thePrs->GetIO(), 1);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VISU_Prs3d_i.hh"
// QT Includes
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <QDialog>
+#include <QList>
class QCheckBox;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class VisuGUI;
struct OffsetStruct
VisuGUI * myModule;
- QtxDblSpinBox * myDxEdt;
- QtxDblSpinBox * myDyEdt;
- QtxDblSpinBox * myDzEdt;
+ QtxDoubleSpinBox * myDxEdt;
+ QtxDoubleSpinBox * myDyEdt;
+ QtxDoubleSpinBox * myDzEdt;
QCheckBox * mySaveChk;
- QPtrList<VISU::Prs3d_i> myPrsList;
- QValueList<OffsetStruct> myOldOffsets;
+ QList<VISU::Prs3d_i*> myPrsList;
+ QList<OffsetStruct> myOldOffsets;
};
#endif // DIALOGBOX_OFFSET_H
#include "SUIT_ResourceMgr.h"
#include "LightApp_Application.h"
-#include "QtxDblSpinBox.h"
-
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include "QtxDoubleSpinBox.h"
+
+#include <QLayout>
+#include <QValidator>
+#include <QTabWidget>
+#include <QRadioButton>
+#include <QSpinBox>
+#include <QCheckBox>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QKeyEvent>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetMapper.h>
//purpose :
//=======================================================================
VisuGUI_Plot3DPane::VisuGUI_Plot3DPane (QWidget* parent)
- : QVBox(parent), myInitFromPrs(false), myPreviewActor(NULL),
+ : QWidget(parent), myInitFromPrs(false), myPreviewActor(NULL),
myViewWindow(VISU::GetActiveViewWindow<SVTK_ViewWindow>()), myPrs(NULL), myPipeCopy(NULL)
{
- layout()->setAlignment(Qt::AlignTop);
- setSpacing(6);
+ QVBoxLayout* aMainLay = new QVBoxLayout( this );
+ aMainLay->setAlignment(Qt::AlignTop);
+ aMainLay->setSpacing(6);
// Orientation
- GBOrientation = new QButtonGroup (tr("Orientation"), this, "GBOrientation");
- GBOrientation->setTitle(tr("ORIENTATION"));
- GBOrientation->setColumnLayout(0, Qt::Vertical);
- GBOrientation->layout()->setSpacing(0);
- GBOrientation->layout()->setMargin(0);
- QGridLayout* BGOrientationLayout = new QGridLayout (GBOrientation->layout());
+ GBOrientation = new QButtonGroup ( this );
+ GBoxOrient = new QGroupBox(tr("ORIENTATION"),this);
+ aMainLay->addWidget(GBoxOrient);
+
+ //GBOrientation->setColumnLayout(0, Qt::Vertical);
+ //GBOrientation->layout()->setSpacing(0);
+ //GBOrientation->layout()->setMargin(0);
+ QGridLayout* BGOrientationLayout = new QGridLayout (GBoxOrient);
BGOrientationLayout->setAlignment(Qt::AlignTop);
BGOrientationLayout->setSpacing(6);
BGOrientationLayout->setMargin(11);
QRadioButton *RBxy, *RByz, *RBzx;
- RBxy = new QRadioButton (tr("// X-Y"), GBOrientation, "RBxy");
- RByz = new QRadioButton (tr("// Y-Z"), GBOrientation, "RByz");
- RBzx = new QRadioButton (tr("// Z-X"), GBOrientation, "RBzx");
+ RBxy = new QRadioButton (tr("// X-Y"), GBoxOrient );
+ RByz = new QRadioButton (tr("// Y-Z"), GBoxOrient );
+ RBzx = new QRadioButton (tr("// Z-X"), GBoxOrient );
BGOrientationLayout->addWidget(RBxy, 0, 0);
BGOrientationLayout->addWidget(RByz, 0, 1);
BGOrientationLayout->addWidget(RBzx, 0, 2);
+ GBOrientation->addButton( RBxy, 0 );
+ GBOrientation->addButton( RByz, 1 );
+ GBOrientation->addButton( RBzx, 2 );
+
// Rotation
- QGroupBox* GBrot = new QGroupBox (tr("ROTATIONS"), this, "GBrot");
- GBrot->setColumnLayout(0, Qt::Vertical);
- GBrot->layout()->setSpacing(0);
- GBrot->layout()->setMargin(0);
- QGridLayout* GBrotLayout = new QGridLayout (GBrot->layout());
+ QGroupBox* GBrot = new QGroupBox (tr("ROTATIONS"), this);
+ aMainLay->addWidget( GBrot );
+ //GBrot->setColumnLayout(0, Qt::Vertical);
+ //GBrot->layout()->setSpacing(0);
+ //GBrot->layout()->setMargin(0);
+ QGridLayout* GBrotLayout = new QGridLayout (GBrot);
GBrotLayout->setAlignment(Qt::AlignTop);
GBrotLayout->setSpacing(6);
GBrotLayout->setMargin(11);
// label 1
- LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot, "LabelRot1");
+ LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot );
GBrotLayout->addWidget(LabelRot1, 0, 0);
// spin 1
- Rot1 = new QtxDblSpinBox (-180, 180, 5, GBrot);
+ Rot1 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
Rot1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot1, 0, 1);
// label 2
- LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot, "LabelRot2");
+ LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot);
GBrotLayout->addWidget(LabelRot2, 1, 0);
// spin 2
- Rot2 = new QtxDblSpinBox (-180, 180, 5, GBrot);
+ Rot2 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
Rot2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot2, 1, 1);
// Position
- QGroupBox* GBpos = new QGroupBox (tr("POSITION"), this, "GBpos");
- GBpos->setColumnLayout(0, Qt::Horizontal);
- GBpos->layout()->setSpacing(0);
- GBpos->layout()->setMargin(0);
- QGridLayout* GBposLayout = new QGridLayout (GBpos->layout());
+ QGroupBox* GBpos = new QGroupBox (tr("POSITION"), this);
+ aMainLay->addWidget( GBpos );
+ //GBpos->setColumnLayout(0, Qt::Horizontal);
+ //GBpos->layout()->setSpacing(0);
+ //GBpos->layout()->setMargin(0);
+ QGridLayout* GBposLayout = new QGridLayout (GBpos);
GBposLayout->setAlignment(Qt::AlignTop);
GBposLayout->setSpacing(6);
GBposLayout->setMargin(11);
// value label
- QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos, "LabelRot1");
+ QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos);
GBposLayout->addWidget(valueLabel, 0, 0);
// value spin
- PositionSpn = new QtxDblSpinBox (0, 1, 0.1, GBpos);
+ PositionSpn = new QtxDoubleSpinBox (0, 1, 0.1, GBpos);
GBposLayout->addWidget(PositionSpn, 0, 1);
// Relative CheckBox
- RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos, "RelativeChkB");
+ RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos);
RelativeChkB->setChecked(true);
GBposLayout->addWidget(RelativeChkB, 0, 2);
// Scale, Presentation type, Nb Contours, Preview
QFrame* bottomFrame = new QFrame (this);
+ aMainLay->addWidget( bottomFrame );
QGridLayout* bottomLayout = new QGridLayout (bottomFrame);
bottomLayout->setAlignment(Qt::AlignTop);
bottomLayout->setSpacing(11);
bottomLayout->setMargin(0);
// scale
QLabel* scaleLabel = new QLabel (tr("SCALE"), bottomFrame);
- ScaleSpn = new QtxDblSpinBox (-1.e6, 1.e6, 0.1, bottomFrame);
+ ScaleSpn = new QtxDoubleSpinBox (-1.e6, 1.e6, 0.1, bottomFrame);
// Presentation type
- GBPrsType = new QHButtonGroup (tr("PRESENTATION_TYPE"), bottomFrame);
- new QRadioButton (tr("SURFACE"), GBPrsType);
- new QRadioButton (tr("CONTOUR"), GBPrsType);
+ GBPrsType = new QButtonGroup ( bottomFrame);
+ QGroupBox* aGB = new QGroupBox (tr("PRESENTATION_TYPE"), bottomFrame);
+ QHBoxLayout* aHBoxLay = new QHBoxLayout( aGB );
+
+ QRadioButton* aRB = new QRadioButton (tr("SURFACE"), aGB);
+ aHBoxLay->addWidget( aRB );
+ GBPrsType->addButton( aRB, 0 );
+ aRB = new QRadioButton (tr("CONTOUR"), aGB);
+ aHBoxLay->addWidget( aRB );
+ GBPrsType->addButton( aRB, 1 );
// nb Contours
QLabel* nbContLabel = new QLabel (tr("NUMBER_CONTOURS"), bottomFrame);
- NbContoursSpn = new QSpinBox (1, 999, 1, bottomFrame, "NbContoursSpn");
+ NbContoursSpn = new QSpinBox ( bottomFrame );
+ NbContoursSpn->setMinimum( 1 );
+ NbContoursSpn->setMaximum( 999 );
+ NbContoursSpn->setSingleStep( 1 );
+
// Preview
PreviewChkB = new QCheckBox (tr("PREVIEW"), bottomFrame);
PreviewChkB->setChecked(false);
bottomLayout->addWidget(scaleLabel, 0, 0);
bottomLayout->addWidget(ScaleSpn, 0, 1);
- bottomLayout->addMultiCellWidget(GBPrsType, 1, 1, 0, 1);
+ bottomLayout->addWidget(aGB, 1, 0, 1, 2);
bottomLayout->addWidget(nbContLabel, 2, 0);
bottomLayout->addWidget(NbContoursSpn, 2, 1);
bottomLayout->addWidget(PreviewChkB, 3, 0);
minPos = 0.;
maxPos = 1.;
}
- PositionSpn->setMinValue(minPos);
- PositionSpn->setMaxValue(maxPos);
- PositionSpn->setLineStep((maxPos - minPos) / 10.);
+ PositionSpn->setMinimum(minPos);
+ PositionSpn->setMaximum(maxPos);
+ PositionSpn->setSingleStep((maxPos - minPos) / 10.);
PositionSpn->setValue(pos);
}
case VISU::Plot3D::YZ: id = 1; break;
default: id = 2;
}
- GBOrientation->setButton(id);
- orientationChanged(id);
+ GBOrientation->button(id)->setChecked( true );
+ //? orientationChanged(id);
// rotation
Rot1->setValue(thePrs->GetRotateX() * 180./PI);
// prs type
id = thePrs->GetIsContourPrs() ? CONTOUR_PRS_ID : SURFACE_PRS_ID;
- GBPrsType->setButton(id);
- onPrsType(id);
+ //GBPrsType->setButton(id);
+ GBOrientation->button(id)->setChecked( true );
+ //onPrsType(id);
// nb contours
NbContoursSpn->setValue(thePrs->GetNbOfContours());
if (thePrs->GetPipeLine()->IsPlanarInput())
{
- GBOrientation->setEnabled(false);
+ //GBOrientation->setEnabled(false);
+ GBoxOrient->setEnabled(false);
Rot1 ->setEnabled(false);
Rot2 ->setEnabled(false);
PositionSpn ->setEnabled(false);
if (myInitFromPrs)
return 0;
// orientation
- int id = GBOrientation->id (GBOrientation->selected());
+ int id = GBOrientation->id (GBOrientation->checkedButton());
VISU::Plot3D::Orientation ori;
switch (id) {
case 0 : ori = VISU::Plot3D::XY; break;
thePrs->SetScaleFactor(ScaleSpn->value());
// prs type
- id = GBPrsType->id (GBPrsType->selected());
+ id = GBPrsType->id (GBPrsType->checkedButton());
thePrs->SetContourPrs(id == CONTOUR_PRS_ID);
// nb contours
case VISU::Plot3D::YZ: id = 1; break;
default: id = 2;
}
- GBOrientation->setButton(id);
- orientationChanged(id);
- GBOrientation->setEnabled(false);
+ GBOrientation->button(id)->setChecked(true);
+ //orientationChanged(id);
+ GBoxOrient->setEnabled(false);
// Set rotation
VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule)
{
- setCaption(tr("TITLE"));
+ setWindowTitle(tr("TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout(this);
myTabBox = new QTabWidget (this);
myIsoPane = new VisuGUI_Plot3DPane (this);
- myIsoPane->setMargin(5);
+ if ( myIsoPane->layout() )
+ myIsoPane->layout()->setMargin(5);
myTabBox->addTab(myIsoPane, tr("PLOT3D_TAB_TITLE"));
myScalarPane = new VisuGUI_ScalarBarPane (this, false);
- myScalarPane->setMargin(5);
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin(5);
myInputPane = new VisuGUI_InputPane(VISU::TPLOT3D, theModule, this);
myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB_TITLE"));
myTabBox->addTab(myInputPane, tr("INPUT_TAB_TITLE"));
TopLayout->addWidget(myTabBox);
- QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+ QGroupBox* GroupButtons = new QGroupBox (this );
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
//=======================================================================
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include <qhbuttongroup.h>
-#include <qtabwidget.h>
+
+class QButtonGroup;
+class QTabWidget;
+class QGroupBox;
class SalomeApp_Module;
class VisuGUI_InputPane;
class VISU_Plot3DPL;
class SVTK_ViewWindow;
class SALOME_Actor;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
-class VisuGUI_Plot3DPane : public QVBox
+class VisuGUI_Plot3DPane : public QWidget//QVBox
{
Q_OBJECT
void restorePrsParams();
QButtonGroup * GBOrientation;
+ QGroupBox * GBoxOrient;
QLabel * LabelRot1;
QLabel * LabelRot2;
- QtxDblSpinBox * Rot1;
- QtxDblSpinBox * Rot2;
- QtxDblSpinBox * PositionSpn;
+ QtxDoubleSpinBox * Rot1;
+ QtxDoubleSpinBox * Rot2;
+ QtxDoubleSpinBox * PositionSpn;
QCheckBox * RelativeChkB;
- QtxDblSpinBox * ScaleSpn;
- QHButtonGroup * GBPrsType;
+ QtxDoubleSpinBox * ScaleSpn;
+ QButtonGroup * GBPrsType;
QSpinBox * NbContoursSpn;
QCheckBox * PreviewChkB;
// Class: VisuGUI_Selection
//////////////////////////////////////////////////
-QtxValue VisuGUI_Selection::param( const int ind, const QString& p ) const
+QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const
{
- QtxValue val( LightApp_Selection::param( ind, p ) );
+ QVariant val( LightApp_Selection::parameter( ind, p ) );
if ( !val.isValid() ) {
- if ( p == "type" ) val = QtxValue( type( ind ) );
- else if ( p == "nbComponents" ) val = QtxValue( nbComponents( ind ) );
- else if ( p == "medEntity" ) val = QtxValue( medEntity( ind ) );
- else if ( p == "medSource" ) val = QtxValue( medSource( ind ) );
- else if ( p == "representation" ) val = QtxValue( representation( ind ) );
- else if ( p == "nbTimeStamps" ) val = QtxValue( nbTimeStamps( ind ) );
- else if ( p == "nbChildren" ) val = QtxValue( nbChildren( ind ) );
- else if ( p == "nbNamedChildren") val = QtxValue( nbNamedChildren( ind ) );
- else if ( p == "isVisible" ) val = QtxValue( isVisible( ind ) );
- else if ( p == "isShrunk" ) val = QtxValue( isShrunk( ind ) );
- else if ( p == "hasActor" ) val = QtxValue( hasActor( ind ) );
- else if ( p == "isShading" ) val = QtxValue( isShading( ind ) );
- else if ( p == "isScalarMapAct" ) val = QtxValue( isScalarMapAct( ind ) );
- else if ( p == "isVisuComponent") val = QtxValue( isVisuComponent( ind ) );
+ if ( p == "type" ) val = QVariant( type( ind ) );
+ else if ( p == "nbComponents" ) val = QVariant( nbComponents( ind ) );
+ else if ( p == "medEntity" ) val = QVariant( medEntity( ind ) );
+ else if ( p == "medSource" ) val = QVariant( medSource( ind ) );
+ else if ( p == "representation" ) val = QVariant( representation( ind ) );
+ else if ( p == "nbTimeStamps" ) val = QVariant( nbTimeStamps( ind ) );
+ else if ( p == "nbChildren" ) val = QVariant( nbChildren( ind ) );
+ else if ( p == "nbNamedChildren") val = QVariant( nbNamedChildren( ind ) );
+ else if ( p == "isVisible" ) val = QVariant( isVisible( ind ) );
+ else if ( p == "isShrunk" ) val = QVariant( isShrunk( ind ) );
+ else if ( p == "hasActor" ) val = QVariant( hasActor( ind ) );
+ else if ( p == "isShading" ) val = QVariant( isShading( ind ) );
+ else if ( p == "isScalarMapAct" ) val = QVariant( isScalarMapAct( ind ) );
+ else if ( p == "isVisuComponent") val = QVariant( isVisuComponent( ind ) );
}
return val;
if ( !aStudy )
return aResStr;
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
VISU::Base_i* aBase = anObjectInfo.myBase;
if ( !aStudy )
return aResStr;
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
bool isExist;
if ( !aStudy )
return QString();
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
bool isExist;
QString VisuGUI_Selection::medSource( const int ind ) const
{
_PTR(Study) aStudyDS = GetStudy()->studyDS();
- if(_PTR(SObject) aSObject = aStudyDS->FindObjectID(entry(ind).latin1())){
+ if(_PTR(SObject) aSObject = aStudyDS->FindObjectID((const char*)entry(ind).toLatin1())){
VISU::Result_var aRes;
if(VISU::Result_i* aResult = CheckResult(myModule,aSObject,aRes)){
using namespace VISU;
if ( !aStudy )
return aResStr;
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
bool isExist;
SVTK_ViewWindow*& theViewWindow,
VISU_Actor*& thenActor)
{
- VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), theEntry);
+ VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), (const char*)theEntry.toLatin1());
thePrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
if(!thePrs3d)
return false;
return cnt;
_PTR(Study) aStudy = GetCStudy( aSStudy );
if ( aStudy ){
- _PTR(SObject) SO = aStudy->FindObjectID( entry( ind ).latin1() );
+ _PTR(SObject) SO = aStudy->FindObjectID( (const char*)entry( ind ).toLatin1() );
if ( SO ){
for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
_PTR(SObject) refSO;
if ( !study )
return false;
- _PTR(SObject) obj = study->studyDS()->FindObjectID( entry( ind ).latin1() );
+ _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry( ind ).toLatin1() );
if ( !obj )
return false;
CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
class VisuGUI_Selection : public LightApp_Selection
{
public:
- VisuGUI_Selection( SalomeApp_Module* theModule ) : myModule( theModule ) {};
+ VisuGUI_Selection( SalomeApp_Module* theModule, const QString& client, LightApp_SelectionMgr* mgr)
+ : LightApp_Selection( client, mgr ), myModule( theModule ) {};
virtual ~VisuGUI_Selection() {};
- virtual QtxValue param( const int, const QString& ) const;
+ virtual QVariant parameter( const int, const QString& ) const;
private:
QString type( const int ) const;
#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
-
-#include "QtxDblSpinBox.h"
+#include "SUIT_Desktop.h"
+
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QRadioButton>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QComboBox>
+#include <QToolButton>
+#include <QLayout>
+#include <QValidator>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QKeyEvent>
+#include <QGridLayout>
+
+#include "QtxDoubleSpinBox.h"
#include <vtkTextProperty.h>
Constructor
*/
VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
- : QDialog(parent, 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
- setName("VisuGUI_TextPrefDlg");
- setCaption(tr("TIT_TEXT_PREF"));
+ setModal( true );
+ setWindowTitle(tr("TIT_TEXT_PREF"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout(this);
TopLayout->setMargin(11);
// "Title" grp
- QGroupBox* aTitleGrp = new QGroupBox (2, Qt::Vertical, tr("LBL_TITLE"), this);
+ QGroupBox* aTitleGrp = new QGroupBox ( tr("LBL_TITLE"), this);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aTitleGrp );
- // edit line
+ // edit line
myTitleEdt = new QLineEdit (aTitleGrp);
+ aVBLay->addWidget( myTitleEdt);
// font
- QHBox* aHBox = new QHBox (aTitleGrp);
- aHBox->setSpacing(5);
+ QWidget* aHBox = new QWidget (aTitleGrp);
+ aVBLay->addWidget( aHBox );
+
+ QHBoxLayout* aHBLay = new QHBoxLayout( aHBox );
+ aHBLay->setSpacing(5);
+
myTitleFont = new SVTK_FontWidget (aHBox);
+ aHBLay->addWidget( myTitleFont );
TopLayout->addWidget(aTitleGrp);
// "Labels" grp
- QGroupBox* aLabelsGrp = new QGroupBox (1, Qt::Vertical, tr("LBL_LABELS"), this);
+ QGroupBox* aLabelsGrp = new QGroupBox (tr("LBL_LABELS"), this);
+ aVBLay = new QVBoxLayout( aLabelsGrp );
// font
- aHBox = new QHBox (aLabelsGrp);
- aHBox->setSpacing(5);
+ aHBox = new QWidget (aLabelsGrp);
+ aVBLay->addWidget( aHBox );
+
+ aHBLay = new QHBoxLayout( aHBox );
+ aHBLay->setSpacing(5);
+
myLabelFont = new SVTK_FontWidget (aHBox);
+ aHBLay->addWidget( myLabelFont );
TopLayout->addWidget(aLabelsGrp);
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
}
else {
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
Constructor
*/
VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
- QVBox(parent), myPreviewActor(0)
+ QWidget(parent), myPreviewActor(0)
{
+ QVBoxLayout* aMainLayout = new QVBoxLayout( this );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
QString propertyName;
propertyName = QString("scalar_bar_vertical_");
Imin = 0.0; Imax = 0.0; /*Fmin = 0.0; Fmax = 0.0;*/ Rmin = 0.0; Rmax = 0.0;
myRangeMode = -1;
- setSpacing(6);
+ aMainLayout->setSpacing(6);
//setMargin(11);
// Range ============================================================
- RangeGroup = new QButtonGroup (tr("SCALAR_RANGE_GRP"), this, "RangeGroup");
- RangeGroup->setColumnLayout(0, Qt::Vertical );
- RangeGroup->layout()->setSpacing( 0 );
- RangeGroup->layout()->setMargin( 0 );
- QGridLayout* RangeGroupLayout = new QGridLayout( RangeGroup->layout() );
+ RangeGroup = new QButtonGroup ( this );
+ QGroupBox* aGB = new QGroupBox( tr("SCALAR_RANGE_GRP"),this );
+ aMainLayout->addWidget( aGB );
+ //RangeGroup->setColumnLayout(0, Qt::Vertical );
+ //RangeGroup->layout()->setSpacing( 0 );
+ //RangeGroup->layout()->setMargin( 0 );
+ QGridLayout* RangeGroupLayout = new QGridLayout( aGB );
RangeGroupLayout->setAlignment( Qt::AlignTop );
RangeGroupLayout->setSpacing( 6 );
RangeGroupLayout->setMargin( 11 );
- myModeLbl = new QLabel("Scalar Mode", RangeGroup);
+ myModeLbl = new QLabel("Scalar Mode", aGB);
- myModeCombo = new QComboBox(RangeGroup);
+ myModeCombo = new QComboBox(aGB);
- CBLog = new QCheckBox (tr("LOGARITHMIC_SCALING"), RangeGroup);
+ CBLog = new QCheckBox (tr("LOGARITHMIC_SCALING"), aGB);
CBLog->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- RBFrange = new QRadioButton (tr("FIELD_RANGE_BTN"), RangeGroup, "RBFrange");
- RBIrange = new QRadioButton (tr("IMPOSED_RANGE_BTN"), RangeGroup, "RBIrange");
+ RBFrange = new QRadioButton (tr("FIELD_RANGE_BTN"), aGB);
+ RBIrange = new QRadioButton (tr("IMPOSED_RANGE_BTN"), aGB);
RBFrange->setChecked( true );
- MinEdit = new QLineEdit( RangeGroup, "MinEdit" );
+ MinEdit = new QLineEdit( aGB );
MinEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
MinEdit->setMinimumWidth( 70 );
MinEdit->setValidator( new QDoubleValidator(this) );
MinEdit->setText( "0.0" );
- QLabel* MinLabel = new QLabel (tr("LBL_MIN"), RangeGroup, "MinLabel");
+ QLabel* MinLabel = new QLabel (tr("LBL_MIN"), aGB);
MinLabel->setBuddy(MinEdit);
- MaxEdit = new QLineEdit( RangeGroup, "MaxEdit" );
+ MaxEdit = new QLineEdit( aGB );
MaxEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
MaxEdit->setMinimumWidth( 70 );
MaxEdit->setValidator( new QDoubleValidator(this) );
MaxEdit->setText( "0.0" );
- QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), RangeGroup, "MaxLabel");
+ QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), aGB);
MaxLabel->setBuddy(MaxEdit);
RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
- RangeGroupLayout->addMultiCellWidget( myModeCombo, 0, 0, 1, 3);
- RangeGroupLayout->addMultiCellWidget( CBLog, 1, 1, 0, 3);
- RangeGroupLayout->addMultiCellWidget( RBFrange, 2, 2, 0, 1);
- RangeGroupLayout->addMultiCellWidget( RBIrange, 2, 2, 2, 3);
+ RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 4);
+ RangeGroupLayout->addWidget( CBLog, 1, 0, 1, 4);
+ RangeGroupLayout->addWidget( RBFrange, 2, 0, 1, 2);
+ RangeGroupLayout->addWidget( RBIrange, 2, 2, 1, 2);
RangeGroupLayout->addWidget( MinLabel, 3, 0 );
RangeGroupLayout->addWidget( MinEdit, 3, 1 );
RangeGroupLayout->addWidget( MaxLabel, 3, 2 );
//TopLayout->addWidget( RangeGroup );
// Colors and Labels ========================================================
- QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this, "ColLabGroup");
- ColLabGroup->setColumnLayout(0, Qt::Vertical );
- ColLabGroup->layout()->setSpacing( 0 );
- ColLabGroup->layout()->setMargin( 0 );
- QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup->layout() );
+ QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this);
+ aMainLayout->addWidget( ColLabGroup );
+ //ColLabGroup->setColumnLayout(0, Qt::Vertical );
+ //ColLabGroup->layout()->setSpacing( 0 );
+ //ColLabGroup->layout()->setMargin( 0 );
+ QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup );
ColLabGroupLayout->setAlignment( Qt::AlignTop );
ColLabGroupLayout->setSpacing( 6 );
ColLabGroupLayout->setMargin( 11 );
- QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup, "ColorLabel");
- ColorSpin = new QSpinBox( 2, 256, 1, ColLabGroup );
+ QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup);
+ ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin->setMinimum( 2 );
+ ColorSpin->setMaximum( 256 );
+ ColorSpin->setSingleStep( 1 );
ColorSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ColorSpin->setMinimumWidth( 70 );
ColorSpin->setValue( 64 );
- QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup, "LabelLabel");
- LabelSpin = new QSpinBox( 2, 65, 1, ColLabGroup );
+ QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
+ LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin->setMinimum( 2 );
+ LabelSpin->setMaximum( 65 );
+ LabelSpin->setSingleStep( 1 );
+
LabelSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
LabelSpin->setMinimumWidth( 70 );
LabelSpin->setValue( 5 );
//TopLayout->addWidget( ColLabGroup );
// Orientation ==========================================================
- QButtonGroup* OrientGroup = new QButtonGroup (tr("ORIENTATION_GRP"), this, "OrientGroup");
- OrientGroup->setColumnLayout(0, Qt::Vertical );
- OrientGroup->layout()->setSpacing( 0 );
- OrientGroup->layout()->setMargin( 0 );
- QGridLayout* OrientGroupLayout = new QGridLayout( OrientGroup->layout() );
+ QButtonGroup* OrientGroup = new QButtonGroup ( this );
+ QGroupBox* OrientGB = new QGroupBox( tr("ORIENTATION_GRP"),this );
+ aMainLayout->addWidget( OrientGB );
+ //OrientGroup->setColumnLayout(0, Qt::Vertical );
+ //OrientGroup->layout()->setSpacing( 0 );
+ //OrientGroup->layout()->setMargin( 0 );
+ QGridLayout* OrientGroupLayout = new QGridLayout( OrientGB );
OrientGroupLayout->setAlignment( Qt::AlignTop );
OrientGroupLayout->setSpacing( 6 );
OrientGroupLayout->setMargin( 11 );
- RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGroup, "RBvert");
+ RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGB);
RBvert->setChecked( true );
- RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGroup, "RBhori");
+ RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGB);
+ OrientGroup->addButton( RBvert );
+ OrientGroup->addButton( RBhori );
OrientGroupLayout->addWidget( RBvert, 0, 0 );
OrientGroupLayout->addWidget( RBhori, 0, 1 );
// TopLayout->addWidget( OrientGroup );
// Origin ===============================================================
- QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this, "OriginGroup");
- OriginGroup->setColumnLayout(0, Qt::Vertical );
- OriginGroup->layout()->setSpacing( 0 );
- OriginGroup->layout()->setMargin( 0 );
- QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup->layout() );
+ QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this);
+ aMainLayout->addWidget( OriginGroup );
+ //OriginGroup->setColumnLayout(0, Qt::Vertical );
+ //OriginGroup->layout()->setSpacing( 0 );
+ // OriginGroup->layout()->setMargin( 0 );
+ QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup );
OriginGroupLayout->setAlignment( Qt::AlignTop );
OriginGroupLayout->setSpacing( 6 );
OriginGroupLayout->setMargin( 11 );
- QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup, "XLabel");
- XSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup);
+ XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
- QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup, "YLabel");
- YSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup);
+ YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.01 );
//TopLayout->addWidget( OriginGroup );
// Dimensions =========================================================
- QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this, "DimGroup");
- DimGroup->setColumnLayout(0, Qt::Vertical );
- DimGroup->layout()->setSpacing( 0 );
- DimGroup->layout()->setMargin( 0 );
- QGridLayout* DimGroupLayout = new QGridLayout( DimGroup->layout() );
+ QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this );
+ aMainLayout->addWidget( DimGroup );
+ //DimGroup->setColumnLayout(0, Qt::Vertical );
+ //DimGroup->layout()->setSpacing( 0 );
+ //DimGroup->layout()->setMargin( 0 );
+ QGridLayout* DimGroupLayout = new QGridLayout( DimGroup );
DimGroupLayout->setAlignment( Qt::AlignTop );
DimGroupLayout->setSpacing( 6 );
DimGroupLayout->setMargin( 11 );
- QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup, "WidthLabel");
- WidthSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup);
+ WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
- QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup, "HeightLabel");
- HeightSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup);
+ HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
//TopLayout->addWidget( DimGroup );
// Save check box ===========================================================
- QHBox* aSaveBox = new QHBox(this);
+ QWidget* aSaveBox = new QWidget(this);
+ aMainLayout->addWidget( aSaveBox );
+ QVBoxLayout* aVBLay = new QVBoxLayout( aSaveBox );
if (!SetPref) {
- CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox, "CBSave");
+ CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox);
+ aVBLay->addWidget( CBSave );
//TopLayout->addWidget(CBSave);
}
else {
CBSave = 0;
}
- myTextBtn = new QPushButton("Text properties...", aSaveBox);
- myTextDlg = new VisuGUI_TextPrefDlg(this);
+ aVBLay->addWidget( myTextBtn = new QPushButton("Text properties...", aSaveBox) );
+
+ aMainLayout->addWidget( myTextDlg = new VisuGUI_TextPrefDlg(this) );
myTextDlg->setTitleVisible(!SetPref);
- QGroupBox* CheckGroup = new QGroupBox("", this, "CheckGroup");
- CheckGroup->setColumnLayout(0, Qt::Vertical );
- CheckGroup->layout()->setSpacing( 0 );
- CheckGroup->layout()->setMargin( 0 );
- QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup->layout() );
+ QGroupBox* CheckGroup = new QGroupBox("", this );
+ aMainLayout->addWidget( CheckGroup );
+ //CheckGroup->setColumnLayout(0, Qt::Vertical );
+ //CheckGroup->layout()->setSpacing( 0 );
+ //CheckGroup->layout()->setMargin( 0 );
+ QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup );
myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), CheckGroup);
myPreviewCheck->setChecked(false);
CheckGroupLayout->addWidget(myPreviewCheck , 0, 0 );
// signals and slots connections ===========================================
- connect( RangeGroup, SIGNAL( clicked( int ) ), this, SLOT( changeRange( int ) ) );
+ connect( RangeGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) );
connect( myModeCombo, SIGNAL( activated( int ) ), this, SLOT( changeScalarMode( int ) ) );
- connect( OrientGroup, SIGNAL( clicked( int ) ), this, SLOT( changeDefaults( int ) ) );
+ connect( OrientGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeDefaults( int ) ) );
connect( XSpin, SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
connect( YSpin, SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
connect( myTextBtn, SIGNAL( clicked() ), this, SLOT( onTextPref() ) );
}
int aScalarMode = aResourceMgr->integerValue("VISU", "scalar_bar_mode", 0);
- myModeCombo->setCurrentItem(aScalarMode);
+ myModeCombo->setCurrentIndex(aScalarMode);
orient = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", orient);
if(orient != 0){
int aNbComp = aField->myNbComp;
bool isScalarMode = (aNbComp > 1);
myModeCombo->clear();
- myModeCombo->insertItem("<Modulus>");
+ myModeCombo->addItem("<Modulus>");
for(int i = 0; i < aNbComp; i++){
- QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
+ QString aComponent = QString(aCompNames[i].c_str()).simplified();
if(aComponent.isNull() || aComponent == "")
aComponent = "Component " + QString::number(i+1);
else
aComponent = "[" + QString::number(i+1) + "] " + aComponent;
- QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
+ QString anUnit = QString(aUnitNames[i].c_str()).simplified();
if(anUnit.isNull() || anUnit == "")
anUnit = "-";
aComponent = aComponent + ", " + anUnit;
- myModeCombo->insertItem(aComponent);
+ myModeCombo->addItem(aComponent);
}
//
- myModeCombo->setCurrentItem(myScalarMap->GetScalarMode());
+ myModeCombo->setCurrentIndex(myScalarMap->GetScalarMode());
if (aNbComp==1){
- myModeCombo->setCurrentItem(1);
+ myModeCombo->setCurrentIndex(1);
}
//
myModeLbl->setEnabled(isScalarMode);
myPreviewActor->GetScalarBar()->VisibilityOn();
myPreviewActor->PickableOff();
- myScalarMapPL->SetScalarMode(myModeCombo->currentItem());
+ myScalarMapPL->SetScalarMode(myModeCombo->currentIndex());
if(isLogarithmic())
myScalarMapPL->SetScaling(VISU::LOGARITHMIC);
else
aScalarBarActor->SetLookupTable(myScalarMapPL->GetBarTable());
- if (myTextDlg->getTitleText().latin1() != "")
- aScalarBarActor->SetTitle(myTextDlg->getTitleText().latin1());
+ if ( !myTextDlg->getTitleText().isEmpty() )
+ aScalarBarActor->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
else
aScalarBarActor->SetTitle(myTitle.c_str());
aScalarBarActor->SetOrientation(getOrientation());
if( !myScalarMap )
return 0;
- myScalarMap->SetScalarMode(myModeCombo->currentItem());
+ myScalarMap->SetScalarMode(myModeCombo->currentIndex());
myScalarMap->SetPosition(XSpin->value(), YSpin->value());
myScalarMap->SetSize(WidthSpin->value(), HeightSpin->value());
myScalarMap->SetBarOrientation((RBvert->isChecked())? VISU::ScalarMap::VERTICAL : VISU::ScalarMap::HORIZONTAL);
if (myIsStoreTextProp) {
// "Title"
- myScalarMap->SetTitle(myTextDlg->getTitleText().latin1());
+ myScalarMap->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
QColor aTitColor (255, 255, 255);
int aTitleFontFamily = VTK_ARIAL;
*/
void VisuGUI_ScalarBarPane::XYChanged( double )
{
- QtxDblSpinBox* snd = (QtxDblSpinBox*)sender();
+ QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
if ( snd == XSpin ) {
- WidthSpin->setMaxValue( 1.0 - XSpin->value() );
+ WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
if ( snd == YSpin ) {
- HeightSpin->setMaxValue( 1.0 - YSpin->value() );
+ HeightSpin->setMaximum( 1.0 - YSpin->value() );
}
updatePreview();
}
double maxVal = MaxEdit->text().toDouble();
if ( RBIrange->isChecked() ) {
if (minVal >= maxVal) {
- SUIT_MessageBox::warn1( this,tr("WRN_VISU"),
+ SUIT_MessageBox::warning( this,tr("WRN_VISU"),
tr("MSG_MINMAX_VALUES"),
tr("BUT_OK"));
return false;
// nothing to do
}
else {
- SUIT_MessageBox::warn1( this,
- tr("WRN_VISU"),
- tr("WRN_LOGARITHMIC_RANGE"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning( this,
+ tr("WRN_VISU"),
+ tr("WRN_LOGARITHMIC_RANGE"),
+ tr("BUT_OK"));
return false;
}
}
// nothing to do
}
else {
- SUIT_MessageBox::warn1( this,
- tr("WRN_VISU"),
- tr("WRN_LOGARITHMIC_FIELD_RANGE"),
- tr("BUT_OK"));
+ SUIT_MessageBox::warning( this,
+ tr("WRN_VISU"),
+ tr("WRN_LOGARITHMIC_FIELD_RANGE"),
+ tr("BUT_OK"));
RBIrange->setChecked(1);
changeRange(1);
//MinEdit->setText( QString::number( Rmin ) );
}
VisuGUI_Prs3dDlg::VisuGUI_Prs3dDlg( SalomeApp_Module* theModule )
- : QDialog( VISU::GetDesktop( theModule ), 0, false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+ : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
}
#ifndef VISUGUI_PRS3DDLG_H
#define VISUGUI_PRS3DDLG_H
-#include <qdialog.h>
-#include <qvbox.h>
+#include <QDialog>
#include "SALOME_GenericObjPointer.hh"
class QToolButton;
class QTabWidget;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class SalomeApp_Module;
class SVTK_FontWidget;
};
-class VisuGUI_ScalarBarPane : public QVBox
+class VisuGUI_ScalarBarPane : public QWidget//QVBox
{
Q_OBJECT;
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDblSpinBox* XSpin;
- QtxDblSpinBox* YSpin;
+ QtxDoubleSpinBox* XSpin;
+ QtxDoubleSpinBox* YSpin;
- QtxDblSpinBox* WidthSpin;
- QtxDblSpinBox* HeightSpin;
+ QtxDoubleSpinBox* WidthSpin;
+ QtxDoubleSpinBox* HeightSpin;
QSpinBox* ColorSpin;
QSpinBox* LabelSpin;
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_PipeLine.hxx"
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+
#include <SPlot2d_ViewWindow.h>
#include <vtkRenderer.h>
aPrs3d->RemoveActors();
INFOS(exc.what());
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
}
if (theViewWindow) {
theViewWindow->getRenderer()->ResetCameraClippingRange();
theViewWindow->Repaint();
}
// Optionally, create table and curves for cut lines
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
CreateCurves( theModule,
dynamic_cast<VISU::CutLines_i*>( aPrs3d ),
aDlg,
{
VISU::Result_var aResult;
if (CheckResult(theModule, theTimeStamp, aResult)){
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
TPrs3d_i* aPrs3d = NULL;
if(thePublishInStudyMode == VISU::ColoredPrs3d_i::EPublishUnderTimeStamp)
aPrs3d = VISU::CreatePrs3d<TPrs3d_i>(aResult,
double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(2048*aMb)) / double(aMb);
CORBA::Float aNecessaryMemory = aRequiredMemory - aFreeMemory - anUsedMemory;
- SUIT_MessageBox::warn1(GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("ERR_NO_MEMORY_TO_BUILD").arg(aNecessaryMemory),
- QObject::tr("&OK") );
+ SUIT_MessageBox::warning(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_NO_MEMORY_TO_BUILD").arg(aNecessaryMemory) );
QApplication::restoreOverrideCursor();
return NULL;
}
{
if( anEnlargeType == VISU::ColoredPrs3dCache::ENLARGE )
{
- if(SUIT_MessageBox::info2(GetDesktop(theModule),
+ if(SUIT_MessageBox::information(GetDesktop(theModule),
QObject::tr("WRN_VISU"),
QObject::tr("WRN_EXTRA_MEMORY_REQUIRED").arg(aRequiredMemory),
QObject::tr("&OK"), QObject::tr("&Cancel"),
if(aPrs3d)
return aPrs3d;
}
- SUIT_MessageBox::warn1(GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") );
+
return NULL;
}
if (!isExist || aType.toInt() != TTIMESTAMP )
return NULL;
- QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1();
- QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1();
- QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1();
- QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1();
+ QString aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName",&isExist).toLatin1();
+ QString anEntity = (const char*)Storable::FindValue(aMap,"myEntityId",&isExist).toLatin1();
+ QString aFieldName = (const char*)Storable::FindValue(aMap,"myFieldName",&isExist).toLatin1();
+ QString aTimeStampId = (const char*)Storable::FindValue(aMap,"myTimeStampId",&isExist).toLatin1();
// Create new TViewWindow instance, if it does not exist.
typedef typename TViewer::TViewWindow TViewWindow;
int aPos = GetFreePositionOfDefaultScalarBar(theModule, aViewWindow);
GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos);
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
TPrs3d_i* aPrs3d =
CreatePrs3dFromFactory<TPrs3d_i>(theModule,
theTimeStamp,
- aMeshName.latin1(),
+ (const char*)aMeshName.toLatin1(),
(Entity)anEntity.toInt(),
- aFieldName.latin1(),
+ (const char*)aFieldName.toLatin1(),
aTimeStampId.toInt(),
thePublishInStudyMode);
if(SPlot2d_Viewer* aPlot2d = GetPlot2dViewer(theModule, false)) aPlot2d->EraseAll();
}
// Optionally, create table and curves for cut lines
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
CreateCurves( theModule,
dynamic_cast<VISU::CutLines_i*>( aPrs3d ),
aDlg,
#include "SUIT_ResourceMgr.h"
#include <limits.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
+
+#include <QLayout>
+#include <QValidator>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QPushButton>
+#include <QGridLayout>
+#include <QKeyEvent>
+
#include <vtkTextProperty.h>
using namespace std;
VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool SetPref)
: VisuGUI_Prs3dDlg(theModule)
{
- setName("VisuGUI_ScalarBarDlg");
- setCaption(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
+ setWindowTitle(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout(this);
myTabBox = new QTabWidget(this);
myScalarPane = new VisuGUI_ScalarBarPane(this, SetPref);
- myScalarPane->setMargin( 5 );
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin( 5 );
myInputPane = new VisuGUI_InputPane(VISU::TSCALARMAP, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
TopLayout->addWidget(myTabBox);
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr("BUT_OK"), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr("BUT_CANCEL") , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr("BUT_HELP") , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
}
else {
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
/*!
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-
-#include "QtxDblSpinBox.h"
-#include "QtxListBox.h"
+class QTabWidget;
+
class VisuGUI_InputPane;
#include "SALOMEDSClient_AttributeString.hxx"
#include "SALOMEDSClient_AttributeName.hxx"
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QTabWidget>
+#include <QGroupBox>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QFrame>
+#include <QKeyEvent>
+
using namespace std;
myUpdateScalars(true),
myVisuGUI(theModule)
{
- setCaption(tr("DLG_TITLE"));
+ setWindowTitle(tr("DLG_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout (this);
myTabBox = new QTabWidget (this);
// Scalar Map on Deformed shape pane
- QVBox* aBox = new QVBox (this);
- aBox->setMargin(11);
- QFrame* TopGroup = new QFrame (aBox, "TopGroup");
+ QWidget* aBox = new QWidget (this);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+ aVBLay->setMargin(11);
+ QFrame* TopGroup = new QFrame (aBox);
+ aVBLay->addWidget( TopGroup );
TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
TopGroup->setLineWidth(1);
QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
TopGroupLayout->setMargin(11);
// Scale factor
- QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup, "ScaleLabel");
+ QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup);
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
+ ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- ScalFact->setPrecision(38);
+ ScalFact->setDecimals(38);
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
// Fields combo box
- QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup, "FieldLabel");
- myFieldsCombo = new QComboBox (TopGroup,"Fields");
+ QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup);
+ myFieldsCombo = new QComboBox (TopGroup );
TopGroupLayout->addWidget(FieldLabel, 1, 0);
TopGroupLayout->addWidget(myFieldsCombo,1,1);
// TimeStamps combo box
- QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup, "TimeStampLabel");
- myTimeStampsCombo = new QComboBox (TopGroup,"TimeStamp");
+ QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup);
+ myTimeStampsCombo = new QComboBox (TopGroup);
TopGroupLayout->addWidget(TimeStampLabel, 2, 0);
TopGroupLayout->addWidget(myTimeStampsCombo,2,1);
// Scalar bar pane
myScalarPane = new VisuGUI_ScalarBarPane (this, false);
- myScalarPane->setMargin(5);
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin(5);
myInputPane = new VisuGUI_InputPane(VISU::TSCALARMAPONDEFORMEDSHAPE, theModule, this);
myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB"));
myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
// Buttons
- QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+ QGroupBox* GroupButtons = new QGroupBox (this);
GroupButtons->setGeometry(QRect(10, 10, 281, 48));
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+ QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding,
QSizePolicy::Minimum), 0, 1);
- QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+ QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
buttonCancel->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
- QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+ QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
buttonHelp->setAutoDefault(TRUE);
GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
setFactor(myPrsCopy->GetScale());
myTimeStampsCombo->setDisabled(myIsAnimation);
- myCurrMeshName = myPrsCopy->GetCMeshName();
+ myCurrMeshName = myPrsCopy->GetCMeshName().c_str();
CORBA::String_var aMeshName = myPrsCopy->GetMeshName();
case 2: anEntity = VISU::FACE; break;
case 3: anEntity = VISU::CELL; break;
}
- TFT &aFieldsMap = myMeshFieldsTimes[aMeshName.latin1()];
- TFE aKey (aFieldName.latin1(), anEntity);
+ TFT &aFieldsMap = myMeshFieldsTimes[(const char*)aMeshName.toLatin1()];
+ TFE aKey ((const char*)aFieldName.toLatin1(), anEntity);
aFieldsMap[aKey][aTimeIter.toInt()] =
- GetFloatValueOfTimeStamp(aMeshName.latin1(),
- aFieldName.latin1(),
+ GetFloatValueOfTimeStamp((const char*)aMeshName.toLatin1(),
+ (const char*)aFieldName.toLatin1(),
aTimeIter.toInt(),
anEntity);
}
AddAllFieldNames();
}
- myFieldsCombo->setCurrentText(aFieldName.in());
+ myFieldsCombo->setCurrentIndex(myFieldsCombo->findText(aFieldName.in()));
AddAllTimes(myFieldsCombo->currentText());
- myTimeStampsCombo->setCurrentText(aIteration);
+ myTimeStampsCombo->setCurrentIndex(myTimeStampsCombo->findText(aIteration));
SetScalarField( false );
myScalarPane->initFromPrsObject(myPrsCopy);
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
int
CORBA::String_var aMeshName = myPrsCopy->GetMeshName();
myPrsCopy->SetScalarField(aMeshName.in(),
- getCurrentScalarFieldName().latin1(),
- myTimeStampID[ myTimeStampsCombo->currentItem() ],
+ (const char*)getCurrentScalarFieldName().toLatin1(),
+ myTimeStampID[ myTimeStampsCombo->currentIndex() ],
myPrsCopy->GetScalarEEntity());
if(myUpdateScalars)
}
int VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldNamePos(){
- return myFieldsCombo->currentItem();
+ return myFieldsCombo->currentIndex();
}
QString VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldName(){
}
void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField( const bool save_scalar_pane ){
- SetScalarField( myTimeStampID[ myTimeStampsCombo->currentItem() ], "", save_scalar_pane );
+ SetScalarField( myTimeStampID[ myTimeStampsCombo->currentIndex() ], "", save_scalar_pane );
}
void
VISU::Entity anEntity = getCurrentScalarEntity();
- myPrsCopy->SetScalarField(myCurrMeshName.latin1(),
- aFieldName.latin1(),
+ myPrsCopy->SetScalarField((const char*)myCurrMeshName.toLatin1(),
+ (const char*)aFieldName.toLatin1(),
theIter,
anEntity);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
TFT::const_iterator aIterField = (aIterMesh->second).begin();
for(;aIterField != (aIterMesh->second).end(); aIterField++){
QString aFieldName = aIterField->first.first;
- myFieldsCombo->insertItem(aFieldName);
+ myFieldsCombo->addItem(aFieldName);
}
}
}
myTimeStampID.reserve( (aIterField->second).size() );
TTL::const_iterator aTimeIter = (aIterField->second).begin();
for(;aTimeIter != (aIterField->second).end(); aTimeIter++) {
- myTimeStampsCombo->insertItem(QString("%1").arg(aTimeIter->second));
+ myTimeStampsCombo->addItem(QString("%1").arg(aTimeIter->second));
myTimeStampID.push_back(aTimeIter->first);
}
return;
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VISUConfig.hh"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
-#include <qdialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+class QComboBox;
+class QTabWidget;
#include <set>
#include <vector>
void onTimeStampChanged(int i=0);
private:
- QtxDblSpinBox* ScalFact;
+ QtxDoubleSpinBox* ScalFact;
QTabWidget* myTabBox;
VisuGUI_ScalarBarPane* myScalarPane;
VisuGUI_InputPane* myInputPane;
#include "LightApp_SelectionMgr.h"
#include "LightApp_VTKSelector.h"
+#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_Session.h"
#include <TColStd_MapOfInteger.hxx>
// QT Includes
-#include <qstring.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qlistbox.h>
-#include <qlayout.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qvalidator.h>
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qtable.h>
+#include <QLabel>
+#include <QSpinBox>
+#include <QListWidget>
+#include <QLayout>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QValidator>
+#include <QPushButton>
+#include <QStackedWidget>
+#include <QGroupBox>
+#include <QLineEdit>
+#include <QValidator>
+#include <QTableWidget>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QKeyEvent>
+#include <QHeaderView>
// VTK Includes
#include <vtkDataSetMapper.h>
VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
QDialog(VISU::GetDesktop(theModule),
- 0,
- false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),//WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySelectionMgr(NULL),
myModule(theModule)
{
if (mySelectionDlg)
- mySelectionDlg->close(true);
+ {
+ mySelectionDlg->close();
+ delete mySelectionDlg;
+ }
- setCaption( "Data on elements" );
+ setWindowTitle( tr("WINDOW_TITLE" ) );
setSizeGripEnabled(TRUE);
QGridLayout* TopLayout = new QGridLayout (this);
TopLayout->setRowStretch(2, 1);
TopLayout->setRowStretch(3, 0);
- QHButtonGroup* aTypeBox = new QHButtonGroup ("Selection", this);
+ QGroupBox* aTypeBox = new QGroupBox (tr("MODE_TITLE"), this);
+ QHBoxLayout* aHBox = new QHBoxLayout();
+ QButtonGroup* aBtnGroup = new QButtonGroup();
+
+ QRadioButton* aBtn = new QRadioButton (tr("MODE_POINT"), aTypeBox);
+ aHBox->addWidget( aBtn );
+ aBtnGroup->addButton( aBtn );
+
+ aBtn = new QRadioButton (tr("MODE_CELL"), aTypeBox);
+ aHBox->addWidget( aBtn );
+ aBtnGroup->addButton( aBtn );
- QRadioButton* aPointBtn =
- new QRadioButton ("Point", aTypeBox);
- new QRadioButton ("Cell" , aTypeBox);
- new QRadioButton ("Actor", aTypeBox);
- aPointBtn->setChecked(true);
+ aBtn = new QRadioButton (tr("MODE_ACTOR"), aTypeBox);
+ aHBox->addWidget( aBtn );
+ aBtnGroup->addButton( aBtn );
+
+ aBtnGroup->button(0)->setChecked(true);
- connect(aTypeBox, SIGNAL(clicked(int)), this, SLOT(onSelectionChange(int)));
+ connect(aBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(onSelectionChange(int)));
TopLayout->addWidget(aTypeBox, 0, 0);
QWidget* aNamePane = new QWidget (this);
QGridLayout* aNameLay = new QGridLayout (aNamePane);
- QLabel* aMeshLbl = new QLabel ("Mesh name: ", aNamePane);
+ QLabel* aMeshLbl = new QLabel (tr("MESH_NAME_LBL"), aNamePane);
myMeshName = new QLabel (aNamePane);
- QLabel* aFieldLbl = new QLabel ("Field name: ", aNamePane);
+ QLabel* aFieldLbl = new QLabel (tr("FIELD_NAME_LBL"), aNamePane);
myFieldName = new QLabel (aNamePane);
aNameLay->addWidget(aMeshLbl, 0, 0);
TopLayout->addWidget(aNamePane, 1, 0);
- myWidgetStack = new QWidgetStack (this);
+ myWidgetStack = new QStackedWidget (this);
// Create Points pane
- myPointsPane = new QVBox (myWidgetStack);
- myPointsPane->layout()->setSpacing(6);
+ myPointsPane = new QWidget (myWidgetStack);
+ QVBoxLayout* aVBoxLayout = new QVBoxLayout(myPointsPane);
- QGroupBox* aDataGrp = new QGroupBox (2, Qt::Horizontal, "Data of Point", myPointsPane);
- aDataGrp->layout()->setSpacing(6);
+ QGroupBox* aDataGrp = new QGroupBox ( tr("POINT_DATA_TITLE"), myPointsPane);
+ QGridLayout* aGridLay = new QGridLayout (aDataGrp);
+ aGridLay->setSpacing(6);
- new QLabel ("ID:", aDataGrp);
+ aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aDataGrp) , 0, 0 );
+ aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aDataGrp), 1, 0 );
+ aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aDataGrp), 2, 0 );
+
myIDValLbl = new QLineEdit ("", aDataGrp);
+ aGridLay->addWidget( myIDValLbl, 0, 1 );
QIntValidator* aIntValidator = new QIntValidator (myIDValLbl);
aIntValidator->setBottom(0);
myIDValLbl->setValidator(aIntValidator);
connect(myIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onPointIdEdit(const QString&)));
- new QLabel ("Scalar Value:", aDataGrp);
myScalarValLbl = new QLabel ("", aDataGrp);
- new QLabel ("Vector Value:", aDataGrp);
+ aGridLay->addWidget( myScalarValLbl, 1, 1 );
+
myVectorValLbl = new QLabel ("", aDataGrp);
myVectorValLbl->setMinimumWidth(150);
+ aGridLay->addWidget( myVectorValLbl, 2, 1 );
- QGroupBox* aCoordGrp = new QGroupBox (4, Qt::Horizontal, "Coordinates", myPointsPane);
- aCoordGrp->layout()->setSpacing(6);
- new QLabel ("X:", aCoordGrp);
+ aVBoxLayout->addWidget( aDataGrp );
+
+ QGroupBox* aCoordGrp = new QGroupBox ( tr("POINT_COORD_TITLE"), myPointsPane);
+ aGridLay = new QGridLayout (aCoordGrp);
+ aGridLay->setSpacing(6);
+
+ aGridLay->addWidget( new QLabel ("X:", aCoordGrp), 0, 0 );
myXValLbl = new QLabel ("", aCoordGrp);
+ aGridLay->addWidget( myXValLbl, 0, 1 );
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- new QLabel ("I:", aCoordGrp);
+ aGridLay->addWidget( new QLabel ("I:", aCoordGrp), 0, 2 );
myIValLbl = new QLabel ("-", aCoordGrp);
+ aGridLay->addWidget( myIValLbl, 0, 3 );
//ENK: 23.11.2006
- new QLabel ("Y:", aCoordGrp);
+ aGridLay->addWidget( new QLabel ("Y:", aCoordGrp), 1, 0 );
myYValLbl = new QLabel ("", aCoordGrp);
+ aGridLay->addWidget( myYValLbl, 1, 1 );
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- new QLabel ("J:", aCoordGrp);
+ aGridLay->addWidget( new QLabel ("J:", aCoordGrp), 1, 2 );
myJValLbl = new QLabel ("-", aCoordGrp);
+ aGridLay->addWidget( myJValLbl, 1, 3 );
//ENK: 23.11.2006
- new QLabel ("Z:",aCoordGrp );
+ aGridLay->addWidget( new QLabel ("Z:",aCoordGrp ), 2, 0 );
myZValLbl = new QLabel ("", aCoordGrp);
+ aGridLay->addWidget( myZValLbl, 2, 1 );
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- new QLabel ("K:", aCoordGrp);
+ aGridLay->addWidget( new QLabel ("K:", aCoordGrp), 2, 1 );
myKValLbl = new QLabel ("-", aCoordGrp);
+ aGridLay->addWidget( myKValLbl, 2, 3 );
//ENK: 23.11.2006
+ aVBoxLayout->addWidget( aCoordGrp );
- myWidgetStack->addWidget(myPointsPane, 0);
+ myWidgetStack->addWidget(myPointsPane);
// Create Cells pane
myCellsPane = new QWidget (myWidgetStack);
aCellLayout->setRowStretch(0, 0);
aCellLayout->setRowStretch(1, 1);
- QGroupBox* aCellGrp = new QGroupBox(2, Qt::Horizontal, "Data of Cell", myCellsPane);
+ QGroupBox* aCellGrp = new QGroupBox( tr("CELL_DATA_TITLE"), myCellsPane);
+ aGridLay = new QGridLayout (aCellGrp);
- new QLabel ("ID:", aCellGrp);
+ aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aCellGrp), 0, 0);
myCellIDValLbl = new QLineEdit ("", aCellGrp);
myCellIDValLbl->setValidator(aIntValidator);
+ aGridLay->addWidget( myCellIDValLbl, 0, 1);
connect(myCellIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onCellIdEdit(const QString&)));
- new QLabel ("Scalar Value:", aCellGrp);
+ aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aCellGrp), 1, 0);
myCellScalarValLbl = new QLabel ("", aCellGrp);
- new QLabel ("Vector Value:", aCellGrp);
+ aGridLay->addWidget( myCellScalarValLbl, 1, 1);
+ aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aCellGrp), 2, 0);
myCellVectorValLbl = new QLabel ("", aCellGrp);
+ aGridLay->addWidget(myCellVectorValLbl , 2, 1);
aCellLayout->addWidget(aCellGrp, 0, 0);
- myListPoints = new QTable (myCellsPane);
- myListPoints->setReadOnly(true);
- myListPoints->setNumCols(9);
- myListPoints->setNumRows(0);
+ myListPoints = new QTableWidget (myCellsPane);
+ myListPoints->setEditTriggers( QAbstractItemView::NoEditTriggers );
+ myListPoints->setColumnCount(9);
+ myListPoints->setRowCount(0);
myListPoints->setColumnWidth(0, 40);
myListPoints->setColumnWidth(1, 40);
myListPoints->setColumnWidth(2, 40);
myListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
myListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
myListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- myListPoints->setSelectionMode(QTable::NoSelection);
- QHeader* aHeader = myListPoints->horizontalHeader();
- aHeader->setLabel( 0, "ID" );
- aHeader->setLabel( 1, "X" );
- aHeader->setLabel( 2, "Y" );
- aHeader->setLabel( 3, "Z" );
- aHeader->setLabel( 4, "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- aHeader->setLabel( 5, "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- aHeader->setLabel( 6, "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- aHeader->setLabel( 7, "Scalar" );
- aHeader->setLabel( 8, "Vector" );
+ myListPoints->setSelectionMode(QAbstractItemView::NoSelection);
+
+ QStringList aLabels;
+ aLabels.append( "ID" );
+ aLabels.append( "X" );
+ aLabels.append( "Y" );
+ aLabels.append( "Z" );
+ aLabels.append( "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ aLabels.append( "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ aLabels.append( "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ aLabels.append( tr("CELL_DATA_SCALAR_HDR") );
+ aLabels.append( tr("CELL_DATA_VECTOR_HDR") );
+ myListPoints->setHorizontalHeaderLabels( aLabels );
aCellLayout->addWidget(myListPoints, 1, 0);
- myWidgetStack->addWidget(myCellsPane, 1);
+ myWidgetStack->addWidget(myCellsPane);
// Actor Pane
- myActorsPane = new QVBox (myWidgetStack);
- myActorsPane->layout()->setSpacing(6);
-
- QGroupBox* aPosGrp = new QGroupBox (2, Qt::Horizontal, "Position", myActorsPane);
- aPosGrp->layout()->setSpacing(6);
- new QLabel ("X:", aPosGrp);
+ myActorsPane = new QWidget (myWidgetStack);
+ aVBoxLayout = new QVBoxLayout(myActorsPane);
+ aVBoxLayout->setSpacing(6);
+
+ QGroupBox* aPosGrp = new QGroupBox (tr("ACTOR_DATA_POSITION_TITLE"), myActorsPane);
+ aGridLay = new QGridLayout (aPosGrp);
+ aGridLay->setSpacing(6);
+ aGridLay->addWidget( new QLabel ("X:", aPosGrp), 0, 0);
myXPosLbl = new QLabel ("0", aPosGrp);
- new QLabel ("Y:", aPosGrp);
+ aGridLay->addWidget( myXPosLbl, 0, 1);
+ aGridLay->addWidget( new QLabel ("Y:", aPosGrp), 1, 0);
myYPosLbl = new QLabel ("0", aPosGrp);
- new QLabel ("Z:", aPosGrp);
+ aGridLay->addWidget( myYPosLbl, 2, 1);
+ aGridLay->addWidget( new QLabel ("Z:", aPosGrp), 2, 0);
myZPosLbl = new QLabel ("0", aPosGrp);
+ aGridLay->addWidget( myZPosLbl, 3, 1);
- QGroupBox* aSizeGrp = new QGroupBox (2, Qt::Horizontal, "Size", myActorsPane);
- aSizeGrp->layout()->setSpacing(6);
- new QLabel ("dX:", aSizeGrp);
+ aVBoxLayout->addWidget( aPosGrp );
+
+ QGroupBox* aSizeGrp = new QGroupBox ( tr("ACTOR_DATA_SIZE_TITLE"), myActorsPane);
+ aGridLay = new QGridLayout (aPosGrp);
+ aGridLay->setSpacing(6);
+ aGridLay->addWidget( new QLabel ("dX:", aSizeGrp ), 0, 0);
myDXLbl = new QLabel ("0", aSizeGrp);
- new QLabel ("dY:", aSizeGrp);
+ aGridLay->addWidget( myDXLbl, 0, 1);
+ aGridLay->addWidget( new QLabel ("dY:", aSizeGrp ), 0, 0);
myDYLbl = new QLabel ("0", aSizeGrp);
- new QLabel ("dZ:",aSizeGrp );
+ aGridLay->addWidget( myDYLbl, 1, 1);
+ aGridLay->addWidget( new QLabel ("dZ:", aSizeGrp ), 0, 0);
myDZLbl = new QLabel ("0", aSizeGrp);
+ aGridLay->addWidget( myDZLbl, 2, 1);
+
+ aVBoxLayout->addWidget( aSizeGrp );
- myWidgetStack->addWidget(myActorsPane, 2);
+ myWidgetStack->addWidget(myActorsPane);
TopLayout->addWidget(myWidgetStack, 2, 0);
// Create buttons group
- QHBox* aBtnBox = new QHBox (this);
- QHBoxLayout* aBtnLayout = (QHBoxLayout*)aBtnBox->layout();
+ QWidget* aBtnBox = new QWidget (this);
+ QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox);
aBtnLayout->addStretch();
QPushButton* aCloseBtn = new QPushButton (tr("BUT_CLOSE"), aBtnBox);
myFl = false;
// Activate Points pane
- myWidgetStack->raiseWidget(myPointsPane);
+ myWidgetStack->setCurrentWidget(myPointsPane);
if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule))
aViewWindow->SetSelectionMode(NodeSelection);
onSelectionEvent();
switch (theId) {
case 0: // Points
- myWidgetStack->raiseWidget(myPointsPane);
+ myWidgetStack->setCurrentWidget(myPointsPane);
aViewWindow->SetSelectionMode(NodeSelection);
onPointIdEdit(myIDValLbl->text());
break;
case 1: // Cells
- myWidgetStack->raiseWidget(myCellsPane);
+ myWidgetStack->setCurrentWidget(myCellsPane);
aViewWindow->SetSelectionMode(CellSelection);
onCellIdEdit(myCellIDValLbl->text());
break;
case 2: // Actor
- myWidgetStack->raiseWidget(myActorsPane);
+ myWidgetStack->setCurrentWidget(myActorsPane);
aViewWindow->SetSelectionMode(ActorSelection);
onSelectionEvent();
}
case ActorSelection:
break;
default:
- close( TRUE );
+ close();
+ delete this;
return;
}
return;
myFl = true;
- int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
+ int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
SVTK_Selector* aSelector = aViewWindow->GetSelector();
}
}
- myListPoints->setNumRows(aPointCoordsMap.size());
+ myListPoints->setRowCount(aPointCoordsMap.size());
TPointCoordsMap::const_iterator anIter = aPointCoordsMap.begin();
const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
- for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->numRows(); anIter++, i++) {
- myListPoints->verticalHeader()->setLabel(i, QString::number( i ));
+ for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->rowCount(); anIter++, i++) {
+ myListPoints->verticalHeaderItem(i)->setText( QString::number( i ));
vtkIdType aNodeObjId = anIter->first;
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(aNodeObjId);
}
//ENK: 23.11.2006
- myListPoints->setText(i, 0, QString::number( aNodeObjId ));
+ myListPoints->item(i,0)->setText( QString::number( aNodeObjId ));
const TCoordArray& aCoordArray = anIter->second;
- myListPoints->setText(i, 1, QString::number( aCoordArray[0] ));
- myListPoints->setText(i, 2, QString::number( aCoordArray[1] ));
- myListPoints->setText(i, 3, QString::number( aCoordArray[2] ));
- myListPoints->setText(i, 4, aI);//ENK: 23.11.2006 - PAL13176
- myListPoints->setText(i, 5, aJ);//ENK: 23.11.2006 - PAL13176
- myListPoints->setText(i, 6, aK);//ENK: 23.11.2006 - PAL13176
+ myListPoints->item(i,1)->setText( QString::number( aCoordArray[0] ));
+ myListPoints->item(i,2)->setText( QString::number( aCoordArray[1] ));
+ myListPoints->item(i,3)->setText( QString::number( aCoordArray[2] ));
+ myListPoints->item(i,4)->setText( aI);//ENK: 23.11.2006 - PAL13176
+ myListPoints->item(i,5)->setText( aJ);//ENK: 23.11.2006 - PAL13176
+ myListPoints->item(i,6)->setText( aK);//ENK: 23.11.2006 - PAL13176
vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
- myListPoints->setText(i, 7, getValue(aPntData, aNodeVTKId));
- myListPoints->setText(i, 8, getVector(aPntData, aNodeVTKId));
+ myListPoints->item(i,7)->setText( getValue(aPntData, aNodeVTKId));
+ myListPoints->item(i,8)->setText( getVector(aPntData, aNodeVTKId));
}
- for(int aColumnId = 0; aColumnId < 9; aColumnId++)
- myListPoints->adjustColumn(aColumnId);
+ //for(int aColumnId = 0; aColumnId < 9; aColumnId++)
+ myListPoints->resizeColumnsToContents();
}
} else {
clearFields();
void VisuGUI_SelectionDlg::clearFields() {
- int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
+ int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
switch (aType) {
case 0:
myXValLbl->setText( "" );
case 1:
myCellScalarValLbl->setText("");
myCellVectorValLbl->setText("");
- myListPoints->setNumRows(0);
+ myListPoints->setRowCount(0);
break;
case 2:
myXPosLbl->setText("");
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VisuGUI_Selection_HeaderFile
#define VisuGUI_Selection_HeaderFile
-#include <qdialog.h>
+#include <QDialog>
class QLabel;
-class QWidgetStack;
-class QVBox;
+class QStackedWidget;
+//class QVBox;
class QLineEdit;
-class QTable;
+class QTableWidget;
class LightApp_SelectionMgr;
class SalomeApp_Application;
class SalomeApp_Module;
QLabel* myMeshName;
QLabel* myFieldName;
- QWidgetStack* myWidgetStack;
- QVBox* myPointsPane;
+ QStackedWidget* myWidgetStack;
+ QWidget* myPointsPane;
QWidget* myCellsPane;
QLabel* myXValLbl;
QLabel* myYValLbl;
QLabel* myScalarValLbl;
QLabel* myVectorValLbl;
- QTable* myListPoints;
+ QTableWidget* myListPoints;
QLineEdit* myCellIDValLbl;
QLabel* myCellScalarValLbl;
QLabel* myCellVectorValLbl;
- QVBox* myActorsPane;
+ QWidget* myActorsPane;
QLabel* myXPosLbl;
QLabel* myYPosLbl;
QLabel* myZPosLbl;
#include "LightApp_Application.h"
+#include <QtxColorButton.h>
+
#include <SALOMEDSClient_AttributeTableOfInteger.hxx>
#include <SALOMEDSClient_AttributeTableOfReal.hxx>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
-#include <qlayout.h>
-#include <qcolordialog.h>
-#include <qspinbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QToolButton>
+#include <QComboBox>
+#include <QScrollArea>
+#include <QLayout>
+#include <QColorDialog>
+#include <QSpinBox>
+#include <QKeyEvent>
+#include <QFrame>
#include <vector>
#include <string>
Constructor
*/
VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent )
- : QDialog( parent,
- "VisuGUI_SetupPlot2dDlg",
- true,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+ : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
{
- setCaption( tr("TLT_SETUP_PLOT2D") );
+ setModal( true );
+ setWindowTitle( tr("TLT_SETUP_PLOT2D") );
setSizeGripEnabled( TRUE );
QGridLayout* topLayout = new QGridLayout( this );
topLayout->setSpacing( SPACING_SIZE );
topLayout->setMargin( MARGIN_SIZE );
- myItems.setAutoDelete( false );
+ //myItems.setAutoDelete( false );
myObject = object;
/* Top scroll view */
- myView = new QScrollView( this );
+ myView = new QScrollArea( this );
QFrame* frame = new QFrame( myView );
frame->setFrameStyle( QFrame::Plain | QFrame::NoFrame );
- QGridLayout* frameLayout = new QGridLayout( frame, 1, 12 );
+ QGridLayout* frameLayout = new QGridLayout( frame );
frameLayout->setMargin( MARGIN_SIZE ); frameLayout->setSpacing( SPACING_SIZE );
QFrame* lin;
QLabel* labData = new QLabel( tr( "DATA_LBL" ), frame );
QLabel* labUnit = new QLabel( tr( "UNITS_LBL" ), frame );
QLabel* labAttr = new QLabel( tr( "ATTRIBUTES_LBL" ), frame );
- labAxis->setAlignment( AlignCenter );
- labAssigned->setAlignment( AlignCenter );
- labData->setAlignment( AlignCenter );
- labUnit->setAlignment( AlignCenter );
- labAttr->setAlignment( AlignCenter );
+ labAxis->setAlignment( Qt::AlignCenter );
+ labAssigned->setAlignment( Qt::AlignCenter );
+ labData->setAlignment( Qt::AlignCenter );
+ labUnit->setAlignment( Qt::AlignCenter );
+ labAttr->setAlignment( Qt::AlignCenter );
QFont font = labAxis->font(); font.setBold( true );
labAxis->setFont( font );
labAssigned->setFont( font );
labUnit->setFont( font );
labAttr->setFont( font );
- frameLayout->addMultiCellWidget( labAxis, 0, 0, 0, 1 );
+ frameLayout->addWidget( labAxis, 0, 0, 1, 2 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
frameLayout->addWidget( lin, 0, 2 );
frameLayout->addWidget( labUnit, 0, 7 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
frameLayout->addWidget( lin, 0, 8 );
- frameLayout->addMultiCellWidget( labAttr, 0, 0, 9, 13 );
- frameLayout->setColStretch( 14, 5 );
+ frameLayout->addWidget( labAttr, 0, 9, 1, 5 );
+ //frameLayout->setColStretch( 14, 5 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- frameLayout->addMultiCellWidget( lin, 1, 1, 0, 14 );
+ frameLayout->addWidget( lin, 1, 0, 1, 15 );
int row = 2;
_PTR(GenericAttribute) anAttr;
vector<string> rowUnits = tblIntAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
- rows.append( rowTitles[i] );
+ rows.append( rowTitles[i].c_str() );
for ( int i = 0; i < nbRows; i++ ) {
VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
vector<string> rowUnits = tblRealAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
- rows.append( rowTitles[i] );
+ rows.append( rowTitles[i].c_str() );
for ( int i = 0; i < nbRows; i++ ) {
VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
}
}
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addMultiCellWidget( lin, 2, row+1, 2, 2 );
+ frameLayout->addWidget( lin, 2, 2, row, 1 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addMultiCellWidget( lin, 2, row+1, 4, 4 );
+ frameLayout->addWidget( lin, 2, 4, row, 1 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addMultiCellWidget( lin, 2, row+1, 6, 6 );
- frameLayout->setRowStretch( row+1, 5 );
+ frameLayout->addWidget( lin, 2, 6, row, 1 );
+ //frameLayout->setRowStretch( row+1, 5 );
- myView->addChild( frame, 0, 0 );
- myView->setResizePolicy( QScrollView::AutoOneFit );
+ myView->setWidget( frame );
+ myView->setAlignment( Qt::AlignCenter );
+ myView->setWidgetResizable( true );
myView->setMinimumWidth( frame->sizeHint().width() + MARGIN_SIZE * 2 );
/* OK/Cancel/Help buttons */
- myOkBtn = new QPushButton( tr( "BUT_OK" ), this, "buttonOk" );
+ myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
myOkBtn->setAutoDefault( TRUE );
myOkBtn->setDefault( TRUE );
- myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this, "buttonCancel" );
+ myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
myCancelBtn->setAutoDefault( TRUE );
- myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this, "buttonHelp" );
+ myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
myHelpBtn->setAutoDefault( TRUE );
- topLayout->addMultiCellWidget( myView, 0, 0, 0, 3 );
+ topLayout->addWidget( myView, 0, 0, 1, 4 );
topLayout->addWidget( myOkBtn, 1, 0 );
- topLayout->setColStretch( 1, 5 );
+ //topLayout->setColStretch( 1, 5 );
topLayout->addWidget( myCancelBtn, 1, 2 );
topLayout->addWidget( myHelpBtn, 1, 3 );
/*!
Gets curves info ( indexes of row data in the table for horizontal and verical axes )
*/
-void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QValueList<int>& verIndexes,
- QValueList<int>& zIndices )
+void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QList<int>& verIndexes,
+ QList<int>& zIndices )
{
/* collecting horizontal and vertical axis items */
horIndex = -1;
/*!
Creates and returns curves presentations
*/
-void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
+void VisuGUI_SetupPlot2dDlg::getCurves( QList<Plot2d_Curve*>& container )
{
_PTR(GenericAttribute) anAttr;
_PTR(AttributeTableOfInteger) tblIntAttr;
/* collecting horizontal and vertical axis items */
int horIndex;
int i, j;
- QValueList<int> verIndex, zIndices;
+ QList<int> verIndex, zIndices;
getCurvesSource( horIndex, verIndex, zIndices );
if ( horIndex < 0 || verIndex.isEmpty() ) /* no curves can be created */
return;
curve->setData( xList, yList, nbPoints, zList );
}
// curve attributes
- curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
- curve->setMarker( (Plot2d_Curve::MarkerType)myItems.at( verIndex[i] )->getMarker() );
+ curve->setLine( (Plot2d::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
+ curve->setMarker( (Plot2d::MarkerType)myItems.at( verIndex[i] )->getMarker() );
curve->setColor( myItems.at( verIndex[i] )->getColor() );
curve->setAutoAssign( myItems.at( verIndex[i] )->isAutoAssign() );
// add curve into container
curve->setData( xList, yList, nbPoints, zList );
}
// curve attributes
- curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
- curve->setMarker( (Plot2d_Curve::MarkerType)myItems.at( verIndex[i] )->getMarker() );
+ curve->setLine( (Plot2d::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
+ curve->setMarker( (Plot2d::MarkerType)myItems.at( verIndex[i] )->getMarker() );
curve->setColor( myItems.at( verIndex[i] )->getColor() );
curve->setAutoAssign( myItems.at( verIndex[i] )->isAutoAssign() );
// add curve into container
void VisuGUI_SetupPlot2dDlg::onVBtnToggled( bool on )
{
VisuGUI_ItemContainer* item = ( VisuGUI_ItemContainer* )sender();
- QPtrList<VisuGUI_ItemContainer> itemList;
- itemList.setAutoDelete( false );
+ QList<VisuGUI_ItemContainer*> itemList;
+ //itemList.setAutoDelete( false );
item->myAssigned->setEnabled( on );
int i;
if ( on ) {
}
}
if ( totalOn == 0 && !itemList.isEmpty() &&
- SUIT_MessageBox::info2( this,
- this->caption(),
- tr( "QUE_WANT_SAME_UNITS" ),
- tr( "BUT_YES" ),
- tr( "BUT_NO" ),
- 0, 1, 1 ) == 0 ) {
+ SUIT_MessageBox::information( this,
+ this->windowTitle(),
+ tr( "QUE_WANT_SAME_UNITS" ),
+ tr( "BUT_YES" ),
+ tr( "BUT_NO" ),
+ 0, 1, 1 ) == 0 )
+ {
for ( i = 0; i < itemList.count(); i++ ) {
itemList.at( i )->blockSignals( true );
itemList.at( i )->setVerticalOn( true );
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
/*!
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
/*!
Constructor
*/
-VisuGUI_ItemContainer::VisuGUI_ItemContainer( QObject* parent, const char* name )
- : QObject( parent, name ),
+VisuGUI_ItemContainer::VisuGUI_ItemContainer( QObject* parent )
+ : QObject( parent ),
myEnabled( true )
{
}
{
myHBtn = new QToolButton( parentWidget );
myHBtn->setText( tr( "H" ) );
- myHBtn->setToggleButton( true );
- myHBtn->setOn( false );
+ myHBtn->setCheckable( true );
+ myHBtn->setChecked( false );
myVBtn = new QToolButton( parentWidget );
myVBtn->setText( tr( "V" ) );
- myVBtn->setToggleButton( true );
- myVBtn->setOn( false );
+ myVBtn->setCheckable( true );
+ myVBtn->setChecked( false );
myTitleLab = new QLabel( parentWidget );
myUnitLab = new QLabel( parentWidget );
- myUnitLab->setAlignment( AlignCenter);
+ myUnitLab->setAlignment( Qt::AlignCenter);
myAutoCheck = new QCheckBox( tr( "AUTO_CHECK_LBL" ), parentWidget );
myAutoCheck->setChecked( true );
- myLineCombo = new QComboBox( false, parentWidget );
- myLineCombo->insertItem( tr( "NONE_LINE_LBL" ) );
- myLineCombo->insertItem( tr( "SOLID_LINE_LBL" ) );
- myLineCombo->insertItem( tr( "DASH_LINE_LBL" ) );
- myLineCombo->insertItem( tr( "DOT_LINE_LBL" ) );
- myLineCombo->insertItem( tr( "DASHDOT_LINE_LBL" ) );
- myLineCombo->insertItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
- myLineCombo->setCurrentItem( 1 ); // SOLID by default
-
- myLineSpin = new QSpinBox( 0, MAX_LINE_WIDTH, 1, parentWidget );
+ myLineCombo = new QComboBox( parentWidget );
+ myLineCombo->addItem( tr( "NONE_LINE_LBL" ) );
+ myLineCombo->addItem( tr( "SOLID_LINE_LBL" ) );
+ myLineCombo->addItem( tr( "DASH_LINE_LBL" ) );
+ myLineCombo->addItem( tr( "DOT_LINE_LBL" ) );
+ myLineCombo->addItem( tr( "DASHDOT_LINE_LBL" ) );
+ myLineCombo->addItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
+ myLineCombo->setCurrentIndex( 1 ); // SOLID by default
+
+ myLineSpin = new QSpinBox( parentWidget );
+ myLineSpin->setMinimum( 0 );
+ myLineSpin->setMaximum( MAX_LINE_WIDTH );
+ myLineSpin->setSingleStep( 1 );
myLineSpin->setValue( 0 ); // width = 0 by default
- myMarkerCombo = new QComboBox( false, parentWidget );
- myMarkerCombo->insertItem( tr( "NONE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "CIRCLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "RECTANGLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "DIAMOND_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "DTRIANGLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "UTRIANGLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "LTRIANGLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "RTRIANGLE_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "CROSS_MARKER_LBL" ) );
- myMarkerCombo->insertItem( tr( "XCROSS_MARKER_LBL" ) );
- myMarkerCombo->setCurrentItem( 1 ); // CIRCLE by default
-
- myColorBtn = new QToolButton( parentWidget );
+ myMarkerCombo = new QComboBox( parentWidget );
+ myMarkerCombo->addItem( tr( "NONE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "CIRCLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "RECTANGLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "DIAMOND_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "DTRIANGLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "UTRIANGLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "LTRIANGLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "RTRIANGLE_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "CROSS_MARKER_LBL" ) );
+ myMarkerCombo->addItem( tr( "XCROSS_MARKER_LBL" ) );
+ myMarkerCombo->setCurrentIndex( 1 ); // CIRCLE by default
+
+ myColorBtn = new QtxColorButton( parentWidget );
myColorBtn->setMinimumWidth( 20 );
- myAssigned = new QComboBox( false, parentWidget );
- myAssigned->insertItem( "" );
+ myAssigned = new QComboBox( parentWidget );
+ myAssigned->addItem( "" );
QStringList::const_iterator anIt = lst.begin(), aLast = lst.end();
for( ; anIt!=aLast; anIt++ )
- myAssigned->insertItem( *anIt );
+ myAssigned->addItem( *anIt );
myAssigned->setEnabled( false );
connect( myAutoCheck, SIGNAL( clicked() ), this, SLOT( onAutoChanged() ) );
- connect( myColorBtn, SIGNAL( clicked() ), this, SLOT( onColorChanged() ) );
+ //connect( myColorBtn, SIGNAL( clicked() ), this, SLOT( onColorChanged() ) );
connect( myHBtn, SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
connect( myVBtn, SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
setColor( QColor( 0, 0, 0 ) );
*/
void VisuGUI_ItemContainer::setHorizontalOn( bool on )
{
- myHBtn->setOn( on );
+ myHBtn->setChecked( on );
}
/*!
Gets horizontal button's state
*/
bool VisuGUI_ItemContainer::isHorizontalOn() const
{
- return myHBtn->isOn();
+ return myHBtn->isChecked();
}
/*!
Sets vertical button's state on
*/
void VisuGUI_ItemContainer::setVerticalOn( bool on )
{
- myVBtn->setOn( on );
+ myVBtn->setChecked( on );
}
/*!
Gets vertical button's state
*/
bool VisuGUI_ItemContainer::isVerticalOn() const
{
- return myVBtn->isOn();
+ return myVBtn->isChecked();
}
/*!
Sets item AutoAssign flag state
*/
void VisuGUI_ItemContainer::setLine( const int line, const int width )
{
- myLineCombo->setCurrentItem( line );
+ myLineCombo->setCurrentIndex( line );
}
/*!
Gets item line type
*/
int VisuGUI_ItemContainer::getLine() const
{
- return myLineCombo->currentItem();
+ return myLineCombo->currentIndex();
}
/*!
Gets item line width
*/
void VisuGUI_ItemContainer::setMarker( const int marker )
{
- myMarkerCombo->setCurrentItem( marker );
+ myMarkerCombo->setCurrentIndex( marker );
}
/*!
Gets item marker type
*/
int VisuGUI_ItemContainer::getMarker() const
{
- return myMarkerCombo->currentItem();
+ return myMarkerCombo->currentIndex();
}
/*!
Sets item color
*/
+
void VisuGUI_ItemContainer::setColor( const QColor& color )
{
- QPalette pal = myColorBtn->palette();
- QColorGroup ca = pal.active();
- ca.setColor( QColorGroup::Button, color );
- QColorGroup ci = pal.inactive();
- ci.setColor( QColorGroup::Button, color );
- pal.setActive( ca );
- pal.setInactive( ci );
- myColorBtn->setPalette( pal );
+ //QPalette pal = myColorBtn->palette();
+ //pal.setColor( myColorBtn->backgroundRole(), color );
+ myColorBtn->setColor( color );
}
/*!
Gets item color
*/
QColor VisuGUI_ItemContainer::getColor() const
{
- return myColorBtn->palette().active().button();
+ return myColorBtn->color();//palette().color( myColorBtn->backgroundRole() );
}
/*!
Enables/disables widgets
/*!
<Color> button slot, invokes color selection dialog box
*/
-void VisuGUI_ItemContainer::onColorChanged()
+/*void VisuGUI_ItemContainer::onColorChanged()
{
QColor color = QColorDialog::getColor( getColor() );
if ( color.isValid() ) {
setColor( color );
}
-}
+}*/
/*!
<H> and <V> buttons slot
*/
const QObject* snd = sender();
if ( snd == myHBtn ) {
if ( on ) {
- if ( myVBtn->isOn() ) {
+ if ( myVBtn->isChecked() ) {
// blockSignals( true );
- myVBtn->setOn( false );
+ myVBtn->setChecked( false );
// blockSignals( false );
}
}
}
else {
if ( on ) {
- if ( myHBtn->isOn() ) {
+ if ( myHBtn->isChecked() ) {
// blockSignals( true );
- myHBtn->setOn( false );
+ myHBtn->setChecked( false );
// blockSignals( false );
}
}
int VisuGUI_ItemContainer::assigned() const
{
if( isVerticalOn() )
- return myAssigned->currentItem()-1;
+ return myAssigned->currentIndex()-1;
else
return -1;
}
#include <SALOMEDSClient_SObject.hxx>
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <QDialog>
+#include <QList>
//=================================================================================
// class : VisuGUI_SetupPlot2dDlg
// purpose : Dialog box for setup Plot2d view
//=================================================================================
-class QScrollView;
+class QScrollArea;
class QPushButton;
class QLabel;
class QCheckBox;
class QSpinBox;
class QToolButton;
class VisuGUI_ItemContainer;
+class QtxColorButton;
class VisuGUI_SetupPlot2dDlg : public QDialog
{
VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
~VisuGUI_SetupPlot2dDlg();
- void getCurves( QPtrList<Plot2d_Curve>& container );
- void getCurvesSource( int& horIndex, QValueList<int>& verIndexes, QValueList<int>& zIndexes );
+ void getCurves( QList<Plot2d_Curve*>& container );
+ void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& zIndexes );
bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
private:
void enableControls();
private:
- QScrollView* myView;
+ QScrollArea* myView;
QPushButton* myOkBtn;
QPushButton* myCancelBtn;
QPushButton* myHelpBtn;
- QPtrList<VisuGUI_ItemContainer> myItems;
+ QList<VisuGUI_ItemContainer*> myItems;
_PTR(SObject) myObject;
};
Q_OBJECT
public:
- VisuGUI_ItemContainer( QObject* parent = 0, const char* name = 0 );
+ VisuGUI_ItemContainer( QObject* parent = 0 );
void createWidgets( QWidget* parentWidget, const QStringList& );
void enableWidgets( bool enable );
public slots:
void onAutoChanged();
- void onColorChanged();
+//void onColorChanged();
void onHVToggled( bool );
public:
QComboBox* myLineCombo;
QSpinBox* myLineSpin;
QComboBox* myMarkerCombo, *myAssigned;
- QToolButton* myColorBtn;
+ QtxColorButton* myColorBtn;
};
#endif // VISUGUI_SetupPlot2dDlg_H
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
-#include <qcombobox.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qtimer.h>
+#include <QComboBox>
+#include <QFont>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QToolButton>
+#include <QToolTip>
+#include <QSlider>
+#include <QSpinBox>
+#include <QTimer>
/*!
Constructor
VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
VVTK_ViewWindow* theViewWindow,
LightApp_SelectionMgr* theSelectionMgr )
- : QtxToolBar( InDock, theViewWindow->getMainWindow1() ),
+ : QtxToolBar( tr("TOOLBAR_TITLE"), theViewWindow->getMainWindow1() ),
myModule( theModule ),
myMainWindow( theViewWindow->getMainWindow1() ),
mySelectionMgr( theSelectionMgr )
{
- setLabel(tr("TOOLBAR_TITLE"));
- setCloseMode(QDockWindow::Undocked);
+ //setLabel();
+ //setCloseMode(QDockWindow::Undocked);
+ setMovable( true );
VISU::ViewManager_var aViewManager = VISU::GetVisuGen( myModule )->GetViewManager();
VISU::View_var aView = aViewManager->GetCurrentView();
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- setHorizontallyStretchable( true );
+ //setHorizontallyStretchable( true );
QWidget* aWidget = new QWidget( this );
- aWidget->setFocusPolicy(StrongFocus);
- setWidget( aWidget );
+ aWidget->setFocusPolicy(Qt::StrongFocus);
+ myWidgetAction = addWidget( aWidget );
- QGridLayout* aLayout = new QGridLayout( aWidget, 2, 13, 11, 6 );
+ QGridLayout* aLayout = new QGridLayout( aWidget );
+ aLayout->setMargin( 11 );
+ aLayout->setSpacing( 6 );
// Slider and time stamps
myFirstTimeStamp = new QLabel( aWidget );
aLayout->addWidget( myFirstTimeStamp, 0, 0, Qt::AlignHCenter );
mySlider = new QSlider( aWidget );
- mySlider->setMinValue( 0 );
+ mySlider->setMinimum( 0 );
mySlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- mySlider->setOrientation( QSlider::Horizontal );
+ mySlider->setOrientation( Qt::Horizontal );
mySlider->setTracking( false );
- mySlider->setFocusPolicy(StrongFocus);
- aLayout->addMultiCellWidget( mySlider, 0, 0, 1, 8 );
+ mySlider->setFocusPolicy(Qt::StrongFocus);
+ aLayout->addWidget( mySlider, 0, 1, 1, 9 );
myLastTimeStamp = new QLabel( aWidget );
myLastTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myMoreButton = new QToolButton( aWidget );
myMoreButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
myMoreButton->setEnabled( false );
- myMoreButton->setToggleButton( true );
- myMoreButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_MORE" ) ) );
+ myMoreButton->setCheckble( true );
+ myMoreButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_MORE" ) ) );
QToolTip::add( myMoreButton, tr( "MORE" ) );
aLayout->addWidget( myMoreButton, 1, 0 );
myAVIButton = new QToolButton( aWidget );
myAVIButton->setEnabled( false );
- myAVIButton->setToggleButton( true );
- myAVIButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_AVI" ) ) );
+ myAVIButton->setCheckble( true );
+ myAVIButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_AVI" ) ) );
QToolTip::add( myAVIButton, tr( "AVI" ) );
aLayout->addWidget( myAVIButton, 1, 1 );
#endif
aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 2 );
myFirstButton = new QToolButton( aWidget );
- myFirstButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
+ myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
aLayout->addWidget( myFirstButton, 1, 3 );
myPreviousButton = new QToolButton( aWidget );
- myPreviousButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
+ myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
aLayout->addWidget( myPreviousButton, 1, 4 );
myPlayButton = new QToolButton( aWidget );
- myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
- myPlayButton->setToggleButton( true );
+ myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+ myPlayButton->setCheckable( true );
aLayout->addWidget( myPlayButton, 1, 5 );
myNextButton = new QToolButton( aWidget );
- myNextButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
+ myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
aLayout->addWidget( myNextButton, 1, 6 );
myLastButton = new QToolButton( aWidget );
- myLastButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
+ myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
aLayout->addWidget( myLastButton, 1, 7 );
aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 8 );
myTimeStampStrings = new QComboBox( aWidget );
myTimeStampStrings->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- myTimeStampStrings->setFocusPolicy(StrongFocus);
+ myTimeStampStrings->setFocusPolicy(Qt::StrongFocus);
aLayout->addWidget( myTimeStampStrings, 1, 9 );
myTimeStampIndices = new QComboBox( aWidget );
myTimeStampIndices->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- myTimeStampIndices->setFocusPolicy(StrongFocus);
+ myTimeStampIndices->setFocusPolicy(Qt::StrongFocus);
aLayout->addWidget( myTimeStampIndices, 1, 10 );
// Speed
aSpeedLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aLayout->addWidget( aSpeedLabel, 1, 11 );
- mySpeedBox = new QSpinBox( 1, 100, 1, aWidget );
+ mySpeedBox = new QSpinBox( aWidget );
+ mySpeedBox->setMinimum( 1 );
+ mySpeedBox->setMaximum( 100 );
+ mySpeedBox->setSingleStep( 1 );
mySpeedBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- mySpeedBox->setFocusPolicy(StrongFocus);
+ mySpeedBox->setFocusPolicy(Qt::StrongFocus);
mySpeedBox->setValue( 50 );
aLayout->addWidget( mySpeedBox, 1, 12 );
enableControls( false );
- myMainWindow->addDockWindow( this, Qt::DockBottom );
+ myMainWindow->addToolBar( Qt::BottomToolBarArea, this );
}
/*!
void VisuGUI_Slider::enableControls( bool on )
{
- widget()->setEnabled( on );
+ widgetForAction( myWidgetAction )->setEnabled( on );
if( on )
{
if( checkHolderList() )
CORBA::Long aNumber = anInfo.myNumber;
QString aTime = anInfo.myTime.in();
- myTimeStampStrings->insertItem( aTime );
- myTimeStampIndices->insertItem( QString::number( aNumber ) );
+ myTimeStampStrings->addItem( aTime );
+ myTimeStampIndices->addItem( QString::number( aNumber ) );
if( aNumber == aTimeStampNumber )
a_current_index = an_index;
myTimeStampIndices->setFont(myTimeStampStrings->font());
myTimeStampIndices->updateGeometry();
- if( a_current_index > mySlider->maxValue() )
- mySlider->setMaxValue( aLength-1 );
+ if( a_current_index > mySlider->maximum() )
+ mySlider->setMaximum( aLength-1 );
- myTimeStampStrings->setCurrentItem( a_current_index );
- myTimeStampIndices->setCurrentItem( a_current_index );
+ myTimeStampStrings->setCurrentIndex( a_current_index );
+ myTimeStampIndices->setCurrentIndex( a_current_index );
mySlider->setValue( a_current_index );
- if( a_current_index <= mySlider->maxValue() )
- mySlider->setMaxValue( aLength-1 );
+ if( a_current_index <= mySlider->maximum() )
+ mySlider->setMaximum( aLength-1 );
}
else
{
- myPlayButton->setOn( false );
+ myPlayButton->setChecked( false );
}
}
void VisuGUI_Slider::onFirst()
{
- int value = mySlider->minValue();
+ int value = mySlider->minimum();
mySlider->setValue( value );
}
void VisuGUI_Slider::onPrevious()
{
int value = mySlider->value() - 1;
- if( value >= mySlider->minValue() )
+ if( value >= mySlider->minimum() )
mySlider->setValue( value );
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
if( on )
{
- myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
+ myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
int delay = int(5000.0 / double(mySpeedBox->value()));
myTimer->start( delay );
else
{
myTimer->stop();
- myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+ myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
}
}
void VisuGUI_Slider::onNext()
{
int value = mySlider->value() + 1;
- if( value <= mySlider->maxValue() )
+ if( value <= mySlider->maximum() )
mySlider->setValue( value );
}
void VisuGUI_Slider::onLast()
{
- int value = mySlider->maxValue();
+ int value = mySlider->maximum();
mySlider->setValue( value );
}
return;
}
- myTimeStampStrings->setCurrentItem( value );
- myTimeStampIndices->setCurrentItem( value );
+ myTimeStampStrings->setCurrentIndex( value );
+ myTimeStampIndices->setCurrentIndex( value );
VISU::ColoredPrs3dHolder_var aHolder = myHolderList.front();
void VisuGUI_Slider::onSpeedChanged( int value )
{
- if(myPlayButton->isOn()){
+ if(myPlayButton->isChecked()){
int delay = int(5000.0 / double(mySpeedBox->value()));
myTimer->start( delay );
}
void VisuGUI_Slider::onTimeout()
{
int value = mySlider->value();
- if( value < mySlider->maxValue() )
+ if( value < mySlider->maximum() )
onNext();
else
- myPlayButton->setOn( false );
+ myPlayButton->setChecked( false );
}
class QSlider;
class QSpinBox;
class QTimer;
+class QAction;
class VVTK_ViewWindow;
class VVTK_MainWindow;
typedef std::vector<VISU::ColoredPrs3dHolder_var> THolderList;
THolderList myHolderList;
+
+ QAction* myWidgetAction;
};
#endif
#include <SALOMEDSClient_SObject.hxx>
-#include "QtxDblSpinBox.h"
+#include <QtxDoubleSpinBox.h>
+#include <QtxColorButton.h>
#include <limits.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QPushButton>
+#include <QLabel>
+#include <QStringList>
+#include <QKeyEvent>
+#include <QFrame>
+
using namespace std;
: VisuGUI_Prs3dDlg(theModule),
myVisuGUI(theModule)
{
- setCaption(tr("DLG_TITLE"));
+ setWindowTitle(tr("DLG_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* aBoxLayout = new QVBoxLayout(this);
myTabBox = new QTabWidget(this);
QFrame* aTopBox = new QFrame(this);
- aTopBox->setMargin( 11 );
+ //aTopBox->setMargin( 11 );
QGridLayout* TopLayout = new QGridLayout( aTopBox );
TopLayout->setAlignment( Qt::AlignTop );
TopLayout->setSpacing( 8 );
// Source box
QGroupBox* aSourceBox = new QGroupBox (tr("SOURCE_GRP"), aTopBox);
- aSourceBox->setColumnLayout(0, Qt::Vertical);
- QGridLayout* aSrcLayout = new QGridLayout( aSourceBox->layout() );
+ //aSourceBox->setColumnLayout(0, Qt::Vertical);
+ QGridLayout* aSrcLayout = new QGridLayout( aSourceBox );
aSrcLayout->setSpacing( 6 );
aSrcLayout->setMargin( 0 );
aSrcLayout->addWidget(aTypeLbl, 0, 0);
myUseSrcCombo = new QComboBox(aSourceBox);
- const char* aChoise[] = { "None", "Entity", "Family", "Group", "Presentation", 0 };
- myUseSrcCombo->insertStrList(aChoise);
+ QStringList aChoise;
+ aChoise.append( "None" );
+ aChoise.append( "Entity" );
+ aChoise.append( "Family" );
+ aChoise.append( "Group" );
+ aChoise.append( "Presentation" );
+ myUseSrcCombo->addItems(aChoise);
aSrcLayout->addWidget(myUseSrcCombo, 0, 1);
mySrcCombo = new QComboBox(aSourceBox);
- mySrcCombo->setEnabled((myUseSrcCombo->currentItem() == 0));
+ mySrcCombo->setEnabled((myUseSrcCombo->currentIndex() == 0));
connect(myUseSrcCombo, SIGNAL(activated(int)), this, SLOT(onSourceTypeChange(int)));
}
// connect(myUseSrcChk, SIGNAL(toggled(bool)), mySrcCombo, SLOT(setEnabled(bool)));
- aSrcLayout->addMultiCellWidget(mySrcCombo, 1, 1, 0, 1);
+ aSrcLayout->addWidget(mySrcCombo, 1, 0, 1, 2);
QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
aSrcLayout->addWidget(aPercentLbl, 2, 0);
- myPntPercent = new QtxDblSpinBox( 0, 1, 0.1, aSourceBox );
+ myPntPercent = new QtxDoubleSpinBox( 0, 1, 0.1, aSourceBox );
aSrcLayout->addWidget(myPntPercent, 2, 1);
- TopLayout->addMultiCellWidget(aSourceBox, 0, 0, 0, 1);
+ TopLayout->addWidget(aSourceBox, 0, 0, 1, 2);
QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
TopLayout->addWidget(aStepLenLbl, 1, 0);
- myStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
+ myStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myStepLen, 1, 1);
connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double)));
QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox);
TopLayout->addWidget(aIntegStepLenLbl, 2, 0);
- myIntegStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
+ myIntegStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myIntegStepLen, 2, 1);
connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double)));
QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox);
TopLayout->addWidget(aPropagationLbl, 3, 0);
- myPropTime = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox );
+ myPropTime = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox );
myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myPropTime, 3, 1);
connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));
QLabel* aDirLbl = new QLabel (tr("LBL_DIRECTION"),aTopBox);
TopLayout->addWidget(aDirLbl, 4, 0);
myDirCombo = new QComboBox(aTopBox);
- myDirCombo->insertItem("Forward");
- myDirCombo->insertItem("Backward");
- myDirCombo->insertItem("Both");
+ myDirCombo->addItem("Forward");
+ myDirCombo->addItem("Backward");
+ myDirCombo->addItem("Both");
TopLayout->addWidget(myDirCombo, 4, 1);
- myUseScalar = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), aTopBox, "UseMagn");
+ myUseScalar = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), aTopBox);
connect( myUseScalar, SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
TopLayout->addWidget(myUseScalar, 5, 0);
- SelColor = new QPushButton (tr("USE_COLOR_BTN"), aTopBox, "SelColor");
- connect( SelColor, SIGNAL( clicked() ), this, SLOT( setVColor() ) );
+ SelColor = new QtxColorButton( aTopBox );
+ SelColor->setText( tr("USE_COLOR_BTN") );
+ //connect( SelColor, SIGNAL( clicked() ), this, SLOT( setVColor() ) );
TopLayout->addWidget( SelColor, 5, 1);
myTabBox->addTab(aTopBox, "Stream Lines");
myScalarPane = new VisuGUI_ScalarBarPane(this, false);
- myScalarPane->setMargin( 5 );
+ if (myScalarPane->layout() )
+ myScalarPane->layout()->setMargin( 5 );
myInputPane = new VisuGUI_InputPane(VISU::TSTREAMLINES, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
aBoxLayout->addWidget(myTabBox);
- QGroupBox* aGroupButtons = new QGroupBox( this, "GroupButtons" );
- aGroupButtons->setColumnLayout(0, Qt::Vertical );
- aGroupButtons->layout()->setSpacing( 0 );
- aGroupButtons->layout()->setMargin( 0 );
+ QGroupBox* aGroupButtons = new QGroupBox( this );
+ //aGroupButtons->setColumnLayout(0, Qt::Vertical );
+ //aGroupButtons->layout()->setSpacing( 0 );
+ //aGroupButtons->layout()->setMargin( 0 );
- QGridLayout* aGroupButtonsLayout = new QGridLayout( aGroupButtons->layout() );
+ QGridLayout* aGroupButtonsLayout = new QGridLayout( aGroupButtons );
aGroupButtonsLayout->setAlignment( Qt::AlignTop );
aGroupButtonsLayout->setSpacing( 6 );
aGroupButtonsLayout->setMargin( 11 );
- QPushButton* aOkBtn = new QPushButton( tr( "&OK" ), aGroupButtons, "buttonOk" );
+ QPushButton* aOkBtn = new QPushButton( tr( "BUT_OK" ), aGroupButtons );
aOkBtn->setAutoDefault( TRUE );
aOkBtn->setDefault( TRUE );
aGroupButtonsLayout->addWidget( aOkBtn, 0, 0 );
aGroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* aCancelBtn = new QPushButton( tr( "&Cancel" ) , aGroupButtons, "buttonCancel" );
+ QPushButton* aCancelBtn = new QPushButton( tr( "BUT_CANCEL" ) , aGroupButtons );
aCancelBtn->setAutoDefault( TRUE );
aGroupButtonsLayout->addWidget( aCancelBtn, 0, 2 );
- QPushButton* aHelpBtn = new QPushButton( tr( "&Help" ) , aGroupButtons, "buttonHelp" );
+ QPushButton* aHelpBtn = new QPushButton( tr( "BUT_HELP" ) , aGroupButtons );
aHelpBtn->setAutoDefault( TRUE );
aGroupButtonsLayout->addWidget( aHelpBtn, 0, 3 );
aMax = aStreamLinesPL->GetMaxPropagationTime();
myPropTime->setRange(aMin,aMax);
myPropTime->setValue(aStreamLinesPL->GetPropagationTime());
- myPropTime->setLineStep((aMax-aMin)/aNbOfSteps);
+ myPropTime->setSingleStep((aMax-aMin)/aNbOfSteps);
aMin = aStreamLinesPL->GetMinStepLength();
aMax = aStreamLinesPL->GetMaxStepLength();
myStepLen->setRange(aMin,aMax);
myStepLen->setValue(aStreamLinesPL->GetStepLength());
- myStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
+ myStepLen->setSingleStep((aMax-aMin)/aNbOfSteps);
aMin = aStreamLinesPL->GetMinIntegrationStep();
aMax = aStreamLinesPL->GetMaxIntegrationStep();
myIntegStepLen->setRange(aMin,aMax);
myIntegStepLen->setValue(aStreamLinesPL->GetIntegrationStep());
- myIntegStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
+ myIntegStepLen->setSingleStep((aMax-aMin)/aNbOfSteps);
switch (myPrsCopy->GetDirection()) {
case VISU::StreamLines::FORWARD:
- myDirCombo->setCurrentItem(0);
+ myDirCombo->setCurrentIndex(0);
break;
case VISU::StreamLines::BACKWARD:
- myDirCombo->setCurrentItem(1);
+ myDirCombo->setCurrentIndex(1);
break;
case VISU::StreamLines::BOTH:
- myDirCombo->setCurrentItem(2);
+ myDirCombo->setCurrentIndex(2);
}
myUseScalar->setChecked(myPrsCopy->IsColored());
myPntPercent->setValue(myPrsCopy->GetUsedPoints());
for (int i = 0; i < PRSLIST.count(); i++) { \
VISU::Prs3d_i* aPrs = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(PRSLIST[i]).in()); \
if (aPrs == NULL) continue; \
- if (aSrcEntry == aPrs->GetEntry()) { \
+ if (aSrcEntry == aPrs->GetEntry().c_str()) { \
onSourceTypeChange(PRSNUM); \
- myUseSrcCombo->setCurrentItem(PRSNUM); \
+ myUseSrcCombo->setCurrentIndex(PRSNUM); \
mySrcCombo->setEnabled(true); \
- mySrcCombo->setCurrentItem(i); \
+ mySrcCombo->setCurrentIndex(i); \
return; \
} \
}
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
myPrsCopy->ShowColored(myUseScalar->isChecked());
if (!myPrsCopy->IsColored()) {
SALOMEDS::Color aColor;
- aColor.R = myColor.red()/255.;
- aColor.G = myColor.green()/255.;
- aColor.B = myColor.blue()/255.;
+ aColor.R = SelColor->color().red()/255.;
+ aColor.G = SelColor->color().green()/255.;
+ aColor.B = SelColor->color().blue()/255.;
myPrsCopy->SetColor(aColor);
}
VISU::StreamLines::Direction aDirection = VISU::StreamLines::BOTH;
- switch (myDirCombo->currentItem()) {
+ switch (myDirCombo->currentIndex()) {
case 0:
aDirection = VISU::StreamLines::FORWARD;
break;
}
VISU::Prs3d_var aPrs;
- int aSrcSelection = myUseSrcCombo->currentItem();
- int aSrcItem = (mySrcCombo->count() > 0)? mySrcCombo->currentItem() : -1;
+ int aSrcSelection = myUseSrcCombo->currentIndex();
+ int aSrcItem = (mySrcCombo->count() > 0)? mySrcCombo->currentIndex() : -1;
if ((aSrcSelection > 0) && (aSrcItem > -1)) {
VISU::VISUType aType;
QString aName;
*/
void VisuGUI_StreamLinesDlg::setColor( QColor color )
{
- myColor = color;
- SelColor->setPaletteBackgroundColor(myColor);
+ /*Color = color;
+ QPalette aPal = SelColor->palette();
+ aPal.setColor( SelColor->backgroundRole(), myColor );
+ SelColor->setPalette( aPal );*/
+ SelColor->setColor( color );
}
/*!
Called when "Select Color" buttonx clicked
*/
-void VisuGUI_StreamLinesDlg::setVColor()
+/*void VisuGUI_StreamLinesDlg::setVColor()
{
QColor cnew = QColorDialog::getColor( myColor, this );
if ( cnew.isValid() )
setColor( cnew );
-}
+}*/
/*!
}
void VisuGUI_StreamLinesDlg::PropagationTimeChanged(double theValue) {
- myStepLen->setMaxValue(theValue);
+ myStepLen->setMaximum(theValue);
}
void VisuGUI_StreamLinesDlg::onSourceTypeChange(int theIndex) {
switch(theIndex) {
case 1: // Entity
- mySrcCombo->insertStringList(myEntitiesLst);
+ mySrcCombo->addItems(myEntitiesLst);
return;
case 2: // Family
- mySrcCombo->insertStringList(myFamilisLst);
+ mySrcCombo->addItems(myFamilisLst);
return;
case 3: // Group
- mySrcCombo->insertStringList(myGroupsLst);
+ mySrcCombo->addItems(myGroupsLst);
return;
case 4: // Presentation
- mySrcCombo->insertStringList(myPrsLst);
+ mySrcCombo->addItems(myPrsLst);
return;
}
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#include "VisuGUI_Prs3dDlg.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
+class QTabWidget;
+class QCheckBox;
+class QComboBox;
+
#include "VISUConfig.hh"
class SalomeApp_Module;
class VisuGUI_InputPane;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
+class QtxColorButton;
namespace VISU
{
private:
VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
- QtxDblSpinBox* myStepLen;
- QtxDblSpinBox* myIntegStepLen;
- QtxDblSpinBox* myPropTime;
+ QtxDoubleSpinBox* myStepLen;
+ QtxDoubleSpinBox* myIntegStepLen;
+ QtxDoubleSpinBox* myPropTime;
QComboBox* myDirCombo;
QCheckBox* myUseScalar;
- QPushButton* SelColor;
- QColor myColor;
+ QtxColorButton* SelColor;
//QCheckBox* myUseSrcChk;
QComboBox* myUseSrcCombo;
- QtxDblSpinBox* myPntPercent;
+ QtxDoubleSpinBox* myPntPercent;
QComboBox* mySrcCombo;
QTabWidget* myTabBox;
VisuGUI_ScalarBarPane* myScalarPane;
VisuGUI_InputPane* myInputPane;
- QValueList<VISU::Prs3d_var> myPrsList;
- QValueList<VISU::Prs3d_var> myEntityList;
- QValueList<VISU::Prs3d_var> myFamilyList;
- QValueList<VISU::Prs3d_var> myGroupList;
+ QList<VISU::Prs3d_var> myPrsList;
+ QList<VISU::Prs3d_var> myEntityList;
+ QList<VISU::Prs3d_var> myFamilyList;
+ QList<VISU::Prs3d_var> myGroupList;
QStringList myEntitiesLst;
QStringList myFamilisLst;
QStringList myGroupsLst;
SalomeApp_Module* myVisuGUI;
private slots:
- void setVColor();
+ //void setVColor();
void enableSetColor();
};
#include <vtkRenderer.h>
#include <vtkMapper.h>
-#include <qhbox.h>
-#include <qgrid.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qthread.h>
-#include <qlistbox.h>
+#include <QGridLayout>
+#include <QImage>
+#include <QImageWriter>
+#include <QLayout>
+#include <QSlider>
+#include <QThread>
+#include <QListWidget>
+#include <QLCDNumber>
+#include <QToolButton>
+#include <QKeyEvent>
+#include <QComboBox>
+#include <QLineEdit>
+#include <QRadioButton>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QLabel>
+
#include <qwt_wheel.h>
-#include <qhgroupbox.h>
-#include <qlcdnumber.h>
-#include <qvgroupbox.h>
-#include <qtoolbutton.h>
#define MAXVAL 1e10
ArrangeDlg::ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator)
- : QDialog(theParent, "ArrangeDlg", true,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+ : QDialog(theParent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
myAnimator(theAnimator),
myViewWindow(theAnimator->getViewer())
{
+ setModal( true );
myCurrent = 0;
init();
QStringList aFieldNames;
aOffs.myOffset[2] = myAnimator->getFieldData(i).myOffset[2];
myOffsets.append(aOffs);
}
- myFieldLst->insertStringList(aFieldNames);
- myFieldLst->setSelected(0, true);
+ myFieldLst->addItems(aFieldNames);
+ myFieldLst->setCurrentRow(0);
}
ArrangeDlg::ArrangeDlg(QWidget* theParent,
const SalomeApp_Module* theModule,
SVTK_ViewWindow* theViewWindow)
- : QDialog(theParent, "ArrangeDlg", true, WStyle_Customize |
- WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+ : QDialog(theParent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myAnimator(NULL),
myViewWindow(theViewWindow)
{
+ setModal( true );
myCurrent = 0;
init();
QStringList aPrsNames;
}
}
}
- myFieldLst->insertStringList(aPrsNames);
- myFieldLst->setSelected(0, true);
+ myFieldLst->addItems(aPrsNames);
+ myFieldLst->setCurrentRow(0);
}
void ArrangeDlg::init()
{
- setCaption("Arrange Presentations");
+ setWindowTitle("Arrange Presentations");
setSizeGripEnabled( TRUE );
- QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+ QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+ aMainLayout->setMargin( 7 );
aMainLayout->setSpacing(5);
- QButtonGroup* aBtnGrp = new QButtonGroup(2, Qt::Horizontal, this);
+ QButtonGroup* aBtnGrp = new QButtonGroup( this);
aBtnGrp->setExclusive(true);
- aMainLayout->addWidget(aBtnGrp);
+ //aMainLayout->addWidget(aBtnGrp);
+
+ QGroupBox* aBtnGB = new QGroupBox( this );
+ aMainLayout->addWidget(aBtnGB);
+ QHBoxLayout* aHBLay = new QHBoxLayout( aBtnGB );
+
+ QRadioButton* aAutoBtn = new QRadioButton("Auto", aBtnGB);
+ aHBLay->addWidget( aAutoBtn );
+ aBtnGrp->addButton(aAutoBtn, AutoMode);
- QRadioButton* aAutoBtn = new QRadioButton("Auto", aBtnGrp);
- aBtnGrp->insert(aAutoBtn, AutoMode);
+ QRadioButton* aManualBtn = new QRadioButton("Manual", aBtnGB);
+ aBtnGrp->addButton(aManualBtn, ManualMode);
+ aHBLay->addWidget( aManualBtn );
- QRadioButton* aManualBtn = new QRadioButton("Manual", aBtnGrp);
- aBtnGrp->insert(aManualBtn, ManualMode);
- aBtnGrp->setButton(AutoMode);
+ aAutoBtn->setChecked( true );
- myStackWgt = new QWidgetStack(this);
+ myStackWgt = new QStackedWidget(this);
aMainLayout->addWidget(myStackWgt);
// AUTO Pane
- QVBox* aAutoPane = new QVBox(myStackWgt);
- aAutoPane->setSpacing(5);
+ QWidget* aAutoPane = new QWidget(myStackWgt);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aAutoPane );
+ aVBLay->setSpacing(5);
// Axis Group
- myAxisGrp = new QButtonGroup(3, Qt::Horizontal,"Axis", aAutoPane);
+ myAxisGrp = new QButtonGroup(aAutoPane);
+
+ QGroupBox* aAxisGB = new QGroupBox( "Axis", aAutoPane );
+ aVBLay->addWidget( aAxisGB );
- QRadioButton* aXBtn = new QRadioButton("X",myAxisGrp );
- myAxisGrp->insert(aXBtn, XAxis);
+ QRadioButton* aXBtn = new QRadioButton("X",aAxisGB );
+ aVBLay->addWidget( aXBtn );
+ myAxisGrp->addButton(aXBtn, XAxis);
- QRadioButton* aYBtn = new QRadioButton("Y",myAxisGrp );
- myAxisGrp->insert(aYBtn, YAxis);
+ QRadioButton* aYBtn = new QRadioButton("Y",aAxisGB );
+ aVBLay->addWidget( aYBtn );
+ myAxisGrp->addButton(aYBtn, YAxis);
- QRadioButton* aZBtn = new QRadioButton("Z",myAxisGrp );
- myAxisGrp->insert(aZBtn, ZAxis);
+ QRadioButton* aZBtn = new QRadioButton("Z",aAxisGB );
+ aVBLay->addWidget( aZBtn );
+ myAxisGrp->addButton(aZBtn, ZAxis);
- myAxisGrp->setButton(XAxis);
+ aXBtn->setChecked( true );
//Distance Input
- QHBox* aDistPane = new QHBox(aAutoPane);
- aDistPane->setSpacing(5);
- new QLabel("Relative Distance", aDistPane);
- myDistVal = new QtxDblSpinBox (-10,10, 0.5, aDistPane);
+ QWidget* aDistPane = new QWidget(aAutoPane);
+ QHBoxLayout* aHLay = new QHBoxLayout( aDistPane );
+ aHLay->setSpacing(5);
+ aHLay->addWidget( new QLabel("Relative Distance", aDistPane) );
+ myDistVal = new QtxDoubleSpinBox (-10,10, 0.5, aDistPane);
myDistVal->setValue(1);
+ aHLay->addWidget( myDistVal );
- myStackWgt->addWidget(aAutoPane, AutoMode);
+ myStackWgt->insertWidget( AutoMode, aAutoPane);
// Manual Pane
- QHBox* aManualPane = new QHBox(myStackWgt);
- aManualPane->setSpacing(10);
+ QWidget* aManualPane = new QWidget(myStackWgt);
+ aHLay = new QHBoxLayout( aManualPane );
+ aHLay->setSpacing(10);
- myFieldLst = new QListBox(aManualPane);
- connect( myFieldLst, SIGNAL( highlighted(int) ),
+ myFieldLst = new QListWidget(aManualPane);
+ aHLay->addWidget( myFieldLst );
+ connect( myFieldLst, SIGNAL( currentRowChanged(int) ),
this, SLOT( onFieldChange(int) ) );
- QGrid* aCoordPane = new QGrid(2, aManualPane);
- aCoordPane->setSpacing(5);
+ QWidget* aCoordPane = new QWidget( aManualPane);
+ QGridLayout* aCoordLayout = new QGridLayout( aCoordPane );
+ aCoordLayout->setSpacing(5);
- new QLabel("X", aCoordPane);
- myCoord[0] = new QtxDblSpinBox(aCoordPane);
+ aCoordLayout->addWidget( new QLabel("X", aCoordPane), 0, 0 );
+ myCoord[0] = new QtxDoubleSpinBox(aCoordPane);
myCoord[0]->setRange(-MAXVAL, MAXVAL);
+ aCoordLayout->addWidget( myCoord[0], 0, 1 );
- new QLabel("Y", aCoordPane);
- myCoord[1] = new QtxDblSpinBox(aCoordPane);
+ aCoordLayout->addWidget( new QLabel("Y", aCoordPane), 1, 0 );
+ myCoord[1] = new QtxDoubleSpinBox(aCoordPane);
myCoord[1]->setRange(-MAXVAL, MAXVAL);
+ aCoordLayout->addWidget( myCoord[1], 1, 1 );
- new QLabel("Z", aCoordPane);
- myCoord[2] = new QtxDblSpinBox(aCoordPane);
+ aCoordLayout->addWidget( new QLabel("Z", aCoordPane), 2, 0 );
+ myCoord[2] = new QtxDoubleSpinBox(aCoordPane);
myCoord[2]->setRange(-MAXVAL, MAXVAL);
+ aCoordLayout->addWidget( myCoord[2], 2, 1 );
- myStackWgt->addWidget(aManualPane, ManualMode);
+ myStackWgt->insertWidget(ManualMode, aManualPane );
- myStackWgt->raiseWidget(AutoMode);
+ myStackWgt->setCurrentIndex(AutoMode);
connect(aBtnGrp, SIGNAL(clicked(int)), myStackWgt, SLOT(raiseWidget(int)) );
}
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
myAnimator->getFieldData(i).myOffset[2] = aOffs.myOffset[2];
}
} else {
- QApplication::setOverrideCursor( Qt::waitCursor );
- FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ FieldData& aData = myAnimator->getFieldData(myFieldLst->currentRow());
if (aData.myPrs.empty())
- myAnimator->generatePresentations(myFieldLst->currentItem());
+ myAnimator->generatePresentations(myFieldLst->currentRow());
vtkFloatingPointType aBounds[6];
aData.myPrs[0]->GetBounds(aBounds);
vtkFloatingPointType aDist = 0;
QMap<VISU::Prs3d_i*, int>::Iterator it;
for (it = myPrsMap.begin(); it != myPrsMap.end(); ++it) {
VISU::Prs3d_i* aPrs = it.key();
- Offset& aOffs = myOffsets[it.data()];
+ Offset& aOffs = myOffsets[it.value()];
if (VISU_Actor* anActor = VISU::FindActor(myViewWindow, aPrs))
anActor->SetPosition(aOffs.myOffset);
if (mySaveChk)
VisuGUI* theModule,
VISU_TimeAnimation* theAnimator) :
QDialog(theParent,
- "SetupDlg",
- true,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
myAnimator(theAnimator),
myModule(theModule)
{
- setCaption("Setup Animation");
+ setModal( true );
+ setWindowTitle("Setup Animation");
setSizeGripEnabled( TRUE );
- QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+ QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+ aMainLayout->setMargin( 7 );
aMainLayout->setSpacing(5);
// Range of time stamps
aRangeGrp->setFrameStyle(QFrame::Box | QFrame::Raised);
myUseRangeChk = new QCheckBox("Use range of time stamps", aRangeGrp);
- aRangeLayout->addMultiCellWidget(myUseRangeChk, 0, 0, 0, 3);
+ aRangeLayout->addWidget(myUseRangeChk, 0, 0, 1, 4);
myUseRangeChk->setChecked(myAnimator->isRangeDefined());
double aMaxTime = myAnimator->getMaxTime();
QLabel* aMinLbl = new QLabel("From", aRangeGrp);
aMinLbl->setEnabled(myUseRangeChk->isChecked());
aRangeLayout->addWidget(aMinLbl, 1, 0);
- myMinVal = new QtxDblSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
+ myMinVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
myMinVal->setEnabled(myUseRangeChk->isChecked());
if (myUseRangeChk->isChecked())
myMinVal->setValue( myAnimator->getMinRange() );
QLabel* aMaxLbl = new QLabel("To", aRangeGrp);
aMaxLbl->setEnabled(myUseRangeChk->isChecked());
aRangeLayout->addWidget(aMaxLbl, 1, 2);
- myMaxVal = new QtxDblSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
+ myMaxVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
myMaxVal->setEnabled(myUseRangeChk->isChecked());
if (myUseRangeChk->isChecked())
myMaxVal->setValue( myAnimator->getMaxRange() );
// Fields and Properties
- QHBox* aPropFrame = new QHBox(this);
- aPropFrame->setSpacing(5);
+ QWidget* aPropFrame = new QWidget(this);
+ QHBoxLayout* aHPropLayout = new QHBoxLayout( aPropFrame );
+ aHPropLayout->setSpacing(5);
- QVGroupBox* aNamesBox = new QVGroupBox("Fields",aPropFrame);
- myFieldLst = new QListBox(aNamesBox);
+ QGroupBox* aNamesBox = new QGroupBox("Fields",aPropFrame);
+ aHPropLayout->addWidget( aNamesBox );
+ QVBoxLayout* aVBoxLayout = new QVBoxLayout( aNamesBox );
+
+ myFieldLst = new QListWidget(aNamesBox);
+ aVBoxLayout->addWidget( myFieldLst );
QStringList aFieldNames;
// Find names of fields
for (int i = 0; i < myAnimator->getNbFields(); i++) {
aFieldNames.append(aFieldName);
else if ( myAnimator->getAnimationMode() == 1 ) {
QString aFileName(VISU::getValue(aSO->GetFather()->GetFather()->GetFather(),"myInitFileName"));
- aFileName = aFileName.right(aFileName.length() - (aFileName.findRev("/") + 1));
+ aFileName = aFileName.right(aFileName.length() - (aFileName.lastIndexOf("/") + 1));
aFieldNames.append(aFileName + QString(" : ") + aFieldName);
}
}
- myFieldLst->insertStringList(aFieldNames);
+ myFieldLst->addItems(aFieldNames);
if ( myAnimator->getAnimationMode() == 0 ) {
- myFieldLst->setSelected(0, true);
- connect( myFieldLst, SIGNAL( highlighted(int) ),
+ myFieldLst->setCurrentRow(0);
+ connect( myFieldLst, SIGNAL( currentRowChanged(int) ),
this, SLOT( onFieldChange(int) ) );
}
else if ( myAnimator->getAnimationMode() == 1 )
- myFieldLst->setSelectionMode(QListBox::NoSelection);
+ myFieldLst->setSelectionMode(QAbstractItemView::NoSelection);
+
+ QWidget* aSetupBox = new QWidget(aPropFrame);
+ aHPropLayout->addWidget( aSetupBox );
+ aVBoxLayout = new QVBoxLayout( aSetupBox );
+ aVBoxLayout->setSpacing(5);
+ aHPropLayout->addWidget( aSetupBox );
+
+ QGroupBox* aPropBox = new QGroupBox("Properties", aSetupBox);
+ aVBoxLayout->addWidget( aPropBox );
+ QVBoxLayout* aPropVBLay = new QVBoxLayout( aPropBox );
- QVBox* aSetupBox = new QVBox(aPropFrame);
- aSetupBox->setSpacing(5);
-
- QVGroupBox* aPropBox = new QVGroupBox("Properties", aSetupBox);
//QVGroupBox* aPropBox = new QVGroupBox("Properties", aPropFrame);
myTypeCombo = new QComboBox(aPropBox);
+ aPropVBLay->addWidget( myTypeCombo );
connect( myTypeCombo, SIGNAL( activated(int) ),
this, SLOT( onTypeChanged(int) ) );
// this, SLOT( onScalarBarDlg() ) );
myPropBtn = new QPushButton("Properties...", aPropBox);
+ aPropVBLay->addWidget( myPropBtn );
// myPropBtn->setEnabled(myAnimator->getFieldData(0).myPrsType != VISU::TSCALARMAP);
connect( myPropBtn, SIGNAL( clicked() ),
this, SLOT( onPreferencesDlg() ) );
onFieldChange(0);
aMainLayout->addWidget(aPropFrame);
- QHBox* aBtnBox = new QHBox(this);
- QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox->layout());
+ QWidget* aBtnBox = new QWidget(this);
+ QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox);
aBtnLayout->addStretch();
QPushButton* aCloseBtn = new QPushButton(tr("BUT_OK"), aBtnBox);
myComboId2TypeId.clear();
// ATTENTION: append items in the same order like it is done in the PrsComboItem enumeration
- myTypeCombo->insertItem("Scalar Map"); // item 0
+ myTypeCombo->addItem("Scalar Map"); // item 0
myTypeId2ComboId[TSCALARMAP_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TSCALARMAP_ITEM);;
- myTypeCombo->insertItem("Iso Surfaces"); // item 1
+ myTypeCombo->addItem("Iso Surfaces"); // item 1
myTypeId2ComboId[TISOSURFACE_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TISOSURFACE_ITEM);;
- myTypeCombo->insertItem("Cut Planes"); // item 2
+ myTypeCombo->addItem("Cut Planes"); // item 2
myTypeId2ComboId[TCUTPLANES_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TCUTPLANES_ITEM);;
- myTypeCombo->insertItem("Cut Lines"); // item 3
+ myTypeCombo->addItem("Cut Lines"); // item 3
myTypeId2ComboId[TCUTLINES_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TCUTLINES_ITEM);;
- myTypeCombo->insertItem("Plot 3D"); // item 4
+ myTypeCombo->addItem("Plot 3D"); // item 4
myTypeId2ComboId[TPLOT3D_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TPLOT3D_ITEM);;
}
if (anEnableItems) {
- myTypeCombo->insertItem("Deformed Shape"); // item 5
+ myTypeCombo->addItem("Deformed Shape"); // item 5
myTypeId2ComboId[TDEFORMEDSHAPE_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TDEFORMEDSHAPE_ITEM);;
- myTypeCombo->insertItem("Vectors"); // item 6
+ myTypeCombo->addItem("Vectors"); // item 6
myTypeId2ComboId[TVECTORS_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TVECTORS_ITEM);;
- myTypeCombo->insertItem("Stream Lines"); // item 7
+ myTypeCombo->addItem("Stream Lines"); // item 7
myTypeId2ComboId[TSTREAMLINES_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TSTREAMLINES_ITEM);;
- myTypeCombo->insertItem("Scalar map on Deformed shape"); // item 9
+ myTypeCombo->addItem("Scalar map on Deformed shape"); // item 9
myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TSCALARMAPONDEFORMEDSHAPE_ITEM);;
}
if(anEnableGP){
- myTypeCombo->insertItem("Gauss Points"); // item 8
+ myTypeCombo->addItem("Gauss Points"); // item 8
myTypeId2ComboId[TGAUSSPOINTS_ITEM] = myComboId2TypeId.size();
myComboId2TypeId.push_back(TGAUSSPOINTS_ITEM);;
}
switch (aPrsType) {
case VISU::TSCALARMAP: //Scalar Map
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TSCALARMAP_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSCALARMAP_ITEM]);
break;
case VISU::TISOSURFACE: //Iso Surfaces
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TISOSURFACE_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TISOSURFACE_ITEM]);
break;
case VISU::TCUTPLANES: //Cut Planes
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TCUTPLANES_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TCUTPLANES_ITEM]);
break;
case VISU::TCUTLINES: //Cut Lines
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TCUTLINES_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TCUTLINES_ITEM]);
break;
case VISU::TPLOT3D: //Plot 3D
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TPLOT3D_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TPLOT3D_ITEM]);
break;
case VISU::TDEFORMEDSHAPE: //Deformed Shape
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TDEFORMEDSHAPE_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TDEFORMEDSHAPE_ITEM]);
break;
case VISU::TSCALARMAPONDEFORMEDSHAPE: //Scalar Map on Deformed Shape
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM]);
break;
case VISU::TVECTORS: //Vectors
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TVECTORS_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TVECTORS_ITEM]);
break;
case VISU::TSTREAMLINES: //Stream Lines
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TSTREAMLINES_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSTREAMLINES_ITEM]);
break;
case VISU::TGAUSSPOINTS: //Gauss Points
- myTypeCombo->setCurrentItem(myTypeId2ComboId[TGAUSSPOINTS_ITEM]);
+ myTypeCombo->setCurrentIndex(myTypeId2ComboId[TGAUSSPOINTS_ITEM]);
break;
}
//myPropBtn->setEnabled(aData.myPrsType != VISU::TSCALARMAP);
for (int i = 0; i < myAnimator->getNbFields(); i++) {
FieldData& aData = ( myAnimator->getAnimationMode() == 0 ) ?
- myAnimator->getFieldData(myFieldLst->currentItem()) :
+ myAnimator->getFieldData(myFieldLst->currentRow()) :
myAnimator->getFieldData(i);
switch (aType) {
{
SUIT_OverrideCursor c;
- int id = ( myAnimator->getAnimationMode() == 0 ) ? myFieldLst->currentItem() : 0;
+ int id = ( myAnimator->getAnimationMode() == 0 ) ? myFieldLst->currentRow() : 0;
FieldData& aData = myAnimator->getFieldData(id);
if (aData.myPrs.empty())
myAnimator->generatePresentations(id);
if(!aData.myNbFrames || !aData.myPrs[0]){
QApplication::restoreOverrideCursor();
- SUIT_MessageBox::warn1(this,
+ SUIT_MessageBox::warning(this,
tr("ERROR"),
VisuGUI_TimeAnimationDlg::tr("MSG_NO_ANIMATIONDATA"),
tr("&OK"));
if(!aData.myNbFrames || !aData.myPrs[0]){
QApplication::restoreOverrideCursor();
- SUIT_MessageBox::warn1(this,
+ SUIT_MessageBox::warning(this,
tr("ERROR"),
VisuGUI_TimeAnimationDlg::tr("MSG_NO_ANIMATIONDATA"),
tr("&OK"));
return;
}
- int aType = myComboId2TypeId[myTypeCombo->currentItem()];
+ int aType = myComboId2TypeId[myTypeCombo->currentIndex()];
switch (aType) {
case TSCALARMAP_ITEM: //Scalar Map
c.suspend();
VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Study) theStudy, int theMode) :
QDialog(VISU::GetDesktop(theModule),
- "VisuGUI_TimeAnimationDlg",
- false,
- WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myModule(theModule),
mySetupDlg(NULL)
{
+ setAttribute( Qt::WA_DeleteOnClose, true );
+ setModal( false );
if ( theMode == 0 )
- setCaption(tr("PARALLEL_ANIMATION"));
+ setWindowTitle(tr("PARALLEL_ANIMATION"));
else if ( theMode == 1 )
- setCaption(tr("SUCCESSIVE_ANIMATION"));
+ setWindowTitle(tr("SUCCESSIVE_ANIMATION"));
setSizeGripEnabled( TRUE );
myAnimator = new VISU_TimeAnimation (theStudy);
connect(myAnimator, SIGNAL(stopped()), this, SLOT(onStop()));
myAnimator->setAnimationMode(theMode);
- QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+ QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+ aMainLayout->setMargin( 7 );
aMainLayout->setSpacing(5);
mySetupBtn = new QPushButton("Setup Animation...", this);
TopLayout->setMargin( 11 );
myTimeLbl = new QLabel("0", myPlayFrame);
- TopLayout->addMultiCellWidget(myTimeLbl, 0, 0, 0, 2, Qt::AlignHCenter);
+ TopLayout->addWidget(myTimeLbl, 0, 0, 1, 3, Qt::AlignHCenter);
- mySlider = new QSlider(Qt::Horizontal, myPlayFrame);
- mySlider->setMinValue(0);
- mySlider->setMaxValue(3);
+ mySlider = new QSlider( myPlayFrame);
+ mySlider->setOrientation(Qt::Horizontal);
+ mySlider->setMinimum(0);
+ mySlider->setMaximum(3);
mySlider->setTickInterval(1);
//mySlider->setTickmarks(QSlider::Below);
mySlider->setTracking(false);
- connect( mySlider, SIGNAL( valueChanged(int) ),
+ connect( mySlider, SIGNAL( sliderMoved(int) ),
this, SLOT( onWindowChanged(int) ) );
- TopLayout->addMultiCellWidget(mySlider, 1, 1, 0, 2);
+ TopLayout->addWidget(mySlider, 1, 0, 1, 3);
myPlayBtn = new QToolButton(myPlayFrame);
- myPlayBtn->setIconSet(MYplayPixmap);
- myPlayBtn->setToggleButton(true);
+ myPlayBtn->setIcon(MYplayPixmap);
+ myPlayBtn->setCheckable(true);
connect( myPlayBtn, SIGNAL( clicked() ),
this, SLOT( onPlayPressed() ) );
- TopLayout->addMultiCellWidget(myPlayBtn, 2, 2, 0, 1);
+ TopLayout->addWidget(myPlayBtn, 2, 0, 1, 2);
QToolButton* aBackBtn = new QToolButton(myPlayFrame);
- aBackBtn->setIconSet(QPixmap(leftIco));
+ aBackBtn->setIcon(QPixmap(leftIco));
connect( aBackBtn, SIGNAL( clicked() ),
this, SLOT( onBackPressed() ) );
TopLayout->addWidget(aBackBtn, 3, 0);
QToolButton* aForvardBtn = new QToolButton(myPlayFrame);
- aForvardBtn->setIconSet(QPixmap(rightIco));
+ aForvardBtn->setIcon(QPixmap(rightIco));
connect( aForvardBtn, SIGNAL( clicked() ),
this, SLOT( onForvardPressed() ) );
TopLayout->addWidget(aForvardBtn, 3, 1);
QToolButton* aFirstBtn = new QToolButton(myPlayFrame);
- aFirstBtn->setIconSet(QPixmap(firstIco));
+ aFirstBtn->setIcon(QPixmap(firstIco));
connect( aFirstBtn, SIGNAL( clicked() ),
this, SLOT( onFirstPressed() ) );
TopLayout->addWidget(aFirstBtn, 4, 0);
QToolButton* aLastBtn = new QToolButton(myPlayFrame);
- aLastBtn->setIconSet(QPixmap(lastIco));
+ aLastBtn->setIcon(QPixmap(lastIco));
connect( aLastBtn, SIGNAL( clicked() ),
this, SLOT( onLastPressed() ) );
TopLayout->addWidget(aLastBtn, 4, 1);
aSpeedNum, SLOT(display(double)) );
connect( aWheel, SIGNAL(valueChanged(double)),
this, SLOT(onSpeedChange(double)) );
- TopLayout->addMultiCellWidget(aWheel, 1, 3, 3, 3, Qt::AlignRight);
+ TopLayout->addWidget(aWheel, 1, 3, 3, 1, Qt::AlignRight);
QCheckBox* aCycleCheck = new QCheckBox("Cycled animation",myPlayFrame);
aCycleCheck->setChecked(myAnimator->isCycling());
connect(aCycleCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setCyclingSlot(bool)));
- TopLayout->addMultiCellWidget(aCycleCheck, 5, 5, 0, 3);
+ TopLayout->addWidget(aCycleCheck, 5, 0, 1, 4);
QCheckBox* aPropCheck = new QCheckBox("Use proportional timing",myPlayFrame);
aPropCheck->setChecked(myAnimator->isProportional());
connect(aPropCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setProportionalSlot(bool)));
- TopLayout->addMultiCellWidget(aPropCheck, 6, 6, 0, 3);
+ TopLayout->addWidget(aPropCheck, 6, 0, 1, 4);
// Pictures saving on disk
QGroupBox* aSaveBox = new QGroupBox( "Saving", myPlayFrame );
- aSaveBox->setColumnLayout(0, Qt::Horizontal );
- QGridLayout* aSaveLay = new QGridLayout(aSaveBox->layout());
+ //aSaveBox->setColumnLayout(0, Qt::Horizontal );
+ QGridLayout* aSaveLay = new QGridLayout(aSaveBox);
aSaveLay->setSpacing( 5 );
aSaveLay->setMargin( 5 );
mySaveCheck = new QCheckBox("Save pictures to directory", aSaveBox);
connect(mySaveCheck, SIGNAL( toggled(bool)),
this, SLOT( onCheckDump(bool) ));
- aSaveLay->addMultiCellWidget(mySaveCheck, 0, 0, 0, 2);
+ aSaveLay->addWidget(mySaveCheck, 0, 0, 1, 3);
QLabel* aFormatLbl = new QLabel("Saving format:", aSaveBox);
aFormatLbl->setEnabled(false);
connect(mySaveCheck, SIGNAL( toggled(bool)),
aFormatLbl, SLOT( setEnabled(bool) ));
- aSaveLay->addMultiCellWidget(aFormatLbl, 1, 1, 0, 1);
+ aSaveLay->addWidget(aFormatLbl, 1, 0, 1, 2);
myPicsFormat = new QComboBox(aSaveBox);
- QStrList aDumpFormats = QImageIO::outputFormats();
+ QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
for (unsigned int i = 0; i < aDumpFormats.count(); i++) {
- myPicsFormat->insertItem(aDumpFormats.at(i));
+ myPicsFormat->addItem(aDumpFormats.at(i));
}
- if (aDumpFormats.find("JPEG"))
- myPicsFormat->setCurrentItem(aDumpFormats.find("JPEG"));
+ if (aDumpFormats.indexOf("JPEG"))
+ myPicsFormat->setCurrentIndex(aDumpFormats.indexOf("JPEG"));
else
- myPicsFormat->setCurrentItem(0);
+ myPicsFormat->setCurrentIndex(0);
myPicsFormat->setEnabled(false);
aSaveLay->addWidget(myPicsFormat, 1, 2);
connect(mySaveCheck, SIGNAL( toggled(bool)),
mySaveAVICheck = new QCheckBox("Save animation to AVI file", aSaveBox);
connect(mySaveAVICheck, SIGNAL( toggled(bool)),
this, SLOT( onCheckDump(bool) ));
- aSaveLay->addMultiCellWidget(mySaveAVICheck, 3, 3, 0, 2);
+ aSaveLay->addWidget(mySaveAVICheck, 3, 0, 1, 3);
myPathAVILbl = new QLabel("Path:", aSaveBox);
myPathAVILbl->setEnabled(false);
mySaveAVICheck->setChecked(false);
//mySaveAVICheck->setEnabled(myAnimator->checkAVIMaker());
- TopLayout->addMultiCellWidget(aSaveBox, 7, 7, 0, 3);
+ TopLayout->addWidget(aSaveBox, 7, 0, 1, 4);
QCheckBox* aCleanMemCheck = new QCheckBox("Clean memory at each frame",myPlayFrame);
aCleanMemCheck->setChecked(myAnimator->isCleaningMemoryAtEachFrame());
connect(aCleanMemCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setCleaningMemoryAtEachFrameSlot(bool)));
- TopLayout->addMultiCellWidget(aCleanMemCheck, 8, 8, 0, 3);
+ TopLayout->addWidget(aCleanMemCheck, 8, 0, 1, 4);
aMainLayout->addWidget(myPlayFrame);
// Animation publishing in study
- QHBox* aPublishBox = new QHBox(this);
- aPublishBox->setSpacing(5);
+ QWidget* aPublishBox = new QWidget(this);
+ QHBoxLayout* aPubHBLay = new QHBoxLayout( aPublishBox );
+ aPubHBLay->setSpacing(5);
myPublishBtn = new QPushButton("Publish to study", aPublishBox);
+ aPubHBLay->addWidget( myPublishBtn );
connect(myPublishBtn, SIGNAL(clicked()), this, SLOT(publishToStudy()));
mySaveBtn = new QPushButton("Save Animation", aPublishBox);
mySaveBtn->setEnabled(myAnimator->isSavedInStudy());
+ aPubHBLay->addWidget( mySaveBtn );
connect(mySaveBtn, SIGNAL(clicked()), this, SLOT(saveToStudy()));
aMainLayout->addWidget(aPublishBox);
- QHBox* aBtnBox = new QHBox(this);
- QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox->layout());
+ QWidget* aBtnBox = new QWidget(this);
+ QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox);
aBtnLayout->addStretch();
QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
if (myAnimator->getNbFrames() == 0) {
myPlayFrame->setEnabled(false);
c.suspend();
- SUIT_MessageBox::warn1(this,
+ SUIT_MessageBox::warning(this,
tr("ERROR"),
tr("MSG_NO_ANIMATIONDATA"),
tr("&OK"));
return;
}
- mySlider->setMaxValue(myAnimator->getNbFrames()-1);
+ mySlider->setMaximum(myAnimator->getNbFrames()-1);
myPlayFrame->setEnabled(true);
if (!myAnimator->generateFrames()) {
c.suspend();
//myPlayFrame->setEnabled(false);
- SUIT_MessageBox::warn1(this,
+ SUIT_MessageBox::warning(this,
tr("ERROR"),
myAnimator->getLastErrorMsg(),
tr("&OK"));
//------------------------------------------------------------------------
void VisuGUI_TimeAnimationDlg::onPlayPressed()
{
- if (myPlayBtn->isOn() && (!myAnimator->running())) {
- myPlayBtn->setIconSet(MYpausePixmap);
+ if (myPlayBtn->isChecked() && (!myAnimator->isRunning())) {
+ myPlayBtn->setIcon(MYpausePixmap);
if (mySaveCheck->isChecked()) {
onPicsFormatChanged();
onPathChanged();
} else if (mySaveAVICheck->isChecked()) {
myAnimator->setDumpFormat("AVI");
- myAnimator->dumpTo(myPathAVIEdit->text());
+ myAnimator->dumpTo((const char*)myPathAVIEdit->text().toLatin1());
} else {
myAnimator->dumpTo("");
}
myGenBtn->setEnabled(false);
myAnimator->startAnimation();
} else {
- myPlayBtn->setIconSet(MYplayPixmap);
+ myPlayBtn->setIcon(MYplayPixmap);
myAnimator->stopAnimation();
mySetupBtn->setEnabled(true);
myGenBtn->setEnabled(true);
if (myAnimator != NULL) {
myAnimator->stopAnimation();
myAnimator->wait(500);
- if (myAnimator->running() && (! myAnimator->finished())) {
+ if (myAnimator->isRunning() && (! myAnimator->isFinished())) {
theEvent->ignore();
QCloseEvent* aNewCloseEvent = new QCloseEvent;
QApplication::postEvent( this, aNewCloseEvent );
void VisuGUI_TimeAnimationDlg::stopAnimation()
{
myAnimator->stopAnimation();
- myPlayBtn->setOn(false);
- myPlayBtn->setIconSet(MYplayPixmap);
+ myPlayBtn->setChecked(false);
+ myPlayBtn->setIcon(MYplayPixmap);
mySetupBtn->setEnabled(true);
myGenBtn->setEnabled(true);
}
aDir = getenv("HOME");
else {
QFileInfo aFile(myPathAVIEdit->text());
- aDir = aFile.dirPath(true);
+ aDir = aFile.absoluteDir().absolutePath();
}
QString aPath = SUIT_FileDlg::getFileName(this, aDir, aFilter, "Select file", false);
if (!aPath.isEmpty())
if (mySaveAVICheck->isChecked()) {
if (!myAnimator->checkAVIMaker()) {
// AVI maker is not available
- SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+ SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
mySaveAVICheck->setChecked(false);
}
else {
//------------------------------------------------------------------------
void VisuGUI_TimeAnimationDlg::onStop()
{
- myPlayBtn->setOn(false);
- myPlayBtn->setIconSet(MYplayPixmap);
+ myPlayBtn->setChecked(false);
+ myPlayBtn->setIcon(MYplayPixmap);
mySetupBtn->setEnabled(true);
myGenBtn->setEnabled(true);
}
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
QObject::tr("BUT_OK"));
myAnimator->restoreFromStudy(theAnimation);
mySaveBtn->setEnabled(myAnimator->isSavedInStudy());
if ( myAnimator->getAnimationMode() == 1 )
- setCaption(tr("SUCCESSIVE_ANIMATION"));
+ setWindowTitle(tr("SUCCESSIVE_ANIMATION"));
}
//------------------------------------------------------------------------
void VisuGUI_TimeAnimationDlg::onPicsFormatChanged()
{
- QStrList aDumpFormats = QImageIO::outputFormats();
- myAnimator->setDumpFormat(aDumpFormats.at(myPicsFormat->currentItem()));
+ QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
+ myAnimator->setDumpFormat(aDumpFormats.at(myPicsFormat->currentIndex()));
}
//------------------------------------------------------------------------
void VisuGUI_TimeAnimationDlg::onPathChanged()
{
- myAnimator->dumpTo(myPathEdit->text());
+ myAnimator->dumpTo((const char*)myPathEdit->text().toLatin1());
}
//------------------------------------------------------------------------
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VISUGUI_TIMEANIMATION_H
#define VISUGUI_TIMEANIMATION_H
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
#include "SALOMEDSClient_Study.hxx"
#include "VTKViewer.h"
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
+#include <QDialog>
+#include <QButtonGroup>
+#include <QStackedWidget>
+#include <QMap>
#include <vector>
#include <map>
class SVTK_ViewWindow;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QLabel;
class QSlider;
-class QListBox;
+class QListWidget;
class QCheckBox;
class QComboBox;
class QToolButton;
~ArrangeDlg() {};
- int getMode() const { return myStackWgt->id(myStackWgt->visibleWidget()); }
+ int getMode() const { return myStackWgt->indexOf(myStackWgt->currentWidget()); }
double getDistance() const { return myDistVal->value(); }
- int getAxis() const { return myAxisGrp->id(myAxisGrp->selected()); }
+ int getAxis() const { return myAxisGrp->id(myAxisGrp->checkedButton()); }
protected slots:
virtual void accept();
VISU_TimeAnimation* myAnimator;
SVTK_ViewWindow * myViewWindow;
- QWidgetStack* myStackWgt;
+ QStackedWidget* myStackWgt;
QButtonGroup* myAxisGrp;
- QtxDblSpinBox* myDistVal;
- QListBox* myFieldLst;
- QtxDblSpinBox* myCoord[3];
- QValueList<Offset> myOffsets;
+ QtxDoubleSpinBox* myDistVal;
+ QListWidget* myFieldLst;
+ QtxDoubleSpinBox* myCoord[3];
+ QList<Offset> myOffsets;
QCheckBox* mySaveChk;
VisuGUI* myModule;
VISU_TimeAnimation* myAnimator;
- QListBox* myFieldLst;
+ QListWidget* myFieldLst;
QComboBox* myTypeCombo;
std::vector<int> myComboId2TypeId;
std::map<int,int> myTypeId2ComboId;
QPushButton* myPropBtn;
QPushButton* myArrangeBtn;
QCheckBox* myUseRangeChk;
- QtxDblSpinBox* myMinVal;
- QtxDblSpinBox* myMaxVal;
+ QtxDoubleSpinBox* myMinVal;
+ QtxDoubleSpinBox* myMaxVal;
};
#include <Utils_Timer.hxx>
-#include <qstring.h>
+#include <QString>
class VisuGUI_Timer : public Utils_Timer
{
#include "LightApp_DataObject.h"
#include "LightApp_SelectionMgr.h"
-#include "OB_Browser.h"
+//TODO
+//#include "OB_Browser.h"
#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_ViewWindow.h"
+
+#include "CAM_DataModel.h"
#include <vtkRenderer.h>
#include <vtkActorCollection.h>
-#include <qstring.h>
+#include <QString>
//=============================================================================
QWidget* theWidget )
{
if(IsStudyLocked(theStudy)){
- SUIT_MessageBox::warn1(theWidget,
- QObject::tr("WRN_VISU_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(theWidget,
+ QObject::tr("WRN_VISU_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED") );
return true;
}
return false;
QString aSourceEntry = theEntry.section(':',0,aLevel);
DataObjectList aList;
theDataObject->children(aList);
- DataObjectListIterator aDataObjectIter(aList);
- while(SUIT_DataObject* aDataObject = aDataObjectIter.current()){
- if(LightApp_DataObject* aChildDataObject = dynamic_cast<LightApp_DataObject*>(aDataObject)){
+ DataObjectList::Iterator aDataObjectIter = aList.begin();
+ while( aDataObjectIter!= aList.end() ) {
+ if(LightApp_DataObject* aChildDataObject = dynamic_cast<LightApp_DataObject*>(*aDataObjectIter)){
QString anEntry = aChildDataObject->entry();
QString aCurrentEntry = anEntry.section(':',0,aLevel);
if(aSourceEntry == aCurrentEntry){
}
}
}
- ++aDataObjectIter;
+ aDataObjectIter++;
}
return NULL;
}
}
}
if(!aGen)
- throw std::runtime_error(QObject::tr("ERR_CANT_FIND_VISU_COMPONENT").latin1());
+ throw std::runtime_error((const char*)QObject::tr("ERR_CANT_FIND_VISU_COMPONENT").toLatin1());
return aGen;
}
aGen = SALOME_MED::MED_Gen::_narrow(aComponent);
}
if(CORBA::is_nil(aGen))
- throw std::runtime_error(QObject::tr("ERR_CANT_FIND_MED_COMPONENT").latin1());
+ throw std::runtime_error((const char*)QObject::tr("ERR_CANT_FIND_MED_COMPONENT").toLatin1());
return aGen;
}
QString aStr("");
VISU::Storable::TRestoringMap aMap = getMapOfValue(theSObject);
if (!aMap.empty())
- aStr = VISU::Storable::FindValue(aMap, theKey.latin1());
+ aStr = VISU::Storable::FindValue(aMap, (const char*)theKey.toLatin1());
return aStr;
}
// mkr : 24.11.2006 : use AttributeName and module title for correct "Delete"
// popup item displaying in object browser popup
_PTR(AttributeName) aComment (anAttr);
- aNAME = aComment->Value();
- QString aVisuTITLE = theModule->getApp()->moduleTitle(QString(aVisuNAME));
- if (!aVisuTITLE.compare(QString(aNAME))) {
+ aNAME = aComment->Value().c_str();
+ QString aVisuTITLE = theModule->getApp()->moduleTitle(QString(aVisuNAME.c_str()));
+ if (!aVisuTITLE.compare(QString(aNAME.c_str()))) {
isUnderVISU = true;
}
}
return true;
}
}
- SUIT_MessageBox::warn1(GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("WRN_NO_AVAILABLE_DATA"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("WRN_NO_AVAILABLE_DATA") );
return false;
}
if (!thePrs || !theViewWindow)
return aActor;
- QApplication::setOverrideCursor( Qt::waitCursor );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
try {
if ((aActor = thePrs->CreateActor()))
theViewWindow->AddActor(aActor);
} catch(std::exception& exc) {
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()) );
}
QApplication::restoreOverrideCursor();
if (SalomeApp_Application* anApp = theModule->getApp()) {
ViewManagerList aViewManagerList;
anApp->viewManagers(SVTK_Viewer::Type(),aViewManagerList);
- QPtrListIterator<SUIT_ViewManager> anIter (aViewManagerList);
- while (SUIT_ViewManager* aViewManager = anIter.current()) {
- QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ QList<SUIT_ViewManager*>::Iterator anIter = aViewManagerList.begin();
+ while ( anIter != aViewManagerList.end() )
+ {
+ QVector<SUIT_ViewWindow*> aViews = (*anIter)->getViews();
for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
}
}
}
- ++anIter;
+ anIter++;
}
}
}
SVTK_ViewWindow* theViewWindow,
const QString& theEntry)
{
- TObjectInfo anObjectInfo = GetObjectByEntry(theStudy, theEntry);
+ TObjectInfo anObjectInfo = GetObjectByEntry(theStudy, (const char*)theEntry.toLatin1());
VISU::Prs3d_i* aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
return FindActor(theViewWindow, aPrs3d);
}
RecreateActor (const SalomeApp_Module* theModule,
VISU::Prs3d_i* thePrs)
{
- QApplication::setOverrideCursor(Qt::waitCursor);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
CORBA::String_var anEntry = aSObject->GetID();
} catch (std::runtime_error& exc) {
INFOS(exc.what());
QApplication::restoreOverrideCursor();
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
thePrs->RemoveActors();
return;
if ( plotCurve ) {
plotCurve->setHorTitle( theCurve->GetHorTitle().c_str() );
//plotCurve->setVerTitle( ( theCurve->GetVerTitle().c_str() ) );
- plotCurve->setVerTitle( theCurve->GetName() );
+ plotCurve->setVerTitle( theCurve->GetName().c_str() );
plotCurve->setHorUnits( theCurve->GetHorUnits().c_str() );
plotCurve->setVerUnits( theCurve->GetVerUnits().c_str() );
double* xList = 0;
plotCurve->setData( xList, yList, nbPoints, zList );
}
if ( !theCurve->IsAuto() ) {
- plotCurve->setLine( (Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
- plotCurve->setMarker( (Plot2d_Curve::MarkerType)theCurve->GetMarker() );
+ plotCurve->setLine( (Plot2d::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
+ plotCurve->setMarker( (Plot2d::MarkerType)theCurve->GetMarker() );
SALOMEDS::Color color = theCurve->GetColor();
plotCurve->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) );
}
if ( theDisplaying == VISU::eDisplayOnly )
aPlot->EraseAll();
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
aPlot->getCurves( clist );
_PTR(Study) aStudy = GetCStudy( GetAppStudy( theModule ) );
_PTR(SObject) TableSO = aStudy->FindObjectID( table->GetEntry() );
UpdateCurve( theCurve, aPlot, plotCurve, theDisplaying );
if ( theDisplaying == VISU::eErase && plotCurve ) {
- clist.remove( plotCurve );
+ clist.removeAll(plotCurve );
}
}
}
// if ( theDisplaying == VISU::eDisplayOnly )
// aPlot->EraseAll();
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
aPlot->getCurves( clist );
SPlot2d_Curve* plotCurve = 0;
SPlot2d_Curve* tmpCurve;
PlotRemoveCurve(const SalomeApp_Module* theModule,
VISU::Curve_i* pCrv)
{
- QString anEntry = pCrv->GetEntry();
+ QString anEntry = pCrv->GetEntry().c_str();
ViewManagerList pvm_list;
theModule->getApp()->viewManagers( SPlot2d_Viewer::Type(), pvm_list );
- for( SUIT_ViewManager* mgr = pvm_list.first(); mgr; mgr = pvm_list.next() ){
- Plot2d_ViewManager* pvm = dynamic_cast<Plot2d_ViewManager*>( mgr );
+ ViewManagerList::Iterator pvm_it = pvm_list.begin();
+ for( ; pvm_it != pvm_list.end(); pvm_it++ ){
+ Plot2d_ViewManager* pvm = dynamic_cast<Plot2d_ViewManager*>( *pvm_it );
if( pvm ){
SPlot2d_Viewer* aSPlot2d = dynamic_cast<SPlot2d_Viewer*>( pvm->getViewModel() );
if( aSPlot2d ){
Plot2d_ViewFrame* aPlot = aSPlot2d->getActiveViewFrame();
if(aPlot){
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
aPlot->getCurves( clist );
for (int i = 0; i < clist.count(); i++) {
- if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i)))
+ if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist[i]))
if(plotCurve->hasIO() && (plotCurve->getIO()->getEntry() == anEntry))
- aPlot->eraseCurve(clist.at(i));
+ aPlot->eraseCurve(clist[i]);
}
}
}
if ( theDisplaying == VISU::eDisplayOnly )
aPlot->EraseAll();
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
aPlot->getCurves( clist );
if ( container->GetNbCurves() > 0 ) {
int nbCurves = container->GetNbCurves();
UpdateCurve( theCurve, aPlot, plotCurve, theDisplaying );
if ( plotCurve && theDisplaying == VISU::eErase ) {
- clist.remove( plotCurve );
+ clist.removeAll( plotCurve );
}
}
}
}
PlotContainer( theModule, pContainer, VISU::eDisplay );
- QString anEntry = pContainer->GetEntry();
+ QString anEntry = pContainer->GetEntry().c_str();
_PTR(Study) aStudy = theTableSO->GetStudy();
- _PTR(SObject) aContainerSO = aStudy->FindObjectID(anEntry.latin1());
+ _PTR(SObject) aContainerSO = aStudy->FindObjectID((const char*)anEntry.toLatin1());
_PTR(SObject) aParentSO = aContainerSO->GetFather();
UpdateObjBrowser(theModule,true,aParentSO);
}
Storable::TRestoringMap aMap = getMapOfValue(aResultSObj);
bool isExist;
- string aComment = Storable::FindValue(aMap,"myComment",&isExist).latin1();
+ string aComment = (const char*)Storable::FindValue(aMap,"myComment",&isExist).toLatin1();
if (!isExist)
return;
CORBA::Object_var aMesh;
- string aMeshName = Storable::FindValue(aMap,"myMeshName").latin1();
+ string aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName").toLatin1();
#ifdef CHECKTIME
Utils_Timer timer;
timer.Start();
aMesh = GetVisuGen(theModule)->MeshOnEntity(aResult,aMeshName.c_str(),anEntity);
} else if (aComment == "FAMILY") {
VISU::Entity anEntity = (VISU::Entity)Storable::FindValue(aMap,"myEntityId").toInt();
- string aFamilyName = Storable::FindValue(aMap,"myName").latin1();
+ string aFamilyName = (const char*)Storable::FindValue(aMap,"myName").toLatin1();
if (VISU::Mesh_i::IsPossible(pResult,aMeshName.c_str(),anEntity,aFamilyName.c_str()))
aMesh = GetVisuGen(theModule)->FamilyMeshOnEntity
(aResult,aMeshName.c_str(),anEntity,aFamilyName.c_str());
} else if (aComment == "GROUP") {
- string aGroupName = Storable::FindValue(aMap,"myName").latin1();
+ string aGroupName = (const char*)Storable::FindValue(aMap,"myName").toLatin1();
if (VISU::Mesh_i::IsPossible(pResult,aMeshName.c_str(),aGroupName.c_str()))
aMesh = GetVisuGen(theModule)->GroupMesh(aResult,aMeshName.c_str(),aGroupName.c_str());
}
if (!CORBA::is_nil(aMesh))
pPresent = dynamic_cast<VISU::Mesh_i*>(VISU::GetServant(aMesh).in());
if (pPresent == NULL) {
- SUIT_MessageBox::warn1 (GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning (GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") );
return;
}
#endif
} catch (std::runtime_error& exc) {
INFOS(exc.what());
- SUIT_MessageBox::warn1
- (GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(GetDesktop(theModule), QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()) );
}
}
#include "SVTK_ViewWindow.h"
// QT Includes
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QSlider>
+#include <QLayout>
+#include <QGroupBox>
+#include <QKeyEvent>
using namespace std;
//
//=================================================================================
VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
- const char* name,
- bool modal,
- WFlags fl)
- : QDialog( VISU::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
- WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
+ bool modal )
+ : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myModule(theModule),
mySelectionMgr( VISU::GetSelectionMgr( theModule ) ),
myViewWindow( VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule) )
{
- if (!name)
- setName("VisuGUI_TransparencyDlg");
- setCaption(tr("TRANSPARENCY_TITLE" ));
+ setModal( modal );
+ setAttribute( Qt::WA_DeleteOnClose );
+
+ setWindowTitle(tr("TRANSPARENCY_TITLE" ));
setSizeGripEnabled(TRUE);
QGridLayout* VisuGUI_TransparencyDlgLayout = new QGridLayout(this);
VisuGUI_TransparencyDlgLayout->setSpacing(6);
VisuGUI_TransparencyDlgLayout->setMargin(11);
/*************************************************************************/
- QGroupBox* GroupC1 = new QGroupBox(this, "GroupC1");
- GroupC1->setColumnLayout(0, Qt::Vertical);
- GroupC1->layout()->setSpacing(0);
- GroupC1->layout()->setMargin(0);
- QGridLayout* GroupC1Layout = new QGridLayout(GroupC1->layout());
+ QGroupBox* GroupC1 = new QGroupBox(this);
+ //GroupC1->setColumnLayout(0, Qt::Vertical);
+ //GroupC1->layout()->setSpacing(0);
+ //GroupC1->layout()->setMargin(0);
+ QGridLayout* GroupC1Layout = new QGridLayout(GroupC1);
GroupC1Layout->setAlignment(Qt::AlignTop);
GroupC1Layout->setSpacing(6);
GroupC1Layout->setMargin(11);
- TextLabelTransparent = new QLabel(GroupC1, "TextLabelTransparent");
- TextLabelTransparent->setText(tr("TRANSPARENCY_TRANSPARENT" ));
- TextLabelTransparent->setAlignment(AlignLeft);
+ TextLabelTransparent = new QLabel(tr("TRANSPARENCY_TRANSPARENT" ), GroupC1);
+ TextLabelTransparent->setAlignment(Qt::AlignLeft);
GroupC1Layout->addWidget(TextLabelTransparent, 0, 0);
- ValueLab = new QLabel(GroupC1, "ValueLab");
- ValueLab->setAlignment(AlignCenter);
+ ValueLab = new QLabel(GroupC1);
+ ValueLab->setAlignment(Qt::AlignCenter);
ValueLab->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
QFont fnt = ValueLab->font(); fnt.setBold(true); ValueLab->setFont(fnt);
GroupC1Layout->addWidget(ValueLab, 0, 1);
- TextLabelOpaque = new QLabel(GroupC1, "TextLabelOpaque");
- TextLabelOpaque->setText(tr("TRANSPARENCY_OPAQUE" ));
- TextLabelOpaque->setAlignment(AlignRight);
+ TextLabelOpaque = new QLabel(tr("TRANSPARENCY_OPAQUE" ), GroupC1);
+ TextLabelOpaque->setAlignment(Qt::AlignRight);
GroupC1Layout->addWidget(TextLabelOpaque, 0, 2);
- Slider1 = new QSlider(0, 10, 1, 5, Horizontal, GroupC1, "Slider1");
- Slider1->setFocusPolicy(QWidget::NoFocus);
+ Slider1 = new QSlider( Qt::Horizontal, GroupC1 );
+ Slider1->setMinimum( 0 );
+ Slider1->setMaximum( 100 );
+ Slider1->setPageStep( 10 );
+ Slider1->setSingleStep( 1 );
+ Slider1->setFocusPolicy(Qt::NoFocus);
Slider1->setMinimumSize(300, 0);
- Slider1->setTickmarks(QSlider::Above);
+ Slider1->setTickPosition(QSlider::TicksAbove);
Slider1->setTickInterval(10);
Slider1->setTracking(true);
- Slider1->setMinValue(0);
- Slider1->setMaxValue(100);
- Slider1->setLineStep(1);
- Slider1->setPageStep(10);
- GroupC1Layout->addMultiCellWidget(Slider1, 1, 1, 0, 2);
+ GroupC1Layout->addWidget(Slider1, 1, 0, 1, 3);
/*************************************************************************/
- QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
- GroupButtons->setColumnLayout(0, Qt::Vertical);
- GroupButtons->layout()->setSpacing(0);
- GroupButtons->layout()->setMargin(0);
- QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+ QGroupBox* GroupButtons = new QGroupBox(this);
+ //GroupButtons->setColumnLayout(0, Qt::Vertical);
+ //GroupButtons->layout()->setSpacing(0);
+ //GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
- buttonOk = new QPushButton(GroupButtons, "buttonOk");
+ buttonOk = new QPushButton(GroupButtons);
buttonOk->setText(tr("BUT_CLOSE"));
buttonOk->setAutoDefault(TRUE);
buttonOk->setDefault(TRUE);
- buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+ buttonHelp = new QPushButton(GroupButtons);
buttonHelp->setText(tr("BUT_HELP"));
buttonHelp->setAutoDefault(TRUE);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
ClickOnHelp();
#define VISUGUI_TRANSPARENCYDLG_H
// QT Includes
-#include <qdialog.h>
+#include <QDialog>
class QLabel;
class QPushButton;
public:
VisuGUI_TransparencyDlg( VisuGUI* = 0,
- const char* name = 0,
- bool modal = false,
- WFlags fl = 0 );
+ bool modal = false );
~VisuGUI_TransparencyDlg();
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include <qlayout.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
+#include <QtxColorButton.h>
+
+#include <QLayout>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QCheckBox>
+#include <QLabel>
+#include <QSpinBox>
+#include <QPushButton>
+#include <QKeyEvent>
using namespace std;
VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
: VisuGUI_Prs3dDlg(theModule)
{
- setCaption(tr("DLG_TITLE"));
+ setWindowTitle(tr("DLG_TITLE"));
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout( this );
myTabBox = new QTabWidget(this);
- QVBox* aBox = new QVBox(this);
- aBox->setMargin( 11 );
+ QWidget* aBox = new QWidget(this);
+ QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+ aVBLay->setMargin( 11 );
- TopGroup = new QButtonGroup( aBox, "TopGroup" );
- TopGroup->setColumnLayout(0, Qt::Vertical );
- TopGroup->layout()->setSpacing( 0 );
- TopGroup->layout()->setMargin( 5 );
- QGridLayout* TopGroupLayout = new QGridLayout( TopGroup->layout() );
+ TopGroup = new QGroupBox( aBox );
+ aVBLay->addWidget( TopGroup );
+ //TopGroup->setColumnLayout(0, Qt::Vertical );
+ //TopGroup->layout()->setSpacing( 0 );
+ //TopGroup->layout()->setMargin( 5 );
+ QGridLayout* TopGroupLayout = new QGridLayout( TopGroup );
TopGroupLayout->setAlignment( Qt::AlignTop );
TopGroupLayout->setSpacing( 6 );
TopGroupLayout->setMargin( 11 );
// Scale factor
- ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup, "ScaleLabel");
+ ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup );
- ScalFact = new QtxDblSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
- ScalFact->setPrecision( 5 );
+ ScalFact = new QtxDoubleSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
+ ScalFact->setDecimals( 5 );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
TopGroupLayout->addWidget( ScalFact, 0, 1 );
// Line width
- LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup, "LineWidLabel");
+ LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup );
- LinWid = new QSpinBox( 1, 10, 1, TopGroup, "LinWid" );
+ LinWid = new QSpinBox( TopGroup );
+ LinWid->setMinimum( 1 );
+ LinWid->setMaximum( 10 );
+ LinWid->setSingleStep( 1 );
+
LinWid->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
LinWid->setValue( 1 );
TopGroupLayout->addWidget( LinWid, 1, 1 );
// Color
- UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), TopGroup, "UseMagn");
+ UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), TopGroup);
//UseMagn->setText(tr("MAGNITUDE_COLORING_CHK"));
- SelColor = new QPushButton (tr("SEL_COLOR_BTN"), TopGroup, "SelColor");
+ SelColor = new QtxColorButton (TopGroup);
+ SelColor->setText( tr("SEL_COLOR_BTN") );
/* ColorLab = new QLabel( TopGroup, "ColorLab" );
ColorLab->setFixedSize( SelColor->sizeHint().height(), SelColor->sizeHint().height() );
TopGroupLayout->addWidget( SelColor, 2, 1 );
// Gliphs
- UseGlyph = new QCheckBox (tr("USE_GLYPHS_CHK"), TopGroup, "UseGlyph");
+ UseGlyph = new QCheckBox (tr("USE_GLYPHS_CHK"), TopGroup);
- TypeGlyph = new QButtonGroup (tr("GLYPH_TYPE_GRP"), TopGroup, "TypeGlyph");
- TypeGlyph->setColumnLayout(0, Qt::Vertical );
- TypeGlyph->layout()->setSpacing( 0 );
- TypeGlyph->layout()->setMargin( 0 );
- QGridLayout* TypeGlyphLayout = new QGridLayout( TypeGlyph->layout() );
+ TypeGlyph = new QButtonGroup ( TopGroup);
+ TypeGB = new QGroupBox( tr("GLYPH_TYPE_GRP"), TopGroup );
+ //TypeGlyph->setColumnLayout(0, Qt::Vertical );
+ //TypeGlyph->layout()->setSpacing( 0 );
+ //TypeGlyph->layout()->setMargin( 0 );
+ QGridLayout* TypeGlyphLayout = new QGridLayout( TypeGB );
TypeGlyphLayout->setAlignment( Qt::AlignTop );
TypeGlyphLayout->setSpacing( 6 );
TypeGlyphLayout->setMargin( 11 );
- RBArrows = new QRadioButton (tr("ARROWS_BTN") , TypeGlyph, "RBArrows");
+ RBArrows = new QRadioButton (tr("ARROWS_BTN"), TypeGB );
TypeGlyphLayout->addWidget( RBArrows, 0, 0 );
- RBCones2 = new QRadioButton (tr("CONES2_BTN"), TypeGlyph, "RBCones2");
+ RBCones2 = new QRadioButton (tr("CONES2_BTN"), TypeGB );
TypeGlyphLayout->addWidget( RBCones2, 1, 0 );
- RBCones6 = new QRadioButton (tr("CONES6_BTN"), TypeGlyph, "RBCones6");
+ RBCones6 = new QRadioButton (tr("CONES6_BTN"), TypeGB );
TypeGlyphLayout->addWidget( RBCones6, 2, 0 );
- PosGlyph = new QButtonGroup (tr("GLYPH_POSITION_GRP"), TopGroup, "PosGlyph");
- PosGlyph->setColumnLayout(0, Qt::Vertical );
- PosGlyph->layout()->setSpacing( 0 );
- PosGlyph->layout()->setMargin( 0 );
- QGridLayout* PosGlyphLayout = new QGridLayout( PosGlyph->layout() );
+ TypeGlyph->addButton( RBArrows );
+ TypeGlyph->addButton( RBCones2 );
+ TypeGlyph->addButton( RBCones6 );
+
+ PosGlyph = new QButtonGroup ( TopGroup );
+ PosGB = new QGroupBox( tr("GLYPH_POSITION_GRP"), TopGroup );
+ //PosGlyph->setColumnLayout(0, Qt::Vertical );
+ //PosGlyph->layout()->setSpacing( 0 );
+ //PosGlyph->layout()->setMargin( 0 );
+ QGridLayout* PosGlyphLayout = new QGridLayout( PosGB );
PosGlyphLayout->setAlignment( Qt::AlignTop );
PosGlyphLayout->setSpacing( 6 );
PosGlyphLayout->setMargin( 11 );
- RBTail = new QRadioButton (tr("TAIL_BTN" ), PosGlyph, "RBTail");
+ RBTail = new QRadioButton (tr("TAIL_BTN" ), PosGB );
PosGlyphLayout->addWidget( RBTail, 0, 0 );
- RBCent = new QRadioButton (tr("CENTER_BTN"), PosGlyph, "RBCent");
+ RBCent = new QRadioButton (tr("CENTER_BTN"), PosGB );
PosGlyphLayout->addWidget( RBCent, 1, 0 );
- RBHead = new QRadioButton (tr("HEAD_BTN" ), PosGlyph, "RBHead");
+ RBHead = new QRadioButton (tr("HEAD_BTN" ), PosGB );
PosGlyphLayout->addWidget( RBHead, 2, 0 );
- TopGroupLayout->addMultiCellWidget( UseGlyph, 3, 3, 0, 2 );
- TopGroupLayout->addWidget( TypeGlyph, 4, 0 );
- TopGroupLayout->addMultiCellWidget( PosGlyph, 4, 4, 1, 2 );
+ PosGlyph->addButton( RBTail );
+ PosGlyph->addButton( RBCent );
+ PosGlyph->addButton( RBHead );
+
+ TopGroupLayout->addWidget( UseGlyph, 3, 0, 1, 3 );
+ TopGroupLayout->addWidget( TypeGB, 4, 0 );
+ TopGroupLayout->addWidget( PosGB, 4, 1, 1, 2 );
// Common buttons ===========================================================
- GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+ buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+ buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
- buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
// top layout
myTabBox->addTab(aBox, "Vectors");
myScalarPane = new VisuGUI_ScalarBarPane(this, false);
- myScalarPane->setMargin( 5 );
+ if ( myScalarPane->layout() )
+ myScalarPane->layout()->setMargin( 5 );
myInputPane = new VisuGUI_InputPane(VISU::TVECTORS, theModule, this);
myTabBox->addTab(myScalarPane, "Scalar Bar");
myTabBox->addTab(myInputPane, "Input");
// signals and slots connections
connect( UseGlyph, SIGNAL( clicked() ), this, SLOT( enableGlyphType() ) );
- connect( SelColor, SIGNAL( clicked() ), this, SLOT( setVColor() ) );
+ //connect( SelColor, SIGNAL( clicked() ), this, SLOT( setVColor() ) );
connect( UseMagn, SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
return;
myInputPane->initFromPrsObject( myPrsCopy );
- myTabBox->setCurrentPage( 0 );
+ myTabBox->setCurrentIndex( 0 );
}
*/
void VisuGUI_VectorsDlg::enableGlyphType()
{
- TypeGlyph->setEnabled( UseGlyph->isChecked() );
- PosGlyph->setEnabled( UseGlyph->isChecked() );
+ TypeGB->setEnabled( UseGlyph->isChecked() );
+ PosGB->setEnabled( UseGlyph->isChecked() );
}
/*!
/*!
Called when "Select Color" buttonx clicked
*/
-void VisuGUI_VectorsDlg::setVColor()
+/*void VisuGUI_VectorsDlg::setVColor()
{
QColor cnew = QColorDialog::getColor( myColor, this );
if ( cnew.isValid() )
setColor( cnew );
-}
+}*/
/*!
Sets Scale factor
*/
void VisuGUI_VectorsDlg::setColor( QColor color )
{
- myColor = color;
- SelColor->setPaletteBackgroundColor(myColor);
-/* QPalette pal = ColorLab->palette();
- QColorGroup ca = pal.active();
- ca.setColor( QColorGroup::Background, myColor );
- pal.setActive( ca );
- ColorLab->setPalette( pal );*/
+ //myColor = color;
+ //QPalette aPal = SelColor->palette();
+ //aPal.setColor( SelColor->backgroundRole(), myColor );
+ //SelColor->setPalette( aPal );
+ SelColor->setColor( color );
}
/*!
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#define VISUGUI_VECTORSDLG_H
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDblSpinBox.h"
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include "QtxDoubleSpinBox.h"
+
+class QGroupBox;
+class QTabWidget;
+class QRadioButton;
+class QButtonGroup;
+class QCheckBox;
+class QPushButton;
+class QtxColorButton;
#include "SALOMEconfig.h"
#include CORBA_CLIENT_HEADER(VISU_Gen)
private:
QGroupBox* TopGroup;
QCheckBox* UseMagn;
- //QLabel* ColorLab;
- QPushButton* SelColor;
+ QtxColorButton* SelColor;
QLabel* LineWidLabel;
QSpinBox* LinWid;
QLabel* ScaleLabel;
- QtxDblSpinBox* ScalFact;
+ QtxDoubleSpinBox* ScalFact;
QCheckBox* UseGlyph;
QButtonGroup* TypeGlyph;
+ QGroupBox* TypeGB;
QRadioButton* RBCones6;
QRadioButton* RBCones2;
QRadioButton* RBArrows;
QButtonGroup* PosGlyph;
+ QGroupBox* PosGB;
QRadioButton* RBTail;
QRadioButton* RBCent;
QRadioButton* RBHead;
private slots:
void enableGlyphType();
- void setVColor();
+//void setVColor();
void enableSetColor();
};
#include "SVTK_ViewModel.h"
#include "SVTK_ViewWindow.h"
+#include <SUIT_Desktop.h>
+
namespace VISU
{
//----------------------------------------------------------------------------
bool theIsHighlight)
{
if (theViewWindow) {
- QApplication::setOverrideCursor( Qt::waitCursor );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
try {
if (VISU_Actor* anActor = thePrs->CreateActor()) {
theViewWindow->AddActor(anActor);
QApplication::restoreOverrideCursor();
INFOS(exc.what());
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()));
}
}
return NULL;
isOk = false;
INFOS(exc.what());
- SUIT_MessageBox::warn1
+ SUIT_MessageBox::warning
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
- QObject::tr("BUT_OK"));
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
}
} else if (theDispOnly) {
anActor->VisibilityOff();
-lsuit \
-lstd \
-lCAM \
- -lLightApp \
-lObjBrowser \
+ -lPyConsole \
+ -lLightApp \
-lSalomePrs \
-lPyInterp \
- -lPythonConsole \
-lLogWindow \
-lToolsGUI \
-lGLViewer \
-lMEDWrapper_V2_2 \
-lMEDWrapper_V2_1 \
-lmed_V2_1 \
- -lmedmem
\ No newline at end of file
+ -lmedmem
//===========================================================================
static int mySCnt = 0;
- static QMutex aMutex(TRUE);
+ static QMutex aMutex(QMutex::Recursive);
Mutex::Mutex(QMutex* theMutex): myMutex(&aMutex){
if(MYDEBUG) MESSAGE("Mutex::Mutex : "<<!mySCnt);
::StrToMap(const QString& theStr,
VISU::Storable::TRestoringMap& theMap)
{
- if(0 && MYDEBUG) MESSAGE("Storable::StrToMap : string="<<theStr);
- QStringList strList = QStringList::split( ";", theStr, false );
+ if(0 && MYDEBUG) MESSAGE("Storable::StrToMap : string="<<(const char*)theStr.toLatin1());
+ QStringList strList = theStr.split( ";", QString::SkipEmptyParts );
for ( int i = 0; i < strList.count(); i++ ) {
QString next = strList[ i ];
- int pos = next.find("=");
+ int pos = next.indexOf("=");
QString aName, aValue;
if ( pos < 0 ) {
- aName = next.stripWhiteSpace();
+ aName = next.trimmed();
aValue = "";
}
else {
- aName = next.left( pos ).stripWhiteSpace();
+ aName = next.left( pos ).trimmed();
aValue = next.mid( pos+1 );
if ( aValue.isNull() )
aValue = "";
}
if ( !aName.isEmpty() )
- theMap.insert( TRestoringMap::value_type( aName.latin1(), aValue ) );
+ theMap.insert( TRestoringMap::value_type( (const char*)aName.toLatin1(), aValue ) );
}
}
QString output = ( !theName.isNull() ? theName : QString("") )
+ QString( "=" )
+ ( !theVal.isNull() ? theVal : QString("") );
- theStr<<output.latin1()<<";";
+ theStr<<(const char*)output.toLatin1()<<";";
}
void
QString output = ( !theName.isNull() ? theName : QString("") )
+ QString( "=" )
+ QString::number( theVal );
- theStr<<output.latin1()<<";";
+ theStr<<(const char*)output.toLatin1()<<";";
}
void
QString output = ( !theName.isNull() ? theName : QString("") )
+ QString( "=" )
+ QString::number( theVal );
- theStr<<output.latin1()<<";";
+ theStr<<(const char*)output.toLatin1()<<";";
}
Storable*
bool isExist;
QString aComment = VISU::Storable::FindValue(aMap,"myComment",&isExist);
if ( isExist ) {
- TCallbackMap::const_iterator anIter = VisuStoreMap.find(aComment.latin1());
- if(MYDEBUG) MESSAGE("Storable::Create - "<<aComment.latin1()<<" "<<(anIter != VisuStoreMap.end()));
+ TCallbackMap::const_iterator anIter = VisuStoreMap.find((const char*)aComment.toLatin1());
+ if(MYDEBUG) MESSAGE("Storable::Create - "<<(const char*)aComment.toLatin1()<<" "<<(anIter != VisuStoreMap.end()));
if(anIter == VisuStoreMap.end())
return NULL;
return (anIter->second)(theSObject, thePrefix, aMap);
#include "SALOMEDSClient_Study.hxx"
// QT headers
-#include <qstring.h>
-#include <qthread.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <QString>
+#include <QThread>
+#include <QFileInfo>
+#include <QApplication>
+#include <QMutex>
// standard C++ headers
#include <stdio.h>
#include "VISU_PipeLine.hxx"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "VTKViewer_Algorithm.h"
#include "SVTK_Functor.h"
#include <vtkRenderWindow.h>
+#include <QtGlobal>
+
#ifdef _DEBUG_
static int MYDEBUG = 0;
#else
if( aHolderIter->first == theActiveHolderEntry )
continue;
const VISU::TLastVisitedPrsList& aPrsList = aHolderIter->second;
- anIteration = QMAX( aPrsList.size() - 1, anIteration );
+ anIteration = qMax( (int)aPrsList.size() - 1, anIteration );
}
// To estimate what amount of memory can be obtained
if(VISU::ColoredPrs3d_i* aColoredPrs3d = CreateColoredPrs3d(theType, theInput)){
VISU::ColoredPrs3dHolder_i* aHolder = new VISU::ColoredPrs3dHolder_i(*this);
std::string aComment = std::string("myComment=") + aColoredPrs3d->GetComment();
- std::string aName = aColoredPrs3d->GenerateName().latin1();
+ std::string aName = (const char*)aColoredPrs3d->GenerateName().toLatin1();
aHolder->PublishInStudy(aName, aColoredPrs3d->GetIconName(), aComment);
RegisterInHolder(aColoredPrs3d, aHolder->GetEntry());
if( aRequiredMemory > 1.0 / VTK_LARGE_FLOAT )
#include "VISU_ColoredPrs3dCache_i.hh"
#include "VISU_ColoredPrs3d_i.hh"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
using namespace VISU;
using namespace std;
#include "VISU_Convertor.hxx"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <strstream>
#include <vtkMapper.h>
return NULL;
SetEntity((VISU::Entity)VISU::Storable::FindValue(theMap,"myEntity").toInt());
- SetFieldName(VISU::Storable::FindValue(theMap,"myFieldName").latin1());
+ SetFieldName((const char*)VISU::Storable::FindValue(theMap,"myFieldName").toLatin1());
SetTimeStampNumber(VISU::Storable::FindValue(theMap,"myIteration").toInt());
myIsTimeStampFixed = VISU::Storable::FindValue(theMap,"myIsTimeStampFixed").toInt();
OnSetInput(false);
SetNbColors(VISU::Storable::FindValue(theMap,"myNumberOfColors").toInt());
SetBarOrientation((VISU::ScalarMap::Orientation)VISU::Storable::FindValue(theMap,"myOrientation").toInt());
- SetTitle(VISU::Storable::FindValue(theMap,"myTitle").latin1());
+ SetTitle((const char*)VISU::Storable::FindValue(theMap,"myTitle").toLatin1());
myNumberOfLabels = VISU::Storable::FindValue(theMap,"myNumberOfLabels").toInt();
myPosition[0] = VISU::Storable::FindValue(theMap,"myPosition[0]").toDouble();
myPosition[1] = VISU::Storable::FindValue(theMap,"myPosition[1]").toDouble();
TSuperClass::ToStream(theStr);
Storable::DataToStream( theStr, "myEntity", GetEntity() );
- Storable::DataToStream( theStr, "myFieldName", GetCFieldName() );
+ Storable::DataToStream( theStr, "myFieldName", GetCFieldName().c_str() );
Storable::DataToStream( theStr, "myIteration", int(GetTimeStampNumber()) );
Storable::DataToStream( theStr, "myIsTimeStampFixed", int(myIsTimeStampFixed) );
SetTitle(GetCFieldName().c_str());
}
if(myPublishInStudyMode == EPublishUnderTimeStamp){
- SetName(GenerateName().latin1(), false);
+ SetName((const char*)GenerateName().toLatin1(), false);
aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
VISU::TTIMESTAMP,
GetCMeshName().c_str(),
GetTimeStampNumber(),
GetField()->myNbComp);
std::string aResultEntry = GetCResult()->GetEntry();
- std::string anEntry = GetCResult()->GetEntry(aComment.latin1());
+ std::string anEntry = GetCResult()->GetEntry((const char*)aComment.toLatin1());
if(anEntry == "")
throw std::runtime_error("There is no Entry for binding the presentation !!!");
aComment.sprintf("myComment=%s;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
anIOR.in(),
GetName(),
"",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}else if(myPublishInStudyMode == EPublishIndependently){
- SetName(GenerateName().latin1(), false);
+ SetName((const char*)GenerateName().toLatin1(), false);
CORBA::String_var anIOR = GetID();
std::string aFatherEntry = ::FindOrCreate3DPresentationsFolder(GetStudyDocument());
aComment.sprintf("myComment=%s",
anIOR.in(),
GetName(),
"",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}
#ifndef _DEXCEPT_
if(0 > anID || anID >= aSize){
static QString aString;
aString.sprintf("LoadPointsOnFamily - aSize(%d) <= aCellNumForType[%d] = %d < 0",aSize,iElem,anID);
- throw std::runtime_error(aString.latin1());
+ throw std::runtime_error((const char*)aString.toLatin1());
}
aSubMeshID.push_back(anID);
}
if(anArray[k] < 0 || aNbPoints <= anArray[k]){
static QString aString;
aString.sprintf("LoadCellsOnEntity >> aNbPoints(%d) <= anArray[%d][%d]=%d < 0 !!!",aNbPoints,iElem,k,anArray[k]);
- throw std::runtime_error(aString.latin1());
+ throw std::runtime_error((const char*)aString.toLatin1());
}
aCell2Connect.push_back(anArray);
} // loop on elements
if(0 > anID || anID >= aSize){
static QString aString;
aString.sprintf("LoadCellsOnFamily - aNbElem(%d) <= aCellNumForType[%d] = %d < 0 !!!",aNbElem,iElem,anID);
- throw std::runtime_error(aString.latin1());
+ throw std::runtime_error((const char*)aString.toLatin1());
}
aSubMeshID.push_back(anID);
}
#include "VISU_PipeLineUtils.hxx"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkAppendPolyData.h>
else
SetBasePlanePosition(VISU::Storable::FindValue(theMap,"myBasePlanePosition").toDouble());
- QStringList aPosList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myLinePosition") );
- QStringList aCondList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myLineCondition") );
+ QStringList aPosList = VISU::Storable::FindValue(theMap,"myLinePosition").split("|", QString::SkipEmptyParts );
+ QStringList aCondList = VISU::Storable::FindValue(theMap,"myLineCondition").split("|",QString::SkipEmptyParts );
for(int i = 0, iEnd = GetNbLines(); i < iEnd; i++)
if(aCondList[i].toInt() == 0)
SetLinePosition(i,aPosList[i].toDouble());
// Restoring the map - \a myMapCurvesInverted
- QStringList aMapCurvesInverted = QStringList::split("|",VISU::Storable::FindValue(theMap,"myMapCurvesInverted") );
+ QStringList aMapCurvesInverted = VISU::Storable::FindValue(theMap,"myMapCurvesInverted").split("|",QString::SkipEmptyParts );
if (aMapCurvesInverted.count() == GetNbLines()){
for(int i = 0, iEnd = GetNbLines(); i < iEnd ; i++){
if(aMapCurvesInverted[i].toInt())
aStrCon.append(QString::number(IsDefaultPosition(i)) + "|");
}
- Storable::DataToStream( theStr, "myLinePosition", aStrPos.latin1());
- Storable::DataToStream( theStr, "myLineCondition", aStrCon.latin1());
+ Storable::DataToStream( theStr, "myLinePosition", (const char*)aStrPos.toLatin1());
+ Storable::DataToStream( theStr, "myLineCondition", (const char*)aStrCon.toLatin1());
Storable::DataToStream( theStr,"myUseAbsLength", IsUseAbsoluteLength());
// Storing the map - \a myMapCurvesInverted
QString aStrCurvesInverted;
for(int i = 0, iEnd = GetNbLines(); i < iEnd; i++)
aStrCurvesInverted.append(QString::number(IsCurveInverted(i)) + "|");
- Storable::DataToStream( theStr, "myMapCurvesInverted", aStrCurvesInverted.latin1());
+ Storable::DataToStream( theStr, "myMapCurvesInverted", (const char*)aStrCurvesInverted.toLatin1());
}
QString aTitle;
aTitle.sprintf("%s",GetCTitle().c_str());
- aTitle = aTitle.simplifyWhiteSpace();
- aTableOfReal->SetTitle(aTitle.latin1());
+ aTitle = aTitle.simplified();
+ aTableOfReal->SetTitle((const char*)aTitle.toLatin1());
int iLineEnd = myCutLinesPL->GetAppendPolyData()->GetNumberOfInputConnections(0);
if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLineEnd = "<<iLineEnd);
vtkFloatingPointType aDist = *aXContIter;
aTableOfReal->PutValue(aDist,1,i+1);
aString.sprintf("%d",i);
- aTableOfReal->SetColumnTitle(i+1,aString.latin1());
+ aTableOfReal->SetColumnTitle(i+1,(const char*)aString.toLatin1());
if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal aDist = "<<aDist);
TXYMapCont::const_iterator aXYMapContIter = aXYMapCont.begin();
for(; aXYMapContIter != aXYMapCont.end(); aXYMapContIter++){
int aScalarMode = myCutLinesPL->GetScalarMode();
if(aScalarMode != 0)
aUnitName = GetField()->myUnitNames[aScalarMode-1].c_str();
- aUnitName = aUnitName.simplifyWhiteSpace();
+ aUnitName = aUnitName.simplified();
if(aUnitName.isEmpty()) aUnitName = "-";
TXYMapCont::const_iterator aXYMapContIter = aXYMapCont.begin();
for(; aXYMapContIter != aXYMapCont.end(); aXYMapContIter++){
long iLineId = aLineIdCont[iLine];
aString.sprintf("Y%d",iLine);
if(MYDEBUG)
- MESSAGE("CutPlanes_i::BuildTableOfReal - SetRowTitle("<<iLineId+2<<",'"<<aString<<"')");
- aTableOfReal->SetRowTitle(iLineId+2,aString.latin1());
- aTableOfReal->SetRowUnit(iLineId+2,aUnitName.latin1());
+ MESSAGE("CutPlanes_i::BuildTableOfReal - SetRowTitle("<<iLineId+2<<",'"<<(const char*)aString.toLatin1()<<"')");
+ aTableOfReal->SetRowTitle(iLineId+2,(const char*)aString.toLatin1());
+ aTableOfReal->SetRowUnit(iLineId+2,(const char*)aUnitName.toLatin1());
}
}
}catch(std::exception& exc){
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#ifdef _DEBUG_
static int MYDEBUG = 0;
SetOrientation(VISU::CutPlanes::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
Storable::FindValue(theMap,"aRot[0]").toDouble(),
Storable::FindValue(theMap,"aRot[1]").toDouble());
- QStringList aPosList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlanePosition") );
- QStringList aCondList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlaneCondition") );
+ QStringList aPosList = VISU::Storable::FindValue(theMap,"myPlanePosition").split("|", QString::SkipEmptyParts );
+ QStringList aCondList = VISU::Storable::FindValue(theMap,"myPlaneCondition").split("|", QString::SkipEmptyParts );
for(int i = 0, iEnd = GetNbPlanes(); i < iEnd; i++)
if(aCondList[i].toInt() == 0)
SetPlanePosition(i,aPosList[i].toDouble());
aStrPos.append(QString::number(GetPlanePosition(i)) + "|");
aStrCon.append(QString::number(IsDefault(i)) + "|");
}
- Storable::DataToStream( theStr, "myPlanePosition", aStrPos.latin1());
- Storable::DataToStream( theStr, "myPlaneCondition", aStrCon.latin1());
+ Storable::DataToStream( theStr, "myPlanePosition", (const char*)aStrPos.toLatin1());
+ Storable::DataToStream( theStr, "myPlaneCondition", (const char*)aStrCon.toLatin1());
}
#include "VISU_Convertor.hxx"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkDataSetMapper.h>
#include <vtkProperty.h>
#include <strstream>
#include <functional>
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <QString>
+#include <QFileInfo>
//#define COUT
{
CORBA::String_var aString = theSObject->GetName();
- std::string aName = QString(aString.in()).simplifyWhiteSpace().latin1();
+ std::string aName = (const char*)QString(aString.in()).simplified().toLatin1();
//replace_if(aName.begin(),aName.end(),not1(ptr_fun(isxdigit)),'_');
replace_if(aName.begin(),aName.end(),TReplacePredicate(),'_');
bool anIsExist;
QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
if(anIsExist){
- if(strcmp(aMethodName.latin1(),"ImportTables") == 0){
+ if(strcmp((const char*)aMethodName.toLatin1(),"ImportTables") == 0){
return;
}
}
bool anIsExist;
QString aSourceId = VISU::Storable::FindValue(aMap,"mySourceId",&anIsExist);
if(anIsExist){
- if(strcmp(aSourceId.latin1(),"CutLines") == 0){
+ if(strcmp((const char*)aSourceId.toLatin1(),"CutLines") == 0){
theStr<<thePrefix<<"if aName2ObjectMap.has_key('"<<theArgumentName<<"'):"<<endl;
thePrefix += PREFIX;
theStr<<thePrefix<<"pass"<<endl<<endl;
theStr<<aPrefix<<"pass"<<endl<<endl;
- }else if(strcmp(aSourceId.latin1(),"TableFile") == 0){
+ }else if(strcmp((const char*)aSourceId.toLatin1(),"TableFile") == 0){
CORBA::Short aTag = theSObject->Tag();
theStr<<thePrefix<<"anIsFound, aSObject = "<<theArgumentName<<".FindSubObject("<<aTag<<")"<<endl;
theStr<<thePrefix<<"if anIsFound:"<<endl;
thePrefix);
theStr<<thePrefix<<"pass"<<endl<<endl;
- }else if(strcmp(aSourceId.latin1(),"TableAttr") == 0){
+ }else if(strcmp((const char*)aSourceId.toLatin1(),"TableAttr") == 0){
theArgumentName = aName;
DumpTableAttrToPython(theStudy,
theIsPublished,
bool anIsExist;
QString aTypeName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
if (anIsExist) {
- if (strcmp(aTypeName.latin1(),"ImportTables") == 0) {
+ if (strcmp((const char*)aTypeName.toLatin1(),"ImportTables") == 0) {
QString aFileName = VISU::Storable::FindValue(aMap,"myFileName",&anIsExist);
if(anIsExist){
std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
- theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"<<aFileName.latin1()<<"')"<<endl;
+ theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"<<(const char*)aFileName.toLatin1()<<"')"<<endl;
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
thePrefix += PREFIX;
theStr<<thePrefix<<"pass"<<endl<<endl;
return;
}
- } else if (strcmp(aTypeName.latin1(),"VIEW3D") == 0) {
+ } else if (strcmp((const char*)aTypeName.toLatin1(),"VIEW3D") == 0) {
std::string aName = GetName(theSObject);
theStr<<thePrefix<<aName<<" = aBuilder.NewObject(aSComponent)"<<endl;
return;
} else if (aTypeName == "ENTITY" || aTypeName == "FAMILY" || aTypeName == "GROUP") {
// Set name (as this object could be renamed by user)
- string aMeshName = VISU::Storable::FindValue(aMap,"myMeshName").latin1();
- string aSubMeshName = VISU::Storable::FindValue(aMap,"myName").latin1();
+ string aMeshName = (const char*)VISU::Storable::FindValue(aMap,"myMeshName").toLatin1();
+ string aSubMeshName = (const char*)VISU::Storable::FindValue(aMap,"myName").toLatin1();
string anEntityTypeKey = "myEntityId";
if (aTypeName == "ENTITY") anEntityTypeKey = "myId";
int anEntity = VISU::Storable::FindValue(aMap,anEntityTypeKey,"0").toInt();
//ANIMATION
theStr<<endl;
QString animName = aSObject->GetName();
- theStr<<thePrefix<<"#Animation: "<<animName<<endl;
+ theStr<<thePrefix<<"#Animation: "<<(const char*)animName.toLatin1()<<endl;
theStr<<endl;
theStr<<thePrefix<<"animSO = aBuilder.NewObject(aSComponent)"<<endl;
- theStr<<thePrefix<<"aBuilder.SetName(animSO, '"<<animName<<"')"<< endl;
+ theStr<<thePrefix<<"aBuilder.SetName(animSO, '"<<(const char*)animName.toLatin1()<<"')"<< endl;
theStr<<thePrefix<<"strAttr = aBuilder.FindOrCreateAttribute(animSO, 'AttributeString')"<< endl;
- theStr<<thePrefix<<"strAttr.SetValue('"<<value<<"')"<< endl;
+ theStr<<thePrefix<<"strAttr.SetValue('"<<(const char*)value.toLatin1()<<"')"<< endl;
value = refObj->GetName();
QString path(theStudy->GetObjectPath(father));
//The following code requierd as a field name can contain '/' character
- theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy,'"<<path<<"','"<<value<<"'))"<<endl;
+ theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy,'"<<
+ (const char*)path.toLatin1()<<"','"<<(const char*)value.toLatin1()<<"'))"<<endl;
}
value = anObj->GetName();
- if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<value<<"')"<< endl;
+ if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<(const char*)value.toLatin1()<<"')"<< endl;
//SCALARMAP,...
SALOMEDS::ChildIterator_var aSubIter = theStudy->NewChildIterator(anObj);
theStr<<thePrefix<<"subSO = aBuilder.NewObject(fieldSO)"<<endl;
value = aSubObj->GetName();
- if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(subSO, '"<<value<<"')"<< endl;
+ if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(subSO, '"<<(const char*)value.toLatin1()<<"')"<< endl;
if (aSubObj->FindAttribute(anAttr, "AttributeString")) {
aStringAttr = SALOMEDS::AttributeString::_narrow(anAttr);
theStr<<thePrefix<<"strAttr = aBuilder.FindOrCreateAttribute(subSO, 'AttributeString')"<< endl;
#include "VISU_ColoredPrs3d_i.hh"
#include "VISU_GaussPtsActorFactory.h"
+#include <QColor>
+
class vtkLookupTable;
class vtkScalarBarActor;
#include "LightApp_SelectionMgr.h"
#include "SVTK_ViewModel.h"
#include "SVTK_ViewWindow.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
#include CORBA_SERVER_HEADER(MED_Gen)
// QT Includes
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <QDir>
+#include <QFileInfo>
+#include <QRegExp>
// VTK Includes
#include <vtkRenderer.h>
if (MYDEBUG) MESSAGE("Error : Unknown type of VISU object!");
}
QString aNewStr = aStr;
- aAttComment->SetValue( aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
- QString("myType=") + QString::number(aVISUType) ).latin1() );
+ aAttComment->SetValue( (const char*)aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
+ QString("myType=").append( QString::number(aVISUType) ) ).toLatin1() );
}
}
}
const QFileInfo& aFileInfo = aResult->GetFileInfo();
const std::string& aName = aResult->GetName();
std::string aFileName = std::string("_") + aName;
- std::string aFile = aFileInfo.filePath().latin1();
+ std::string aFile = (const char*)aFileInfo.absoluteFilePath().toLatin1();
if(theIsMultiFile){
aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()) + aFileName;
CORBA::Object_var anObj = SObjectToObject(gotBranch);
if(CORBA::is_nil(anObj)) continue;
if(Result_i* pResult = dynamic_cast<Result_i*>(GetServant(anObj).in())){
- switch(pResult->GetCreationId()){
+ switch(pResult->GetCreationId())
+ {
case Result_i::eImportFile:
- case Result_i::eCopyAndImportFile: {
- const QFileInfo& aFileInfo = pResult->GetFileInfo();
- QString aPrefix("");
- if (isMultiFile) aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()).c_str();
- QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
- QString tmpDir = QDir::convertSeparators( QString(aTmpDir.ToCString()) );;
- static QString aCommand;
- aCommand.sprintf(" %s %s%s",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
- aCommand = QDir::convertSeparators( aCommand );
- aCommand.prepend( COPY_COMMAND );
-
- if(system(aCommand.latin1())){
- if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
- continue;
- }else
- if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
-
- QString studyPath = tmpDir.append(aFileName);
- TCollection_AsciiString aString((char *)(aFileName.latin1()));
-
- HDFascii::ConvertFromHDFToASCII(strdup(studyPath.latin1()), true);
-
- aFileNames.Append(aString);
- }}
+ case Result_i::eCopyAndImportFile:
+ {
+ const QFileInfo& aFileInfo = pResult->GetFileInfo();
+ QString aPrefix("");
+ if (isMultiFile) aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()).c_str();
+ QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
+ QString tmpDir = QDir::convertSeparators( QString(aTmpDir.ToCString()) );;
+ static QString aCommand;
+ aCommand.sprintf(" %s %s%s",(const char*)aFileInfo.absoluteFilePath().toLatin1(),
+ (const char*)tmpDir.toLatin1(),
+ (const char*)aFileName.toLatin1());
+ aCommand = QDir::convertSeparators( aCommand );
+ aCommand.prepend( COPY_COMMAND );
+
+ if(system((const char*)aCommand.toLatin1())){
+ if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<(const char*)aCommand.toLatin1());
+ continue;
+ }else
+ if(MYDEBUG)
+ MESSAGE("VISU_Gen_i::Save - "<<(const char*)aCommand.toLatin1());
+
+ QString studyPath = tmpDir.append(aFileName);
+ TCollection_AsciiString aString(aFileName.toLatin1().data());
+
+ HDFascii::ConvertFromHDFToASCII(strdup((const char*)studyPath.toLatin1()), true);
+
+ aFileNames.Append(aString);
+ }
+ }
}
}
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
{
bool isActive = false;
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- SUIT_Application* aFirstApp = anIter.current();
- while (SUIT_Application* anApp = anIter.current()) {
- ++anIter;
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ SUIT_Application* aFirstApp = *anIter;
+ while (anIter != anApplications.end()) {
+ SUIT_Application* anApp = *anIter;
if (SUIT_Study* aSStudy = anApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
+ anIter++;
}
if (!isActive) {
MESSAGE("!!! anApp->onLoadDoc(myStudyName) !!!");
}
string aResultEntry = pResult->GetEntry();
- string anEntry = pResult->GetEntry(aComment.latin1());
+ string anEntry = pResult->GetEntry((const char*)aComment.toLatin1());
if (anEntry == "") return;
SALOMEDS::SObject_ptr aSObject = myStudyDocument->FindObjectID(anEntry.c_str());
Result_i* aResultObj = dynamic_cast<Result_i*>(GetServant(theObject).in());
if (!aResultObj) return aResultSO._retn();
const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
- CORBA::String_var anEntry = aResultObj->Create(aFileInfo.filePath().latin1())->GetID();
+ CORBA::String_var anEntry = aResultObj->Create((const char*)aFileInfo.absoluteFilePath().toLatin1())->GetID();
aResultSO = theStudy->FindObjectID(anEntry);
return aResultSO._retn();
}
string aFileName = string(SALOMEDS_Tool::GetNameFromPath(theObject->GetStudy()->URL())) + "_";
if(strlen(aFileName.c_str()) == 1) aFileName="";
const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
- aFileName += aFileInfo.fileName().latin1();
+ aFileName += (const char*)aFileInfo.fileName().toLatin1();
static QString aCommand;
string aFullFileName = aTmpDir + aFileName;
- aCommand.sprintf(" %s %s",aFileInfo.filePath().latin1(), aFullFileName.c_str() );
+ aCommand.sprintf(" %s %s",(const char*)aFileInfo.absoluteFilePath().toLatin1(), aFullFileName.c_str() );
aCommand = QDir::convertSeparators( aCommand );
aCommand.prepend( COPY_COMMAND );
- if(system(aCommand.latin1()) == -1) {
- if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<aCommand);
+ if(system((const char*)aCommand.toLatin1()) == -1) {
+ if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<(const char*)aCommand.toLatin1());
return NULL;
}
aSeq->length(2);
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#ifdef _DEBUG_
static int MYDEBUG = 0;
#include "VISU_PipeLineUtils.hxx"
#include "VISU_Convertor.hxx"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SUIT_ResourceMgr.h"
myPresentType = VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
if(myEntity == VISU::NODE_ENTITY)
myPresentType = VISU::POINT;
- SetName(GenerateName().latin1(), false);
+ SetName((const char*)GenerateName().toLatin1(), false);
myCellColor.R = 0.0; myCellColor.G = myCellColor.B = 1.0;
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
aComment.append(";");
aComment.append(aTmp.sprintf("myEntityId=%d;",myEntity));
aComment.append("myName=");
- aComment.append(mySubMeshName);
+ aComment.append(mySubMeshName.c_str());
break;
case VISU::TGROUP :
anIDMapper = anInput->GetMeshOnGroup(GetCMeshName(),
aComment.append(GetCMeshName().c_str());
aComment.append(";");
aComment.append("myName=");
- aComment.append(mySubMeshName);
+ aComment.append(mySubMeshName.c_str());
break;
}
if(!theRestoring) { //Setting IOR on the label
myMeshPL->Init();
string aResultEntry = GetCResult()->GetEntry();
- string anEntry = GetCResult()->GetEntry(aComment.latin1());
+ string anEntry = GetCResult()->GetEntry((const char*)aComment.toLatin1());
if(anEntry == "")
throw std::runtime_error("Mesh_i::Build - anEntry was not found !!!");
SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectID(anEntry.c_str());
return NULL;
myEntity = VISU::Storable::FindValue(theMap,"myEntity").toInt();//jfa IPAL9284
- mySubMeshName = VISU::Storable::FindValue(theMap,"mySubMeshName").latin1();
+ mySubMeshName = (const char*)VISU::Storable::FindValue(theMap,"mySubMeshName").toLatin1();
myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#ifdef _DEBUG_
static int MYDEBUG = 0;
#include "VISU_Result_i.hh"
#include "VISU_Actor.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkActorCollection.h>
#include <vtkUnstructuredGrid.h>
const Storable::TRestoringMap& theMap)
{
SetStudyDocument(theStudy);
- SetResultEntry(VISU::Storable::FindValue(theMap,"myResultEntry").latin1());
+ SetResultEntry((const char*)VISU::Storable::FindValue(theMap,"myResultEntry").toLatin1());
if(!GetCResult())
return NULL;
- SetMeshName(VISU::Storable::FindValue(theMap,"myMeshName").latin1());
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
+ SetMeshName((const char*)VISU::Storable::FindValue(theMap,"myMeshName").toLatin1());
+ SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
myOffset[0] = VISU::Storable::FindValue(theMap,"myOffset[0]").toFloat();
myOffset[1] = VISU::Storable::FindValue(theMap,"myOffset[1]").toFloat();
myOffset[2] = VISU::Storable::FindValue(theMap,"myOffset[2]").toFloat();
VISU::Prs3d_i
::ToStream(std::ostringstream& theStr)
{
- Storable::DataToStream( theStr, "myResultEntry", GetResultEntry() );
- Storable::DataToStream( theStr, "myMeshName", GetCMeshName() );
+ Storable::DataToStream( theStr, "myResultEntry", GetResultEntry().c_str() );
+ Storable::DataToStream( theStr, "myMeshName", GetCMeshName().c_str() );
Storable::DataToStream( theStr, "myName", GetName().c_str() );
Storable::DataToStream( theStr, "myOffset[0]", myOffset[0] );
Storable::DataToStream( theStr, "myOffset[1]", myOffset[1] );
#include "HDFascii.hxx"
#include "SUIT_Session.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
#include <boost/bind.hpp>
// QT Includes
-#include <qstring.h>
-#include <qfileinfo.h>
-#include <qsemaphore.h>
-#include <qthread.h>
-#include <qdir.h>
+#include <QString>
+#include <QFileInfo>
+#include <QSemaphore>
+#include <QThread>
+#include <QDir>
+#include <QList>
// VTK Includes
#include <vtkCell.h>
Execute()
{
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* aSApp = anIter.current()) {
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while ( anIter != anApplications.end() ) {
+ SUIT_Application* aSApp (*anIter);
if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
if(SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())) {
if(_PTR(Study) aStudyDS = aStudy->studyDS()){
}
}
}
- ++anIter;
+ anIter++;
}
}
};
QString tmp;
if (i == aMap.end()) {
aMap[theName] = 0;
- tmp = theName;
+ tmp = theName.c_str();
} else {
tmp = GenerateName(theName,++aMap[theName]);
}
- if(MYDEBUG) MESSAGE("GenerateName - "<<tmp<<" from - "<<theName<<"; " <<aMap[theName]);
+ if(MYDEBUG) MESSAGE("GenerateName - "<<(const char*)tmp.toLatin1()<<" from - "<<theName<<"; " <<aMap[theName]);
return tmp;
}
aName.sprintf("%s, -",theName.c_str());
else
aName.sprintf("%s, %s",theName.c_str(),theUnits.c_str());
- aName = aName.simplifyWhiteSpace();
- return aName.latin1();
+ aName = aName.simplified();
+ return (const char*)aName.toLatin1();
}
{
TLock aLock(myMutex);
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* aSApp = anIter.current()) {
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while ( anIter != anApplications.end() ) {
+ SUIT_Application* aSApp = *anIter;
if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
- ++anIter;
+ anIter++;
}
}
};
continue;
aComment = "";
aComment.append("myComment=MESH;");
- aComment.append("myName=");aComment.append(aMeshName);aComment.append(";");
+ aComment.append("myName=");aComment.append(aMeshName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myDim=%d",aMesh->myDim));
aMesh->myEntry =
CreateAttributes(theStudy,
theResultEntry,
"",
aMeshName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
aComment = "";
aComment.append("myComment=FAMILIES;");
- aComment.append("myMeshName=");aComment.append(aMeshName);
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
string aSubMeshesEntry =
CreateAttributes(theStudy,
aMesh->myEntry,
"",
"Families",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
if(theIsBuildGroups){
aComment = "";
aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
- aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myId=%d",anEntity));
aSubMeshesEntry,
"",
anEntityName.c_str(),
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}
}
const PFamily& aFamily = aFamilyMapIter->second;
aComment = "";
aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",TFAMILY));
- aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
- aComment.append("myName=");aComment.append(aFamilyName);
+ aComment.append("myName=");aComment.append(aFamilyName.c_str());
aFamily->myEntry =
CreateAttributes(theStudy,
aMeshOnEntity->myEntry,
"",
aFamilyName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}
}
if(!aGroupMap.empty()){
aComment = "";
aComment.append("myComment=GROUPS;");
- aComment.append("myMeshName=");aComment.append(aMeshName);
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
UpdateAttributes(theStudy,
aMesh->myGroupsEntry,
"",
"Groups",
- aComment.latin1());
+ (const char*)aComment.toLatin1());
TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
aComment = "";
aComment.sprintf("myComment=GROUP;myType=%d;",
TGROUP);
- aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
- aComment.append("myName=");aComment.append(aGroupName);
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
+ aComment.append("myName=");aComment.append(aGroupName.c_str());
aGroup->myEntry =
CreateAttributes(theStudy,
aMesh->myGroupsEntry,
"",
aGroupName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
const TFamilySet& aFamilySet = aGroup->myFamilySet;
TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
{
aComment = "";
aComment.append("myComment=FIELDS;");
- aComment.append("myMeshName=");aComment.append(aMeshName);
+ aComment.append("myMeshName=");aComment.append( aMeshName.c_str() );
UpdateAttributes(
theStudy,
aMesh->myFieldsEntry,
"",
"Fields",
- aComment.latin1());
+ (const char*)aComment.toLatin1());
anIsFieldsEntryUpdated = true;
}
QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
aComment = "";
aComment.sprintf("myComment=FIELD;myType=%d;",TFIELD);
- aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
- aComment.append("myName=");aComment.append(aFieldName);aComment.append(";");
+ aComment.append("myName=");aComment.append(aFieldName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myNbTimeStamps=%d;",aValField.size()));
aComment.append(aTmp.sprintf("myNumComponent=%d",aField->myNbComp));
theStudy,
aMesh->myFieldsEntry,
"",
- aFieldNameWithUnit.latin1(),
- aComment.latin1(),
+ (const char*)aFieldNameWithUnit.toLatin1(),
+ (const char*)aComment.toLatin1(),
true);
CreateReference(
const PValForTime& aValForTime = aValFieldIter->second;
aComment = "";
aComment.sprintf("myComment=TIMESTAMP;myType=%d;",TTIMESTAMP);
- aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
- aComment.append("myFieldName=");aComment.append(aFieldName);aComment.append(";");
+ aComment.append("myFieldName=");aComment.append(aFieldName.c_str());aComment.append(";");
aComment.append(aTmp.sprintf("myTimeStampId=%d;myNumComponent=%d",aTimeStamp,aField->myNbComp));
string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
aField->myEntry,
"",
aTimeStampId,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}
}
try
{
multipr::Obj multiprObj;
- multiprObj.create(theResult->GetFileInfoMultipr().filePath().latin1());
+ multiprObj.create((const char*)theResult->GetFileInfoMultipr().absoluteFileName().toLatin1());
if (multiprObj.isValidDistributedMEDFile())
{
theResult->SetIsDistributedMEDMultipr(true);
aMesh->myPartsEntry,
"",
"Parts",
- aComment.latin1());
+ (const char*)aComment.toLatin1());
string lastEntry;
lastEntry, // father
"",
lPartName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
}
else
aMesh->myPartsEntry, // father
"",
lPartName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true,
- icon.latin1());
+ (const char*)icon.toLatin1());
}
theResult->AddPartMultipr(lPartName, lMEDFileName);
aComment.sprintf("myComment=%s;myType=%d;myFileName=%s;myInitFileName=%s",
GetComment(),
VISU::TRESULT,
- myFileInfo.filePath().latin1(),
+ (const char*)myFileInfo.filePath().toLatin1(),
myInitFileName.c_str()); // Restoring of Python dump
string aResultEntry =
CreateAttributes(myStudy,
aSComponentEntry.in(),
anIOR.in(),
myName,
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true);
mySObject = myStudyDocument->FindObjectID(aResultEntry.c_str());
if(!CORBA::is_nil(theSObject)){
}
else {
#ifdef ENABLE_MULTIPR
- if (strlen(GetFileInfoMultipr().filePath().latin1()) == 0)
+ if (strlen((const char*)GetFileInfoMultipr().absoluteFilePath().toLatin1()) == 0)
#endif
{
// sequential MED file
throw std::runtime_error("distributed MED file; bad format");
//cout << "MULTIPR: original med file=" << originalMEDFileName << endl;
- myFileInfoMultipr.setFile(myFileInfo.filePath());
+ myFileInfoMultipr.setFile(myFileInfo.absoluteFilePath());
myFileInfo.setFile(originalMEDFileName);
}
else
}
#endif
- myInitFileName = myFileInfo.filePath().latin1();
- myName = ::GenerateName(myFileInfo.fileName()).latin1();
+ myInitFileName = (const char*)myFileInfo.filePath().toLatin1();
+ myName = (const char*)::GenerateName((const char*)myFileInfo.fileName().toLatin1()).toLatin1();
if(mySourceId == eRestoredFile){
std::string aTmpDir(SALOMEDS_Tool::GetTmpDir());
static QString aCommand;
- aCommand.sprintf(" %s %s", myFileInfo.absFilePath().latin1(), aTmpDir.c_str() );
+ aCommand.sprintf(" %s %s", (const char*)myFileInfo.absoluteFilePath().toLatin1(), aTmpDir.c_str() );
aCommand = QDir::convertSeparators( aCommand );
aCommand.prepend( COPY_COMMAND );
- if(system(aCommand.latin1()) == -1){
- MESSAGE("Create - Can't execute the command :"<<aCommand);
+ if(system((const char*)aCommand.toLatin1()) == -1){
+ MESSAGE("Create - Can't execute the command :"<<(const char*)aCommand.toLatin1());
return NULL;
}
- if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<aCommand);
+ if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<(const char*)aCommand.toLatin1());
myFileInfo.setFile(QString(aTmpDir.c_str()) + myFileInfo.fileName());
}
- myInput = CreateConvertor(myFileInfo.absFilePath().latin1());
+ myInput = CreateConvertor((const char*)myFileInfo.absoluteFilePath().toLatin1());
if(myInput){
if(myIsBuildImmediately)
myFileInfo.setFile(aCompDataType.c_str());
myInitFileName = aCompDataType;
- myName = ::GenerateName("aResult").latin1();
+ myName = (const char*)::GenerateName("aResult").toLatin1();
return Build(theMedSObject);
}catch(std::exception& exc){
myFileInfo.setFile(aCompDataType.c_str());
myInitFileName = aCompDataType;
- myName = ::GenerateName("aResult").latin1();
+ myName = (const char*)::GenerateName("aResult").toLatin1();
CORBA::String_var anIOR = myStudyDocument->ConvertObjectToIOR(theField);
SALOMEDS::SObject_var aFieldSObject = myStudyDocument->FindObjectIOR(anIOR);
mySObject = SALOMEDS::SObject::_duplicate(theSObject);
myStudyDocument = mySObject->GetStudy();
mySComponent = mySObject->GetFatherComponent();
- myName = VISU::Storable::FindValue(theMap, "myName").latin1();
- myInitFileName = VISU::Storable::FindValue(theMap, "myInitFileName").latin1();
+ myName = (const char*)VISU::Storable::FindValue(theMap, "myName").toLatin1();
+ myInitFileName = (const char*)VISU::Storable::FindValue(theMap, "myInitFileName").toLatin1();
SALOMEDS::SObject_var aRefSObj, aTargetRefSObj;
if (mySObject->FindSubObject(1, aRefSObj) &&
myFileInfo.setFile(aFileName.c_str());
}
if(MYDEBUG)
- MESSAGE("Result_i::Restore - aFileName = " << myFileInfo.filePath() << "; " << myFileInfo.isFile());
+ MESSAGE("Result_i::Restore - aFileName = " << (const char*)myFileInfo.absoluteFilePath().toLatin1() << "; " << myFileInfo.isFile());
- const char* aPathLatin = myFileInfo.filePath().latin1();
+ const char* aPathLatin = (const char*)myFileInfo.absoluteFilePath().toLatin1();
if (HDFascii::isASCII(aPathLatin)) {
MESSAGE("ConvertFromASCIIToHDF(" << aPathLatin << ")");
char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aPathLatin);
if (IsMultifile()) { // set this file as new - temporary
static QString aCommand;
- aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().latin1());
+ aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, (const char*)myFileInfo.baseName().toLatin1());
aCommand = QDir::convertSeparators( aCommand );
aCommand.prepend( MOVE_COMMAND );
- if (system(aCommand.latin1()) == -1) {
- if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
+ if (system((const char*)aCommand.toLatin1()) == -1) {
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << (const char*)aCommand.toLatin1());
return NULL;
} else {
- if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << aCommand);
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << (const char*)aCommand.toLatin1());
}
- myFileInfo.setFile(QString(aResultPath) + QString(myFileInfo.baseName().latin1()));
+ myFileInfo.setFile(QString(aResultPath) + QString(myFileInfo.baseName().toLatin1()));
} else { // change current temporary file to the new: with hdf-format
static QString aCommand;
- aCommand.sprintf(" %s %s\0",aHDFFileName, myFileInfo.filePath().latin1());
+ aCommand.sprintf(" %s %s\0",aHDFFileName, (const char*)myFileInfo.absoluteFilePath().toLatin1());
aCommand = QDir::convertSeparators( aCommand );
aCommand.prepend( MOVE_COMMAND );
- if (system(aCommand.latin1()) == -1) {
- if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
+ if (system((const char*)aCommand.toLatin1()) == -1) {
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << (const char*)aCommand.toLatin1());
return NULL;
} else {
- if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << aCommand);
+ if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << (const char*)aCommand.toLatin1());
}
SALOMEDS::ListOfFileNames_var anEmptyList = new SALOMEDS::ListOfFileNames;
SALOMEDS_Tool::RemoveTemporaryFiles(aResultPath, anEmptyList.in(), true);
mySourceId = eFile;
}
if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - mySourceId = " << mySourceId);
- myInput = CreateConvertor(myFileInfo.filePath().latin1());
+ myInput = CreateConvertor((const char*)myFileInfo.absoluteFilePath().toLatin1());
myInput->BuildEntities();
if(myIsBuildFields){
QString aComment;
aComment.sprintf("myComment=%s;myType=%d;myFileName=%s;myInitFileName=%s",
- GetComment(), VISU::TRESULT, myFileInfo.filePath().latin1(),
+ GetComment(), VISU::TRESULT, (const char*)myFileInfo.absoluteFilePath().toLatin1(),
myInitFileName.c_str()); // Restoring of Python dump
SALOMEDS::GenericAttribute_var anAttr;
if (!theSObject->FindAttribute(anAttr, "AttributeString"))
throw std::runtime_error("Build - There is no AttributeString for the SObject !!!");
SALOMEDS::AttributeString_var aCmnt = SALOMEDS::AttributeString::_narrow(anAttr);
- aCmnt->SetValue(aComment.latin1());
+ aCmnt->SetValue((const char*)aComment.toLatin1());
}
bool anIsBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
if(anIsBuildAll)
if (mySourceId == eRestoredFile) {
static QString aCommand;
#ifndef WNT
- aCommand.sprintf("rm %s",myFileInfo.filePath().latin1());
+ aCommand.sprintf("rm %s",(const char*)myFileInfo.absoluteFilePath().toLatin1());
#else
- aCommand.sprintf("del /F %s",myFileInfo.filePath().latin1());
+ aCommand.sprintf("del /F %s",(const char*)myFileInfo.absoluteFilePath().toLatin1());
#endif
- int res = system(aCommand);
- MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
+ int res = system((const char*)aCommand.toLatin1());
+ MESSAGE("Result_i::~Result_i - system("<<(const char*)aCommand.toLatin1()<<") = "<<res);
#ifndef WNT
- aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",myFileInfo.dirPath().latin1());
+ aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",(const char*)myFileInfo.absolutePath().toLatin1());
#else
- aCommand.sprintf("del /F %s",myFileInfo.dirPath().latin1());
+ aCommand.sprintf("del /F %s",(const char*)myFileInfo.absolutePath().toLatin1());
#endif
- res = system(aCommand);
- MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
+ res = system((const char*)aCommand.toLatin1());
+ MESSAGE("Result_i::~Result_i - system("<<(const char*)aCommand.toLatin1()<<") = "<<res);
}
if(myInput) delete myInput;
}
#include "VISU_Result_i.hh"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkUnstructuredGrid.h>
#include <vtkProperty.h>
QString aFieldName = VISU::Storable::FindValue(theMap,"myScalarFieldName");
int aTimeStampNumber = VISU::Storable::FindValue(theMap,"myScalarIteration").toInt();
- SetScalarField(aMeshName,
- aFieldName,
+ SetScalarField((const char*)aMeshName.toLatin1(),
+ (const char*)aFieldName.toLatin1(),
aTimeStampNumber,
anEntity);
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
// Update Object Browser
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter(anApplications);
- while(SUIT_Application* aSApp = anIter.current()){
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while( anIter != anApplications.end() ){
+ SUIT_Application* aSApp = *anIter;
if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
if(SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())){
if(_PTR(Study) aCStudy = aStudy->studyDS()){
}
}
}
- ++anIter;
+ anIter++;
}
}
UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange").toInt());
QString aGeomNames = VISU::Storable::FindValue(theMap, "myGeomNameList");
- QStringList aGeomNameList = QStringList::split("|", aGeomNames);
+ QStringList aGeomNameList = aGeomNames.split("|", QString::SkipEmptyParts);
int aNbOfGroups = aGeomNameList.count();
if(aNbOfGroups > 0){
RemoveAllGeom();
for(int aGroupNum = 0; aGroupNum < aNbOfGroups; aGroupNum++){
QString aGroupName = aGeomNameList[aGroupNum];
- AddMeshOnGroup(aGroupName.latin1());
+ AddMeshOnGroup((const char*)aGroupName.toLatin1());
}
}
const std::string& aGroupName = *anIter;
aGeomNameList<<aGroupName<<"|";
}
- Storable::DataToStream(theStr, "myGeomNameList", aGeomNameList.str());
+ Storable::DataToStream(theStr, "myGeomNameList", aGeomNameList.str().c_str() );
}
#include "VISU_Convertor.hxx"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkDataSetMapper.h>
#include <vtkAppendFilter.h>
VISU::Prs3d::_nil(),
aPercents,
VISU::StreamLines::Direction(aDirection));
- mySourceEntry = VISU::Storable::FindValue(theMap,"mySourceEntry").latin1();
+ mySourceEntry = (const char*)VISU::Storable::FindValue(theMap,"mySourceEntry").toLatin1();
return this;
}
#include "VISU_Result_i.hh"
#include "VISU_ViewManager_i.hh"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SPlot2d_Curve.h"
#include <memory>
#include <fstream>
#include <strstream>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <QString>
+#include <QRegExp>
+#include <QFile>
using namespace std;
*/
const char* VISU::Table_i::GenerateName()
{
- return VISU::GenerateName( "Table", ++myNbPresent );
+ return (const char*)VISU::GenerateName( "Table", ++myNbPresent ).toLatin1();
}
/*!
Gets comment string
bool anIsExist;
QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
if(anIsExist){
- if(strcmp(aMethodName.latin1(),"ImportTables") == 0){
+ if(strcmp((const char*)aMethodName.toLatin1(),"ImportTables") == 0){
aComment.sprintf("myComment=%s;myType=%d;mySourceId=TableFile",GetComment(),VISU::TTABLE);
}
}
GetID(),
GetName(),
"",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
pCutLines );
// create SObject referenced to real table object
mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID( anEntry.c_str() ));
VISU::Storable* VISU::Table_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO)
{
if(MYDEBUG) MESSAGE(GetComment());
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
- myTitle = VISU::Storable::FindValue(theMap,"myTitle").latin1();
+ SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
+ myTitle = (const char*)VISU::Storable::FindValue(theMap,"myTitle").toLatin1();
myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() );
mySObj = SALOMEDS::SObject::_duplicate(SO);
return Build( true );
*/
const char* VISU::Curve_i::GenerateName()
{
- return VISU::GenerateName( "Curve", ++myNbPresent );
+ return (const char*)VISU::GenerateName( "Curve", ++myNbPresent ).toLatin1();
}
/*!
Gets comment string
GetID(),
GetName(),
"",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true );
// create SObject referenced to real table object
mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
//for ( int i =0 ; i < nbPoints; i++ ) {
// cout << i<<"\t"<<xList[i] << "\t"<< yList[i] << endl;
//}
- crv->setLine( (Plot2d_Curve::LineType)GetLine(), GetLineWidth() );
- crv->setMarker( (Plot2d_Curve::MarkerType)GetMarker() );
+ crv->setLine( (Plot2d::LineType)GetLine(), GetLineWidth() );
+ crv->setMarker( (Plot2d::MarkerType)GetMarker() );
SALOMEDS::Color color = GetColor();
crv->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) );
crv->setAutoAssign( IsAuto() );
{
if(MYDEBUG) MESSAGE(GetComment());
mySObj = SALOMEDS::SObject::_duplicate(theSO);
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
+ SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt();
myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt();
bool ok = false;
*/
const char* VISU::Container_i::GenerateName()
{
- return VISU::GenerateName( "Plot2DView", ++myNbPresent );
+ return (const char*)VISU::GenerateName( "Plot2DView", ++myNbPresent ).toLatin1();
}
/*!
Gets comment string
PortableServer::POA_ptr aPOA = GetPOA();
Curve_i* pCurve = dynamic_cast<Curve_i*>( aPOA->reference_to_servant( theCurve ) );
if( pCurve ) {
- QString entry = pCurve->GetEntry();
- SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( entry.latin1() );
- if ( !SO->_is_nil() && myCurves.find( entry ) == myCurves.end() ) {
+ QString entry( pCurve->GetEntry().c_str() );
+ SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)entry.toLatin1() );
+ if ( !SO->_is_nil() && myCurves.indexOf( entry ) == -1 ) {
myCurves.append( entry );
SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
SALOMEDS::SObject_var newSO = Builder->NewObject( mySO );
PortableServer::POA_ptr aPOA = GetPOA();
Curve_i* pCurve = dynamic_cast<Curve_i*>( aPOA->reference_to_servant( theCurve ) );
if( pCurve ) {
- QString entry = pCurve->GetEntry();
- if ( myCurves.find( entry ) != myCurves.end() ) {
+ QString entry( pCurve->GetEntry().c_str() );
+ if ( myCurves.indexOf( entry ) != -1 ) {
// found !!!
- myCurves.remove( entry );
+ myCurves.removeAll( entry );
SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
for ( ; CI->More(); CI->Next() ) {
}
SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
for ( int i = 0; i < toDelete.count(); i++ ) {
- SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( toDelete[i].latin1() );
+ SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)toDelete[i].toLatin1() );
Builder->RemoveObject( SO );
}
myCurves.clear();
GetID(),
GetName(),
"",
- aComment.latin1(),
+ (const char*)aComment.toLatin1(),
true );
mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
}
QStringList toDelete;
int i;
for ( i = 0; i < myCurves.count(); i++ ) {
- SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( myCurves[i].latin1() );
+ SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)myCurves[i].toLatin1() );
if ( !SO->_is_nil() && Builder->FindAttribute( SO, anAttr, "AttributeIOR" ) ) {
// if real Curve Object still exists
SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
}
}
for ( i = 0; i < toDelete.count(); i++ ) {
- myCurves.remove( toDelete[i] );
+ myCurves.removeAll( toDelete[i] );
}
toDelete.clear();
SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
SALOMEDS::SObject_var childSO = CI->Value();
SALOMEDS::SObject_var refSO;
if ( childSO->ReferencedObject( refSO ) && ( refSO->_is_nil() || !Builder->FindAttribute( refSO, anAttr, "AttributeIOR" ) ||
- myCurves.find( refSO->GetID() ) == myCurves.end() ) ) {
+ myCurves.indexOf( refSO->GetID() ) == -1 ) ) {
toDelete.append( childSO->GetID() );
}
}
if ( theIndex > 0 && theIndex <= myCurves.count() ) {
SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
SALOMEDS::GenericAttribute_var anAttr;
- SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( myCurves[ theIndex-1 ].latin1() );
+ SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID((const char*) myCurves[ theIndex-1 ].toLatin1() );
CORBA::Object_var anObject = VISU::SObjectToObject( SO );
if( !CORBA::is_nil( anObject ) ) {
// if real Curve Object exists
{
if(MYDEBUG) MESSAGE(GetComment());
mySObj = SALOMEDS::SObject::_duplicate(SO);
- SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1(), false);
+ SetName((const char*)VISU::Storable::FindValue( theMap, "myName" ).toLatin1(), false);
QString val = VISU::Storable::FindValue( theMap, "myCurves" );
- myCurves = QStringList::split( QString( "*" ), val, false );
+ myCurves = val.split( "*", QString::SkipEmptyParts );
return Build( true );
}
/*!
QString aTmp;
do {
// find beginning of table (tables are separated by empty lines)
- while( getLine( aStmIn, aTmp ) && aTmp.stripWhiteSpace() == "");
+ while( getLine( aStmIn, aTmp ) && aTmp.trimmed() == "");
TTable2D aTable2D;
if(MYDEBUG) cout << "New table is found" << endl;
- while( !aStmIn.eof() && aTmp.stripWhiteSpace() != "" ){
- QString data = aTmp.stripWhiteSpace();
+ while( !aStmIn.eof() && aTmp.trimmed() != "" ){
+ QString data = aTmp.trimmed();
QString cmt = "";
QString keyword = "";
// split string to data and comment (comment starts from '#' symbol)
- int index = aTmp.find( "#" );
+ int index = aTmp.indexOf( "#" );
if ( index >= 0 ) {
- data = aTmp.left( index ).stripWhiteSpace();
- cmt = aTmp.mid( index+1 ).stripWhiteSpace();
+ data = aTmp.left( index ).trimmed();
+ cmt = aTmp.mid( index+1 ).trimmed();
}
// if comment is not empty, try to get keyword from it (separated by ':' symbol)
if ( !cmt.isEmpty() ) {
- int index1 = cmt.find( ":" );
+ int index1 = cmt.indexOf( ":" );
if ( index1 >= 0 ) {
- QString tmpstr = cmt.left( index1 ).stripWhiteSpace();
+ QString tmpstr = cmt.left( index1 ).trimmed();
if ( tmpstr == QString( "TITLE" ) ||
tmpstr == QString( "COLUMN_TITLES" ) ||
tmpstr == QString( "COLUMN_UNITS" ) ||
tmpstr == QString( "COMMENT" ) ) {
keyword = tmpstr;
- cmt = cmt.mid( index1+1 ).stripWhiteSpace();
+ cmt = cmt.mid( index1+1 ).trimmed();
}
}
}
QString title = cmt;
if ( aTable2D.myTitle != "" )
title = QString( aTable2D.myTitle.c_str() ) + QString( " " ) + title;
- if(MYDEBUG) cout << "...Table TITLE is: " << title.latin1() << endl;
- aTable2D.myTitle = title.latin1();
+ if(MYDEBUG) cout << "...Table TITLE is: " << (const char*)title.toLatin1() << endl;
+ aTable2D.myTitle = (const char*)title.toLatin1();
}
else if ( keyword == QString( "COLUMN_TITLES" ) ) {
// comment may contain column headers
- QStringList aStrList = QStringList::split( "|", cmt );
+ QStringList aStrList = cmt.split( "|", QString::SkipEmptyParts );
if(MYDEBUG) cout << "...Column TITLES are: ";
for ( int i = 0; i < aStrList.count(); i++ ) {
- QString tmpstr = aStrList[ i ].stripWhiteSpace();
- if(MYDEBUG) cout << tmpstr.latin1() << " ";
- aTable2D.myColumnTitles.push_back( tmpstr.latin1() );
+ QString tmpstr = aStrList[ i ].trimmed();
+ if(MYDEBUG) cout << (const char*)tmpstr.toLatin1() << " ";
+ aTable2D.myColumnTitles.push_back( (const char*)tmpstr.toLatin1() );
}
if(MYDEBUG) cout << endl;
}
else if ( keyword == QString( "COLUMN_UNITS" ) ) {
// comment may contain column units
- QStringList aStrList = QStringList::split( " ", cmt );
+ QStringList aStrList = cmt.split( " ", QString::SkipEmptyParts );
if(MYDEBUG) cout << "...Column UNITS are: ";
for ( int i = 0; i < aStrList.count(); i++ ) {
- QString tmpstr = aStrList[ i ].stripWhiteSpace();
- if(MYDEBUG) cout << tmpstr.latin1() << " ";
- aTable2D.myColumnUnits.push_back( tmpstr.latin1() );
+ QString tmpstr = aStrList[ i ].trimmed();
+ if(MYDEBUG) cout << (const char*)tmpstr.toLatin1() << " ";
+ aTable2D.myColumnUnits.push_back( (const char*)tmpstr.toLatin1() );
}
if(MYDEBUG) cout << endl;
}
else if ( keyword == QString( "COMMENT" ) ) {
// keyword 'COMMENT' processing can be here
// currently it is ignored
- if(MYDEBUG) cout << "...COMMENT: " << cmt.latin1() << endl;
+ if(MYDEBUG) cout << "...COMMENT: " << (const char*)cmt.toLatin1() << endl;
}
}
else {
- if(MYDEBUG) cout << "...comment: " << cmt.latin1() << endl;
+ if(MYDEBUG) cout << "...comment: " << (const char*)cmt.toLatin1() << endl;
// simple comment processing can be here
// currently it is ignored
}
TRow aRow;
if(MYDEBUG) cout << "...New row is found: " << endl;
if ( !cmt.isEmpty() ) {
- aRow.myTitle = cmt.latin1();
- if(MYDEBUG) cout << "......ROW TITLE is: " << cmt.latin1() << endl;
+ aRow.myTitle = (const char*)cmt.toLatin1();
+ if(MYDEBUG) cout << "......ROW TITLE is: " << (const char*)cmt.toLatin1() << endl;
}
QString datar1 = data.replace(QRegExp("\t"), " ");
- QStringList aValList = QStringList::split( " ", datar1 );
+ QStringList aValList = datar1.split( " ", QString::SkipEmptyParts );
for ( int i = 0; i < aValList.count(); i++ ) {
- if ( aValList[i].stripWhiteSpace() != "" ) {
- TValue aVal = aValList[i].stripWhiteSpace().latin1();
+ if ( aValList[i].trimmed() != "" ) {
+ TValue aVal = (const char*)aValList[i].trimmed().toLatin1();
aRow.myValues.push_back( aVal );
}
}
aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
QFileInfo aFileInfo(theFileName);
- aName->SetValue(aFileInfo.fileName().latin1());
+ aName->SetValue( (const char*)aFileInfo.fileName().toLatin1());
anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeString");
SALOMEDS::AttributeString_var aComment = SALOMEDS::AttributeString::_narrow(anAttr);
QString aString;
aString.sprintf("myComment=ImportTables;myFileName=%s",
- aFileInfo.absFilePath().latin1());
- aComment->SetValue(aString.latin1());
+ (const char*)aFileInfo.absoluteFilePath().toLatin1());
+ aComment->SetValue((const char*)aString.toLatin1());
for(int i = 0, iEnd = aTableCont.size(); i < iEnd; i++){
const TTable2D& aTable2D = aTableCont[i];
SALOMEDS::SObject_var aRealObject = aStudyBuilder->NewObject(aFileObject);
else{
QString aNewName;
aNewName.sprintf("Table:%d",i);
- aName->SetValue(aNewName.latin1());
+ aName->SetValue((const char*)aNewName.toLatin1());
}
anAttr = aStudyBuilder->FindOrCreateAttribute(aRealObject, "AttributeTableOfReal");
SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
QString aVal = aNewTable2D.myRows[j].myValues[k].c_str();
bool anIsOk = false;
double aValue = aVal.toDouble(&anIsOk);
- if(anIsOk && !aVal.contains("NAN",false) && !aVal.contains("INF",false))
+ if(anIsOk && !aVal.contains("NAN",Qt::CaseInsensitive) && !aVal.contains("INF",Qt::CaseInsensitive))
aTableOfReal->PutValue(aValue,j+1,k+1);
}
{
if (!CORBA::is_nil(aTabAttr)) {
QFile aFile(theFileName);
- aFile.open(IO_WriteOnly);
+ aFile.open(QIODevice::WriteOnly);
/* extract the tabe info and write it into file */
SALOMEDS::StringSeq_var aRowTitles = aTabAttr->GetRowTitles();
QString anAbscissTitle(aRowTitles[0]); /*Absciss row title (X coord)*/
- anAbscissTitle.stripWhiteSpace();
+ anAbscissTitle.trimmed();
SALOMEDS::StringSeq_var aRowUnits = aTabAttr->GetRowUnits();
QString anAbscissUnit(aRowUnits[0]);
- anAbscissUnit.stripWhiteSpace();
+ anAbscissUnit.trimmed();
SALOMEDS::StringSeq_var aColumnTitles = aTabAttr->GetColumnTitles();
if (aRowsNb > 2 && aTitle.length() ) aTitle = aTitle + " - ";
{
/* TITLE */
QString anOrdinate(aRowTitles[i-1]), aTail;
- anOrdinate.stripWhiteSpace();
+ anOrdinate.trimmed();
aLine = "#TITLE: " + aTitle +
((anOrdinate.length())? anOrdinate :
(aRowsNb>2)? aTail.sprintf("%d",i-1) : aTail.sprintf("") ) + "\n";
- aFile.writeBlock(aLine, aLine.length() );
+ aFile.write(aLine.toLatin1() );
/* COLUMN_TITLES */
if ( anAbscissTitle.length() || anOrdinate.length() ) {
aLine = "#COLUMN_TITLES: " + anAbscissTitle + " | " + anOrdinate + "\n";
- aFile.writeBlock(aLine, aLine.length() );
+ aFile.write(aLine.toLatin1() );
}
/* COLUMN_UNITS */
aLine = anAbscissUnit + " " +aRowUnits[i-1];
- if (!aLine.stripWhiteSpace().isEmpty()) {
+ if (!aLine.trimmed().isEmpty()) {
aLine = "#COLUMN_UNITS: " + aLine + "\n";
- aFile.writeBlock(aLine, aLine.length() );
+ aFile.write(aLine.toLatin1() );
}
/* CURVE COORDINATES */
aLine = aLine.sprintf("%.16g %.16g",
(double)(aTabAttr->GetValue(1,j)),
(double)(aTabAttr->GetValue(i,j))); /* aTabAttr->GetValue(1,j) - X coord */
- if ( !aLine.stripWhiteSpace().isEmpty() ) {
+ if ( !aLine.trimmed().isEmpty() ) {
QString aColTitle(aColumnTitles[j-1]);
- if ( !aColTitle.stripWhiteSpace().isEmpty() )
+ if ( !aColTitle.trimmed().isEmpty() )
aLine = aLine + " #TITLE: " + aColTitle ;
- aFile.writeBlock(aLine + "\n", aLine.length() + 1);
+ aFile.write(QString(aLine + "\n").toLatin1() );
}
}
}
- aFile.writeBlock("\n", 1);
+ aFile.write("\n", 1);
}
aFile.close();
return true;
#include "VISU_PrsObject_i.hh"
-#include <qstringlist.h>
+#include <QStringList>
class SPlot2d_Curve;
#ifdef WNT
#include <windows.h>
#include <vfw.h>
-#include <qmessagebox.h>
+#include <QMessageBox>
#endif
#include "VISUConfig.hh"
#include "SVTK_ViewWindow.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Application.h"
#include "SALOMEDSClient_AttributeName.hxx"
#include "CASCatch.hxx"
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qstrlist.h>
-#include <qdir.h>
+#include <QPixmap>
+#include <QImage>
+#include <QImageWriter>
+#include <QStringList>
+#include <QDir>
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
#define NO_CAS_CATCH
return;
}
- if (QThread::running() && !QThread::finished()) {
+ if (QThread::isRunning() && !QThread::isFinished()) {
//myExecutionState->SetActive(false);
stopAnimation();
QThread::wait(500);
- if (QThread::running() && !QThread::finished()) {
+ if (QThread::isRunning() && !QThread::isFinished()) {
QThread::terminate();
}
}
bool anIsCreated = false;
TPrs3d* aPresent = new TPrs3d(VISU::ColoredPrs3d_i::EDoNotPublish);
aPresent->SetCResult(theResult);
- aPresent->SetMeshName(aMeshName.latin1());
+ aPresent->SetMeshName((const char*)aMeshName.toLatin1());
aPresent->SetEntity(anEntity);
- aPresent->SetFieldName(aFieldName.latin1());
+ aPresent->SetFieldName((const char*)aFieldName.toLatin1());
aPresent->SetTimeStampNumber(aTimeStampId);
#ifdef NO_CAS_CATCH
try{
}
}
-double getMinFieldsValue( QValueList<FieldData>& theFieldsLst )
+double getMinFieldsValue( QList<FieldData>& theFieldsLst )
{
// for succcessive animation mode only
double aRes;
return aRes;
}
-double getMaxFieldsValue( QValueList<FieldData>& theFieldsLst )
+double getMaxFieldsValue( QList<FieldData>& theFieldsLst )
{
// for succcessive animation mode only
double aRes;
}
//------------------------------------------------------------------------
-void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList<int>& theIndexList )
+void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QList<int>& theIndexList )
{
double k = 1;
double aOneVal = 1;
}
//------------------------------------------------------------------------
-void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<int>& theIndexList )
+void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QList<int>& theIndexList )
{
if (myFrame >= getNbFrames() - 1)
{
//------------------------------------------------------------------------
void VISU_TimeAnimation::saveImages( int theFieldId,
double& theOneVal, int& theNbFiles,
- QValueList<int>& theIndexList )
+ QList<int>& theIndexList )
{
if (myDumpFormat.compare("AVI") != 0) {
QString aFile(myDumpPath);
aName = QString("%1").arg(myFieldsLst[theFieldId].myTiming[getRelativeFrameNumber(myFrame).second]);
int aPos = -1;
- while ((aPos = aName.find(".")) > -1 )
+ while ((aPos = aName.indexOf(".")) > -1 )
aName.replace(aPos, 1, "_");
aFile += aName;
aFile += ".";
- aFile += myDumpFormat.lower();
+ aFile += myDumpFormat.toLower();
ProcessVoidEvent(new TVoidMemFunEvent<SVTK_ViewWindow>
(myView,&SVTK_ViewWindow::RefreshDumpImage)); // IPAL13602
ProcessEvent(new TMemFun2ArgEvent<SVTK_ViewWindow,bool,const QString&,const QString&>
(myView,&SVTK_ViewWindow::dumpViewToFormat,aFile,myDumpFormat));
} else {
QFileInfo aFileInfo(myDumpPath);
- QString aDirPath = aFileInfo.dirPath(true);
+ QString aDirPath = aFileInfo.absolutePath();
QString aBaseName = aFileInfo.fileName();
switch (myFrame) {
QString aFile = aDirPath + QDir::separator() + aBaseName;
aFile += "_";
- aFile += QString("%1").arg(myFileIndex).rightJustify(8, '0');
+ aFile += QString("%1").arg(myFileIndex).rightJustified(8, '0');
aFile += ".jpeg";
/* check image size is divisable 16
bool isDumping = !myDumpPath.isEmpty();
myFileIndex = 0;
- QValueList<int> anIndexList;
+ QList<int> anIndexList;
if ( myAnimationMode == 0 ) // parallel animation mode
parallelAnimation( isDumping, anIndexList );
double aFPS = 17.3 * mySpeed;
QFileInfo aFileInfo(myDumpPath);
- QString aDirPath = aFileInfo.dirPath(true);
+ QString aDirPath = aFileInfo.absolutePath();
QString aBaseName = aFileInfo.fileName();
// add missing files
int aStartIndex = anIndexList[0], anEndIndex;
for (int i = 1; i < anIndexList.count(); i++) {
anEndIndex = anIndexList[i];
- QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustify(8, '0'));
+ QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustified(8, '0'));
QStringList aCommands;
for (int j = aStartIndex+1; j < anEndIndex; j++) {
- QString aFile = aFFile.arg(QString::number(j).rightJustify(8, '0'));
+ QString aFile = aFFile.arg(QString::number(j).rightJustified(8, '0'));
aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
}
- system(aCommands.join(" ; \\\n").latin1());
+ system((const char*)aCommands.join(" ; \\\n").toLatin1());
aStartIndex = anEndIndex;
}
}
aCmd += QString(" -j %1").arg(aPattern);
aCmd += " | yuv2lav";
aCmd += QString(" -o %1").arg(myDumpPath);
- system(aCmd.latin1());
+ system((const char*)aCmd.toLatin1());
// remove temporary jpeg files
aCmd = "( ";
aCmd += QString(" | egrep '%1_[0-9]*.jpeg'").arg(aBaseName);
aCmd += " | xargs rm";
aCmd += " )";
- system(aCmd.latin1());
+ system((const char*)aCmd.toLatin1());
}
if (myExecutionState->IsActive())
if (theTimeStamp->FindAttribute(anAttr, "AttributeName")) {
_PTR(AttributeName) aName (anAttr);
QString aNameString (aName->Value().c_str());
- int time_len = aNameString.find(',');
+ int time_len = aNameString.indexOf(',');
if (time_len > -1)
return aNameString.left(time_len).toDouble();
else
std::string VISU_TimeAnimation::setDumpFormat(const char* theFormat)
{
myDumpFormat = theFormat;
- QStrList aDumpFormats = QImageIO::outputFormats();
+ QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
if (myDumpFormat.isEmpty() ||
- (aDumpFormats.find(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
- if (aDumpFormats.find("JPEG"))
+ (aDumpFormats.indexOf(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
+ if (aDumpFormats.indexOf("JPEG"))
myDumpFormat = "JPEG";
else
myDumpFormat = aDumpFormats.at(0);
}
- return myDumpFormat.latin1();
+ return (const char*)myDumpFormat.toLatin1();
}
//------------------------------------------------------------------------
bool VISU_TimeAnimation::checkAVIMaker() const
{
- QStrList aDumpFormats = QImageIO::outputFormats();
- if (aDumpFormats.find("JPEG") < 0) return false;
+ QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
+ if (aDumpFormats.indexOf("JPEG") < 0) return false;
QString aCmd("which ");
aCmd += myAVIMaker;
aCmd += " >& /dev/null";
- int iErr = system(aCmd.latin1());
+ int iErr = system((const char*)aCmd.toLatin1());
return (iErr == 0);
}
VISU::TANIMATION,myTimeMinVal,myTimeMaxVal,myAnimationMode);
string anEntry = VISU::CreateAttributes(myStudy,aSComponentEntry.c_str(),"","",
- GenerateName(),"",aComment,true);
+ (const char*)GenerateName().toLatin1(),"",(const char*)aComment.toLatin1(),true);
myAnimEntry = anEntry.c_str();
_PTR(SObject) aAnimSObject = myStudy->FindObjectID(anEntry.c_str());
if (myStudy->GetProperties()->IsLocked()) return;
if (myAnimEntry.isEmpty()) return;
- _PTR(SObject) aAnimSObject = myStudy->FindObjectID(myAnimEntry.latin1());
+ _PTR(SObject) aAnimSObject = myStudy->FindObjectID((const char*)myAnimEntry.toLatin1());
if (!aAnimSObject) return;
_PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder();
_PTR(GenericAttribute) anAttr;
anAttr = aStudyBuilder->FindOrCreateAttribute(aAnimSObject, "AttributeString");
_PTR(AttributeString) aCmnt (anAttr);
- aCmnt->SetValue(aComment.latin1());
+ aCmnt->SetValue((const char*)aComment.toLatin1());
_PTR(ChildIterator) anIter = myStudy->NewChildIterator(aAnimSObject);
int i = 0, nbf = getNbFields();
Execute()
{
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* anApp = anIter.current()) {
- ++anIter;
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while ( anIter != anApplications.end() ) {
+ SUIT_Application* anApp = *anIter;
if (SUIT_Study* aSStudy = anApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
+ anIter++;
}
}
};
#include <vector>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qthread.h>
+#include <QObject>
+#include <QList>
+#include <QThread>
class SVTK_ViewWindow;
class VISU_Actor;
};
-class VISU_I_EXPORT VISU_TimeAnimation: public QObject, public QThread
+class VISU_I_EXPORT VISU_TimeAnimation: public QThread
{
Q_OBJECT;
void _emitFrameChanged(long theNewFrame, double theTime);
void _emitStopped();
- void parallelAnimation( bool& theIsDumping, QValueList<int>& theIndexList );
- void succcessiveAnimation( bool& theIsDumping, QValueList<int>& theIndexList );
- void saveImages( int theFieldId, double& theOneVal, int& theNbFiles, QValueList<int>& theIndexList );
+ void parallelAnimation( bool& theIsDumping, QList<int>& theIndexList );
+ void succcessiveAnimation( bool& theIsDumping, QList<int>& theIndexList );
+ void saveImages( int theFieldId, double& theOneVal, int& theNbFiles, QList<int>& theIndexList );
public:
//static VISU::Result_i* createPresent (SALOMEDS::SObject_var theField);
private:
QString myLastError;
- QValueList<FieldData> myFieldsLst;
+ QList<FieldData> myFieldsLst;
VISU::ExecutionState* myExecutionState;
long myFrame;
std::vector<long> myFieldsAbsFrames;
#include "VISU_Convertor.hxx"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include <vtkProperty.h>
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
-#include <qapplication.h>
+#include <QApplication>
using namespace std;
{
MESSAGE("Find application for study with id = : " << myStudyId);
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* anApp = anIter.current()) {
- ++anIter;
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while ( anIter != anApplications.end() ) {
+ SUIT_Application* anApp = *anIter;
if (SUIT_Study* aSStudy = anApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
+ anIter++;
}
if (!myResult) {
//MESSAGE("Error: application is not found for study : " << myStudyName);
if(MYDEBUG) MESSAGE("UpdatePlot2d - theDisplaying = " << theDisplaying);
if (!theView)
return;
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
theView->getCurves(clist);
if (theDisplaying == eEraseAll) {
for (int i = 0; i < clist.count(); i++) {
aSPlot2dC->setData( xList, yList, nbPoints, zList );
}
if (!theCurve->IsAuto()) {
- aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(),
+ aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(),
theCurve->GetLineWidth());
- aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
+ aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
SALOMEDS::Color color = theCurve->GetColor();
aSPlot2dC->setColor(QColor((int)(color.R*255.),
(int)(color.G*255.),
aSPlot2dC->setData( xList, yList, nbPoints, zList );
}
if ( !theCurve->IsAuto() ) {
- aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
- aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
+ aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
+ aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
SALOMEDS::Color color = theCurve->GetColor();
aSPlot2dC->setColor(QColor((int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.)));
}
CORBA::String_var studyName = myStudyDocument->Name();
std::string aStudyName = studyName.in();
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* aSUITApp = anIter.current()) {
- ++anIter;
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while ( anIter != anApplications.end() ) {
+ SUIT_Application* aSUITApp = *anIter;
if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
+ anIter++;
}
if (!anApp)
return;
// 3. Remove Actors
ViewManagerList aViewManagerList;
anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
- QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
- for (; anVMIter.current(); ++anVMIter) {
- SUIT_ViewManager* aViewManager = anVMIter.current();
- QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+ for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
+ SUIT_ViewManager* aViewManager = *anVMIter;
+ QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
Plot2d_ViewFrame* vf = vw->getViewFrame();
- QList<Plot2d_Curve> clist;
+ QList<Plot2d_Curve*> clist;
vf->getCurves(clist);
for (int i = 0; i < clist.count(); i++) {
if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
CORBA::String_var studyName = myStudyDocument->Name();
std::string aStudyName = studyName.in();
SUIT_Session* aSession = SUIT_Session::session();
- QPtrList<SUIT_Application> anApplications = aSession->applications();
- QPtrListIterator<SUIT_Application> anIter (anApplications);
- while (SUIT_Application* aSUITApp = anIter.current()) {
- ++anIter;
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while (anIter != anApplications.end()) {
+ SUIT_Application* aSUITApp = *anIter;
if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
}
}
}
+ anIter++;
}
if (!anApp)
return;
// 3. Remove Actors
ViewManagerList aViewManagerList;
anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
- QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
- for (; anVMIter.current(); ++anVMIter) {
- SUIT_ViewManager* aViewManager = anVMIter.current();
- QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+ QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+ for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
+ SUIT_ViewManager* aViewManager = *anVMIter;
+ QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
#include "VISU_Actor.h"
#include "VISU_ScalarMapAct.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_ViewManager.h"
#include "SalomeApp_Study.h"
#include <QtxWorkstack.h>
+#include <QtxWorkspace.h>
-#include <qworkspace.h>
-#include <qimage.h>
+#include <QWorkspace>
+#include <QImage>
#include <vtkCamera.h>
#include <vtkRenderer.h>
ViewManagerList::const_iterator anIt = mgrs.begin(), aLast = mgrs.end();
for( ; anIt!=aLast; anIt++ )
{
- const QPtrVector<SUIT_ViewWindow>& views = (*anIt)->getViews();
+ const QVector<SUIT_ViewWindow*>& views = (*anIt)->getViews();
for( int i=0; i<views.count(); i++ )
views[i]->setShown( myState );
}
ViewManagerList::const_iterator anIt = aViewManagerList.begin();
for( ; anIt != aViewManagerList.end(); anIt++ )
{
- const QPtrVector<SUIT_ViewWindow>& views = (*anIt)->getViews();
+ const QVector<SUIT_ViewWindow*>& views = (*anIt)->getViews();
for( int i=0; i<views.count(); i++ ) {
- myResult = views[i]->isShown();
+ myResult = views[i]->isVisible();
return;
}
}
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
- Qt::Horizontal, QtxWorkstack::SPLIT_MOVE));
+ Qt::Horizontal, QtxWorkstack::SplitMove));
}
void
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
- Qt::Horizontal, QtxWorkstack::SPLIT_STAY));
+ Qt::Horizontal, QtxWorkstack::SplitStay));
}
void
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
- Qt::Vertical, QtxWorkstack::SPLIT_MOVE));
+ Qt::Vertical, QtxWorkstack::SplitMove));
}
void
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
- Qt::Vertical, QtxWorkstack::SPLIT_STAY));
+ Qt::Vertical, QtxWorkstack::SplitStay));
}
void
void
Execute()
{
- if (QWidget* aParent = myVW->parentWidget(true)) {
+ if (QWidget* aParent = myVW->parentWidget()) {
QRect aQRect = aParent->frameGeometry();
(aQRect.*myAction)(mySize);
aParent->setGeometry(aQRect);
void
Execute()
{
- if(QWidget* aParent = myVW->parentWidget(true)){
+ if(QWidget* aParent = myVW->parentWidget()){
QRect aQRect = aParent->frameGeometry();
myResult = (aQRect.*myAction)();
}
class TAlignEvent: public TWorkspaceEvent
{
protected:
- Qt::AlignmentFlags myAligment;
+ Qt::AlignmentFlag myAligment;
public:
TAlignEvent(QWidget* theViewWindow,
QWidget* theWorkspace,
- Qt::AlignmentFlags theAligment):
+ Qt::AlignmentFlag theAligment):
TWorkspaceEvent(theViewWindow,theWorkspace),
myAligment(theAligment)
{}
void
Execute()
{
- if(QWidget* aParent = myVW->parentWidget(true))
+ if(QWidget* aParent = myVW->parentWidget())
SUIT_Tools::alignWidget(aParent,myWorkspace,myAligment);
}
};
void
Execute()
{
- if(QWidget* aParent = myVW->parentWidget(true))
+ if(QWidget* aParent = myVW->parentWidget())
aParent->move(int(myX*myWorkspace->width()),int(myY*myWorkspace->height()));
}
};
void
Execute()
{
- if(QWidget* aParent = myVW->parentWidget(true))
+ if(QWidget* aParent = myVW->parentWidget())
aParent->setGeometry(aParent->x(),
aParent->y(),
int(myX*myWorkspace->width()),
aColor[0] = int(255.0*myColor.R);
aColor[1] = int(255.0*myColor.G);
aColor[2] = int(255.0*myColor.B);
- myWidget->setBackgroundColor(QColor(aColor[0],aColor[1],aColor[2]));
+ QPalette aPal( myWidget->palette() );
+ aPal.setColor( myWidget->backgroundRole(), QColor(aColor[0],aColor[1],aColor[2]) );
+ myWidget->setPalette( aPal );
+ //myWidget->setBackgroundColor(QColor(aColor[0],aColor[1],aColor[2]));
}
};
void
Execute()
{
- const QColor& aColor = myWidget->backgroundColor();
+ const QColor& aColor = myWidget->palette().color( myWidget->backgroundRole() );
myResult.R = aColor.red()/255.0;
myResult.G = aColor.green()/255.0;
myResult.B = aColor.blue()/255.0;
if (!img.isNull()) {
QString fileName (myFileName);
if (!fileName.isEmpty()) {
- QString fmt = SUIT_Tools::extension(fileName).upper();
+ QString fmt = SUIT_Tools::extension(fileName).toUpper();
if (fmt.isEmpty()) fmt = QString("BMP"); // default format
if (fmt == "JPG" ) fmt = "JPEG";
//QApplication::setOverrideCursor(Qt::waitCursor);
- img.save(fileName, fmt.latin1());
+ img.save(fileName, fmt.toLatin1());
myResult = true;
//QApplication::restoreOverrideCursor();
}
SUIT_ViewWindow* View_i::GetViewWindow()
{
if (myViewWindow) {
- QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
- int aPos = aViews.find(myViewWindow);
+ QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
+ int aPos = aViews.indexOf(myViewWindow);
if (aPos < 0)
myViewWindow = NULL;
}
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TVoidMemFun1ArgEvent<SUIT_ViewWindow,const QString&,QString>
- (aVW, &SUIT_ViewWindow::setCaption, QString(theTitle)));
+ (aVW, &SUIT_ViewWindow::setWindowTitle, QString(theTitle)));
}
char* XYPlot_i::GetTitle()
{
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
- return CORBA::string_dup(aVW->caption().latin1());
+ return CORBA::string_dup( (const char*)aVW->windowTitle().toLatin1());
return CORBA::string_dup("");
}
char* XYPlot_i::GetSubTitle()
{
if (GetViewWindow())
- return CORBA::string_dup(myView->getTitle());
+ return CORBA::string_dup((const char*)myView->getTitle().toLatin1());
return CORBA::string_dup("");
}
char* XYPlot_i::GetXTitle()
{
if (GetViewWindow())
- return CORBA::string_dup(myView->getTitle(Plot2d_ViewFrame::XTitle));
+ return CORBA::string_dup((const char*)myView->getTitle(Plot2d_ViewFrame::XTitle).toLatin1());
return CORBA::string_dup("");
}
char* XYPlot_i::GetYTitle()
{
if (GetViewWindow())
- return CORBA::string_dup(myView->getTitle(Plot2d_ViewFrame::YTitle));
+ return CORBA::string_dup((const char*)myView->getTitle(Plot2d_ViewFrame::YTitle).toLatin1());
return CORBA::string_dup("");
}
void TableView_i::SetTitle (const char* theTitle)
{
ProcessVoidEvent(new TVoidMemFun1ArgEvent<VisuGUI_TableDlg,const QString&,QString>
- (myView, &VisuGUI_TableDlg::setCaption, QString(theTitle)));
+ (myView, &VisuGUI_TableDlg::setWindowTitle, QString(theTitle)));
}
char* TableView_i::GetTitle()
{
//jfa: may be need to be enclosed in SALOME_Event?
- return CORBA::string_dup(myView->caption().latin1());
+ return CORBA::string_dup((const char*)myView->windowTitle().toLatin1());
}
void TableView_i::Close()
Storable::StrToMap(strIn, aMap);
if (Storable::FindValue(aMap, "myComment").compare
(View3D_i::myComment.c_str()) >= 0) {
- if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - aComm = " << strIn);
+ if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - aComm = " << (const char*)strIn.toLatin1());
Restore(theViewManager->getActiveView(), aMap);
return true;
}
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
ProcessVoidEvent(new TVoidMemFun1ArgEvent<SUIT_ViewWindow,const QString&,QString>
- (aVW,&SUIT_ViewWindow::setCaption,QString(theTitle)));
+ (aVW,&SUIT_ViewWindow::setWindowTitle,QString(theTitle)));
}
char* View3D_i::GetTitle()
{
SUIT_ViewWindow* aVW = GetViewWindow();
if (aVW)
- return CORBA::string_dup(aVW->caption().latin1());
+ return CORBA::string_dup((const char*)aVW->windowTitle().toLatin1());
return CORBA::string_dup("");
}
#include "VVTK_ImageWriter.h"
-#include <qsemaphore.h>
+#include <QSemaphore>
#include <vtkImageData.h>
#include <vtkImageClip.h>
if(MYDEBUG) cout<<"VVTK_ImageWriter::run "<<
"- this = "<<this<<
- "; total = "<<mySemaphore->total()<<
+ //"; total = "<<mySemaphore->total()<<
"; available = "<<mySemaphore->available()<<endl;
- *mySemaphore -= 1;
+ mySemaphore->release();
}
#include <vtkImageData.h>
-#include <qsemaphore.h>
+#include <QSemaphore>
#include <limits>
{
int aMax = std::numeric_limits<int>::max() / 2;
mySemaphore = new QSemaphore(aMax);
- *mySemaphore += aMax;
+ mySemaphore->acquire( aMax );
if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::VVTK_ImageWriterMgr "<<
- "- total = "<<mySemaphore->total()<<
+ //"- total = "<<mySemaphore->total()<<
"; available = "<<mySemaphore->available()<<endl;
}
::Stop()
{
if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop "<<
- "- total = "<<mySemaphore->total()<<
+ //"- total = "<<mySemaphore->total()<<
"; available = "<<mySemaphore->available()<<endl;
if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop - *mySemaphore += "<<myThreads.size()<<endl;
- *mySemaphore += myThreads.size();
+ mySemaphore->acquire( myThreads.size() );
for(size_t anId = 0, anEnd = myThreads.size(); anId < anEnd; anId++){
VVTK_ImageWriter* anImageWriter = myThreads[anId];
#include "SUIT_Tools.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_ResourceMgr.h"
-#include "SUIT_ToolButton.h"
#include "SUIT_Accel.h"
#include "SUIT_MessageBox.h"
#include "QtxAction.h"
+#include "QtxMultiAction.h"
-#include <qimage.h>
-#include <qtoolbar.h>
-#include <qsplitter.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
+#include <QImage>
+#include <QToolBar>
+#include <QSplitter>
+#include <QFileDialog>
+#include <QApplication>
//----------------------------------------------------------------------------
VVTK_MainWindow
myInteractorStyle->Delete();
- moveDockWindow(myToolBar,Qt::DockLeft);
- myActionsMap[NonIsometric]->removeFrom(myToolBar);
+ addToolBar( Qt::LeftToolBarArea, myToolBar );
+ //TO DO:
+ //myActionsMap[NonIsometric]->removeFrom(myToolBar);
// Recording
- myRecordingToolBar = new QToolBar(this);
- myRecordingToolBar->setCloseMode(QDockWindow::Undocked);
- myRecordingToolBar->setLabel(tr("LBL_TOOLBAR_RECORD_LABEL"));
- moveDockWindow(myRecordingToolBar,Qt::DockLeft);
+ myRecordingToolBar = new QToolBar(tr("LBL_TOOLBAR_RECORD_LABEL"), this);
+ addToolBar(Qt::LeftToolBarArea, myRecordingToolBar );
myStartAction = new QtxAction(tr("MNU_VVTK_RECORDING_START"),
theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_START" ) ),
tr( "MNU_VVTK_RECORDING_START" ), 0, this);
myStartAction->setStatusTip(tr("DSC_VVTK_RECORDING_START"));
- myStartAction->addTo( myRecordingToolBar );
- connect( myStartAction, SIGNAL( activated() ), this, SLOT( OnStartRecording() ) );
+ //myStartAction->addTo( myRecordingToolBar );
+ myRecordingToolBar->addAction( myStartAction );
+ connect( myStartAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnStartRecording() ) );
myPlayAction = new QtxAction(tr("MNU_VVTK_RECORDING_PLAY"),
theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_PLAY" ) ),
tr( "MNU_VVTK_RECORDING_PLAY" ), 0, this);
myPlayAction->setStatusTip(tr("DSC_VVTK_RECORDING_PLAY"));
myPlayAction->setEnabled( false );
- myPlayAction->addTo( myRecordingToolBar );
- connect( myPlayAction, SIGNAL( activated() ), this, SLOT( OnPlayRecording() ) );
+ //myPlayAction->addTo( myRecordingToolBar );
+ myRecordingToolBar->addAction( myPlayAction );
+ connect( myPlayAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnPlayRecording() ) );
myPauseAction = new QtxAction(tr("MNU_VVTK_RECORDING_PAUSE"),
theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_PAUSE" ) ),
tr( "MNU_VVTK_RECORDING_PAUSE" ), 0, this);
myPauseAction->setStatusTip(tr("DSC_VVTK_RECORDING_PAUSE"));
myPauseAction->setEnabled( false );
- myPauseAction->addTo( myRecordingToolBar );
- connect( myPauseAction, SIGNAL( activated() ), this, SLOT( OnPauseRecording() ) );
+ //myPauseAction->addTo( myRecordingToolBar );
+ myRecordingToolBar->addAction( myPauseAction );
+ connect( myPauseAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnPauseRecording() ) );
myStopAction = new QtxAction(tr("MNU_VVTK_RECORDING_STOP"),
theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_STOP" ) ),
tr( "MNU_VVTK_RECORDING_STOP" ), 0, this);
myStopAction->setStatusTip(tr("DSC_VVTK_RECORDING_STOP"));
myStopAction->setEnabled( false );
- myStopAction->addTo( myRecordingToolBar );
- connect( myStopAction, SIGNAL( activated() ), this, SLOT( OnStopRecording() ) );
+ //myStopAction->addTo( myRecordingToolBar );
+ myRecordingToolBar->addAction( myStopAction );
+ connect( myStopAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnStopRecording() ) );
myRecorder = VVTK_Recorder::New();
//myRecorder->CheckExistAVIMaker();
if( fileName.isEmpty() )
return;
- QString fmt = SUIT_Tools::extension( fileName ).upper();
+ QString fmt = SUIT_Tools::extension( fileName ).toUpper();
if( fmt.isEmpty() )
fmt = QString( "BMP" ); // default format
else if( fmt == "JPG" )
fmt = "JPEG";
- QApplication::setOverrideCursor( Qt::waitCursor );
- img.save( fileName, fmt.latin1() );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ img.save( fileName, fmt.toLatin1() );
QApplication::restoreOverrideCursor();
}
{
myRecorder->CheckExistAVIMaker();
if (myRecorder->ErrorStatus()) {
- SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+ SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER") );
}
else {
VVTK_RecorderDlg* aRecorderDlg = new VVTK_RecorderDlg( this, myRecorder );
mySplitter(theParent),
myPickingDlg(NULL)
{
- myPtsToolBar = new QToolBar(this);
- myPtsToolBar->setCloseMode(QDockWindow::Undocked);
- myPtsToolBar->setLabel(tr("LBL_TOOLBAR_GAUSS_LABEL"));
- moveDockWindow(myPtsToolBar,Qt::DockLeft);
+ myPtsToolBar = new QToolBar( tr("LBL_TOOLBAR_GAUSS_LABEL"), this );
+ addToolBar( Qt::LeftToolBarArea, myPtsToolBar );
QPixmap aPixmap;
QtxAction* anAction;
tr( "MNU_VVTK_INTERACTOR_STYLE_SWITCH" ),
0,
this,
- "VVTK/SVTK StyleSwitch",
+ //"VVTK/SVTK StyleSwitch",
true);
- anAction->setToggleAction(true);
+ anAction->setCheckable(true);
anAction->setStatusTip(tr("DSC_VVTK_INTERACTOR_STYLE_SWITCH"));
- anAction->addTo( myPtsToolBar );
+ myPtsToolBar->addAction( anAction );
myStyleSwitchAction = anAction;
if( theResourceMgr->integerValue( "VISU", "mouse_behaviour", true ) == 1 )
tr( "MNU_VVTK_SELECTION_MODE_SWITCH" ),
0,
this,
- "VVTK/SVTK SelectionSwitch",
+ //"VVTK/SVTK SelectionSwitch",
true);
- myPickingAction->setToggleAction(true);
+ myPickingAction->setCheckable(true);
myPickingAction->setStatusTip(tr("DSC_VVTK_SELECTION_MODE_SWITCH"));
- myPickingAction->addTo( myPtsToolBar );
+ myPtsToolBar->addAction( myPickingAction );
connect(myPickingAction, SIGNAL(toggled(bool)), this, SLOT(OnSelectionModeSwitch(bool)));
myPickingDlg = new VVTK_PickingDlg( myPickingAction, this, "PickingDlg" );
tr( "MNU_VVTK_PLANE_SEGMENTATION_SWITCH" ),
0,
this,
- "VVTK/SVTK PlaneSegmentationSwitch",
+ //"VVTK/SVTK PlaneSegmentationSwitch",
true);
- myPlaneSegmentationAction->setToggleAction(true);
+ myPlaneSegmentationAction->setCheckable(true);
myPlaneSegmentationAction->setStatusTip(tr("DSC_VVTK_PLANE_SEGMENTATION_SWITCH"));
//myPlaneSegmentationAction->addTo( myPtsToolBar );
- connect( myPlaneSegmentationAction, SIGNAL( activated() ), this, SLOT( OnSegmentationSwitch() ) );
+ connect( myPlaneSegmentationAction, SIGNAL( triggered() ), this, SLOT( OnSegmentationSwitch() ) );
aPixmap = theResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_SPHERE_SEGMENTATION_SWITCH"));
mySphereSegmentationAction = new QtxAction(tr("MNU_VVTK_SPHERE_SEGMENTATION_SWITCH"),
tr( "MNU_VVTK_SPHERE_SEGMENTATION_SWITCH" ),
0,
this,
- "VVTK/SVTK SphereSegmentationSwitch",
+ //"VVTK/SVTK SphereSegmentationSwitch",
true);
- mySphereSegmentationAction->setToggleAction(true);
+ mySphereSegmentationAction->setCheckable(true);
mySphereSegmentationAction->setStatusTip(tr("DSC_VVTK_SPHERE_SEGMENTATION_SWITCH"));
//mySphereSegmentationAction->addTo( myPtsToolBar );
connect( mySphereSegmentationAction, SIGNAL( activated() ), this, SLOT( OnSegmentationSwitch() ) );
mySegmentationCursorDlg->SetSphereAction( mySphereSegmentationAction );
connect( mySegmentationCursorDlg, SIGNAL( scgClose() ), this, SLOT( OnSegmentationSwitch() ) );
- SUIT_ToolButton* aSegmentationButton = new SUIT_ToolButton( myPtsToolBar );
- aSegmentationButton->AddAction( myPlaneSegmentationAction );
- aSegmentationButton->AddAction( mySphereSegmentationAction );
+ //SUIT_ToolButton* aSegmentationButton = new SUIT_ToolButton( myPtsToolBar );
+ QtxMultiAction* aSegmentationAction = new QtxMultiAction( this );
+ aSegmentationAction->insertAction( myPlaneSegmentationAction );
+ aSegmentationAction->insertAction( mySphereSegmentationAction );
+ myPtsToolBar->addAction( aSegmentationAction );
}
void
myRenderer = theRenderer;
VVTK_MainWindow::Initialize(theInteractor);
- if( myStyleSwitchAction->isOn() )
+ if( myStyleSwitchAction->isEnabled() )
PushInteractorStyle(myInteractorStyle.GetPointer());
connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
::OnSelectionChanged()
{
Selection_Mode aSelectionMode = SelectionMode();
- if(myPickingAction->isOn() && aSelectionMode != GaussPointSelection)
- myPickingAction->setOn(false);
- else if(!myPickingAction->isOn() && aSelectionMode == GaussPointSelection)
- myPickingAction->setOn(true);
+ if(myPickingAction->isEnabled() && aSelectionMode != GaussPointSelection)
+ myPickingAction->setEnabled(false);
+ else if(!myPickingAction->isEnabled() && aSelectionMode == GaussPointSelection)
+ myPickingAction->setEnabled(true);
}
VVTK_MainWindow1
::SetPlanesSegementation(bool theIsOn)
{
- myPlaneSegmentationAction->setOn( theIsOn );
+ myPlaneSegmentationAction->setEnabled( theIsOn );
OnSegmentationSwitch(myPlaneSegmentationAction);
}
VVTK_MainWindow1
::SetSphereSegementation(bool theIsOn)
{
- mySphereSegmentationAction->setOn( theIsOn );
+ mySphereSegmentationAction->setEnabled( theIsOn );
OnSegmentationSwitch(mySphereSegmentationAction);
}
VVTK_MainWindow1
::OnSegmentationSwitch(QtxAction* theAction)
{
- bool anIsSegmentationOn = myPlaneSegmentationAction->isOn() ||
- mySphereSegmentationAction->isOn();
+ bool anIsSegmentationOn = myPlaneSegmentationAction->isEnabled() ||
+ mySphereSegmentationAction->isEnabled();
if( !theAction )
return;
aWidgetCtrl->SetEnabled(anIsSegmentationOn);
if( theAction == myPlaneSegmentationAction && anIsSegmentationOn )
- mySphereSegmentationAction->setOn( false );
+ mySphereSegmentationAction->setEnabled( false );
else if( theAction == mySphereSegmentationAction && anIsSegmentationOn )
- myPlaneSegmentationAction->setOn( false );
+ myPlaneSegmentationAction->setEnabled( false );
if( anIsSegmentationOn )
{
{
VVTK_MainWindow::Initialize(theInteractor);
- if( myStyleSwitchAction->isOn() )
+ if( myStyleSwitchAction->isEnabled() )
PushInteractorStyle(myInteractorStyle.GetPointer());
connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
}
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
+#include "CAM_Module.h"
+
#include "SVTK_MainWindow.h"
#include "SVTK_RenderWindowInteractor.h"
#include "utilities.h"
-#include <qcheckbox.h>
-#include <qcolordialog.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
+#include <QCheckBox>
+#include <QColorDialog>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QPushButton>
+#include <QVBoxLayout>
+#include <QKeyEvent>
#include "QtxAction.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
#include "QtxIntSpinBox.h"
+#include "QtxColorButton.h"
#include "LightApp_Application.h"
myEventCallbackCommand->SetClientData(this);
myEventCallbackCommand->SetCallback(VVTK_PickingDlg::ProcessEvents);
- setCaption( tr( "PICKING_DLG_TITLE" ) );
+ setWindowTitle( tr( "PICKING_DLG_TITLE" ) );
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout( this );
TopLayout->setSpacing(6);
TopLayout->setMargin(11);
- QVBox* aBox = new QVBox( this );
- aBox->setMargin(0);
- aBox->setSpacing(6);
+ QWidget* aBox = new QWidget( this );
+ QVBoxLayout* BoxLayout = new QVBoxLayout( aBox );
+ BoxLayout->setMargin(0);
+ BoxLayout->setSpacing(6);
// Cursor
- QGroupBox* CursorGroup = new QGroupBox( tr( "CURSOR_TITLE" ), aBox, "CursorGroup" );
- CursorGroup->setColumnLayout(0, Qt::Vertical );
- CursorGroup->layout()->setSpacing( 0 );
- CursorGroup->layout()->setMargin( 0 );
+ QGroupBox* CursorGroup = new QGroupBox( tr( "CURSOR_TITLE" ), aBox );
+ //CursorGroup->setColumnLayout(0, Qt::Vertical );
+ //CursorGroup->layout()->setSpacing( 0 );
+ //CursorGroup->layout()->setMargin( 0 );
- QGridLayout* CursorGroupLayout = new QGridLayout (CursorGroup->layout());
+ QGridLayout* CursorGroupLayout = new QGridLayout (CursorGroup);
CursorGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
CursorGroupLayout->setSpacing(6);
CursorGroupLayout->setMargin(11);
QLabel* CursorSizeLabel = new QLabel( tr( "CURSOR_SIZE" ), CursorGroup );
- myCursorSizeSpinBox = new QtxDblSpinBox( 0, 1, 0.1, CursorGroup );
+ myCursorSizeSpinBox = new QtxDoubleSpinBox( 0, 1, 0.1, CursorGroup );
myCursorSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* PyramidHeightLabel = new QLabel( tr( "PYRAMID_HEIGHT" ), CursorGroup );
double aHeightMin=1.e-7;
double aHeightMax=10.;
double aHeightStep=0.1;
- myPyramidHeightSpinBox = new QtxDblSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
+ myPyramidHeightSpinBox = new QtxDoubleSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
myPyramidHeightSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* SelectionColorLabel = new QLabel( tr( "SELECTION_COLOR" ), CursorGroup );
- mySelectionColorButton = new QPushButton( CursorGroup );
- mySelectionColorButton->setPaletteBackgroundColor( Qt::blue );
- mySelectionColorButton->setPaletteForegroundColor( Qt::blue );
- connect( mySelectionColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
+ mySelectionColorButton = new QtxColorButton( CursorGroup );
+ mySelectionColorButton->setColor( Qt::blue );
+ //QPalette aPalette( mySelectionColorButton->palette() );
+ //aPalette.setColor( mySelectionColorButton->backgroundRole(), Qt::blue );
+ //mySelectionColorButton->setPalette( aPalette );
+ //connect( mySelectionColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
CursorGroupLayout->addWidget( CursorSizeLabel, 0, 0 );
CursorGroupLayout->addWidget( myCursorSizeSpinBox, 0, 1 );
CursorGroupLayout->addWidget( SelectionColorLabel, 2, 0 );
CursorGroupLayout->addWidget( mySelectionColorButton, 2, 1 );
+ BoxLayout->addWidget( CursorGroup );
+
// Tolerance
- QGroupBox* ToleranceGroup = new QGroupBox( tr( "TOLERANCE_TITLE" ), aBox, "ToleranceGroup" );
- ToleranceGroup->setColumnLayout(0, Qt::Vertical );
- ToleranceGroup->layout()->setSpacing( 0 );
- ToleranceGroup->layout()->setMargin( 0 );
+ QGroupBox* ToleranceGroup = new QGroupBox( tr( "TOLERANCE_TITLE" ), aBox );
+ //ToleranceGroup->setColumnLayout(0, Qt::Vertical );
+ //ToleranceGroup->layout()->setSpacing( 0 );
+ //ToleranceGroup->layout()->setMargin( 0 );
- QGridLayout* ToleranceGroupLayout = new QGridLayout (ToleranceGroup->layout());
+ QGridLayout* ToleranceGroupLayout = new QGridLayout (ToleranceGroup);
ToleranceGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
ToleranceGroupLayout->setSpacing(6);
ToleranceGroupLayout->setMargin(11);
QLabel* PointToleranceLabel = new QLabel( tr( "POINT_TOLERANCE" ), ToleranceGroup );
- myPointToleranceSpinBox = new QtxDblSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
+ myPointToleranceSpinBox = new QtxDoubleSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
myPointToleranceSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ToleranceGroupLayout->addWidget( PointToleranceLabel, 0, 0 );
ToleranceGroupLayout->addWidget( myPointToleranceSpinBox, 0, 1 );
+ BoxLayout->addWidget( ToleranceGroup );
+
// Information window
- QGroupBox* InfoWindowGroup = new QGroupBox( tr( "INFO_WINDOW_TITLE" ), aBox, "InfoWindowGroup" );
- InfoWindowGroup->setColumnLayout(0, Qt::Vertical );
- InfoWindowGroup->layout()->setSpacing( 0 );
- InfoWindowGroup->layout()->setMargin( 0 );
+ QGroupBox* InfoWindowGroup = new QGroupBox( tr( "INFO_WINDOW_TITLE" ), aBox );
+ //InfoWindowGroup->setColumnLayout(0, Qt::Vertical );
+ //InfoWindowGroup->layout()->setSpacing( 0 );
+ //InfoWindowGroup->layout()->setMargin( 0 );
- QGridLayout* InfoWindowGroupLayout = new QGridLayout (InfoWindowGroup->layout());
+ QGridLayout* InfoWindowGroupLayout = new QGridLayout (InfoWindowGroup);
InfoWindowGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
InfoWindowGroupLayout->setSpacing(6);
InfoWindowGroupLayout->setMargin(11);
myPositionComboBox = new QComboBox( InfoWindowGroup );
myPositionComboBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myPositionComboBox->insertItem( tr( "BELOW_POINT" ) );
- myPositionComboBox->insertItem( tr( "TOP_LEFT_CORNER" ) );
+ myPositionComboBox->addItem( tr( "BELOW_POINT" ) );
+ myPositionComboBox->addItem( tr( "TOP_LEFT_CORNER" ) );
InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 );
InfoWindowGroupLayout->addWidget( myTransparencySpinBox, 0, 1 );
InfoWindowGroupLayout->addWidget( PositionLabel, 1, 0 );
InfoWindowGroupLayout->addWidget( myPositionComboBox, 1, 1 );
+ BoxLayout->addWidget( InfoWindowGroup );
+
// Movement of the camera
- QGroupBox* CameraGroup = new QGroupBox( tr( "CAMERA_TITLE" ), aBox, "CameraGroup" );
- CameraGroup->setColumnLayout(0, Qt::Vertical );
- CameraGroup->layout()->setSpacing( 0 );
- CameraGroup->layout()->setMargin( 0 );
+ QGroupBox* CameraGroup = new QGroupBox( tr( "CAMERA_TITLE" ), aBox );
+ //CameraGroup->setColumnLayout(0, Qt::Vertical );
+ //CameraGroup->layout()->setSpacing( 0 );
+ //CameraGroup->layout()->setMargin( 0 );
- QGridLayout* CameraGroupLayout = new QGridLayout (CameraGroup->layout());
+ QGridLayout* CameraGroupLayout = new QGridLayout (CameraGroup);
CameraGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
CameraGroupLayout->setSpacing(6);
CameraGroupLayout->setMargin(11);
QLabel* ZoomFactorLabel = new QLabel( tr( "ZOOM_FACTOR" ), CameraGroup );
- myZoomFactorSpinBox = new QtxDblSpinBox( 0.1, 10.0, 0.1, CameraGroup );
+ myZoomFactorSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1, CameraGroup );
myZoomFactorSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* StepNumberLabel = new QLabel( tr( "STEP_NUMBER" ), CameraGroup );
CameraGroupLayout->addWidget( StepNumberLabel, 1, 0 );
CameraGroupLayout->addWidget( myStepNumberSpinBox, 1, 1 );
+ BoxLayout->addWidget( CameraGroup );
+
// Display parent mesh element
- QGroupBox* ParentMeshGroup = new QGroupBox( tr( "PARENT_MESH_TITLE" ), aBox, "ParentMeshGroup" );
- ParentMeshGroup->setColumnLayout(0, Qt::Vertical );
- ParentMeshGroup->layout()->setSpacing( 0 );
- ParentMeshGroup->layout()->setMargin( 0 );
+ QGroupBox* ParentMeshGroup = new QGroupBox( tr( "PARENT_MESH_TITLE" ), aBox );
+ //ParentMeshGroup->setColumnLayout(0, Qt::Vertical );
+ //ParentMeshGroup->layout()->setSpacing( 0 );
+ //ParentMeshGroup->layout()->setMargin( 0 );
- QGridLayout* ParentMeshGroupLayout = new QGridLayout (ParentMeshGroup->layout());
+ QGridLayout* ParentMeshGroupLayout = new QGridLayout (ParentMeshGroup);
ParentMeshGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
ParentMeshGroupLayout->setSpacing(6);
ParentMeshGroupLayout->setMargin(11);
myDisplayParentMeshCheckBox = new QCheckBox( tr( "DISPLAY_PARENT_MESH" ), ParentMeshGroup );
ParentMeshGroupLayout->addWidget( myDisplayParentMeshCheckBox, 0, 0 );
+ BoxLayout->addWidget( ParentMeshGroup );
+
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons, "buttonApply" );
+ QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons );
buttonApply->setAutoDefault( TRUE );
buttonApply->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonApply, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons, "buttonClose" );
+ QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons );
buttonClose->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
myPyramidHeightSpinBox->setValue( myPickingSettings->GetPyramidHeight() );
myPointToleranceSpinBox->setValue( myPickingSettings->GetPointTolerance() );
myTransparencySpinBox->setValue( int(myPickingSettings->GetInfoWindowTransparency() * 100.0) );
- myPositionComboBox->setCurrentItem( myPickingSettings->GetInfoWindowPosition() );
+ myPositionComboBox->setCurrentIndex( myPickingSettings->GetInfoWindowPosition() );
myZoomFactorSpinBox->setValue( myPickingSettings->GetZoomFactor() );
myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
vtkFloatingPointType* aColor = myPickingSettings->GetColor();
- mySelectionColorButton->setPaletteBackgroundColor( QColor( ( int )( aColor[0] * 255.0 ),
- ( int )( aColor[1] * 255.0 ),
- ( int )( aColor[2] * 255.0 ) ) );
-
+
+ //QPalette aPalette( mySelectionColorButton->palette() );
+ /*aPalette.setColor( mySelectionColorButton->backgroundRole(),
+ QColor( ( int )( aColor[0] * 255.0 ),
+ ( int )( aColor[1] * 255.0 ),
+ ( int )( aColor[2] * 255.0 ) ) );
+ mySelectionColorButton->setPalette( aPalette );*/
+ mySelectionColorButton->setColor(
+ QColor( ( int )( aColor[0] * 255.0 ),
+ ( int )( aColor[1] * 255.0 ),
+ ( int )( aColor[2] * 255.0 ) ) );
+
return;
}
myPointToleranceSpinBox->setValue( aPointTolerance );
aColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", aColor );
- mySelectionColorButton->setPaletteBackgroundColor( aColor );
+ //QPalette aPalette( mySelectionColorButton->palette() );
+ //aPalette.setColor( mySelectionColorButton->backgroundRole(), aColor );
+ mySelectionColorButton->setColor( aColor );
anInfoWindowTransparency = aResourceMgr->integerValue( "VISU", "picking_transparency", anInfoWindowTransparency );
myTransparencySpinBox->setValue( anInfoWindowTransparency );
anInfoWindowPosition = aResourceMgr->integerValue( "VISU", "picking_position", anInfoWindowPosition );
- myPositionComboBox->setCurrentItem( anInfoWindowPosition );
+ myPositionComboBox->setCurrentIndex( anInfoWindowPosition );
aZoomFactor = aResourceMgr->doubleValue( "VISU", "picking_zoom_factor", aZoomFactor );
myZoomFactorSpinBox->setValue( aZoomFactor );
myPickingSettings->SetPyramidHeight( myPyramidHeightSpinBox->value() );
myPickingSettings->SetPointTolerance( myPointToleranceSpinBox->value() );
myPickingSettings->SetInfoWindowTransparency( myTransparencySpinBox->value() / 100.0 );
- myPickingSettings->SetInfoWindowPosition( myPositionComboBox->currentItem() );
+ myPickingSettings->SetInfoWindowPosition( myPositionComboBox->currentIndex() );
myPickingSettings->SetZoomFactor( myZoomFactorSpinBox->value() );
myPickingSettings->SetStepNumber( myStepNumberSpinBox->value() );
myPickingSettings->SetDisplayParentMesh( myDisplayParentMeshCheckBox->isChecked() );
- QColor aButtonColor = mySelectionColorButton->paletteBackgroundColor();
+ //QPalette aPalette( mySelectionColorButton->palette() );
+ QColor aButtonColor = mySelectionColorButton->color();//aPalette.color(mySelectionColorButton->backgroundRole() );
vtkFloatingPointType aColor[3];
aColor[0] = aButtonColor.red() / 255.0;
aColor[1] = aButtonColor.green() / 255.0;
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning( 0,
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
-void VVTK_PickingDlg::onColorButtonPressed()
+/*void VVTK_PickingDlg::onColorButtonPressed()
{
- QColor aColor = QColorDialog::getColor( mySelectionColorButton->paletteBackgroundColor(), this );
+ QPalette aPalette( mySelectionColorButton->palette() );
+ QColor aColor = QColorDialog::
+ getColor( aPalette.color(mySelectionColorButton->backgroundRole() ), this );
+
if( aColor.isValid() )
- mySelectionColorButton->setPaletteBackgroundColor( aColor );
-}
+ {
+ aPalette.setColor( mySelectionColorButton->backgroundRole(),
+ aColor );
+ mySelectionColorButton->setPalette( aPalette );
+ }
+}*/
void VVTK_PickingDlg::keyPressEvent( QKeyEvent* e )
{
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onClickHelp();
class QPushButton;
class QtxAction;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QtxIntSpinBox;
+class QtxColorButton;
class VISU_GaussPtsAct;
class VISU_PickingSettings;
void onClickClose();
void onClickHelp();
- void onColorButtonPressed();
+ //void onColorButtonPressed();
private:
static void ProcessEvents(vtkObject* theObject,
void keyPressEvent( QKeyEvent* e );
private:
- QtxDblSpinBox* myCursorSizeSpinBox;
- QtxDblSpinBox* myPyramidHeightSpinBox;
- QPushButton* mySelectionColorButton;
- QtxDblSpinBox* myPointToleranceSpinBox;
- QtxIntSpinBox* myTransparencySpinBox;
- QComboBox* myPositionComboBox;
- QtxDblSpinBox* myZoomFactorSpinBox;
- QtxIntSpinBox* myStepNumberSpinBox;
- QCheckBox* myDisplayParentMeshCheckBox;
-
- QtxAction* myAction;
- vtkSmartPointer<VISU_PickingSettings> myPickingSettings;
-
- SVTK_RenderWindowInteractor* myInteractor;
-
- float myPriority;
- vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
+ QtxDoubleSpinBox* myCursorSizeSpinBox;
+ QtxDoubleSpinBox* myPyramidHeightSpinBox;
+ QtxColorButton* mySelectionColorButton;
+ QtxDoubleSpinBox* myPointToleranceSpinBox;
+ QtxIntSpinBox* myTransparencySpinBox;
+ QComboBox* myPositionComboBox;
+ QtxDoubleSpinBox* myZoomFactorSpinBox;
+ QtxIntSpinBox* myStepNumberSpinBox;
+ QCheckBox* myDisplayParentMeshCheckBox;
+
+ QtxAction* myAction;
+ vtkSmartPointer<VISU_PickingSettings>
+ myPickingSettings;
+
+ SVTK_RenderWindowInteractor*
+ myInteractor;
+
+ float myPriority;
+ vtkSmartPointer<vtkCallbackCommand>
+ myEventCallbackCommand;
};
#endif
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
#include "QtxIntSpinBox.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QFileDialog>
#include <iostream>
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
setTitle( tr( "PRIMITIVE_TITLE" ) );
- setColumnLayout(0, Qt::Vertical );
- layout()->setSpacing( 0 );
- layout()->setMargin( 0 );
+ //setColumnLayout(0, Qt::Vertical );
+ //layout()->setSpacing( 0 );
+ //layout()->setMargin( 0 );
- QGridLayout* aLayout = new QGridLayout( layout() );
+ QGridLayout* aLayout = new QGridLayout( this );
aLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
aLayout->setSpacing(6);
aLayout->setMargin(11);
myAlphaTexture = aRootDir + "sprite_alpha.bmp";
// Primitive Type
- QButtonGroup* aPrimitiveTypeGroup = new QButtonGroup( 3, Qt::Horizontal, this, "PrimitiveTypeGroup" );
+ QGroupBox* aPrimitiveTypeGroup = new QGroupBox( this );
aPrimitiveTypeGroup->setMinimumWidth( 450 );
- aPrimitiveTypeGroup->setRadioButtonExclusive( true );
- aPrimitiveTypeGroup->setFrameStyle( QFrame::NoFrame );
- aPrimitiveTypeGroup->layout()->setMargin( 0 );
+ QHBoxLayout* aPrimLayout = new QHBoxLayout( aPrimitiveTypeGroup );
+ aPrimLayout->setMargin( 0 );
+
+ //QButtonGroup* aPrimitiveTypeGroup = new QButtonGroup( 3, Qt::Horizontal, this, "PrimitiveTypeGroup" );
+ //aPrimitiveTypeGroup->setMinimumWidth( 450 );
+ //aPrimitiveTypeGroup->setRadioButtonExclusive( true );
+ //aPrimitiveTypeGroup->setFrameStyle( QFrame::NoFrame );
+ //aPrimitiveTypeGroup->layout()->setMargin( 0 );
myPointSpriteButton = new QRadioButton( tr( "POINT_SPRITE" ), aPrimitiveTypeGroup );
myOpenGLPointButton = new QRadioButton( tr( "OPENGL_POINT" ), aPrimitiveTypeGroup );
myGeomSphereButton = new QRadioButton( tr( "GEOMETRICAL_SPHERE" ), aPrimitiveTypeGroup );
- aLayout->addMultiCellWidget( aPrimitiveTypeGroup, 0, 0, 0, 2 );
+ aPrimLayout->addWidget( myPointSpriteButton );
+ aPrimLayout->addWidget( myOpenGLPointButton );
+ aPrimLayout->addWidget( myGeomSphereButton );
+
+ aLayout->addWidget( aPrimitiveTypeGroup, 0, 0, 1, 2 );
// Clamp ( Point Sprite & OpenGL Point )
myClampLabel = new QLabel( tr( "CLAMP" ), this );
- myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, this );
+ myClampSpinBox = new QtxDoubleSpinBox( 1.0, 512.0, 1.0, this );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
aLayout->addWidget( myClampLabel, 1, 0 );
- aLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
+ aLayout->addWidget( myClampSpinBox, 1, 1, 1, 2 );
// Main Texture ( Point Sprite )
myMainTextureLabel = new QLabel( tr( "MAIN_TEXTURE" ), this );
myMainTextureLineEdit = new QLineEdit( this );
myMainTextureButton = new QPushButton( this );
myMainTextureButton->setAutoDefault( false );
- myMainTextureButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+ myMainTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
connect( myMainTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseMainTexture() ) );
aLayout->addWidget( myMainTextureLabel, 2, 0 );
myAlphaTextureLineEdit = new QLineEdit( this );
myAlphaTextureButton = new QPushButton( this );
myAlphaTextureButton->setAutoDefault( false );
- myAlphaTextureButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+ myAlphaTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
connect( myAlphaTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseAlphaTexture() ) );
aLayout->addWidget( myAlphaTextureLabel, 3, 0 );
// Alpha Threshold ( Point Sprite )
myAlphaThresholdLabel = new QLabel( tr( "ALPHA_THRESHOLD" ), this );
- myAlphaThresholdSpinBox = new QtxDblSpinBox( 0.0, 1.0, 0.1, this );
+ myAlphaThresholdSpinBox = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, this );
myAlphaThresholdSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
aLayout->addWidget( myAlphaThresholdLabel, 4, 0 );
- aLayout->addMultiCellWidget( myAlphaThresholdSpinBox, 4, 4, 1, 2 );
+ aLayout->addWidget( myAlphaThresholdSpinBox, 4, 1, 1, 2 );
// Resolution ( Geometrical Sphere )
myResolutionLabel = new QLabel( tr( "RESOLUTION" ), this );
myResolutionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( myResolutionSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( onResolutionChanged( int ) ) );
- aLayout->addWidget( myResolutionLabel, 1, 0 );
- aLayout->addMultiCellWidget( myResolutionSpinBox, 1, 1, 1, 2 );
+ aLayout->addWidget( myResolutionLabel, 5, 0 );
+ aLayout->addWidget( myResolutionSpinBox, 5, 1, 1, 2 );
// Number of faces ( Geometrical Sphere )
myFaceNumberLabel = new QLabel( tr( "FACE_NUMBER" ), this );
myFaceNumberLineEdit->setEnabled( false );
//myFaceNumberLineEdit->setReadOnly( true );
- aLayout->addWidget( myFaceNumberLabel, 2, 0 );
- aLayout->addMultiCellWidget( myFaceNumberLineEdit, 2, 2, 1, 2 );
+ aLayout->addWidget( myFaceNumberLabel, 6, 0 );
+ aLayout->addWidget( myFaceNumberLineEdit, 6, 1, 1, 2 );
// Notification ( Geometrical Sphere )
myFaceLimitLabel = new QLabel( tr( "FACE_LIMIT" ), this );
myFaceLimitSpinBox = new QtxIntSpinBox( 10, 1000000, 10, this );
myFaceLimitSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- aLayout->addWidget( myFaceLimitLabel, 3, 0 );
- aLayout->addMultiCellWidget( myFaceLimitSpinBox, 3, 3, 1, 2 );
+ aLayout->addWidget( myFaceLimitLabel, 7, 0 );
+ aLayout->addWidget( myFaceLimitSpinBox, 7, 1, 1, 2 );
connect( myPointSpriteButton, SIGNAL( clicked() ), this, SLOT( onTogglePointSprite() ) );
connect( myOpenGLPointButton, SIGNAL( clicked() ), this, SLOT( onToggleOpenGLPoint() ) );
void VVTK_PrimitiveBox::setClampMaximum( float theClampMaximum )
{
- myClampSpinBox->setMaxValue( theClampMaximum );
+ myClampSpinBox->setMaximum( theClampMaximum );
}
void VVTK_PrimitiveBox::setMainTexture( const QString& theMainTexture )
void VVTK_PrimitiveBox::onBrowseMainTexture()
{
QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
- QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
+ QString aFileName = QFileDialog::getOpenFileName( this,
+ 0,
+ aRootDir,
+ "Bitmap (*.bmp *.jpg *.png)" );
if( aFileName.isNull() )
return;
void VVTK_PrimitiveBox::onBrowseAlphaTexture()
{
QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
- QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
+ QString aFileName = QFileDialog::getOpenFileName( this,
+ 0,
+ aRootDir,
+ "Bitmap (*.bmp *.jpg *.png)" );
if( aFileName.isNull() )
return;
#include "VVTK.h"
-#include <qgroupbox.h>
+#include <QGroupBox>
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QtxIntSpinBox;
class VVTK_EXPORT VVTK_PrimitiveBox : public QGroupBox
QString myAlphaTexture;
QLabel* myClampLabel;
- QtxDblSpinBox* myClampSpinBox;
+ QtxDoubleSpinBox* myClampSpinBox;
QLabel* myMainTextureLabel;
QLineEdit* myMainTextureLineEdit;
QPushButton* myAlphaTextureButton;
QLabel* myAlphaThresholdLabel;
- QtxDblSpinBox* myAlphaThresholdSpinBox;
+ QtxDoubleSpinBox* myAlphaThresholdSpinBox;
QLabel* myResolutionLabel;
QtxIntSpinBox* myResolutionSpinBox;
#include <unistd.h>
#endif
-#include <qapplication.h>
-#include <qfileinfo.h>
+#include <QApplication>
+#include <QFileInfo>
+#include <QDir>
#include "utilities.h"
VVTK_Recorder
::Stop()
{
- QApplication::setOverrideCursor( Qt::waitCursor );
+ QApplication::setOverrideCursor( Qt::WaitCursor );
if(myState == VVTK_Recorder_Record){
if(!myPaused)
if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<aString<<endl;
QFileInfo aFileInfo(myName.c_str());
- QString aDirPath = aFileInfo.dirPath(TRUE);
+ QString aDirPath = aFileInfo.absoluteDir().path();
QString aBaseName = aFileInfo.fileName();
QString aCommand =
QString("(cd ") + aDirPath +
aCommand =
QString("rm ") + aDirPath + "/" + aBaseName + "*.jpeg";
- if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<aCommand.latin1()<<endl;
- system(aCommand.latin1());
+ if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<(const char*)aCommand.toLatin1()<<endl;
+ system((const char*)aCommand.toLatin1());
}
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
#include "QtxIntSpinBox.h"
#include "LightApp_Application.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include "CAM_Module.h"
+
+#include <QCheckBox>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
/*!
* Constructor
*/
VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecorder ):
- QDialog( theParent, "VVTK_RecorderDlg", false ),
+ QDialog( theParent ),
myRecorder( theRecorder )
{
- setCaption( tr( "DLG_RECORDER_TITLE" ) );
+ setWindowTitle( tr( "DLG_RECORDER_TITLE" ) );
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
QVBoxLayout* aTopLayout = new QVBoxLayout( this );
aTopLayout->setSpacing( 6 );
aTopLayout->setMargin( 6 );
- aTopLayout->setAutoAdd( true );
+ //aTopLayout->setAutoAdd( true );
// Settings
QGroupBox* mySettingsBox = new QGroupBox( tr( "SETTINGS" ), this );
- mySettingsBox->setColumnLayout( 0, Qt::Vertical );
- mySettingsBox->layout()->setSpacing( 0 );
- mySettingsBox->layout()->setMargin( 0 );
+ //mySettingsBox->setColumnLayout( 0, Qt::Vertical );
+ //mySettingsBox->layout()->setSpacing( 0 );
+ //mySettingsBox->layout()->setMargin( 0 );
- QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox->layout() );
+ QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox );
aSettingsLayout->setSpacing( 6 );
aSettingsLayout->setMargin( 11 );
myFileNameLineEdit = new QLineEdit( mySettingsBox );
myFileNameLineEdit->setMinimumWidth( 250 );
myFileNameLineEdit->setReadOnly( true );
- /*
- QPushButton* aFileNameButton = new QPushButton( mySettingsBox );
- aFileNameButton->setAutoDefault( false );
- aFileNameButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
- connect( aFileNameButton, SIGNAL( clicked() ), this, SLOT( onBrowseFile() ) );
- */
+
QLabel* aRecordingModeLabel = new QLabel( tr( "RECORDING_MODE" ), mySettingsBox );
myRecordingModeComboBox = new QComboBox( mySettingsBox );
- myRecordingModeComboBox->insertItem( tr( "SKIPPED_FRAMES" ) );
- myRecordingModeComboBox->insertItem( tr( "ALL_DISLPAYED_FRAMES" ) );
- myRecordingModeComboBox->setCurrentItem( aResourceMgr->integerValue( "VISU", "recorder_mode", 1 ) );
+ myRecordingModeComboBox->addItem( tr( "SKIPPED_FRAMES" ) );
+ myRecordingModeComboBox->addItem( tr( "ALL_DISLPAYED_FRAMES" ) );
+ myRecordingModeComboBox->setCurrentIndex( aResourceMgr->integerValue( "VISU", "recorder_mode", 1 ) );
QLabel* aFPSLabel = new QLabel( tr( "FPS" ), mySettingsBox );
- myFPSSpinBox = new QtxDblSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
+ myFPSSpinBox = new QtxDoubleSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
myFPSSpinBox->setValue( aResourceMgr->doubleValue( "VISU", "recorder_fps", 10.0 ) );
QLabel* aQualityLabel = new QLabel( tr( "QUALITY" ), mySettingsBox );
myProgressiveCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "recorder_progressive", false ) );
aSettingsLayout->addWidget( aFileNameLabel, 0, 0 );
- aSettingsLayout->addMultiCellWidget( myFileNameLineEdit, 1, 1, 0, 1 );
+ aSettingsLayout->addWidget( myFileNameLineEdit, 1, 0, 1, 2 );
//aSettingsLayout->addWidget( aFileNameButton, 1, 2 );
aSettingsLayout->addWidget( aRecordingModeLabel, 2, 0 );
aSettingsLayout->addWidget( myRecordingModeComboBox, 2, 1 );
aSettingsLayout->addWidget( myQualitySpinBox, 4, 1 );
aSettingsLayout->addWidget( myProgressiveCheckBox, 5, 0 );
+ aTopLayout->addWidget( mySettingsBox );
+
// Start / Close
QGroupBox* CommonGroup = new QGroupBox( this );
- CommonGroup->setColumnLayout(0, Qt::Vertical );
- CommonGroup->layout()->setSpacing( 0 );
- CommonGroup->layout()->setMargin( 0 );
- QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup->layout() );
+ //CommonGroup->setColumnLayout(0, Qt::Vertical );
+ //CommonGroup->layout()->setSpacing( 0 );
+ //CommonGroup->layout()->setMargin( 0 );
+ QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup );
CommonGroupLayout->setAlignment( Qt::AlignTop );
CommonGroupLayout->setSpacing( 6 );
CommonGroupLayout->setMargin( 11 );
aHelpButton->setAutoDefault( true );
CommonGroupLayout->addWidget( aHelpButton, 0, 3 );
+ aTopLayout->addWidget( CommonGroup );
+
connect( aStartButton, SIGNAL( clicked() ), this, SLOT( onStart() ) );
connect( aCloseButton, SIGNAL( clicked() ), this, SLOT( onClose() ) );
connect( aHelpButton, SIGNAL( clicked() ), this, SLOT( onHelp() ) );
if( myFileName.isNull() )
return;
- myRecorder->SetName( myFileName.latin1() );
+ myRecorder->SetName( (const char*)myFileName.toLatin1() );
- myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentItem() == 0 );
+ myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentIndex() == 0 );
myRecorder->SetNbFPS( myFPSSpinBox->value() );
myRecorder->SetQuality( myQualitySpinBox->value() );
myRecorder->SetProgressiveMode( myProgressiveCheckBox->isChecked() );
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onHelp();
#ifndef VVTK_RECORDERDLG_H
#define VVTK_RECORDERDLG_H
-#include <qdatetime.h>
-#include <qdialog.h>
+#include <QDateTime>
+#include <QDialog>
class QCheckBox;
class QComboBox;
class QPushButton;
class QTimer;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QtxIntSpinBox;
class VVTK_Recorder;
QLineEdit* myFileNameLineEdit;
- QComboBox* myRecordingModeComboBox;
- QtxDblSpinBox* myFPSSpinBox;
- QtxIntSpinBox* myQualitySpinBox;
- QCheckBox* myProgressiveCheckBox;
+ QComboBox* myRecordingModeComboBox;
+ QtxDoubleSpinBox* myFPSSpinBox;
+ QtxIntSpinBox* myQualitySpinBox;
+ QCheckBox* myProgressiveCheckBox;
};
#include "VISU_GaussPointsPL.hxx"
#include "VISU_OpenGLPointSpriteMapper.hxx"
-#include "LightApp_Application.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
+#include <LightApp_Application.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
-#include "SVTK_RenderWindowInteractor.h"
+#include <SVTK_RenderWindowInteractor.h>
#include <vtkActorCollection.h>
#include <vtkCallbackCommand.h>
#include "utilities.h"
-#include <qbuttongroup.h>
-#include <qcolordialog.h>
-#include <qfiledialog.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-
-#include "QtxAction.h"
-#include "QtxDblSpinBox.h"
-#include "QtxIntSpinBox.h"
+#include <QButtonGroup>
+#include <QColorDialog>
+#include <QFileDialog>
+#include <QGroupBox>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QTabWidget>
+//#include <qvbox.h>
+
+#include <QtxAction.h>
+#include <QtxDoubleSpinBox.h>
+#include <QtxIntSpinBox.h>
+#include <CAM_Module.h>
using namespace std;
Image2VTI(const QString& theImageFileName)
{
QFileInfo aFileInfo(theImageFileName);
- QString aFormat = aFileInfo.extension(FALSE);
+ QString aFormat = aFileInfo.suffix();
#ifdef WIN32
QString aTmpDir = getenv( "TEMP" );
#else
QString aTmpDir = QString( "/tmp/" ) + getenv("USER");
#endif
- QString aVTIName = aTmpDir + "-" + aFileInfo.baseName(TRUE) + ".vti";
+ QString aVTIName = aTmpDir + "-" + aFileInfo.completeBaseName() + ".vti";
QString aCommand = QString( "VISU_img2vti " ) + aFormat + " " + theImageFileName + " " + aVTIName;
- if(system( aCommand.latin1() ) == 0)
+ if(system( (const char*)aCommand.toLatin1() ) == 0)
return aVTIName;
return QString::null;
#else:
QString aCommand = QString( "del /F " ) + theFileName;
#endif
- system( aCommand.latin1() );
+ system( (const char*)aCommand.toLatin1() );
}
}
static TTextureMap aTextureMap;
TTextureValue aTextureValue;
- TTextureKey aTextureKey(theMainTexture.latin1(),theAlphaTexture.latin1());
+ TTextureKey aTextureKey((const char*)theMainTexture.toLatin1(),
+ (const char*)theAlphaTexture.toLatin1());
TTextureMap::const_iterator anIter = aTextureMap.find(aTextureKey);
if(anIter != aTextureMap.end()){
aTextureValue = anIter->second;
if( !aMainTextureVTI.isNull() && !anAlphaTextureVTI.isNull() ){
aTextureValue =
- VISU_GaussPointsPL::MakeTexture( aMainTextureVTI.latin1(),
- anAlphaTextureVTI.latin1());
+ VISU_GaussPointsPL::MakeTexture( (const char*)aMainTextureVTI.toLatin1(),
+ (const char*)anAlphaTextureVTI.toLatin1());
if( aTextureValue.GetPointer() )
aTextureMap[aTextureKey] = aTextureValue;
//----------------------------------------------------------------
VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const char* name )
- :QDialog( parent, name, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
+ :QDialog( parent,
+ Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
myEventCallbackCommand( vtkCallbackCommand::New() ),
myInsideCursorSettings( VISU_InsideCursorSettings::New() ),
myOutsideCursorSettings( VISU_OutsideCursorSettings::New() ),
myWidgetCtrl(NULL),
myInteractor(NULL)
{
+ setAccessibleName( name );
+
myPriority = 0.0;
myEventCallbackCommand->Delete();
myEventCallbackCommand->SetClientData(this);
myEventCallbackCommand.GetPointer(),
myPriority);
- setCaption( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
+ setWindowTitle( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
setSizeGripEnabled(TRUE);
QVBoxLayout* TopLayout = new QVBoxLayout( this );
myTabBox = new QTabWidget( this );
// Segmentation cursor pane
- mySegmentationCursorBox = new QVBox( this );
- mySegmentationCursorBox->setMargin(11);
- mySegmentationCursorBox->setSpacing(6);
- mySegmentationCursorBox->layout()->setAlignment(Qt::AlignTop);
+ mySegmentationCursorBox = new QWidget( this );
+ QVBoxLayout* SCBoxLayout = new QVBoxLayout( mySegmentationCursorBox );
+ SCBoxLayout->setMargin(11);
+ SCBoxLayout->setSpacing(6);
+ SCBoxLayout->setAlignment(Qt::AlignTop);
// Origin
- myOriginGroup = new QGroupBox( tr( "ORIGIN_TITLE" ), mySegmentationCursorBox, "OriginGroup" );
- myOriginGroup->setColumnLayout( 0, Qt::Vertical );
- myOriginGroup->layout()->setSpacing( 0 );
- myOriginGroup->layout()->setMargin( 0 );
+ myOriginGroup = new QGroupBox( tr( "ORIGIN_TITLE" ), mySegmentationCursorBox );
+ //myOriginGroup->setColumnLayout( 0, Qt::Vertical );
+ //myOriginGroup->layout()->setSpacing( 0 );
+ //myOriginGroup->layout()->setMargin( 0 );
- QGridLayout* OriginGroupLayout = new QGridLayout( myOriginGroup->layout() );
+ QGridLayout* OriginGroupLayout = new QGridLayout( myOriginGroup );
OriginGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
OriginGroupLayout->setSpacing(6);
OriginGroupLayout->setMargin(11);
QLabel* XOriginLabel = new QLabel( tr( "ORIGIN_X" ), myOriginGroup );
- myXOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myXOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
myXOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myXOriginSpinBox->setMinimumWidth( 100 );
myXOriginSpinBox->setValue( 0.0 );
QLabel* YOriginLabel = new QLabel( tr( "ORIGIN_Y" ), myOriginGroup );
- myYOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myYOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
myYOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myYOriginSpinBox->setMinimumWidth( 100 );
myYOriginSpinBox->setValue( 0.0 );
QLabel* ZOriginLabel = new QLabel( tr( "ORIGIN_Z" ), myOriginGroup );
- myZOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+ myZOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
//myZOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myZOriginSpinBox->setMinimumWidth( 100 );
myZOriginSpinBox->setValue( 1.0 );
OriginGroupLayout->addWidget( ZOriginLabel, 0, 4 );
OriginGroupLayout->addWidget( myZOriginSpinBox, 0, 5 );
+ SCBoxLayout->addWidget( myOriginGroup );
+
// Direction ( Plane Segmentation )
- myDirectionGroup = new QGroupBox( tr( "DIRECTION_TITLE" ), mySegmentationCursorBox, "DirectionGroup" );
- myDirectionGroup->setColumnLayout( 0, Qt::Vertical );
- myDirectionGroup->layout()->setSpacing( 0 );
- myDirectionGroup->layout()->setMargin( 0 );
+ myDirectionGroup = new QGroupBox( tr( "DIRECTION_TITLE" ), mySegmentationCursorBox );
+ //myDirectionGroup->setColumnLayout( 0, Qt::Vertical );
+ //myDirectionGroup->layout()->setSpacing( 0 );
+ //myDirectionGroup->layout()->setMargin( 0 );
- QGridLayout* DirectionGroupLayout = new QGridLayout( myDirectionGroup->layout() );
+ QGridLayout* DirectionGroupLayout = new QGridLayout( myDirectionGroup );
DirectionGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
DirectionGroupLayout->setSpacing(6);
DirectionGroupLayout->setMargin(11);
QLabel* DXDirectionLabel = new QLabel( tr( "DIRECTION_DX" ), myDirectionGroup );
- myDXDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDXDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
myDXDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDXDirectionSpinBox->setMinimumWidth( 100 );
myDXDirectionSpinBox->setValue( 0.0 );
QLabel* DYDirectionLabel = new QLabel( tr( "DIRECTION_DY" ), myDirectionGroup );
- myDYDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDYDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
myDYDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDYDirectionSpinBox->setMinimumWidth( 100 );
myDYDirectionSpinBox->setValue( 0.0 );
QLabel* DZDirectionLabel = new QLabel( tr( "DIRECTION_DZ" ), myDirectionGroup );
- myDZDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+ myDZDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
myDZDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDZDirectionSpinBox->setMinimumWidth( 100 );
myDZDirectionSpinBox->setValue( 1.0 );
DirectionGroupLayout->addWidget( DZDirectionLabel, 0, 4 );
DirectionGroupLayout->addWidget( myDZDirectionSpinBox, 0, 5 );
+ SCBoxLayout->addWidget( myDirectionGroup );
+
// Depth ( Plane Segmentation )
- myDepthGroup = new QGroupBox( tr( "DEPTH_TITLE" ), mySegmentationCursorBox, "DepthGroup" );
- myDepthGroup->setColumnLayout( 0, Qt::Vertical );
- myDepthGroup->layout()->setSpacing( 0 );
- myDepthGroup->layout()->setMargin( 0 );
+ myDepthGroup = new QGroupBox( tr( "DEPTH_TITLE" ), mySegmentationCursorBox );
+ //myDepthGroup->setColumnLayout( 0, Qt::Vertical );
+ //myDepthGroup->layout()->setSpacing( 0 );
+ //myDepthGroup->layout()->setMargin( 0 );
- QGridLayout* DepthGroupLayout = new QGridLayout( myDepthGroup->layout() );
+ QGridLayout* DepthGroupLayout = new QGridLayout( myDepthGroup );
DepthGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
DepthGroupLayout->setSpacing(6);
DepthGroupLayout->setMargin(11);
QLabel* DepthLabel = new QLabel( tr( "DEPTH" ), myDepthGroup );
- myDepthSpinBox = new QtxDblSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, myDepthGroup );
+ myDepthSpinBox = new QtxDoubleSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, myDepthGroup );
myDepthSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDepthSpinBox->setMinimumWidth( 100 );
myDepthSpinBox->setValue( 1.0 );
DepthGroupLayout->addWidget( DepthLabel, 0, 0 );
DepthGroupLayout->addWidget( myDepthSpinBox, 0, 1 );
+ SCBoxLayout->addWidget( myDepthGroup );
+
// Radius ( Sphere Segmentation )
- myRadiusGroup = new QGroupBox( tr( "RADIUS_TITLE" ), mySegmentationCursorBox, "RadiusGroup" );
- myRadiusGroup->setColumnLayout( 0, Qt::Vertical );
- myRadiusGroup->layout()->setSpacing( 0 );
- myRadiusGroup->layout()->setMargin( 0 );
+ myRadiusGroup = new QGroupBox( tr( "RADIUS_TITLE" ), mySegmentationCursorBox );
+ //myRadiusGroup->setColumnLayout( 0, Qt::Vertical );
+ //myRadiusGroup->layout()->setSpacing( 0 );
+ //myRadiusGroup->layout()->setMargin( 0 );
- QGridLayout* RadiusGroupLayout = new QGridLayout( myRadiusGroup->layout() );
+ QGridLayout* RadiusGroupLayout = new QGridLayout( myRadiusGroup );
RadiusGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
RadiusGroupLayout->setSpacing(6);
RadiusGroupLayout->setMargin(11);
QLabel* RadiusLabel = new QLabel( tr( "RADIUS" ),myRadiusGroup );
- myRadiusSpinBox = new QtxDblSpinBox( 0.0, 1000.0, 1.0,myRadiusGroup );
+ myRadiusSpinBox = new QtxDoubleSpinBox( 0.0, 1000.0, 1.0,myRadiusGroup );
myRadiusSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myRadiusSpinBox->setMinimumWidth( 100 );
myRadiusSpinBox->setValue( 100.0 );
QLabel* RatioLabel = new QLabel( tr( "RATIO" ), myRadiusGroup );
- myRatioSpinBox = new QtxDblSpinBox( 0.1, 10.0, 0.1,myRadiusGroup );
+ myRatioSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1,myRadiusGroup );
myRatioSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myRatioSpinBox->setMinimumWidth( 100 );
myRatioSpinBox->setValue( 2.0 );
RadiusGroupLayout->addWidget( RatioLabel, 0, 2 );
RadiusGroupLayout->addWidget( myRatioSpinBox, 0, 3 );
+ SCBoxLayout->addWidget( myRadiusGroup );
myTabBox->addTab( mySegmentationCursorBox, tr( "SEGMENTATION_CURSOR_TAB" ) );
-
// Gauss points pane
- myGaussPointsBox = new QVBox( this );
- myGaussPointsBox->setMargin(11);
- myGaussPointsBox->setSpacing(6);
+ myGaussPointsBox = new QWidget( this );
+ QVBoxLayout* GPBoxLayout = new QVBoxLayout( myGaussPointsBox );
+ GPBoxLayout->setMargin(11);
+ GPBoxLayout->setSpacing(6);
// Inside Gauss points
QGroupBox* anInsideGroup = new QGroupBox( tr( "INSIDE_GAUSS_POINTS" ), myGaussPointsBox );
- anInsideGroup->setColumnLayout( 0, Qt::Vertical );
- anInsideGroup->layout()->setSpacing( 0 );
- anInsideGroup->layout()->setMargin( 0 );
+ //anInsideGroup->setColumnLayout( 0, Qt::Vertical );
+ //anInsideGroup->layout()->setSpacing( 0 );
+ //anInsideGroup->layout()->setMargin( 0 );
- QGridLayout* anInsideGroupLayout = new QGridLayout( anInsideGroup->layout() );
+ QGridLayout* anInsideGroupLayout = new QGridLayout( anInsideGroup );
anInsideGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
anInsideGroupLayout->setSpacing(6);
anInsideGroupLayout->setMargin(11);
anInsideGroupLayout->addWidget( myInsidePrimitiveBox, 0, 0 );
anInsideGroupLayout->addWidget( myInsideSizeBox, 1, 0 );
+ GPBoxLayout->addWidget( anInsideGroup );
+
// Outside Gauss points
QGroupBox* anOutsideGroup = new QGroupBox( tr( "OUTSIDE_GAUSS_POINTS" ), myGaussPointsBox );
- anOutsideGroup->setColumnLayout( 0, Qt::Vertical );
- anOutsideGroup->layout()->setSpacing( 0 );
- anOutsideGroup->layout()->setMargin( 0 );
+ //anOutsideGroup->setColumnLayout( 0, Qt::Vertical );
+ //anOutsideGroup->layout()->setSpacing( 0 );
+ //anOutsideGroup->layout()->setMargin( 0 );
- QGridLayout* anOutsideGroupLayout = new QGridLayout( anOutsideGroup->layout() );
+ QGridLayout* anOutsideGroupLayout = new QGridLayout( anOutsideGroup );
anOutsideGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
anOutsideGroupLayout->setSpacing(6);
anOutsideGroupLayout->setMargin(11);
anOutsideGroupLayout->addWidget( myOutsidePrimitiveBox, 0, 0 );
anOutsideGroupLayout->addWidget( myOutsideSizeBox, 1, 0 );
+ GPBoxLayout->addWidget( anOutsideGroup );
// Magnification
- QGroupBox* MagnificationGroup = new QGroupBox ( tr( "MAGNIFICATION_TITLE" ), myGaussPointsBox, "MagnificationGroup" );
- MagnificationGroup->setColumnLayout(0, Qt::Vertical );
- MagnificationGroup->layout()->setSpacing( 0 );
- MagnificationGroup->layout()->setMargin( 0 );
+ QGroupBox* MagnificationGroup = new QGroupBox ( tr( "MAGNIFICATION_TITLE" ), myGaussPointsBox );
+ //MagnificationGroup->setColumnLayout(0, Qt::Vertical );
+ //MagnificationGroup->layout()->setSpacing( 0 );
+ //MagnificationGroup->layout()->setMargin( 0 );
- QGridLayout* MagnificationGroupLayout = new QGridLayout (MagnificationGroup->layout());
+ QGridLayout* MagnificationGroupLayout = new QGridLayout ( MagnificationGroup );
MagnificationGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
MagnificationGroupLayout->setSpacing(6);
MagnificationGroupLayout->setMargin(11);
// Increment
myIncrementLabel = new QLabel( tr( "INCREMENT" ), MagnificationGroup );
- myIncrementSpinBox = new QtxDblSpinBox( 0.01, 10, 0.1, MagnificationGroup );
+ myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, MagnificationGroup );
myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
MagnificationGroupLayout->addWidget( myIncrementLabel, 0, 2 );
myTabBox->addTab( myGaussPointsBox, tr( "GAUSS_POINTS_TAB" ) );
- myTabBox->showPage( myGaussPointsBox );
+ //myTabBox->showPage( myGaussPointsBox );
+ myTabBox->setCurrentWidget( myGaussPointsBox );
+
+ GPBoxLayout->addWidget( MagnificationGroup );
// Common buttons ===========================================================
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ //GroupButtons->setColumnLayout(0, Qt::Vertical );
+ //GroupButtons->layout()->setSpacing( 0 );
+ //GroupButtons->layout()->setMargin( 0 );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons, "buttonApply" );
+ QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons );
buttonApply->setAutoDefault( TRUE );
buttonApply->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonApply, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons, "buttonClose" );
+ QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons );
buttonClose->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
- QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
myOutsideAlphaTexture = theAlphaTexture;
}
- return VISU::GetTexture( theMainTexture.latin1(),
- theAlphaTexture.latin1());
+ return VISU::GetTexture( (const char*)theMainTexture.toLatin1(),
+ (const char*)theAlphaTexture.toLatin1());
}
void VVTK_SegmentationCursorDlg::onClickApply()
{
- if( myTabBox->currentPage() == mySegmentationCursorBox )
+ if( myTabBox->currentWidget() == mySegmentationCursorBox )
ApplySegmentationCursor();
else
{
aWarning.append( "presentation might be too important to ensure an acceptable frame rate.\n\n" );
aWarning.append( "Can you please confirm that you want to continue anyway?" );
bool toApply = CheckNumberOfFaces() ||
- SUIT_MessageBox::warn2( this, tr( "Warning" ), aWarning,
+ SUIT_MessageBox::warning( this, tr( "Warning" ), aWarning,
tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 0;
if( toApply )
void VVTK_SegmentationCursorDlg::onClickClose()
{
- myPlaneAction->setOn( false );
- mySphereAction->setOn( false );
+ myPlaneAction->setChecked( false );
+ mySphereAction->setChecked( false );
emit scgClose();
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning( 0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
void VVTK_SegmentationCursorDlg::done( int r )
{
- myPlaneAction->setOn( false );
- mySphereAction->setOn( false );
+ myPlaneAction->setChecked( false );
+ mySphereAction->setChecked( false );
emit scgClose();
void VVTK_SegmentationCursorDlg::onParentShow()
{
- if(myPlaneAction->isOn() || mySphereAction->isOn())
+ if(myPlaneAction->isChecked() || mySphereAction->isChecked())
show();
else
hide();
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
onClickHelp();
class QRadioButton;
class QTabWidget;
class QGroupBox;
-class QVBox;
+class QWidget;
+//class QVBox;
class QtxAction;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QtxIntSpinBox;
class VISU_GaussPtsAct1;
private:
SVTK_RenderWindowInteractor* myInteractor;
- QTabWidget* myTabBox;
+ QTabWidget* myTabBox;
// Segmentation cursor
- QVBox* mySegmentationCursorBox;
+ QWidget* mySegmentationCursorBox;
- QGroupBox* myOriginGroup;
- QtxDblSpinBox* myXOriginSpinBox;
- QtxDblSpinBox* myYOriginSpinBox;
- QtxDblSpinBox* myZOriginSpinBox;
+ QGroupBox* myOriginGroup;
+ QtxDoubleSpinBox* myXOriginSpinBox;
+ QtxDoubleSpinBox* myYOriginSpinBox;
+ QtxDoubleSpinBox* myZOriginSpinBox;
- QGroupBox* myDirectionGroup;
- QtxDblSpinBox* myDXDirectionSpinBox;
- QtxDblSpinBox* myDYDirectionSpinBox;
- QtxDblSpinBox* myDZDirectionSpinBox;
+ QGroupBox* myDirectionGroup;
+ QtxDoubleSpinBox* myDXDirectionSpinBox;
+ QtxDoubleSpinBox* myDYDirectionSpinBox;
+ QtxDoubleSpinBox* myDZDirectionSpinBox;
- QGroupBox* myDepthGroup;
- QtxDblSpinBox* myDepthSpinBox;
+ QGroupBox* myDepthGroup;
+ QtxDoubleSpinBox* myDepthSpinBox;
- QGroupBox* myRadiusGroup;
- QtxDblSpinBox* myRadiusSpinBox;
- QtxDblSpinBox* myRatioSpinBox;
+ QGroupBox* myRadiusGroup;
+ QtxDoubleSpinBox* myRadiusSpinBox;
+ QtxDoubleSpinBox* myRatioSpinBox;
- bool myIsPlaneSegmentation;
+ bool myIsPlaneSegmentation;
- float myPriority;
+ float myPriority;
vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
- VISU_WidgetCtrl* myWidgetCtrl;
- QtxAction* myPlaneAction;
- QtxAction* mySphereAction;
+ VISU_WidgetCtrl* myWidgetCtrl;
+ QtxAction* myPlaneAction;
+ QtxAction* mySphereAction;
// Gauss Points
- QVBox* myGaussPointsBox;
+ QWidget* myGaussPointsBox;
VVTK_PrimitiveBox* myInsidePrimitiveBox;
- VVTK_SizeBox* myInsideSizeBox;
+ VVTK_SizeBox* myInsideSizeBox;
- QString myInsideMainTexture;
- QString myInsideAlphaTexture;
+ QString myInsideMainTexture;
+ QString myInsideAlphaTexture;
vtkSmartPointer<VISU_InsideCursorSettings> myInsideCursorSettings;
VVTK_PrimitiveBox* myOutsidePrimitiveBox;
- VVTK_SizeBox* myOutsideSizeBox;
+ VVTK_SizeBox* myOutsideSizeBox;
- QString myOutsideMainTexture;
- QString myOutsideAlphaTexture;
+ QString myOutsideMainTexture;
+ QString myOutsideAlphaTexture;
vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
- QLabel* myMagnificationLabel;
- QtxIntSpinBox* myMagnificationSpinBox;
- QLabel* myIncrementLabel;
- QtxDblSpinBox* myIncrementSpinBox;
+ QLabel* myMagnificationLabel;
+ QtxIntSpinBox* myMagnificationSpinBox;
+ QLabel* myIncrementLabel;
+ QtxDoubleSpinBox* myIncrementSpinBox;
};
#endif
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
-#include "QtxDblSpinBox.h"
-#include "QtxIntSpinBox.h"
-
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qcolordialog.h>
+#include <QtxDoubleSpinBox.h>
+#include <QtxIntSpinBox.h>
+#include <QtxColorButton.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QColorDialog>
using namespace std;
VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
- QVBox( parent )
+ QWidget( parent )
{
- layout()->setSpacing( 0 );
- layout()->setMargin( 0 );
+ QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+ aMainLayout->setSpacing( 0 );
+ aMainLayout->setMargin( 0 );
// Size
- QGroupBox* SizeGroup = new QGroupBox ( tr( "SIZE_TITLE" ), this, "SizeGroup" );
- SizeGroup->setColumnLayout(0, Qt::Vertical );
- SizeGroup->layout()->setSpacing( 0 );
- SizeGroup->layout()->setMargin( 0 );
+ QGroupBox* SizeGroup = new QGroupBox ( tr( "SIZE_TITLE" ), this );
+ //SizeGroup->setColumnLayout(0, Qt::Vertical );
+ //SizeGroup->layout()->setSpacing( 0 );
+ //SizeGroup->layout()->setMargin( 0 );
- QGridLayout* SizeGroupLayout = new QGridLayout (SizeGroup->layout());
+ QGridLayout* SizeGroupLayout = new QGridLayout (SizeGroup);
SizeGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
SizeGroupLayout->setSpacing(6);
SizeGroupLayout->setMargin(11);
// Increment
myIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup );
- myIncrementSpinBox = new QtxDblSpinBox( 0.01, 10, 0.1, SizeGroup );
+ myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, SizeGroup );
myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SizeGroupLayout->addWidget( myIncrementLabel, 2, 2 );
SizeGroupLayout->addWidget( myIncrementSpinBox, 2, 3 );
+ aMainLayout->addWidget( SizeGroup );
// Color
- myColorGroup = new QGroupBox ( tr( "COLOR_TITLE" ), this, "ColorGroup" );
- myColorGroup->setColumnLayout(0, Qt::Vertical );
- myColorGroup->layout()->setSpacing( 0 );
- myColorGroup->layout()->setMargin( 0 );
+ myColorGroup = new QGroupBox ( tr( "COLOR_TITLE" ), this );
+ //myColorGroup->setColumnLayout(0, Qt::Vertical );
+ //myColorGroup->layout()->setSpacing( 0 );
+ //myColorGroup->layout()->setMargin( 0 );
- QGridLayout* ColorGroupLayout = new QGridLayout (myColorGroup->layout());
+ QGridLayout* ColorGroupLayout = new QGridLayout ( myColorGroup );
ColorGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
ColorGroupLayout->setSpacing(6);
ColorGroupLayout->setMargin(11);
myUniformCheckBox = new QCheckBox( tr( "UNIFORM_COLOR" ), myColorGroup );
myColorLabel = new QLabel( tr( "COLOR" ), myColorGroup );
- myColorButton = new QPushButton( myColorGroup );
+ myColorButton = new QtxColorButton( myColorGroup );
ColorGroupLayout->addWidget( myUniformCheckBox, 0, 0 );
ColorGroupLayout->addWidget( myColorLabel, 0, 1 );
ColorGroupLayout->addWidget( myColorButton, 0, 2 );
+ aMainLayout->addWidget( myColorGroup );
+
connect( myUniformCheckBox, SIGNAL( toggled( bool ) ), myColorButton, SLOT( setEnabled( bool ) ) );
- connect( myColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
+ //connect( myColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
setType( VVTK_SizeBox::Results );
}
QColor VVTK_SizeBox::getColor() const
{
- return myColorButton->paletteBackgroundColor();
+ return myColorButton->color();//palette().color( myColorButton->backgroundRole() );
+ //return myColorButton->paletteBackgroundColor();
}
void VVTK_SizeBox::setColor( const QColor& theColor )
{
- myColorButton->setPaletteBackgroundColor( theColor );
+ if ( theColor.isValid() )
+ {
+ //QPalette aPalette( myColorButton->palette() );
+ //aPalette.setColor( myColorButton->backgroundRole(), theColor );
+ myColorButton->setColor( theColor );
+ }
+ //myColorButton->setPaletteBackgroundColor( theColor );
}
-void VVTK_SizeBox::onColorButtonPressed()
+/*void VVTK_SizeBox::onColorButtonPressed()
{
- QColor aColor = QColorDialog::getColor( myColorButton->paletteBackgroundColor(), this );
+ QPalette aPalette( myColorButton->palette() );
+ QColor aColor = QColorDialog::
+ getColor( aPalette.color(myColorButton->backgroundRole() ), this );
+
if( aColor.isValid() )
- myColorButton->setPaletteBackgroundColor( aColor );
-}
+ {
+ aPalette.setColor( myColorButton->backgroundRole(), aColor );
+ myColorButton->setPalette( aPalette );
+ }
+}*/
#include "VVTK.h"
-#include <qvbox.h>
+#include <QWidget>
class QLabel;
class QLineEdit;
class QCheckBox;
class QGroupBox;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QtxIntSpinBox;
+class QtxColorButton;
-class VVTK_EXPORT VVTK_SizeBox : public QVBox
+class VVTK_EXPORT VVTK_SizeBox : public QWidget
{
Q_OBJECT
void onToggleInside();
void onToggleOutside();
- void onColorButtonPressed();
+ //void onColorButtonPressed();
private:
int myType;
QtxIntSpinBox* myMagnificationSpinBox;
QLabel* myIncrementLabel;
- QtxDblSpinBox* myIncrementSpinBox;
+ QtxDoubleSpinBox* myIncrementSpinBox;
QCheckBox* myUniformCheckBox;
QGroupBox* myColorGroup;
QLabel* myColorLabel;
- QPushButton* myColorButton;
+ QtxColorButton* myColorButton;
};
#include "VVTK_ViewManager.h"
#include "VVTK_ViewModel.h"
+#include <SUIT_ViewWindow.h>
+
int VVTK_ViewManager::_VVTKViewMgr_Id = 0;
//***************************************************************
//***************************************************************
void VVTK_ViewManager::setViewName(SUIT_ViewWindow* theView)
{
- int aPos = myViews.find(theView);
- theView->setCaption( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
+ int aPos = myViews.indexOf(theView);
+ theView->setWindowTitle( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
}
#include "SVTK_View.h"
#include "SVTK_Prs.h"
+#include <SUIT_ViewManager.h>
+
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
while(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(aCollection->GetNextActor())){
if(!anActor->GetFactory()->GetActiveState())
continue;
- QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
+ QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
if(SVTK_View* aView = aViewWindow->getView()){
VVTK_Viewer
::isVisible( const Handle(SALOME_InteractiveObject)& theIO )
{
- QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
+ QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
bool aResult;
#include "SVTK_RenderWindowInteractor.h"
#include "SVTK_GenericRenderWindowInteractor.h"
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qimage.h>
+#include <QLayout>
+#include <QList>
+#include <QSplitter>
+#include <QToolBar>
//----------------------------------------------------------------------------
VVTK_ViewWindow
setCentralWidget(aWidget);
QBoxLayout* aLayout = new QVBoxLayout(aWidget);
- aLayout->setAutoAdd(true);
+ //aLayout->setAutoAdd(true);
QSplitter* aSplitter = new QSplitter(Qt::Vertical,aWidget);
//aSplitter->setChildrenCollapsible(true);
+ aLayout->addWidget( aSplitter );
VISU_WidgetCtrl* aWidgetCtrl = NULL;
VISU_InsideCursorSettings* anInsideCursorSettings = NULL;
aSelector->Delete();
int h = height() / 2;
- QValueList<int> aSizes;
+ QList<int> aSizes;
aSizes.append( h );
aSizes.append( h );
aSplitter->setSizes( aSizes );
{
if( myMainWindow1->GetInteractor()->hasFocus() )
{
- if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+ if ( myMainWindow1->getToolBar()->testAttribute(Qt::WA_UnderMouse) || myDumpImage.isNull() )
return myMainWindow1->dumpView();
else
return myDumpImage;
if( myMainWindow2->GetInteractor()->hasFocus() )
{
- if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+ if ( myMainWindow1->getToolBar()->testAttribute(Qt::WA_UnderMouse) || myDumpImage.isNull() )
return myMainWindow2->dumpView();
else
return myDumpImage;
#include "VVTK.h"
#include "SVTK_ViewWindow.h"
-#include <qimage.h>
+#include <QImage>
#include <string>