OpalLinkConfigurationWindow.cc 774 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#include "OpalLinkConfigurationWindow.h"

OpalLinkConfigurationWindow::OpalLinkConfigurationWindow(OpalLink* link,
                                                         QWidget *parent,
                                                         Qt::WindowFlags flags) :
    QWidget(parent, flags),
    link(link)

{


    ui.setupUi(this);

    ui.opalInstIDSpinBox->setValue(this->link->getOpalInstID());

    connect(ui.opalInstIDSpinBox, SIGNAL(valueChanged(int)), link, SLOT(setOpalInstID(int)));
    connect(link, SIGNAL(connected(bool)), this, SLOT(allowSettingsAccess(bool)));
    this->show();
}

void OpalLinkConfigurationWindow::allowSettingsAccess(bool enabled)
{
    ui.paramFileButton->setEnabled(enabled);
    ui.servoConfigFileButton->setEnabled(enabled);
}