LibreOffice Module cui (master) 1
connect.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 <svx/connctrl.hxx>
22#include <sfx2/tabdlg.hxx>
23#include <vcl/customweld.hxx>
24#include <vcl/weld.hxx>
25#include <sfx2/basedlgs.hxx>
26
27class SdrView;
28
31{
32private:
36 const SdrView* pView;
38
40 std::unique_ptr<weld::ComboBox> m_xLbType;
41 std::unique_ptr<weld::Label> m_xFtLine1;
42 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine1;
43 std::unique_ptr<weld::Label> m_xFtLine2;
44 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine2;
45 std::unique_ptr<weld::Label> m_xFtLine3;
46 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLine3;
47 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHorz1;
48 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldVert1;
49 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHorz2;
50 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldVert2;
51 std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
52
53 void FillTypeLB();
54
55 DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
56 DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
57
58 template<class T>
60public:
61
62 SvxConnectionPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
63 virtual ~SvxConnectionPage() override;
64
65 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
67
68 virtual bool FillItemSet( SfxItemSet* ) override;
69 virtual void Reset( const SfxItemSet * ) override;
70
71 void Construct();
72 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
73 virtual void PageCreated(const SfxAllItemSet& aSet) override;
74};
75
76/* Derived from SfxSingleTabDialogController, in order to be informed about
77 virtual methods by the control. */
79{
80public:
81 SvxConnectionDialog(weld::Window* pParent, const SfxItemSet& rAttr,
82 const SdrView* pView);
83};
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxConnectionDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView)
Definition: connect.cxx:44
Dialog for changing connectors.
Definition: connect.hxx:31
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine1
Definition: connect.hxx:42
std::unique_ptr< weld::Label > m_xFtLine1
Definition: connect.hxx:41
const SdrView * pView
Definition: connect.hxx:36
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine3
Definition: connect.hxx:46
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHorz1
Definition: connect.hxx:47
DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::Label > m_xFtLine3
Definition: connect.hxx:45
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldVert2
Definition: connect.hxx:50
virtual bool FillItemSet(SfxItemSet *) override
Definition: connect.cxx:202
std::unique_ptr< weld::Label > m_xFtLine2
Definition: connect.hxx:43
void SetMetricValueAndSave(const SfxItemSet *rAttrs, weld::MetricSpinButton &rField, TypedWhichId< T > nWhich)
Definition: connect.cxx:122
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHorz2
Definition: connect.hxx:49
SfxItemSet aAttrSet
Definition: connect.hxx:35
DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton &, void)
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLine2
Definition: connect.hxx:44
virtual void Reset(const SfxItemSet *) override
Definition: connect.cxx:138
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: connect.cxx:386
std::unique_ptr< weld::CustomWeld > m_xCtlPreview
Definition: connect.hxx:51
virtual ~SvxConnectionPage() override
Definition: connect.cxx:116
SvxConnectionPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: connect.cxx:62
static const WhichRangesContainer pRanges
Definition: connect.hxx:33
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldVert1
Definition: connect.hxx:48
void SetView(const SdrView *pSdrView)
Definition: connect.hxx:72
std::unique_ptr< weld::ComboBox > m_xLbType
Definition: connect.hxx:40
static WhichRangesContainer GetRanges()
Definition: connect.hxx:66
SvxXConnectionPreview m_aCtlPreview
Definition: connect.hxx:39
const SfxItemSet & rOutAttrs
Definition: connect.hxx:34
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: connect.cxx:282
MapUnit