mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现HTTP服务架构
This commit is contained in:
@@ -17,24 +17,24 @@ PvPopWidget::PvPopWidget(PARAM* p, int width, int height, std::string name)
|
||||
ui.bkgL = PvApp::label(p, ui.widget, 0, 0, 60, height, "", "background-color: transparent; border: 0 solid rgb(42, 149, 245); border-width: 5px 0 5px 5px;");
|
||||
ui.bkgR = PvApp::label(p, ui.widget, width-60, 0, 60, height, "", "background-color: transparent; border: 0 solid rgb(42, 149, 245); border-width: 5px 5px 5px 0;");
|
||||
|
||||
ui.title = PvApp::label(p, ui.widget, 20, 10, width-20, 30, name, qss::label(20));
|
||||
PvApp::label(p, ui.widget, 20, 40, width*0.5-20, 3, "", qss::QSS_UNDERLINE);
|
||||
ui.title = PvApp::label(p, ui.widget, 20, 10, width-20, 30, name, QSS::label(20));
|
||||
PvApp::label(p, ui.widget, 20, 40, width*0.5-20, 3, "", QSS::QSS_UNDERLINE);
|
||||
{
|
||||
int w = 100, h = 40, offset = 50;
|
||||
int x = (width- w*2 - offset) *0.5;
|
||||
int y = height - h - 40;
|
||||
|
||||
ui.btnOK = PvApp::button(p, ui.widget, x, y, w, h, "确定", qss::BTN_CONFIRM);
|
||||
ui.btnOK = PvApp::button(p, ui.widget, x, y, w, h, "确定", QSS::BTN_CONFIRM);
|
||||
PvApp::bind(p, PvEvent::BUTTON_EVENT, ui.btnOK, [=](std::string) {
|
||||
if (callbackConfirm) { callbackConfirm(); }
|
||||
});
|
||||
ui.btnCancel = PvApp::button(p, ui.widget, x+w+offset, y, w, h, "取消", qss::BTN_CANCEL);
|
||||
ui.btnCancel = PvApp::button(p, ui.widget, x+w+offset, y, w, h, "取消", QSS::BTN_CANCEL);
|
||||
PvApp::bind(p, PvEvent::BUTTON_EVENT, ui.btnCancel, [=](std::string) {
|
||||
this->show(false);
|
||||
});
|
||||
}
|
||||
|
||||
ui.msg = PvApp::label(p, ui.widget, 50, height-110, width-100, 24, "", qss::label(14, "red"));
|
||||
ui.msg = PvApp::label(p, ui.widget, 50, height-110, width-100, 24, "", QSS::label(14, "red"));
|
||||
}
|
||||
|
||||
std::shared_ptr<PvPopWidget::ParamLine> PvPopWidget::addParamLine(std::string type, std::string key, std::string title, int x, int y, bool editable/* = true*/)
|
||||
@@ -42,7 +42,7 @@ std::shared_ptr<PvPopWidget::ParamLine> PvPopWidget::addParamLine(std::string ty
|
||||
auto line = std::make_shared<ParamLine>(type, key);
|
||||
mapLines[key] = line;
|
||||
|
||||
PvApp::label(p, ui.widget, x, y, lineKeyWidth, lineHeight, title, qss::label(15));
|
||||
PvApp::label(p, ui.widget, x, y, lineKeyWidth, lineHeight, title, QSS::label(15));
|
||||
if (type == "textedit")
|
||||
{
|
||||
line->widget = PvApp::textedit(p, ui.widget, x+lineKeyWidth, y, lineValWidth, lineHeight, "");
|
||||
|
||||
Reference in New Issue
Block a user