25  int GuiInputAttribute::GetAttributes(
const QString &defaultAttribute,
 
   26                                       QString &newAttribute,
 
   34    p_dialog->setWindowTitle(title);
 
   37    p_dialog->SetAttributes(defaultAttribute);
 
   38    if(p_dialog->exec() == QDialog::Accepted) {
 
   39      newAttribute = p_dialog->GetAttributes();
 
   42    newAttribute = defaultAttribute;
 
 
   49    QRadioButton *allBands = 
new QRadioButton(
"&All Bands");
 
   50    allBands->setToolTip(
"Select all bands from the input cube");
 
   52    QRadioButton *listBands = 
new QRadioButton(
"&Band List");
 
   53    listBands->setToolTip(
"Select any bands from the input cube");
 
   56    p_buttonGroup = 
new QButtonGroup();
 
   57    p_buttonGroup->addButton(allBands);
 
   58    p_buttonGroup->addButton(listBands);
 
   59    p_buttonGroup->setExclusive(
true);
 
   62    p_lineEdit = 
new QLineEdit();
 
   63    connect(allBands, SIGNAL(toggled(
bool)), p_lineEdit, SLOT(setDisabled(
bool)));
 
   64    allBands->setChecked(
true);
 
   67    QGridLayout *gridLayout = 
new QGridLayout();
 
   68    gridLayout->addWidget(allBands, 0, 0);
 
   69    gridLayout->addWidget(listBands, 1, 0);
 
   70    gridLayout->addWidget(p_lineEdit, 1, 1);
 
   73    QPushButton *okButton = 
new QPushButton(
"Ok");
 
   74    connect(okButton, SIGNAL(clicked()), 
this, SLOT(accept()));
 
   76    QPushButton *cancelButton = 
new QPushButton(
"Cancel");
 
   77    connect(cancelButton, SIGNAL(clicked()), 
this, SLOT(reject()));
 
   81    QButtonGroup *actionGroup = 
new QButtonGroup();
 
   82    actionGroup->addButton(okButton);
 
   83    actionGroup->addButton(cancelButton);
 
   87    QHBoxLayout *actionLayout = 
new QHBoxLayout();
 
   88    actionLayout->addWidget(okButton);
 
   89    actionLayout->addWidget(cancelButton);
 
   92    QVBoxLayout *dialogLayout = 
new QVBoxLayout(
this);
 
   93    dialogLayout->addLayout(gridLayout);
 
   94    dialogLayout->addLayout(actionLayout);