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
...@@ -30,43 +30,41 @@ ...@@ -30,43 +30,41 @@
namespace chart namespace chart
{ {
SchAxisLabelTabPage::SchAxisLabelTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ) : SchAxisLabelTabPage::SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
SfxTabPage( pParent, "AxisLabelTabPage","modules/schart/ui/tp_axisLabel.ui", &rInAttrs ), : SfxTabPage(pParent, "modules/schart/ui/tp_axisLabel.ui", "AxisLabelTabPage", &rInAttrs)
, m_bShowStaggeringControls( true )
m_bShowStaggeringControls( true ), , m_nInitialDegrees( 0 )
, m_bHasInitialDegrees( true )
m_nInitialDegrees( 0 ), , m_bInitialStacking( false )
m_bHasInitialDegrees( true ), , m_bHasInitialStacking( true )
m_bInitialStacking( false ), , m_bComplexCategories( false )
m_bHasInitialStacking( true ), , m_xCbShowDescription(m_xBuilder->weld_check_button("showlabelsCB"))
m_bComplexCategories( false ) , m_xFlOrder(m_xBuilder->weld_label("orderL"))
, m_xRbSideBySide(m_xBuilder->weld_radio_button("tile"))
, m_xRbUpDown(m_xBuilder->weld_radio_button("odd"))
, m_xRbDownUp(m_xBuilder->weld_radio_button("even"))
, m_xRbAuto(m_xBuilder->weld_radio_button("auto"))
, m_xFlTextFlow(m_xBuilder->weld_label("textflowL"))
, m_xCbTextOverlap(m_xBuilder->weld_check_button("overlapCB"))
, m_xCbTextBreak(m_xBuilder->weld_check_button("breakCB"))
, m_xFtABCD(m_xBuilder->weld_label("labelABCD"))
, m_xFlOrient(m_xBuilder->weld_label("labelTextOrient"))
, m_xFtRotate(m_xBuilder->weld_label("degreeL"))
, m_xNfRotate(m_xBuilder->weld_spin_button("OrientDegree"))
, m_xCbStacked(m_xBuilder->weld_check_button("stackedCB"))
, m_xFtTextDirection(m_xBuilder->weld_label("textdirL"))
, m_xLbTextDirection(new SchTextDirectionListBox(m_xBuilder->weld_combo_box("textdirLB")))
, m_xCtrlDial(new weld::CustomWeld(*m_xBuilder, "dialCtrl", m_aCtrlDial))
{ {
get(m_pCbShowDescription, "showlabelsCB"); m_aCtrlDial.SetText(m_xFtABCD->get_label());
get(m_pFlOrder, "orderL"); m_aCtrlDial.SetLinkedField(m_xNfRotate.get());
get(m_pRbSideBySide, "tile"); m_xCtrlDial->set_sensitive(true);
get(m_pRbUpDown, "odd"); m_xNfRotate->set_sensitive(true);
get(m_pRbDownUp, "even"); m_xCbStacked->set_sensitive(true);
get(m_pRbAuto, "auto"); m_xFtRotate->set_sensitive(true);
get(m_pFlTextFlow, "textflowL");
get(m_pCbTextOverlap, "overlapCB"); m_xCbStacked->connect_toggled(LINK(this, SchAxisLabelTabPage, StackedToggleHdl));
get(m_pCbTextBreak, "breakCB"); m_xCbShowDescription->connect_toggled(LINK(this, SchAxisLabelTabPage, ToggleShowLabel));
get(m_pFlOrient, "labelTextOrient");
get(m_pCtrlDial,"dialCtrl");
get(m_pFtRotate,"degreeL");
get(m_pNfRotate,"OrientDegree");
get(m_pCbStacked,"stackedCB");
get(m_pFtTextDirection,"textdirL");
get(m_pLbTextDirection,"textdirLB");
get(m_pFtABCD,"labelABCD");
m_pCtrlDial->SetText(m_pFtABCD->GetText());
m_pOrientHlp.reset(new svx::OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked));
m_pOrientHlp->Enable();
m_pCbStacked->EnableTriState( false );
m_pOrientHlp->AddDependentWindow( *m_pFlOrient );
m_pOrientHlp->AddDependentWindow( *m_pFtRotate, TRISTATE_TRUE );
m_pCbShowDescription->SetClickHdl( LINK( this, SchAxisLabelTabPage, ToggleShowLabel ) );
} }
SchAxisLabelTabPage::~SchAxisLabelTabPage() SchAxisLabelTabPage::~SchAxisLabelTabPage()
...@@ -76,45 +74,29 @@ SchAxisLabelTabPage::~SchAxisLabelTabPage() ...@@ -76,45 +74,29 @@ SchAxisLabelTabPage::~SchAxisLabelTabPage()
void SchAxisLabelTabPage::dispose() void SchAxisLabelTabPage::dispose()
{ {
m_pOrientHlp.reset(); m_xCtrlDial.reset();
m_pCbShowDescription.clear(); m_xLbTextDirection.reset();
m_pFlOrder.clear();
m_pRbSideBySide.clear();
m_pRbUpDown.clear();
m_pRbDownUp.clear();
m_pRbAuto.clear();
m_pFlTextFlow.clear();
m_pCbTextOverlap.clear();
m_pCbTextBreak.clear();
m_pFtABCD.clear();
m_pFlOrient.clear();
m_pCtrlDial.clear();
m_pFtRotate.clear();
m_pNfRotate.clear();
m_pCbStacked.clear();
m_pFtTextDirection.clear();
m_pLbTextDirection.clear();
SfxTabPage::dispose(); SfxTabPage::dispose();
} }
VclPtr<SfxTabPage> SchAxisLabelTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrs ) VclPtr<SfxTabPage> SchAxisLabelTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs)
{ {
return VclPtr<SchAxisLabelTabPage>::Create( pParent.pParent, *rAttrs ); return VclPtr<SchAxisLabelTabPage>::Create(pParent, *rAttrs);
} }
bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
{ {
bool bStacked = false; bool bStacked = false;
if( m_pOrientHlp->GetStackedState() != TRISTATE_INDET ) if (m_xCbStacked->get_state() != TRISTATE_INDET )
{ {
bStacked = m_pOrientHlp->GetStackedState() == TRISTATE_TRUE; bStacked = m_xCbStacked->get_state() == TRISTATE_TRUE;
if( !m_bHasInitialStacking || (bStacked != m_bInitialStacking) ) if( !m_bHasInitialStacking || (bStacked != m_bInitialStacking) )
rOutAttrs->Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) ); rOutAttrs->Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) );
} }
if( m_pCtrlDial->HasRotation() ) if( m_aCtrlDial.HasRotation() )
{ {
sal_Int32 nDegrees = bStacked ? 0 : m_pCtrlDial->GetRotation(); sal_Int32 nDegrees = bStacked ? 0 : m_aCtrlDial.GetRotation();
if( !m_bHasInitialDegrees || (nDegrees != m_nInitialDegrees) ) if( !m_bHasInitialDegrees || (nDegrees != m_nInitialDegrees) )
rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
} }
...@@ -124,13 +106,13 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) ...@@ -124,13 +106,13 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
SvxChartTextOrder eOrder = SvxChartTextOrder::SideBySide; SvxChartTextOrder eOrder = SvxChartTextOrder::SideBySide;
bool bRadioButtonChecked = true; bool bRadioButtonChecked = true;
if( m_pRbUpDown->IsChecked()) if( m_xRbUpDown->get_active())
eOrder = SvxChartTextOrder::UpDown; eOrder = SvxChartTextOrder::UpDown;
else if( m_pRbDownUp->IsChecked()) else if( m_xRbDownUp->get_active())
eOrder = SvxChartTextOrder::DownUp; eOrder = SvxChartTextOrder::DownUp;
else if( m_pRbAuto->IsChecked()) else if( m_xRbAuto->get_active())
eOrder = SvxChartTextOrder::Auto; eOrder = SvxChartTextOrder::Auto;
else if( m_pRbSideBySide->IsChecked()) else if( m_xRbSideBySide->get_active())
eOrder = SvxChartTextOrder::SideBySide; eOrder = SvxChartTextOrder::SideBySide;
else else
bRadioButtonChecked = false; bRadioButtonChecked = false;
...@@ -139,15 +121,15 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) ...@@ -139,15 +121,15 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
rOutAttrs->Put( SvxChartTextOrderItem( eOrder, SCHATTR_AXIS_LABEL_ORDER )); rOutAttrs->Put( SvxChartTextOrderItem( eOrder, SCHATTR_AXIS_LABEL_ORDER ));
} }
if( m_pCbTextOverlap->GetState() != TRISTATE_INDET ) if( m_xCbTextOverlap->get_state() != TRISTATE_INDET )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, m_pCbTextOverlap->IsChecked() ) ); rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, m_xCbTextOverlap->get_active() ) );
if( m_pCbTextBreak->GetState() != TRISTATE_INDET ) if( m_xCbTextBreak->get_state() != TRISTATE_INDET )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, m_pCbTextBreak->IsChecked() ) ); rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, m_xCbTextBreak->get_active() ) );
if( m_pCbShowDescription->GetState() != TRISTATE_INDET ) if( m_xCbShowDescription->get_state() != TRISTATE_INDET )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) ); rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_xCbShowDescription->get_active() ) );
if( m_pLbTextDirection->GetSelectedEntryCount() > 0 ) if (m_xLbTextDirection->get_active() != -1)
rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) ); rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
return true; return true;
} }
...@@ -160,19 +142,17 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) ...@@ -160,19 +142,17 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem ); SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE ) if( aState == SfxItemState::DONTCARE )
{ {
m_pCbShowDescription->EnableTriState(); m_xCbShowDescription->set_state( TRISTATE_INDET );
m_pCbShowDescription->SetState( TRISTATE_INDET );
} }
else else
{ {
m_pCbShowDescription->EnableTriState( false );
bool bCheck = false; bool bCheck = false;
if( aState == SfxItemState::SET ) if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbShowDescription->Check( bCheck ); m_xCbShowDescription->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
m_pCbShowDescription->Hide(); m_xCbShowDescription->hide();
} }
// Rotation as orient item or in degrees ---------- // Rotation as orient item or in degrees ----------
...@@ -185,9 +165,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) ...@@ -185,9 +165,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_bHasInitialDegrees = aState != SfxItemState::DONTCARE; m_bHasInitialDegrees = aState != SfxItemState::DONTCARE;
if( m_bHasInitialDegrees ) if( m_bHasInitialDegrees )
m_pCtrlDial->SetRotation( m_nInitialDegrees ); m_aCtrlDial.SetRotation( m_nInitialDegrees );
else else
m_pCtrlDial->SetNoRotation(); m_aCtrlDial.SetNoRotation();
// check stacked item // check stacked item
m_bInitialStacking = false; m_bInitialStacking = false;
...@@ -197,52 +177,49 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) ...@@ -197,52 +177,49 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_bHasInitialStacking = aState != SfxItemState::DONTCARE; m_bHasInitialStacking = aState != SfxItemState::DONTCARE;
if( m_bHasInitialDegrees ) if( m_bHasInitialDegrees )
m_pOrientHlp->SetStackedState( m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE ); m_xCbStacked->set_state(m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE);
else else
m_pOrientHlp->SetStackedState( TRISTATE_INDET ); m_xCbStacked->set_state(TRISTATE_INDET);
StackedToggleHdl(*m_xCbStacked);
if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
m_pLbTextDirection->SelectEntryValue( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() ); m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
// Text overlap ---------- // Text overlap ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem ); aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE ) if( aState == SfxItemState::DONTCARE )
{ {
m_pCbTextOverlap->EnableTriState(); m_xCbTextOverlap->set_state( TRISTATE_INDET );
m_pCbTextOverlap->SetState( TRISTATE_INDET );
} }
else else
{ {
m_pCbTextOverlap->EnableTriState( false );
bool bCheck = false; bool bCheck = false;
if( aState == SfxItemState::SET ) if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbTextOverlap->Check( bCheck ); m_xCbTextOverlap->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
m_pCbTextOverlap->Hide(); m_xCbTextOverlap->hide();
} }
// text break ---------- // text break ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem ); aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE ) if( aState == SfxItemState::DONTCARE )
{ {
m_pCbTextBreak->EnableTriState(); m_xCbTextBreak->set_state( TRISTATE_INDET );
m_pCbTextBreak->SetState( TRISTATE_INDET );
} }
else else
{ {
m_pCbTextBreak->EnableTriState( false );
bool bCheck = false; bool bCheck = false;
if( aState == SfxItemState::SET ) if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbTextBreak->Check( bCheck ); m_xCbTextBreak->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET ) if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
{ {
m_pCbTextBreak->Hide(); m_xCbTextBreak->hide();
if( ! m_pCbTextOverlap->IsVisible() ) if( ! m_xCbTextOverlap->get_visible() )
m_pFlTextFlow->Hide(); m_xFlTextFlow->hide();
} }
} }
...@@ -257,22 +234,22 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs ) ...@@ -257,22 +234,22 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
switch( eOrder ) switch( eOrder )
{ {
case SvxChartTextOrder::SideBySide: case SvxChartTextOrder::SideBySide:
m_pRbSideBySide->Check(); m_xRbSideBySide->set_active(true);
break; break;
case SvxChartTextOrder::UpDown: case SvxChartTextOrder::UpDown:
m_pRbUpDown->Check(); m_xRbUpDown->set_active(true);
break; break;
case SvxChartTextOrder::DownUp: case SvxChartTextOrder::DownUp:
m_pRbDownUp->Check(); m_xRbDownUp->set_active(true);
break; break;
case SvxChartTextOrder::Auto: case SvxChartTextOrder::Auto:
m_pRbAuto->Check(); m_xRbAuto->set_active(true);
break; break;
} }
} }
} }
ToggleShowLabel( nullptr ); ToggleShowLabel(*m_xCbShowDescription);
} }
void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls ) void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls )
...@@ -281,11 +258,11 @@ void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls ) ...@@ -281,11 +258,11 @@ void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls )
if( !m_bShowStaggeringControls ) if( !m_bShowStaggeringControls )
{ {
m_pRbSideBySide->Hide(); m_xRbSideBySide->hide();
m_pRbUpDown->Hide(); m_xRbUpDown->hide();
m_pRbDownUp->Hide(); m_xRbDownUp->hide();
m_pRbAuto->Hide(); m_xRbAuto->hide();
m_pFlOrder->Hide(); m_xFlOrder->hide();
} }
} }
...@@ -296,23 +273,34 @@ void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories ) ...@@ -296,23 +273,34 @@ void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories )
// event handling routines // event handling routines
IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel, Button*, void) IMPL_LINK_NOARG(SchAxisLabelTabPage, StackedToggleHdl, weld::ToggleButton&, void)
{
bool bActive = m_xCbStacked->get_active() && m_xCbStacked->get_sensitive();
m_xNfRotate->set_sensitive(bActive);
m_xCtrlDial->set_sensitive(bActive);
m_aCtrlDial.StyleUpdated();
m_xFtRotate->set_sensitive(bActive);
}
IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel, weld::ToggleButton&, void)
{ {
bool bEnable = ( m_pCbShowDescription->GetState() != TRISTATE_FALSE ); bool bEnable = ( m_xCbShowDescription->get_state() != TRISTATE_FALSE );
m_xCbStacked->set_sensitive(bEnable);
StackedToggleHdl(*m_xCbStacked);
m_pOrientHlp->Enable( bEnable ); m_xFlOrder->set_sensitive( bEnable );
m_pFlOrder->Enable( bEnable ); m_xRbSideBySide->set_sensitive( bEnable );
m_pRbSideBySide->Enable( bEnable ); m_xRbUpDown->set_sensitive( bEnable );
m_pRbUpDown->Enable( bEnable ); m_xRbDownUp->set_sensitive( bEnable );
m_pRbDownUp->Enable( bEnable ); m_xRbAuto->set_sensitive( bEnable );
m_pRbAuto->Enable( bEnable );
m_pFlTextFlow->Enable( bEnable ); m_xFlTextFlow->set_sensitive( bEnable );
m_pCbTextOverlap->Enable( bEnable && !m_bComplexCategories ); m_xCbTextOverlap->set_sensitive( bEnable && !m_bComplexCategories );
m_pCbTextBreak->Enable( bEnable ); m_xCbTextBreak->set_sensitive( bEnable );
m_pFtTextDirection->Enable( bEnable ); m_xFtTextDirection->set_sensitive( bEnable );
m_pLbTextDirection->Enable( bEnable ); m_xLbTextDirection->set_sensitive( bEnable );
} }
} //namespace chart } //namespace chart
......
...@@ -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