summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorShubham Goyal <22shubh22@gmail.com>2019-07-03 12:15:08 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-25 07:15:10 +0200
commit2de42b53b7c23223c38e64a75eae248d8a0cd4ec (patch)
treedc4b2fc96a0569b7c0ebfdc80446181c842a9964 /cui
parent5ccc8124a03cffca3a1848f754524a06a063cb51 (diff)
QRCode Dialog Box feature
The patch handles the created QR code as a Customized Shape (Graphic Object) Change-Id: I1cee6f0e7fac585de880a9ac34e3bc441a4b7390 Reviewed-on: https://gerrit.libreoffice.org/74167 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/Library_cui.mk2
-rw-r--r--cui/source/dialogs/QrCodeGenDialog.cxx288
-rw-r--r--cui/source/inc/QrCodeGenDialog.hxx58
-rw-r--r--cui/uiconfig/ui/qrcodegen.ui273
4 files changed, 621 insertions, 0 deletions
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index e3cd0c36ba4f..620d3de8fa69 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_Library_use_externals,cui,\
libxml2 \
orcus-parser \
orcus \
+ qrcodegen \
))
ifeq ($(DISABLE_GUI),)
$(eval $(call gb_Library_use_externals,cui,\
@@ -129,6 +130,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/dialogs/screenshotannotationdlg \
cui/source/dialogs/pastedlg \
cui/source/dialogs/postdlg \
+ cui/source/dialogs/QrCodeGenDialog \
cui/source/dialogs/scriptdlg \
cui/source/dialogs/SignatureLineDialogBase \
cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx
new file mode 100644
index 000000000000..628ada1df38b
--- /dev/null
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -0,0 +1,288 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <QrCodeGenDialog.hxx>
+
+#include <comphelper/processfactory.hxx>
+#include <comphelper/xmltools.hxx>
+#include <tools/stream.hxx>
+#include <unotools/streamwrap.hxx>
+#include <utility>
+#include <vcl/weld.hxx>
+
+#include <QrCode.hpp>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/graphic/GraphicProvider.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/drawing/QRCode.hpp>
+#include <com/sun/star/drawing/QRCodeErrorCorrection.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/sheet/XSpreadsheetView.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+
+using namespace css;
+using namespace css::uno;
+using namespace css::beans;
+using namespace css::container;
+using namespace css::frame;
+using namespace css::io;
+using namespace css::lang;
+using namespace css::frame;
+using namespace css::sheet;
+using namespace css::text;
+using namespace css::drawing;
+using namespace css::graphic;
+using namespace qrcodegen;
+
+QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference<XModel> xModel,
+ bool bEditExisting)
+ : GenericDialogController(pParent, "cui/ui/qrcodegen.ui", "QrCodeGenDialog")
+ , m_xModel(std::move(xModel))
+ , m_xEdittext(m_xBuilder->weld_entry("edit_text"))
+ , m_xRadioLow(m_xBuilder->weld_radio_button("button_low"))
+ , m_xRadioMedium(m_xBuilder->weld_radio_button("button_medium"))
+ , m_xRadioQuartile(m_xBuilder->weld_radio_button("button_quartile"))
+ , m_xRadioHigh(m_xBuilder->weld_radio_button("button_high"))
+ , m_xSpinBorder(m_xBuilder->weld_spin_button("edit_border"))
+{
+ maBox.AddButton(m_xRadioLow.get());
+ maBox.AddButton(m_xRadioMedium.get());
+ maBox.AddButton(m_xRadioQuartile.get());
+ maBox.AddButton(m_xRadioHigh.get());
+
+ // Set ECC to Low by Default.
+ if (!bEditExisting)
+ {
+ // ECC::Low 0
+ m_aECCSelect = css::drawing::QRCodeErrorCorrection::LOW;
+ m_xRadioLow->set_active(true);
+ return;
+ }
+
+ Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(),
+ UNO_QUERY_THROW);
+ Reference<XPropertySet> xProps(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
+
+ // Read properties from selected qr code
+ css::drawing::QRCode aQrCode;
+ xProps->getPropertyValue("QRCodeProperties") >>= aQrCode;
+
+ m_xEdittext->set_text(aQrCode.Payload);
+ GetErrorCorrection(aQrCode.ErrorCorrection);
+
+ Link<weld::ToggleButton&, void> aLink = LINK(this, QrCodeGenDialog, SelectRadio_Impl);
+ m_xRadioLow->connect_toggled(aLink);
+ m_xRadioMedium->connect_toggled(aLink);
+ m_xRadioQuartile->connect_toggled(aLink);
+ m_xRadioHigh->connect_toggled(aLink);
+
+ m_xSpinBorder->set_value(aQrCode.Border);
+
+ // Mark this as existing shape
+ m_xExistingShapeProperties = xProps;
+}
+
+short QrCodeGenDialog::run()
+{
+ short nRet = GenericDialogController::run();
+ if (nRet == RET_OK)
+ Apply();
+ return nRet;
+}
+
+void QrCodeGenDialog::Apply()
+{
+ css::drawing::QRCode aQrCode;
+ aQrCode.Payload = m_xEdittext->get_text();
+ aQrCode.ErrorCorrection = m_aECCSelect;
+ aQrCode.Border = m_xSpinBorder->get_value();
+
+ // Read svg and replace placeholder texts
+ OUString aSvgImage = GenerateQrCode(aQrCode.Payload, aQrCode.ErrorCorrection, aQrCode.Border);
+
+ // Insert/Update graphic
+ SvMemoryStream aSvgStream(4096, 4096);
+ aSvgStream.WriteOString(OUStringToOString(aSvgImage, RTL_TEXTENCODING_UTF8));
+ Reference<XInputStream> xInputStream(new utl::OSeekableInputStreamWrapper(aSvgStream));
+ Reference<XComponentContext> xContext(comphelper::getProcessComponentContext());
+ Reference<XGraphicProvider> xProvider = css::graphic::GraphicProvider::create(xContext);
+
+ Sequence<PropertyValue> aMediaProperties(1);
+ aMediaProperties[0].Name = "InputStream";
+ aMediaProperties[0].Value <<= xInputStream;
+ Reference<XGraphic> xGraphic(xProvider->queryGraphic(aMediaProperties));
+
+ bool bIsExistingQrCode = m_xExistingShapeProperties.is();
+ Reference<XPropertySet> xShapeProps;
+ if (bIsExistingQrCode)
+ xShapeProps = m_xExistingShapeProperties;
+ else
+ xShapeProps.set(Reference<lang::XMultiServiceFactory>(m_xModel, UNO_QUERY_THROW)
+ ->createInstance("com.sun.star.drawing.GraphicObjectShape"),
+ UNO_QUERY);
+
+ xShapeProps->setPropertyValue("Graphic", Any(xGraphic));
+
+ // Set qrcode properties
+ xShapeProps->setPropertyValue("QRCodeProperties", Any(aQrCode));
+
+ if (!bIsExistingQrCode)
+ {
+ // Default size
+ Reference<XShape> xShape(xShapeProps, UNO_QUERY);
+ awt::Size aShapeSize;
+ aShapeSize.Height = 3000;
+ aShapeSize.Width = 6000;
+ xShape->setSize(aShapeSize);
+
+ // Default anchoring
+ xShapeProps->setPropertyValue("AnchorType", Any(TextContentAnchorType_AT_PARAGRAPH));
+
+ const Reference<XServiceInfo> xServiceInfo(m_xModel, UNO_QUERY);
+
+ // Writer
+ const Reference<XTextDocument> xTextDocument(m_xModel, UNO_QUERY);
+ if (xTextDocument.is())
+ {
+ Reference<XTextContent> xTextContent(xShape, UNO_QUERY_THROW);
+ Reference<XTextViewCursorSupplier> xViewCursorSupplier(m_xModel->getCurrentController(),
+ UNO_QUERY_THROW);
+ Reference<XTextViewCursor> xCursor = xViewCursorSupplier->getViewCursor();
+ // use cursor's XText - it might be in table cell, frame, ...
+ Reference<XText> const xText(xCursor->getText());
+ assert(xText.is());
+ xText->insertTextContent(xCursor, xTextContent, true);
+ return;
+ }
+
+ // Calc
+ const Reference<XSpreadsheetDocument> xSpreadsheetDocument(m_xModel, UNO_QUERY);
+ if (xSpreadsheetDocument.is())
+ {
+ Reference<XPropertySet> xSheetCell(m_xModel->getCurrentSelection(), UNO_QUERY_THROW);
+ awt::Point aCellPosition;
+ xSheetCell->getPropertyValue("Position") >>= aCellPosition;
+ xShape->setPosition(aCellPosition);
+
+ Reference<XSpreadsheetView> xView(m_xModel->getCurrentController(), UNO_QUERY_THROW);
+ Reference<XSpreadsheet> xSheet(xView->getActiveSheet(), UNO_SET_THROW);
+ Reference<XDrawPageSupplier> xDrawPageSupplier(xSheet, UNO_QUERY_THROW);
+ Reference<XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW);
+ Reference<XShapes> xShapes(xDrawPage, UNO_QUERY_THROW);
+
+ xShapes->add(xShape);
+ return;
+ }
+ }
+}
+
+IMPL_LINK(QrCodeGenDialog, SelectRadio_Impl, weld::ToggleButton&, rButton, void)
+{
+ // If the button is already active do not toggle it back.
+ if (!rButton.get_active())
+ rButton.set_active(true);
+
+ SelectErrorCorrection(rButton);
+}
+
+void QrCodeGenDialog::SelectErrorCorrection(weld::ToggleButton& rButton)
+{
+ sal_Int32 nPos = maBox.GetButtonPos(&rButton);
+ if (nPos != -1 && nPos != maBox.GetCurrentButtonPos())
+ {
+ maBox.SelectButton(&rButton);
+ m_aECCSelect = static_cast<int>(maBox.GetCurrentButtonPos()) + 1;
+ }
+}
+
+OUString QrCodeGenDialog::GenerateQrCode(OUString aQrText, int aQrECC, int aQrBorder)
+{
+ //Select ECC:: value from aQrECC
+ qrcodegen::QrCode::Ecc bqrEcc = qrcodegen::QrCode::Ecc::LOW;
+
+ switch (aQrECC)
+ {
+ case 2:
+ {
+ bqrEcc = qrcodegen::QrCode::Ecc::MEDIUM;
+ break;
+ }
+ case 3:
+ {
+ bqrEcc = qrcodegen::QrCode::Ecc::QUARTILE;
+ break;
+ }
+ case 4:
+ {
+ bqrEcc = qrcodegen::QrCode::Ecc::HIGH;
+ break;
+ }
+ default:
+ {
+ bqrEcc = qrcodegen::QrCode::Ecc::LOW;
+ break;
+ }
+ }
+
+ //OuString to char* qrtext
+ OString o = OUStringToOString(aQrText, RTL_TEXTENCODING_ASCII_US);
+ const char* qrtext = o.pData->buffer;
+
+ //From Qr Code library.
+ qrcodegen::QrCode qr0 = qrcodegen::QrCode::encodeText(qrtext, bqrEcc);
+ std::string svg = qr0.toSvgString(aQrBorder);
+ //cstring to OUString
+ char* cstr = &svg[0];
+ return OUString::createFromAscii(cstr);
+}
+
+void QrCodeGenDialog::GetErrorCorrection(long ErrorCorrection)
+{
+ switch (ErrorCorrection)
+ {
+ case css::drawing::QRCodeErrorCorrection::MEDIUM:
+ {
+ m_xRadioMedium->set_active(true);
+ m_aECCSelect = ErrorCorrection;
+ break;
+ }
+ case css::drawing::QRCodeErrorCorrection::QUARTILE:
+ {
+ m_xRadioQuartile->set_active(true);
+ m_aECCSelect = ErrorCorrection;
+ break;
+ }
+ case css::drawing::QRCodeErrorCorrection::HIGH:
+ {
+ m_xRadioHigh->set_active(true);
+ m_aECCSelect = ErrorCorrection;
+ break;
+ }
+ default:
+ {
+ m_xRadioLow->set_active(true);
+ m_aECCSelect = css::drawing::QRCodeErrorCorrection::LOW;
+ break;
+ }
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/QrCodeGenDialog.hxx b/cui/source/inc/QrCodeGenDialog.hxx
new file mode 100644
index 000000000000..70fc2c7f7d7a
--- /dev/null
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_CUI_INC_QRCODEGENDIALOG_HXX
+#define INCLUDED_CUI_INC_QRCODEGENDIALOG_HXX
+
+#include <vcl/weld.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/drawing/QRCodeErrorCorrection.hpp>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+// cuitabarea included to use Button Box class for group of Radio Buttons
+#include "cuitabarea.hxx"
+
+class QrCodeGenDialog : public weld::GenericDialogController
+{
+public:
+ QrCodeGenDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting);
+
+ virtual short run() override;
+
+protected:
+ css::uno::Reference<css::frame::XModel> m_xModel;
+ void Apply();
+
+private:
+ std::unique_ptr<weld::Entry> m_xEdittext;
+ std::unique_ptr<weld::RadioButton> m_xRadioLow;
+ std::unique_ptr<weld::RadioButton> m_xRadioMedium;
+ std::unique_ptr<weld::RadioButton> m_xRadioQuartile;
+ std::unique_ptr<weld::RadioButton> m_xRadioHigh;
+ std::unique_ptr<weld::SpinButton> m_xSpinBorder;
+
+ css::uno::Reference<css::beans::XPropertySet> m_xExistingShapeProperties;
+
+ /* maBox - holds radioButton, helped in writing code. */
+ ButtonBox maBox;
+ /* Stores which error correction is selected. */
+ long m_aECCSelect;
+ void SelectErrorCorrection(weld::ToggleButton&);
+ void GetErrorCorrection(long);
+ static OUString GenerateQrCode(OUString aQrText, int aQrECC, int aQrBorder);
+
+ DECL_LINK(SelectRadio_Impl, weld::ToggleButton&, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
new file mode 100644
index 000000000000..3be92513d178
--- /dev/null
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.0 -->
+<interface domain="cui">
+ <requires lib="gtk+" version="3.18"/>
+ <object class="GtkDialog" id="QrCodeGenDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes" context="qrcodegen|QrCodeGenDialog">QR Code</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkEntry" id="edit_text">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="activates_default">True</property>
+ <property name="placeholder_text" translatable="yes" context="qrcodegen|edit_name">www.libreoffice.org</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_text">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="qrcodegen|label_text" comments="Text to be converted in qr">URL/Text :</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit_text</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_border">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="qrcodegen|label_border" comments="Set Border">Border :</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit_border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_ecc">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="qrcodegen|label_ecc" comments="Error correction while qr gen">Error Correction Level :</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="edit_border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkRadioButton" id="button_low">
+ <property name="label" translatable="yes" context="qrcodegen|ErrorCorrection" >Low</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="button_medium">
+ <property name="label" translatable="yes" context="qrcodegen|ErrorCorrection" >Medium</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="button_quartile">
+ <property name="label" translatable="yes" context="qrcodegen|ErrorCorrection" >Quartile</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="button_high">
+ <property name="label" translatable="yes" context="qrcodegen|ErrorCorrection" >High</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="qrcodegen|QR Code Properties">QR Code</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancel</action-widget>
+ <action-widget response="-5">ok</action-widget>
+ <action-widget response="-11">help</action-widget>
+ </action-widgets>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
+ </object>
+</interface>