OpalLinkConfigurationWindow.cc 676 Bytes
Newer Older
1 2 3
#include "OpalLinkConfigurationWindow.h"

OpalLinkConfigurationWindow::OpalLinkConfigurationWindow(OpalLink* link,
4 5
        QWidget *parent,
        Qt::WindowFlags flags) :
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    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);
}