MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / StyleGroup

Method StyleGroup

source/ui/EditUi.cpp:1022–1133  ·  view source on GitHub ↗

TODO: new widgets

Source from the content-addressed store, hash-verified

1020 const QiTextPad& ref = var.to<QiTextPad>();
1021 widget_td.edit()->setPlainText(ref.text);
1022 widget_td.show();
1023 } break;
1024 case QiType::range:
1025 {
1026 const QiRangeSet& ref = var.to<QiRangeSet>();
1027 macro->range = ref.rect;
1028 RECT rect;
1029 if (macro->wndState)
1030 {
1031 if (!macro->wndInfo.update_fromName()) SelectWindow();
1032 rect = QiCvt::WR_AtR(ref.rect, macro->wndInfo.wnd);
1033 POINT pt = Window::pos(macro->wndInfo.wnd);
1034 rect.left += pt.x, rect.top += pt.y, rect.right += pt.x, rect.bottom += pt.y;
1035 }
1036 else rect = QiCvt::SR_AtR(ref.rect);
1037 range_rv.Show(rect, 2, QColor(0, 127, 192));
1038 } break;
1039 }
1040 }
1041 else
1042 {
1043 SetGroupCurrent();
1044 SetEditCurrent();
1045 }
1046 });
1047}
1048
1049// TODO: new widgets
1050void EditUi::StyleGroup()
1051{
1052 if ("this window")
1053 {
1054 setProperty(Prop::style_group, "frame");
1055 style_set_group(ui.title_widget, "title");
1056 style_set_group(ui.content_widget, "edit-client");
1057 style_set_group(ui.title_run_button, "title-title_run_button");
1058 style_set_group(ui.title_back_button, "title-back_button");
1059 style_set_group(ui.title_close_button, "title-close_button");
1060 }
1061 if ("tool button")
1062 {
1063 style_set_group(ui.window_select_button, "get_button");
1064 }
1065 if ("operation button")
1066 {
1067 BindSafeIter(bind_add_button, [this](QPushButton* p, size_t) { style_set_group(p, "edit-add_button"); });
1068 BindSafeIter(bind_chg_button, [this](QPushButton* p, size_t) { style_set_group(p, "edit-add_button"); });
1069 BindSafeIter(bind_edt_button, [this](QPushButton* p, size_t) { style_set_group(p, "edit-edit_button"); });
1070 BindSafeIter(bind_edt2_button, [this](QPushButton* p, size_t) { style_set_group(p, "edit-edit_button"); });
1071 BindSafeIter(bind_tab_button, [this](QPushButton* p, size_t) { style_set_group(p, "edit-tab_button"); });
1072 style_set_group(ui.rec_button, "edit-add_button");
1073 style_set_group(ui.rec_window_button, "edit-add_button");
1074 style_set_group(ui.ocr_test_button, "edit-add_button");
1075 style_set_group(ui.varOperator_test_button, "edit-add_button");
1076 style_set_group(ui.range_wnd_button, "edit-add_button");
1077 }
1078 if ("check box")
1079 {

Callers

nothing calls this directly

Calls 6

classNameMethod · 0.80
propertyMethod · 0.80
indexOfMethod · 0.80
setStyleSheetMethod · 0.45
sizeMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected