- // Mode selector (auto/manual)
- QGroupBox* aModeGroup = new QGroupBox( tr( "MODE" ) );
-
- QRadioButton* aManualRB = new QRadioButton( tr( "MANUAL" ), mainFrame() );
- QRadioButton* anAutoRB = new QRadioButton( tr( "AUTO" ), mainFrame() );
-
- myLandCoverModeButtons = new QButtonGroup( mainFrame() );
- myLandCoverModeButtons->addButton( anAutoRB, HYDROData_CalculationCase::AUTOMATIC );
- myLandCoverModeButtons->addButton( aManualRB, HYDROData_CalculationCase::MANUAL );
-
- QBoxLayout* aModeSelectorLayout = new QHBoxLayout;
- aModeSelectorLayout->setMargin( 5 );
- aModeSelectorLayout->setSpacing( 5 );
- aModeSelectorLayout->addWidget( anAutoRB );
- aModeSelectorLayout->addWidget( aManualRB );
- aModeGroup->setLayout( aModeSelectorLayout );
-
- // Available land covers
- QLabel* aLandCoversLabel = new QLabel( tr( "CALCULATION_REFERENCE_LAND_COVERS" ) );
- myAvailableLandCovers = new QListWidget( aPage );
- myAvailableLandCovers->setSelectionMode( QListWidget::ExtendedSelection );
- myAvailableLandCovers->setEditTriggers( QListWidget::NoEditTriggers );
- myAvailableLandCovers->setViewMode( QListWidget::ListMode );
- myAvailableLandCovers->setSortingEnabled( true );
-
- // Included land covers
- QLabel* anIncludedLabel = new QLabel( tr( "INCLUDED_LAND_COVERS" ) );
- myLandCovers = new HYDROGUI_OrderedListWidget( aPage, 16 );
- myLandCovers->setHiddenObjectsShown(true);
- myLandCovers->setVisibilityIconShown(false);
- myLandCovers->setContentsMargins(QMargins());
-
- // Include/Exclude buttons
- QFrame* aBtnsFrame = new QFrame;
- QVBoxLayout* aBtnsLayout = new QVBoxLayout( aBtnsFrame );
- aBtnsLayout->setMargin( 5 );
- aBtnsLayout->setSpacing( 5 );
- aBtnsFrame->setLayout( aBtnsLayout );
- QPushButton* anAddBtn = new QPushButton( tr("INCLUDE"), aBtnsFrame );
- QPushButton* aRemoveBtn = new QPushButton( tr("EXCLUDE"), aBtnsFrame );
-
- // Fill the butons frame with two buttons
- aBtnsLayout->addWidget( anAddBtn );
- aBtnsLayout->addWidget( aRemoveBtn );
- aBtnsLayout->addStretch( 1 );
-
- // Land covers frame
- QFrame* aLandCoversFrame = new QFrame( aPage );
- aLandCoversFrame->setFrameStyle( QFrame::Panel | QFrame::Raised );
- QGridLayout* aLandCoversLayout = new QGridLayout( aLandCoversFrame );
- aLandCoversLayout->setMargin( 5 );
- aLandCoversLayout->setSpacing( 5 );
- aLandCoversFrame->setLayout( aLandCoversLayout );
-
- // Fill the land covers frame with two lists, two labels and with buttons frame
- aLandCoversLayout->addWidget( aLandCoversLabel, 0, 0, Qt::AlignHCenter );
- aLandCoversLayout->addWidget( anIncludedLabel, 0, 2, Qt::AlignHCenter );
- aLandCoversLayout->addWidget( myAvailableLandCovers, 1, 0 );
- aLandCoversLayout->addWidget( aBtnsFrame, 1, 1, Qt::AlignHCenter );
- aLandCoversLayout->addWidget( myLandCovers, 1, 2 );
-