diff --git a/rmapplugin/gresb.cpp b/rmapplugin/gresb.cpp new file mode 100644 --- /dev/null +++ b/rmapplugin/gresb.cpp @@ -0,0 +1,48 @@ +#include "gresb.h" + +gresb::gresb(QWidget *parent) : + QWidget(parent) +{ + //*** QLABEL ***// + gresbBridgeIPLabel = new QLabel(tr("GRESB Bridge IP: ")); + gresbVirtualLinkLabel = new QLabel(tr("GRESB Virtual Link: ")); + spwLinkLabel = new QLabel(tr("GRESB SPW Link: ")); + rmapSourceLogicalAddressLabel = new QLabel(tr("RMAP Source Logical Address: ")); + rmapSendStateLabel = new QLabel(tr("RMAP Send Socket State: waiting for connection")); + rmapReceiveStateLabel = new QLabel(tr("RMAP Receive Socket State: waiting for connection")); + gresbStatusQueryLabel = new QLabel(tr("GRESB status query socket (port 3010): waiting for connection")); + + //*** SPINBOX ***// + gresbVirtualLinkSpinBox = new QSpinBox; + rmapSourceLogicalAddressSpinBox = new QSpinBox; + spwLinkSpinBox = new QSpinBox;; + gresbVirtualLinkSpinBox->setRange(0, 4); + gresbVirtualLinkSpinBox->setValue(1); + rmapSourceLogicalAddressSpinBox->setRange(0, 255); + rmapSourceLogicalAddressSpinBox->setValue(33); + spwLinkSpinBox->setRange(0, 2); + spwLinkSpinBox->setValue(0); + + //*** LAYOUT ***// + connectionLayout = new QGridLayout; + + //*** MISC ***// + gresbBridgeIPDialogBox = new QIPDialogBox; + + connectionLayout->addWidget(gresbBridgeIPLabel, 0, 0, 0); + connectionLayout->addWidget(gresbBridgeIPDialogBox, 0, 1, 0); + connectionLayout->addWidget(gresbVirtualLinkLabel, 1, 0, 0); + connectionLayout->addWidget(gresbVirtualLinkSpinBox, 1, 1, 0); + connectionLayout->addWidget(spwLinkLabel, 2, 0, 0); + connectionLayout->addWidget(spwLinkSpinBox, 2, 1, 0); + connectionLayout->addWidget(rmapSourceLogicalAddressLabel, 3, 0, 0); + connectionLayout->addWidget(rmapSourceLogicalAddressSpinBox, 3, 1, 0); + connectionLayout->addWidget(rmapSendStateLabel, 4, 0, 1, 2); + connectionLayout->addWidget(rmapReceiveStateLabel, 5, 0, 1, 2); + connectionLayout->addWidget(gresbStatusQueryLabel, 6, 0, 1, 2); + + connectionLayout->setRowStretch(7, 1); + connectionLayout->setColumnStretch(2, 1); + + this->setLayout(connectionLayout); +} diff --git a/rmapplugin/gresb.h b/rmapplugin/gresb.h new file mode 100644 --- /dev/null +++ b/rmapplugin/gresb.h @@ -0,0 +1,40 @@ +#ifndef GRESB_H +#define GRESB_H + +#include +#include +#include +#include +#include +#include "qipdialogbox.h" + +class gresb : public QWidget +{ + Q_OBJECT +public: + explicit gresb(QWidget *parent = 0); + +signals: + +public slots: + +private: + QLabel *gresbBridgeIPLabel; + QLabel *gresbVirtualLinkLabel; + QLabel *spwLinkLabel; + QLabel *rmapSourceLogicalAddressLabel; + QLabel *rmapSendStateLabel; + QLabel *rmapReceiveStateLabel; + QLabel *gresbStatusQueryLabel; + + QIPDialogBox* gresbBridgeIPDialogBox; + + QSpinBox *gresbVirtualLinkSpinBox; + QSpinBox *spwLinkSpinBox; + QSpinBox *rmapSourceLogicalAddressSpinBox; + + QGridLayout *connectionLayout; + +}; + +#endif // GRESB_H