mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-24 16:30:35 +05:00
ILMAB: field of geometry
Fix a bug that modification of values of the boolean field is not stored by [Apply]
This commit is contained in:
parent
874aceefb0
commit
ca7f74119c
@ -263,56 +263,6 @@ private:
|
||||
StepTable* myTable;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : EntityGUI_FieldDlg::StepTable
|
||||
Description : Table widget
|
||||
*/
|
||||
|
||||
class EntityGUI_FieldDlg::StepTable : public QTableWidget
|
||||
{
|
||||
//Q_OBJECT
|
||||
|
||||
int myDataType;
|
||||
int myStepID;
|
||||
int myStamp;
|
||||
GEOM::GEOM_FieldStep_var myStep;
|
||||
bool myIsChanged;
|
||||
|
||||
QTableWidgetItem * newDefaultItem();
|
||||
public:
|
||||
StepTable( int stepID, int dataType, int nbRows, int nbColumns,
|
||||
QString shapeName, QStringList headers,
|
||||
GEOM::GEOM_FieldStep_ptr stepVar, QWidget* = 0 );
|
||||
virtual ~StepTable();
|
||||
|
||||
QSize minimumSizeHint() const;
|
||||
|
||||
void setEditable( bool, int, int );
|
||||
bool isEditable( int, int ) const;
|
||||
|
||||
void setReadOnly( bool );
|
||||
bool isReadOnly() const;
|
||||
|
||||
void insertRows( int, int = 1 );
|
||||
QString text( int, int );
|
||||
|
||||
QList<int> selectedRows();
|
||||
void selectRows(const QList<int>& rows);
|
||||
|
||||
void setDim( int nbRows, QString shapeName, bool setDefault=true );
|
||||
void setNbComps( int nbComps );
|
||||
void setDataType( int dataType );
|
||||
void setStamp( int stamp ) { myStamp = stamp; }
|
||||
int getStamp() { return myStamp; }
|
||||
int getStepID() { return myStepID; }
|
||||
QStringList getHeaders();
|
||||
void setHeaders(const QStringList& headers);
|
||||
GEOM::GEOM_FieldStep_var getStep() { return myStep; }
|
||||
void setValues(GEOM::GEOM_FieldStep_var& step);
|
||||
|
||||
void setIsChanged() { myIsChanged = true; }
|
||||
};
|
||||
|
||||
EntityGUI_FieldDlg::Delegate::Delegate( QObject* parent )
|
||||
: QItemDelegate( parent ),
|
||||
myTable( dynamic_cast<EntityGUI_FieldDlg::StepTable*>( parent ) )
|
||||
@ -443,6 +393,7 @@ EntityGUI_FieldDlg::StepTable::StepTable (int stepID, int dataType,
|
||||
for ( int iC = 1; iC < nbColumns; ++iC )
|
||||
setItem( iR, iC, new CheckItem( vals[ iV++ ]));
|
||||
}
|
||||
connect( this, SIGNAL( itemClicked(QTableWidgetItem *)), this, SLOT( setIsChanged() ));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <QMap>
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
#include <QTableWidget>
|
||||
|
||||
class QGroupBox;
|
||||
class QLineEdit;
|
||||
@ -131,6 +132,57 @@ private:
|
||||
QWidget* mySwitchTableWdg;
|
||||
QComboBox* myStepsCombo;
|
||||
SalomeApp_IntSpinBox* myStampSpin;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
Class : EntityGUI_FieldDlg::StepTable
|
||||
Description : Table widget
|
||||
*/
|
||||
|
||||
class EntityGUI_FieldDlg::StepTable : public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
int myDataType;
|
||||
int myStepID;
|
||||
int myStamp;
|
||||
GEOM::GEOM_FieldStep_var myStep;
|
||||
bool myIsChanged;
|
||||
|
||||
QTableWidgetItem * newDefaultItem();
|
||||
public:
|
||||
StepTable( int stepID, int dataType, int nbRows, int nbColumns,
|
||||
QString shapeName, QStringList headers,
|
||||
GEOM::GEOM_FieldStep_ptr stepVar, QWidget* = 0 );
|
||||
virtual ~StepTable();
|
||||
|
||||
QSize minimumSizeHint() const;
|
||||
|
||||
void setEditable( bool, int, int );
|
||||
bool isEditable( int, int ) const;
|
||||
|
||||
void setReadOnly( bool );
|
||||
bool isReadOnly() const;
|
||||
|
||||
void insertRows( int, int = 1 );
|
||||
QString text( int, int );
|
||||
|
||||
QList<int> selectedRows();
|
||||
void selectRows(const QList<int>& rows);
|
||||
|
||||
void setDim( int nbRows, QString shapeName, bool setDefault=true );
|
||||
void setNbComps( int nbComps );
|
||||
void setDataType( int dataType );
|
||||
void setStamp( int stamp ) { myStamp = stamp; }
|
||||
int getStamp() { return myStamp; }
|
||||
int getStepID() { return myStepID; }
|
||||
QStringList getHeaders();
|
||||
void setHeaders(const QStringList& headers);
|
||||
GEOM::GEOM_FieldStep_var getStep() { return myStep; }
|
||||
void setValues(GEOM::GEOM_FieldStep_var& step);
|
||||
public slots:
|
||||
void setIsChanged() { myIsChanged = true; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user