2015-07-17 20:51:37 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* 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/.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-08-05 15:36:19 +00:00
|
|
|
#pragma once
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
#include <sfx2/sidebar/ControllerItem.hxx>
|
|
|
|
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
|
2015-07-23 01:20:45 +02:00
|
|
|
#include <sfx2/sidebar/SidebarModelUpdate.hxx>
|
2020-04-26 15:47:16 +01:00
|
|
|
#include <sfx2/sidebar/PanelLayout.hxx>
|
2015-07-17 20:51:37 +02:00
|
|
|
#include "ChartSidebarModifyListener.hxx"
|
2015-07-23 16:20:36 +02:00
|
|
|
#include "ChartSidebarSelectionListener.hxx"
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2020-05-08 10:59:40 +02:00
|
|
|
namespace com::sun::star::util { class XModifyListener; }
|
|
|
|
namespace com::sun::star::view { class XSelectionChangeListener; }
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
namespace chart {
|
|
|
|
|
|
|
|
class ChartController;
|
|
|
|
|
|
|
|
namespace sidebar {
|
|
|
|
|
|
|
|
class ChartAxisPanel : public PanelLayout,
|
|
|
|
public ::sfx2::sidebar::IContextChangeReceiver,
|
|
|
|
public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
|
2015-07-23 01:20:45 +02:00
|
|
|
public sfx2::sidebar::SidebarModelUpdate,
|
2015-07-23 16:20:36 +02:00
|
|
|
public ChartSidebarModifyListenerParent,
|
|
|
|
public ChartSidebarSelectionListenerParent
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
public:
|
2021-03-04 17:22:14 +00:00
|
|
|
static std::unique_ptr<PanelLayout> Create(
|
|
|
|
weld::Widget* pParent,
|
2015-07-17 20:51:37 +02:00
|
|
|
ChartController* pController);
|
|
|
|
|
|
|
|
virtual void DataChanged(
|
2015-10-12 16:04:04 +02:00
|
|
|
const DataChangedEvent& rEvent) override;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
virtual void HandleContextChange(
|
2016-06-17 23:54:00 +02:00
|
|
|
const vcl::EnumContext& rContext) override;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
virtual void NotifyItemUpdate(
|
|
|
|
const sal_uInt16 nSId,
|
|
|
|
const SfxItemState eState,
|
2019-10-18 11:45:12 +02:00
|
|
|
const SfxPoolItem* pState) override;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2020-03-27 19:24:14 -04:00
|
|
|
virtual void GetControlState(
|
|
|
|
const sal_uInt16 /*nSId*/,
|
|
|
|
boost::property_tree::ptree& /*rState*/) override {};
|
|
|
|
|
2017-03-19 18:19:41 +01:00
|
|
|
// constructor/destructor
|
2015-07-17 20:51:37 +02:00
|
|
|
ChartAxisPanel(
|
2021-03-04 17:22:14 +00:00
|
|
|
weld::Widget* pParent,
|
2015-07-17 20:51:37 +02:00
|
|
|
ChartController* pController);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ChartAxisPanel() override;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void updateData() override;
|
|
|
|
virtual void modelInvalid() override;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void selectionChanged(bool bCorrectType) override;
|
2015-07-23 16:20:36 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
|
2015-07-23 01:20:45 +02:00
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
private:
|
|
|
|
//ui controls
|
2019-12-20 15:06:23 +00:00
|
|
|
std::unique_ptr<weld::CheckButton> mxCBShowLabel;
|
|
|
|
std::unique_ptr<weld::CheckButton> mxCBReverse;
|
|
|
|
std::unique_ptr<weld::ComboBox> mxLBLabelPos;
|
|
|
|
std::unique_ptr<weld::Widget> mxGridLabel;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> mxNFRotation;
|
2015-10-23 00:34:55 +02:00
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
rtl::Reference<::chart::ChartModel> mxModel;
|
2015-07-23 16:20:36 +02:00
|
|
|
css::uno::Reference<css::util::XModifyListener> mxModifyListener;
|
|
|
|
css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2015-07-31 17:34:56 +02:00
|
|
|
bool mbModelValid;
|
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
void Initialize();
|
2023-12-07 09:12:15 +00:00
|
|
|
void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2021-05-20 17:27:49 +01:00
|
|
|
DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
|
2019-12-20 15:06:23 +00:00
|
|
|
DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
|
|
|
|
DECL_LINK(TextRotationHdl, weld::MetricSpinButton&, void);
|
2015-07-17 20:51:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} } // end of namespace ::chart::sidebar
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|