30 #include <QVBoxLayout> 40 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
42 _layout =
new QVBoxLayout(
this);
43 _layout->setContentsMargins(5, 5, 0, 0);
44 _layout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
60 _fields.insert(label, info.field_raw);
64 bool selected_field = (info.field_raw == info.oneof_selected_field) || !info.oneof_selected_field;
98 auto field =
_fields.find(label);
146 if (!cache)
return false;
151 _message->GetReflection()->SwapFields(
_message, cache.get(), {current_field});
159 std::string nnames = *it;
160 for (std::advance(it, 1); it !=
_nested_field_name.end(); ++it) nnames += delimiter + *it;
166 _layout->addWidget(
new QLabel(description));
void toCache(const std::string &key, const google::protobuf::Message &message)
if(UPLO(*uplo)==INVALID) *info
static std::string nestedNameListToKey(const std::list< std::string > &nested_name)
std::unique_ptr< google::protobuf::Message > fromCache(const std::string &key) const