void medBrowserPacsNodesToolBox::remNode(void)
{
    d->table->removeRow(d->table->currentRow());

    this->writeSettings();
    emit nodesUpdated();
}
medPacsDataSource::medPacsDataSource(QWidget* parent) : medAbstractDataSource(parent), d(new medPacsDataSourcePrivate)
{
    //this hierarchy is clearly broken: medPacsDataSource inherits from QObject,
    //pacsWidget is a widget, and its parent is the browserArea,
    //see destructor.
    d->pacsWidget = new medPacsWidget(parent);
    d->pacsSelector = new medPacsSelector(d->pacsWidget);
    d->pacsHostToolBox = new medBrowserPacsHostToolBox(d->pacsWidget);
    d->toolBoxes.push_back(d->pacsHostToolBox);
    d->pacsNodesToolBox = new medBrowserPacsNodesToolBox(d->pacsWidget);
    d->toolBoxes.push_back(d->pacsNodesToolBox);
    d->pacsSearchToolBox = new medBrowserPacsSearchToolBox(d->pacsWidget);
    d->toolBoxes.push_back(d->pacsSearchToolBox);

    connect(d->pacsWidget, SIGNAL(moveList(const QVector<medMoveCommandItem>&)), this, SLOT(onPacsMove(const QVector<medMoveCommandItem>&)));
    connect(d->pacsWidget, SIGNAL(import(QString)), this, SIGNAL(dataToImportReceived(QString)));

    connect(d->pacsNodesToolBox, SIGNAL(nodesUpdated()), d->pacsSelector, SLOT(updateList()));
    connect(d->pacsSelector, SIGNAL(selectionChanged(QVector<int>)), d->pacsWidget, SLOT(updateSelectedNodes(QVector<int>)));

    connect(d->pacsNodesToolBox, SIGNAL(echoRequest()), d->pacsWidget, SLOT(onEchoRequest()));
    connect(d->pacsWidget, SIGNAL(echoResponse(QVector<bool>)), d->pacsNodesToolBox, SLOT(onEchoResponse(QVector<bool>)));

    connect(d->pacsSearchToolBox, SIGNAL(search(QString)), d->pacsWidget, SLOT(search(QString)));

}
void medBrowserPacsNodesToolBox::addNode(void)
{
    int row = d->table->rowCount(); d->table->insertRow(row);

    d->table->setItem(row, 0, new QTableWidgetItem(d->title->text()));
    d->table->setItem(row, 1, new QTableWidgetItem(d->address->text()));
    d->table->setItem(row, 2, new QTableWidgetItem(d->port->text()));

    this->writeSettings();
    emit nodesUpdated();
}