Kaydet (Commit) c3c02d01 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SchAxisLabelTabPage

Change-Id: I499162c6c2327a6c0d635382defea7e0bae068cd
Reviewed-on: https://gerrit.libreoffice.org/61747
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 5487df9c
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_AXISLABEL_HXX #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_AXISLABEL_HXX
#include <sfx2/tabdlg.hxx> #include <sfx2/tabdlg.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <svx/dialcontrol.hxx> #include <svx/dialcontrol.hxx>
#include <svx/orienthelper.hxx> #include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
#include <TextDirectionListBox.hxx> #include <TextDirectionListBox.hxx>
namespace chart namespace chart
...@@ -32,28 +31,6 @@ namespace chart ...@@ -32,28 +31,6 @@ namespace chart
class SchAxisLabelTabPage : public SfxTabPage class SchAxisLabelTabPage : public SfxTabPage
{ {
private: private:
VclPtr<CheckBox> m_pCbShowDescription;
VclPtr<FixedText> m_pFlOrder;
VclPtr<RadioButton> m_pRbSideBySide;
VclPtr<RadioButton> m_pRbUpDown;
VclPtr<RadioButton> m_pRbDownUp;
VclPtr<RadioButton> m_pRbAuto;
VclPtr<FixedText> m_pFlTextFlow;
VclPtr<CheckBox> m_pCbTextOverlap;
VclPtr<CheckBox> m_pCbTextBreak;
VclPtr<FixedText> m_pFtABCD;
VclPtr<FixedText> m_pFlOrient;
VclPtr<svx::DialControl> m_pCtrlDial;
VclPtr<FixedText> m_pFtRotate;
VclPtr<NumericField> m_pNfRotate;
VclPtr<TriStateBox> m_pCbStacked;
std::unique_ptr<svx::OrientationHelper> m_pOrientHlp;
VclPtr<FixedText> m_pFtTextDirection;
VclPtr<TextDirectionListBox> m_pLbTextDirection;
bool m_bShowStaggeringControls; bool m_bShowStaggeringControls;
sal_Int32 m_nInitialDegrees; sal_Int32 m_nInitialDegrees;
...@@ -62,10 +39,30 @@ private: ...@@ -62,10 +39,30 @@ private:
bool m_bHasInitialStacking; /// false = checkbox in tristate bool m_bHasInitialStacking; /// false = checkbox in tristate
bool m_bComplexCategories; bool m_bComplexCategories;
DECL_LINK ( ToggleShowLabel, Button*, void ); svx::SvxDialControl m_aCtrlDial;
std::unique_ptr<weld::CheckButton> m_xCbShowDescription;
std::unique_ptr<weld::Label> m_xFlOrder;
std::unique_ptr<weld::RadioButton> m_xRbSideBySide;
std::unique_ptr<weld::RadioButton> m_xRbUpDown;
std::unique_ptr<weld::RadioButton> m_xRbDownUp;
std::unique_ptr<weld::RadioButton> m_xRbAuto;
std::unique_ptr<weld::Label> m_xFlTextFlow;
std::unique_ptr<weld::CheckButton> m_xCbTextOverlap;
std::unique_ptr<weld::CheckButton> m_xCbTextBreak;
std::unique_ptr<weld::Label> m_xFtABCD;
std::unique_ptr<weld::Label> m_xFlOrient;
std::unique_ptr<weld::Label> m_xFtRotate;
std::unique_ptr<weld::SpinButton> m_xNfRotate;
std::unique_ptr<weld::CheckButton> m_xCbStacked;
std::unique_ptr<weld::Label> m_xFtTextDirection;
std::unique_ptr<SchTextDirectionListBox> m_xLbTextDirection;
std::unique_ptr<weld::CustomWeld> m_xCtrlDial;
DECL_LINK(StackedToggleHdl, weld::ToggleButton&, void);
DECL_LINK(ToggleShowLabel, weld::ToggleButton&, void);
public: public:
SchAxisLabelTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
virtual ~SchAxisLabelTabPage() override; virtual ~SchAxisLabelTabPage() override;
virtual void dispose() override; virtual void dispose() override;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 --> <!-- Generated with glade 3.22.1 -->
<interface domain="chart"> <interface domain="chart">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustmentSpinDegrees"> <object class="GtkAdjustment" id="adjustmentSpinDegrees">
<property name="upper">359</property> <property name="upper">359</property>
<property name="step_increment">5</property> <property name="step_increment">5</property>
...@@ -68,7 +67,6 @@ ...@@ -68,7 +67,6 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">odd</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -85,7 +83,7 @@ ...@@ -85,7 +83,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">even</property> <property name="group">tile</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -102,7 +100,7 @@ ...@@ -102,7 +100,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">auto</property> <property name="group">tile</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -260,6 +258,7 @@ ...@@ -260,6 +258,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="margin_top">40</property> <property name="margin_top">40</property>
<property name="activates_default">True</property>
<property name="progress_pulse_step">1</property> <property name="progress_pulse_step">1</property>
<property name="adjustment">adjustmentSpinDegrees</property> <property name="adjustment">adjustmentSpinDegrees</property>
<property name="wrap">True</property> <property name="wrap">True</property>
...@@ -267,8 +266,6 @@ ...@@ -267,8 +266,6 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -282,8 +279,6 @@ ...@@ -282,8 +279,6 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -302,23 +297,32 @@ ...@@ -302,23 +297,32 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="svxlo-DialControl" id="dialCtrl"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">True</property>
<property name="halign">center</property> <property name="halign">center</property>
<property name="valign">center</property> <property name="valign">center</property>
<property name="active">True</property> <property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkDrawingArea" id="dialCtrl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -341,8 +345,6 @@ ...@@ -341,8 +345,6 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -353,16 +355,12 @@ ...@@ -353,16 +355,12 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -375,12 +373,10 @@ ...@@ -375,12 +373,10 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="chartcontrollerlo-TextDirectionListBox" id="textdirLB"> <object class="GtkComboBoxText" id="textdirLB">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
</object> </object>
...@@ -388,7 +384,6 @@ ...@@ -388,7 +384,6 @@
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="width">2</property> <property name="width">2</property>
<property name="height">1</property>
</packing> </packing>
</child> </child>
</object> </object>
......
...@@ -179,6 +179,8 @@ public: ...@@ -179,6 +179,8 @@ public:
sal_Int32 GetRotation() const; sal_Int32 GetRotation() const;
/** Sets the rotation to the passed value (in 1/100 degrees). */ /** Sets the rotation to the passed value (in 1/100 degrees). */
void SetRotation( sal_Int32 nAngle ); void SetRotation( sal_Int32 nAngle );
/** Returns true, if the control is not in "don't care" state. */
bool HasRotation() const;
/** Sets the control to "don't care" state. */ /** Sets the control to "don't care" state. */
void SetNoRotation(); void SetNoRotation();
......
...@@ -621,6 +621,11 @@ void SvxDialControl::LoseFocus() ...@@ -621,6 +621,11 @@ void SvxDialControl::LoseFocus()
HandleEscapeEvent(); HandleEscapeEvent();
} }
bool SvxDialControl::HasRotation() const
{
return !mpImpl->mbNoRot;
}
void SvxDialControl::SetNoRotation() void SvxDialControl::SetNoRotation()
{ {
if( !mpImpl->mbNoRot ) if( !mpImpl->mbNoRot )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment