34 #include <QPushButton> 50 BaseWidget(parent,
"network_data_transfer_widget",
"Network Data Transfer"),
51 mDataTransfer(backend)
69 QPushButton* sendButton =
new QPushButton(
"Send",
this);
72 QVBoxLayout* layout =
new QVBoxLayout(
this);
75 QString uid = mDataTransfer->getOpenIGTLink()->getNetworkConnection()->getUid();
76 QVBoxLayout* connectionLayout = this->createVBoxInGroupBox(layout, QString(
"Connection/%1").arg(uid));
77 connectionLayout->addWidget(mConnectionWidget);
79 QVBoxLayout* receiveLayout = this->createVBoxInGroupBox(layout,
"Receive");
81 mDataTransfer->getPatientModelService(),
82 this, mDataTransfer->getAcceptIncomingData()));
84 QVBoxLayout* sendLayout = this->createVBoxInGroupBox(layout,
"Send");
86 mDataTransfer->getPatientModelService(),
87 this, mDataTransfer->getDataToSend()));
88 sendLayout->addWidget(sendButton);
90 mDataTransfer->getPatientModelService(),
93 mDataTransfer->getPatientModelService(),
94 this, mDataTransfer->getStreamActiveVideoSource()));
99 mDataTransfer.reset();
102 QVBoxLayout* NetworkDataTransferWidget::createVBoxInGroupBox(QVBoxLayout* parent, QString header)
104 QWidget* widget =
new QWidget(
this);
105 QVBoxLayout* layout =
new QVBoxLayout(widget);
106 layout->setMargin(0);
109 parent->addWidget(groupBox);
boost::shared_ptr< class NetworkDataTransfer > NetworkDataTransferPtr
QWidget * createDataWidget(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget *parent, PropertyPtr data, QGridLayout *gridLayout, int row)
Create a widget capable of displaying the input data.
static StringPropertyActiveVideoSourcePtr create(VideoServicePtr service)
Namespace for all CustusX production code.