| 88 | namespace dialogs { |
| 89 | |
| 90 | DeviceOptions::DeviceOptions(QWidget *parent) : |
| 91 | DSDialog(parent) |
| 92 | { |
| 93 | _scroll_panel = NULL; |
| 94 | _container_panel = NULL; |
| 95 | _scroll = NULL; |
| 96 | _width = 0; |
| 97 | _groupHeight1 = 0; |
| 98 | _groupHeight2 = 0; |
| 99 | _dynamic_panel = NULL; |
| 100 | _container_lay = NULL; |
| 101 | _isBuilding = false; |
| 102 | _cur_analog_tag_index = 0; |
| 103 | |
| 104 | SigSession *session = AppControl::Instance()->GetSession(); |
| 105 | _device_agent = session->get_device(); |
| 106 | |
| 107 | this->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_DEVICE_OPTIONS), "Device Options")); |
| 108 | this->SetTitleSpace(0); |
| 109 | this->layout()->setSpacing(0); |
| 110 | this->layout()->setDirection(QBoxLayout::TopToBottom); |
| 111 | this->layout()->setAlignment(Qt::AlignTop); |
| 112 | |
| 113 | // scroll panel |
| 114 | _scroll_panel = new QWidget(); |
| 115 | QVBoxLayout *scroll_lay = new QVBoxLayout(); |
| 116 | scroll_lay->setContentsMargins(0, 0, 0, 0); |
| 117 | scroll_lay->setAlignment(Qt::AlignLeft); |
| 118 | scroll_lay->setDirection(QBoxLayout::TopToBottom); |
| 119 | _scroll_panel->setLayout(scroll_lay); |
| 120 | this->layout()->addWidget(_scroll_panel); |
| 121 | |
| 122 | // container |
| 123 | _container_panel = new QWidget(); |
| 124 | _container_lay = new QVBoxLayout(); |
| 125 | _container_lay->setDirection(QBoxLayout::TopToBottom); |
| 126 | _container_lay->setAlignment(Qt::AlignTop); |
| 127 | _container_lay->setContentsMargins(0, 0, 0, 0); |
| 128 | _container_lay->setSpacing(5); |
| 129 | _container_panel->setLayout(_container_lay); |
| 130 | scroll_lay->addWidget(_container_panel); |
| 131 | |
| 132 | QFont font = this->font(); |
| 133 | font.setPointSizeF(AppConfig::Instance().appOptions.fontSize); |
| 134 | |
| 135 | // mode group box |
| 136 | QGroupBox *props_box = new QGroupBox(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_MODE), "Mode"), this); |
| 137 | props_box->setFont(font); |
| 138 | props_box->setMinimumHeight(70); |
| 139 | props_box->setAlignment(Qt::AlignTop); |
| 140 | QLayout *props_lay = get_property_form(props_box); |
| 141 | props_lay->setContentsMargins(5, 20, 5, 5); |
| 142 | props_box->setLayout(props_lay); |
| 143 | _container_lay->addWidget(props_box); |
| 144 | |
| 145 | QWidget *minWid = new QWidget(); |
| 146 | minWid->setFixedHeight(1); |
| 147 | minWid->setMinimumWidth(230); |
nothing calls this directly
no test coverage detected