LibreOffice Module cui (master) 1
measure.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <sfx2/basedlgs.hxx>
22#include <svx/dlgctrl.hxx>
23#include <svx/measctrl.hxx>
24
25class SdrView;
26
29{
30private:
32
35 const SdrView* pView;
37
39
42 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLineDist;
43 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineOverhang;
44 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineDist;
45 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline1Len;
46 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline2Len;
47 std::unique_ptr<weld::CheckButton> m_xTsbBelowRefEdge;
48 std::unique_ptr<weld::SpinButton> m_xMtrFldDecimalPlaces;
49 std::unique_ptr<weld::CheckButton> m_xTsbAutoPosV;
50 std::unique_ptr<weld::CheckButton> m_xTsbAutoPosH;
51 std::unique_ptr<weld::CheckButton> m_xTsbShowUnit;
52 std::unique_ptr<weld::ComboBox> m_xLbUnit;
53 std::unique_ptr<weld::CheckButton> m_xTsbParallel;
54 std::unique_ptr<weld::Label> m_xFtAutomatic;
55 std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
56 std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
57
58 void FillUnitLB();
59
60 DECL_LINK(ClickAutoPosHdl_Impl, weld::Toggleable&, void);
61 DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
62 DECL_LINK(ChangeAttrSpinHdl_Impl, weld::SpinButton&, void);
63 DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
64 DECL_LINK(ChangeAttrClickHdl_Impl, weld::Toggleable&, void);
65 void ChangeAttrHdl_Impl(void const *);
66
67public:
68
69 SvxMeasurePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
70 virtual ~SvxMeasurePage() override;
71
72 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
74
75 virtual bool FillItemSet( SfxItemSet* ) override;
76 virtual void Reset( const SfxItemSet * ) override;
77
78 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
79
80 void Construct();
81 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
82 virtual void PageCreated(const SfxAllItemSet& aSet) override;
83
84};
85
86/* Derived from SfxSingleTabDialogController, in order to be able to be
87 informed about virtual methods by the control. */
89{
90public:
91 SvxMeasureDialog(weld::Window* pParent, const SfxItemSet& rAttr,
92 const SdrView* pView);
93};
94
95/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxMeasureDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView)
Definition: measure.cxx:47
Dialog for changing TextAttributes.
Definition: measure.hxx:29
std::unique_ptr< weld::Label > m_xFtAutomatic
Definition: measure.hxx:54
DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::CheckButton > m_xTsbShowUnit
Definition: measure.hxx:51
DECL_LINK(ClickAutoPosHdl_Impl, weld::Toggleable &, void)
void ChangeAttrHdl_Impl(void const *)
Definition: measure.cxx:601
DECL_LINK(ChangeAttrSpinHdl_Impl, weld::SpinButton &, void)
static const WhichRangesContainer pRanges
Definition: measure.hxx:31
std::unique_ptr< weld::ComboBox > m_xLbUnit
Definition: measure.hxx:52
std::unique_ptr< weld::CheckButton > m_xTsbAutoPosV
Definition: measure.hxx:49
SfxItemSet aAttrSet
Definition: measure.hxx:34
virtual void PointChanged(weld::DrawingArea *pWindow, RectPoint eRP) override
Definition: measure.cxx:529
virtual bool FillItemSet(SfxItemSet *) override
Definition: measure.cxx:350
SvxRectCtl m_aCtlPosition
Definition: measure.hxx:40
const SfxItemSet & rOutAttrs
Definition: measure.hxx:33
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: measure.cxx:523
virtual void Reset(const SfxItemSet *) override
Definition: measure.cxx:142
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelplineOverhang
Definition: measure.hxx:43
const SdrView * pView
Definition: measure.hxx:35
std::unique_ptr< weld::CustomWeld > m_xCtlPosition
Definition: measure.hxx:55
std::unique_ptr< weld::SpinButton > m_xMtrFldDecimalPlaces
Definition: measure.hxx:48
virtual ~SvxMeasurePage() override
Definition: measure.cxx:130
bool bPositionModified
Definition: measure.hxx:38
std::unique_ptr< weld::CheckButton > m_xTsbParallel
Definition: measure.hxx:53
SvxXMeasurePreview m_aCtlPreview
Definition: measure.hxx:41
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelplineDist
Definition: measure.hxx:44
void Construct()
Definition: measure.cxx:509
void SetView(const SdrView *pSdrView)
Definition: measure.hxx:81
std::unique_ptr< weld::CheckButton > m_xTsbAutoPosH
Definition: measure.hxx:50
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelpline1Len
Definition: measure.hxx:45
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelpline2Len
Definition: measure.hxx:46
static WhichRangesContainer GetRanges()
Definition: measure.hxx:73
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: measure.cxx:745
std::unique_ptr< weld::CustomWeld > m_xCtlPreview
Definition: measure.hxx:56
DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::CheckButton > m_xTsbBelowRefEdge
Definition: measure.hxx:47
SvxMeasurePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: measure.cxx:66
MapUnit eUnit
Definition: measure.hxx:36
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLineDist
Definition: measure.hxx:42
DECL_LINK(ChangeAttrClickHdl_Impl, weld::Toggleable &, void)
void FillUnitLB()
Definition: measure.cxx:729
MapUnit
RectPoint