summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-06 10:37:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-08 16:17:45 +0200
commitd00a8b05c057d9260c5a44408d9a815121ee6cba (patch)
tree0ad731b379068244d6477c3c4b1f0af97262712a /chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
parent1d137f07cb7cff1f7bcf12b51ceca6f56059b7ef (diff)
weld View3DDialog
Change-Id: Ifd689c54574c08f026f6760efb39b5f927cb2625 Reviewed-on: https://gerrit.libreoffice.org/73604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx')
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx79
1 files changed, 46 insertions, 33 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 72e39d673539..81bb278e28eb 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -20,48 +20,56 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
#include <TimerTriggeredControllerLock.hxx>
-
-#include <vcl/tabpage.hxx>
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
#include <svx/dlgctl3d.hxx>
namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
-class SvxColorListBox;
+class ColorListBox;
namespace chart
{
-class LightButton : public ImageButton
+class LightButton
{
public:
- explicit LightButton( vcl::Window* pParent);
+ explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton);
void switchLightOn(bool bOn);
bool isLightOn() const { return m_bLightOn;}
+ bool get_active() const { return m_xButton->get_active(); }
+ void set_active(bool bActive) { m_xButton->set_active(bActive); }
+
+ weld::ToggleButton* get_widget() const { return m_xButton.get(); }
+
+ void connect_clicked(const Link<weld::Button&, void>& rLink)
+ {
+ m_xButton->connect_clicked(rLink);
+ }
+
private:
+ std::unique_ptr<weld::ToggleButton> m_xButton;
bool m_bLightOn;
};
struct LightSourceInfo;
-class ThreeD_SceneIllumination_TabPage : public TabPage
+class ThreeD_SceneIllumination_TabPage
{
public:
ThreeD_SceneIllumination_TabPage(
- vcl::Window* pWindow,
+ weld::Container* pParent, weld::Window* pTopLevel,
const css::uno::Reference< css::beans::XPropertySet > & xSceneProperties,
const css::uno::Reference< css::frame::XModel >& xChartModel );
- virtual ~ThreeD_SceneIllumination_TabPage() override;
- virtual void dispose() override;
+ ~ThreeD_SceneIllumination_TabPage();
private:
- DECL_LINK( ClickLightSourceButtonHdl, Button*, void );
- DECL_LINK( SelectColorHdl, SvxColorListBox&, void );
- DECL_LINK( ColorDialogHdl, Button*, void );
- DECL_LINK( PreviewChangeHdl, SvxLightCtl3D*, void );
- DECL_LINK( PreviewSelectHdl, SvxLightCtl3D*, void );
+ DECL_LINK( ClickLightSourceButtonHdl, weld::Button&, void );
+ DECL_LINK( SelectColorHdl, ColorListBox&, void );
+ DECL_LINK( ColorDialogHdl, weld::Button&, void );
+ DECL_LINK( PreviewChangeHdl, LightCtl3D*, void );
+ DECL_LINK( PreviewSelectHdl, LightCtl3D*, void );
void updatePreview();
@@ -71,23 +79,6 @@ private:
void applyLightSourceToModel( sal_uInt32 nLightNumber );
void applyLightSourcesToModel();
- VclPtr<LightButton> m_pBtn_Light1;
- VclPtr<LightButton> m_pBtn_Light2;
- VclPtr<LightButton> m_pBtn_Light3;
- VclPtr<LightButton> m_pBtn_Light4;
- VclPtr<LightButton> m_pBtn_Light5;
- VclPtr<LightButton> m_pBtn_Light6;
- VclPtr<LightButton> m_pBtn_Light7;
- VclPtr<LightButton> m_pBtn_Light8;
-
- VclPtr<SvxColorListBox> m_pLB_LightSource;
- VclPtr<PushButton> m_pBtn_LightSource_Color;
-
- VclPtr<SvxColorListBox> m_pLB_AmbientLight;
- VclPtr<PushButton> m_pBtn_AmbientLight_Color;
-
- VclPtr<SvxLightCtl3D> m_pCtl_Preview;
-
std::unique_ptr<LightSourceInfo[]> m_pLightSourceInfoList;
css::uno::Reference< css::beans::XPropertySet > m_xSceneProperties;
@@ -96,7 +87,29 @@ private:
bool m_bInCommitToModel;
- css::uno::Reference< css::frame::XModel > m_xChartModel;
+ css::uno::Reference<css::frame::XModel> m_xChartModel;
+
+ weld::Window* m_pTopLevel;
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<LightButton> m_xBtn_Light1;
+ std::unique_ptr<LightButton> m_xBtn_Light2;
+ std::unique_ptr<LightButton> m_xBtn_Light3;
+ std::unique_ptr<LightButton> m_xBtn_Light4;
+ std::unique_ptr<LightButton> m_xBtn_Light5;
+ std::unique_ptr<LightButton> m_xBtn_Light6;
+ std::unique_ptr<LightButton> m_xBtn_Light7;
+ std::unique_ptr<LightButton> m_xBtn_Light8;
+ std::unique_ptr<ColorListBox> m_xLB_LightSource;
+ std::unique_ptr<weld::Button> m_xBtn_LightSource_Color;
+ std::unique_ptr<ColorListBox> m_xLB_AmbientLight;
+ std::unique_ptr<weld::Button> m_xBtn_AmbientLight_Color;
+ std::unique_ptr<weld::Scale> m_xHoriScale;
+ std::unique_ptr<weld::Scale> m_xVertScale;
+ std::unique_ptr<weld::Button> m_xBtn_Corner;
+ std::unique_ptr<LightControl3D> m_xPreview;
+ std::unique_ptr<weld::CustomWeld> m_xPreviewWnd;
+ std::unique_ptr<LightCtl3D> m_xCtl_Preview;
};
} //namespace chart