From aece54a415e5e35d6c5f5cfd1f6d8b3af594d272 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 9 Apr 2018 16:21:28 +0100 Subject: weld SpacingDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ida9077b19ad78001c632796257651e4314a9a538 Reviewed-on: https://gerrit.libreoffice.org/52676 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- starmath/inc/dialog.hxx | 51 +++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'starmath/inc') diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index bc0701421d43..cd860e5649b1 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -179,13 +179,13 @@ class SmCategoryDesc { OUString Name; OUString Strings[4]; - std::unique_ptr Graphics[4]; /* regular bitmaps */ + std::unique_ptr Graphics[4]; /* regular bitmaps */ sal_uInt16 Minimum[4]; sal_uInt16 Maximum[4]; sal_uInt16 Value[4]; public: - SmCategoryDesc(VclBuilderContainer& rBuilder, sal_uInt16 nCategoryIdx); + SmCategoryDesc(weld::Builder& rBuilder, sal_uInt16 nCategoryIdx); ~SmCategoryDesc(); const OUString& GetName() const { return Name; } @@ -195,52 +195,49 @@ public: sal_uInt16 GetValue(sal_uInt16 Index) const { return Value[Index]; } void SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;} - const Image * GetGraphic(sal_uInt16 Index) const + weld::Widget* GetGraphic(sal_uInt16 Index) const { return Graphics[Index].get(); } }; - -class SmDistanceDialog : public ModalDialog +class SmDistanceDialog : public weld::GenericDialogController { - VclPtr m_pFrame; - VclPtr m_pFixedText1; - VclPtr m_pMetricField1; - VclPtr m_pFixedText2; - VclPtr m_pMetricField2; - VclPtr m_pFixedText3; - VclPtr m_pMetricField3; - VclPtr m_pCheckBox1; - VclPtr m_pFixedText4; - VclPtr m_pMetricField4; - VclPtr m_pMenuButton; - VclPtr m_pDefaultButton; - VclPtr m_pBitmap; + std::unique_ptr m_xFrame; + std::unique_ptr m_xFixedText1; + std::unique_ptr m_xMetricField1; + std::unique_ptr m_xFixedText2; + std::unique_ptr m_xMetricField2; + std::unique_ptr m_xFixedText3; + std::unique_ptr m_xMetricField3; + std::unique_ptr m_xCheckBox1; + std::unique_ptr m_xFixedText4; + std::unique_ptr m_xMetricField4; + std::unique_ptr m_xMenuButton; + std::unique_ptr m_xDefaultButton; + std::unique_ptr m_xBitmap; + + weld::Widget* m_pCurrentImage; SmCategoryDesc *Categories[NOCATEGORIES]; sal_uInt16 nActiveCategory; bool bScaleAllBrackets; - DECL_LINK(GetFocusHdl, Control&, void); - DECL_LINK(MenuSelectHdl, Menu *, bool); - DECL_LINK(DefaultButtonClickHdl, Button *, void); - DECL_LINK(CheckBoxClickHdl, Button *, void); + DECL_LINK(GetFocusHdl, weld::Widget&, void); + DECL_LINK(MenuSelectHdl, const OString&, void); + DECL_LINK(DefaultButtonClickHdl, weld::Button&, void); + DECL_LINK(CheckBoxClickHdl, weld::ToggleButton&, void); - using Window::SetHelpId; - static void SetHelpId(MetricField &rField, const OString& sHelpId); void SetCategory(sal_uInt16 Category); public: - SmDistanceDialog(vcl::Window *pParent); + SmDistanceDialog(weld::Window *pParent); virtual ~SmDistanceDialog() override; - virtual void dispose() override; void ReadFrom(const SmFormat &rFormat); void WriteTo (SmFormat &rFormat); }; - /**************************************************************************/ -- cgit