#include <QLineEdit>
#include <QCheckBox>
#include <QtxDoubleSpinBox.h>
+#include <QRadioButton>
HYDROGUI_ChannelDlg::HYDROGUI_ChannelDlg( HYDROGUI_Module* theModule, const QString& theTitle )
: HYDROGUI_InputPanel( theModule, theTitle )
myEquiDistance->setValue( 1.0 );
myEquiDistance->setSingleStep( 1.0 );
+ //for digue
+ myLCVal = new QtxDoubleSpinBox( aParamGroup );
+ myLCVal->setRange( 0.0, 999999 );
+ myLCVal->setValue( 50 );
+ myLCVal->setSingleStep( 0.1 );
+
+ myDeltaZVal = new QtxDoubleSpinBox( aParamGroup );
+ myDeltaZVal->setRange( 0.0, 999999 );
+ myDeltaZVal->setValue( 5.0 );
+ myDeltaZVal->setSingleStep( 0.1 );
+
+ myCoteZVal = new QtxDoubleSpinBox( aParamGroup );
+ myCoteZVal->setRange( 0.0, 999999 );
+ myCoteZVal->setValue( 1.0 );
+ myCoteZVal->setSingleStep( 0.1 );
+ //END for digue
+
myInvertDirection = new QCheckBox(aParamGroup);
myInvertDirection->setChecked(false);
+ myProfileLabel = new QLabel( tr( "CHANNEL_PROFILE" ), aParamGroup);
+
+ myProfileModeButton = new QRadioButton( tr( "VIA_PROFILE" ), myObjectNameGroup );
+ QRadioButton* ProfileModeButton2 = new QRadioButton( tr( "PREDEF" ), myObjectNameGroup );
+
QGridLayout* aParamsLayout = new QGridLayout( aParamGroup );
aParamsLayout->setMargin( 5 );
aParamsLayout->setSpacing( 5 );
aParamsLayout->addWidget( new QLabel( tr( "CHANNEL_GUIDE_LINE" ), aParamGroup ), 0, 0 );
aParamsLayout->addWidget( myGuideLines, 0, 1 );
- aParamsLayout->addWidget( new QLabel( tr( "CHANNEL_PROFILE" ), aParamGroup ), 1, 0 );
- aParamsLayout->addWidget( myProfiles, 1, 1 );
- aParamsLayout->addWidget( new QLabel( tr( "EQUI_DISTANCE" ), aParamGroup ), 2, 0 );
- aParamsLayout->addWidget( myEquiDistance, 2, 1 );
- aParamsLayout->addWidget( new QLabel( tr( "INVERT_DIRECTION" ), aParamGroup ), 3, 0 );
- aParamsLayout->addWidget( myInvertDirection, 3, 1 );
+
+ aParamsLayout->addWidget( myProfileModeButton, 1, 0 );
+ aParamsLayout->addWidget( ProfileModeButton2, 1, 1 );
+
+ aParamsLayout->addWidget( myProfileLabel, 2, 0 );
+ aParamsLayout->addWidget( myProfiles, 2, 1 );
+
+ myLCValLabel = new QLabel( tr( "LC_VALUE" ), aParamGroup);
+ myDeltaZValLabel = new QLabel( tr( "DELTAZ_VALUE" ), aParamGroup);
+ myCoteZValLabel = new QLabel( tr( "COTEZ_VALUE" ), aParamGroup);
+
+ aParamsLayout->addWidget( myLCValLabel, 3, 0 );
+ aParamsLayout->addWidget( myLCVal, 3, 1 );
+ aParamsLayout->addWidget( myDeltaZValLabel, 4, 0 );
+ aParamsLayout->addWidget( myDeltaZVal, 4, 1 );
+ aParamsLayout->addWidget( myCoteZValLabel, 5, 0 );
+ aParamsLayout->addWidget( myCoteZVal, 5, 1 );
+
+ aParamsLayout->addWidget( new QLabel( tr( "EQUI_DISTANCE" ), aParamGroup ), 6, 0 );
+ aParamsLayout->addWidget( myEquiDistance, 6, 1 );
+ aParamsLayout->addWidget( new QLabel( tr( "INVERT_DIRECTION" ), aParamGroup ), 7, 0 );
+ aParamsLayout->addWidget( myInvertDirection, 7, 1 );
// Common
addWidget( myObjectNameGroup );
// Connect signals and slots
connect( myGuideLines, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onChannelDefChanged() ) );
connect( myProfiles, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onChannelDefChanged() ) );
+
+ connect( myProfileModeButton, SIGNAL( toggled( bool ) ), this, SLOT( onProfileModeChanged( bool ) ) );
+ myProfileModeButton->setChecked(true);
}
HYDROGUI_ChannelDlg::~HYDROGUI_ChannelDlg()
emit CreatePreview();
}
+void HYDROGUI_ChannelDlg::onProfileModeChanged(bool mode)
+{
+ if ( signalsBlocked() )
+ return;
+ if (mode)
+ {
+ myProfiles->setVisible(true);
+ myProfileLabel->setVisible(true);
+ myLCValLabel->setVisible(false);
+ myLCVal->setVisible(false);
+ myDeltaZValLabel->setVisible(false);
+ myDeltaZVal->setVisible(false);
+ myCoteZValLabel->setVisible(false);
+ myCoteZVal->setVisible(false);
+ }
+ else
+ {
+ myProfiles->setVisible(false);
+ myProfileLabel->setVisible(false);
+ myLCValLabel->setVisible(true);
+ myLCVal->setVisible(true);
+ myDeltaZValLabel->setVisible(true);
+ myDeltaZVal->setVisible(true);
+ myCoteZValLabel->setVisible(true);
+ myCoteZVal->setVisible(true);
+ }
+}
+
+bool HYDROGUI_ChannelDlg::getProfileMode()
+{
+ return myProfileModeButton->isChecked();
+}
+
double HYDROGUI_ChannelDlg::getEquiDistance() const
{
return myEquiDistance->value();