tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / extensions / source / propctrlr / pushbuttonnavigation.hxx
blob7248fb27d4bfd8567d75df560e16f902a0f5cd24
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <com/sun/star/beans/XPropertySet.hpp>
23 #include <com/sun/star/beans/PropertyState.hpp>
24 #include <com/sun/star/form/FormButtonType.hpp>
27 namespace pcr
31 //= PushButtonNavigation
33 class PushButtonNavigation final
35 css::uno::Reference< css::beans::XPropertySet >
36 m_xControlModel;
37 bool m_bIsPushButton;
39 public:
40 /** ctor
41 @param _rxControlModel
42 the control model which is or will be bound
44 explicit PushButtonNavigation(
45 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel
48 /** returns the current value of the "ButtonType" property, taking into account
49 the "virtual" button types such as "move-to-next-record button".
51 css::uno::Any
52 getCurrentButtonType() const;
54 /** sets the current value of the "ButtonType" property, taking into account
55 the "virtual" button types such as "move-to-next-record button".
57 void setCurrentButtonType( const css::uno::Any& _rValue ) const;
59 /** retrieves the current state of the "ButtonType" property, taking into account
60 the "virtual" button types such as "move-to-next-record button".
62 css::beans::PropertyState
63 getCurrentButtonTypeState( ) const;
65 /** returns the current value of the "TargetURL" property, taking into account
66 that some URLs are special values caused by "virtual" ButtonTypes
68 css::uno::Any
69 getCurrentTargetURL() const;
71 /** sets the current value of the "TargetURL" property, taking into account
72 that some URLs are special values caused by "virtual" ButtonTypes
74 void setCurrentTargetURL( const css::uno::Any& _rValue ) const;
76 /** retrieves the current state of the "TargetURL" property, taking into account
77 that some URLs are special values caused by "virtual" ButtonTypes
79 css::beans::PropertyState
80 getCurrentTargetURLState( ) const;
82 /** determines whether the current button type is FormButtonType_URL
84 bool currentButtonTypeIsOpenURL() const;
86 /** determines whether the TargetURL property does currently denote a non-empty string
88 bool hasNonEmptyCurrentTargetURL() const;
90 private:
91 css::form::FormButtonType implGetCurrentButtonType() const;
95 } // namespace pcr
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */