void qt_theme_settings::postDefaultThemeIdToCore(const int _theme_id) const { Ui::gui_coll_helper cl_coll(GetDispatcher()->create_collection(), true); cl_coll.set_value_as_int("id", _theme_id); GetDispatcher()->post_message_to_core("themes/default/id", cl_coll.get()); }
void qt_gui_settings::post_value_to_core(const QString& _name, const settings_value& _val) const { Ui::gui_coll_helper cl_coll(GetDispatcher()->create_collection(), true); core::ifptr<core::istream> data_stream(cl_coll->create_stream()); if (_val.data_.size()) data_stream->write((const uint8_t*) &_val.data_[0], (uint32_t)_val.data_.size()); cl_coll.set_value_as_qstring("name", _name); cl_coll.set_value_as_stream("value", data_stream.get()); GetDispatcher()->post_message_to_core("settings/value/set", cl_coll.get()); }
void qt_theme_settings::postContactsThemesToCore() const { Ui::gui_coll_helper cl_coll(GetDispatcher()->create_collection(), true); core::ifptr<core::istream> data_stream(cl_coll->create_stream()); QString result = serializedContactsThemes(); uint size = result.toLatin1().size(); if (size) { data_stream->write((const uint8_t*) result.toLatin1().data(), size); } cl_coll.set_value_as_qstring("name", "contacts_themes"); cl_coll.set_value_as_stream("value", data_stream.get()); __INFO("themes", ", result string: " << result); GetDispatcher()->post_message_to_core("themes/settings/set", cl_coll.get()); }