34 int text_editor_font_size = 12;
35 int info_board_font_size = 12;
36 int tool_bar_icon_width = 24;
37 int tool_bar_icon_height = 24;
38 Qt::ToolButtonStyle tool_bar_button_style = Qt::ToolButtonTextUnderIcon;
40 bool save_window_state;
43 if (
const auto v = j[
"text_editor_font_size"]; v.isDouble()) {
44 text_editor_font_size = v.toInt();
46 if (
const auto v = j[
"info_board_font_size"]; v.isDouble()) {
47 info_board_font_size = v.toInt();
49 if (
const auto v = j[
"tool_bar_icon_width"]; v.isDouble()) {
50 tool_bar_icon_width = v.toInt();
52 if (
const auto v = j[
"tool_bar_icon_height"]; v.isDouble()) {
53 tool_bar_icon_height = v.toInt();
55 if (
const auto v = j[
"tool_bar_button_style"]; v.isDouble()) {
56 tool_bar_button_style =
static_cast<Qt::ToolButtonStyle
>(v.toInt());
59 if (
const auto v = j[
"save_window_state"]; v.isBool()) {
60 save_window_state = v.toBool();
64 [[nodiscard]]
auto ToJson()
const -> QJsonObject {
66 j[
"text_editor_font_size"] = text_editor_font_size;
67 j[
"info_board_font_size"] = info_board_font_size;
68 j[
"tool_bar_icon_width"] = tool_bar_icon_width;
69 j[
"tool_bar_icon_height"] = tool_bar_icon_height;
70 j[
"tool_bar_button_style"] = tool_bar_button_style;
72 j[
"save_window_state"] = save_window_state;
Definition: FileReadTask.cpp:31
Definition: AppearanceSO.h:33