Convert chart 3D scene geometry tabpage to widget
Change-Id: I5840d47047880636fb4e8f80ecef1a6f5377d786 Reviewed-on: https://gerrit.libreoffice.org/6840 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
6014e3c98d
commit
51a423cd75
@ -47,7 +47,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
|
||||
chart2/source/controller/dialogs/Strings.src \
|
||||
chart2/source/controller/dialogs/Strings_Statistic.src \
|
||||
chart2/source/controller/dialogs/tp_3D_SceneAppearance.src \
|
||||
chart2/source/controller/dialogs/tp_3D_SceneGeometry.src \
|
||||
chart2/source/controller/dialogs/tp_3D_SceneIllumination.src \
|
||||
chart2/source/controller/dialogs/tp_AxisLabel.src \
|
||||
chart2/source/controller/dialogs/tp_ChartType.src \
|
||||
|
@ -36,6 +36,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
|
||||
chart2/uiconfig/ui/smoothlinesdlg \
|
||||
chart2/uiconfig/ui/steppedlinesdlg \
|
||||
chart2/uiconfig/ui/titlerotationtabpage \
|
||||
chart2/uiconfig/ui/tp_3D_SceneGeometry \
|
||||
chart2/uiconfig/ui/tp_axisLabel \
|
||||
chart2/uiconfig/ui/tp_AxisPositions \
|
||||
chart2/uiconfig/ui/tp_LegendPosition \
|
||||
|
@ -18,8 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "tp_3D_SceneGeometry.hxx"
|
||||
#include "tp_3D_SceneGeometry.hrc"
|
||||
#include "ResId.hxx"
|
||||
|
||||
#include "BaseGFXHelper.hxx"
|
||||
#include "macros.hxx"
|
||||
#include "DiagramHelper.hxx"
|
||||
@ -58,17 +57,10 @@ void lcl_SetMetricFieldLimits( MetricField& rField, sal_Int64 nLimit )
|
||||
ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow
|
||||
, const uno::Reference< beans::XPropertySet > & xSceneProperties
|
||||
, ControllerLockHelper & rControllerLockHelper )
|
||||
: TabPage ( pWindow, SchResId( TP_3D_SCENEGEOMETRY ) )
|
||||
: TabPage ( pWindow
|
||||
, "tp_3DSceneGeometry"
|
||||
, "modules/schart/ui/tp_3D_SceneGeometry.ui")
|
||||
, m_xSceneProperties( xSceneProperties )
|
||||
, m_aCbxRightAngledAxes( this, SchResId( CBX_RIGHT_ANGLED_AXES ) )
|
||||
, m_aFtXRotation ( this, SchResId( FT_X_ROTATION ) )
|
||||
, m_aMFXRotation ( this, SchResId( MTR_FLD_X_ROTATION ) )
|
||||
, m_aFtYRotation ( this, SchResId( FT_Y_ROTATION ) )
|
||||
, m_aMFYRotation ( this, SchResId( MTR_FLD_Y_ROTATION ) )
|
||||
, m_aFtZRotation ( this, SchResId( FT_Z_ROTATION ) )
|
||||
, m_aMFZRotation ( this, SchResId( MTR_FLD_Z_ROTATION ) )
|
||||
, m_aCbxPerspective ( this, SchResId( CBX_PERSPECTIVE ) )
|
||||
, m_aMFPerspective ( this, SchResId( MTR_FLD_PERSPECTIVE ) )
|
||||
, m_nXRotation(0)
|
||||
, m_nYRotation(0)
|
||||
, m_nZRotation(0)
|
||||
@ -76,7 +68,13 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow
|
||||
, m_bPerspectiveChangePending( false )
|
||||
, m_rControllerLockHelper( rControllerLockHelper )
|
||||
{
|
||||
FreeResource();
|
||||
get(m_pCbxRightAngledAxes,"CBX_RIGHT_ANGLED_AXES");
|
||||
get(m_pMFXRotation, "MTR_FLD_X_ROTATION");
|
||||
get(m_pMFYRotation, "MTR_FLD_Y_ROTATION");
|
||||
get(m_pFtZRotation, "FT_Z_ROTATION");
|
||||
get(m_pMFZRotation, "MTR_FLD_Z_ROTATION");
|
||||
get(m_pCbxPerspective,"CBX_PERSPECTIVE");
|
||||
get(m_pMFPerspective, "MTR_FLD_PERSPECTIVE");
|
||||
|
||||
double fXAngle, fYAngle, fZAngle;
|
||||
ThreeDHelper::getRotationAngleFromDiagram( m_xSceneProperties, fXAngle, fYAngle, fZAngle );
|
||||
@ -87,49 +85,49 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow
|
||||
|
||||
OSL_ENSURE( fZAngle>=-90 && fZAngle<=90, "z angle is out of valid range" );
|
||||
|
||||
lcl_SetMetricFieldLimits( m_aMFZRotation, 90 );
|
||||
lcl_SetMetricFieldLimits( *m_pMFZRotation, 90 );
|
||||
|
||||
m_nXRotation = ::basegfx::fround(fXAngle*pow(10.0,m_aMFXRotation.GetDecimalDigits()));
|
||||
m_nYRotation = ::basegfx::fround(-1.0*fYAngle*pow(10.0,m_aMFYRotation.GetDecimalDigits()));
|
||||
m_nZRotation = ::basegfx::fround(-1.0*fZAngle*pow(10.0,m_aMFZRotation.GetDecimalDigits()));
|
||||
m_nXRotation = ::basegfx::fround(fXAngle*pow(10.0,m_pMFXRotation->GetDecimalDigits()));
|
||||
m_nYRotation = ::basegfx::fround(-1.0*fYAngle*pow(10.0,m_pMFYRotation->GetDecimalDigits()));
|
||||
m_nZRotation = ::basegfx::fround(-1.0*fZAngle*pow(10.0,m_pMFZRotation->GetDecimalDigits()));
|
||||
|
||||
lcl_shiftAngleToValidRange( m_nXRotation );
|
||||
lcl_shiftAngleToValidRange( m_nYRotation );
|
||||
lcl_shiftAngleToValidRange( m_nZRotation );
|
||||
|
||||
m_aMFXRotation.SetValue(m_nXRotation);
|
||||
m_aMFYRotation.SetValue(m_nYRotation);
|
||||
m_aMFZRotation.SetValue(m_nZRotation);
|
||||
m_pMFXRotation->SetValue(m_nXRotation);
|
||||
m_pMFYRotation->SetValue(m_nYRotation);
|
||||
m_pMFZRotation->SetValue(m_nZRotation);
|
||||
|
||||
const sal_uLong nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT;
|
||||
Link aAngleChangedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleChanged ));
|
||||
Link aAngleEditedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleEdited ));
|
||||
|
||||
m_aMFXRotation.EnableUpdateData( nTimeout );
|
||||
m_aMFXRotation.SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_aMFXRotation.SetModifyHdl( aAngleEditedLink );
|
||||
m_pMFXRotation->EnableUpdateData( nTimeout );
|
||||
m_pMFXRotation->SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_pMFXRotation->SetModifyHdl( aAngleEditedLink );
|
||||
|
||||
m_aMFYRotation.EnableUpdateData( nTimeout );
|
||||
m_aMFYRotation.SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_aMFYRotation.SetModifyHdl( aAngleEditedLink );
|
||||
m_pMFYRotation->EnableUpdateData( nTimeout );
|
||||
m_pMFYRotation->SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_pMFYRotation->SetModifyHdl( aAngleEditedLink );
|
||||
|
||||
m_aMFZRotation.EnableUpdateData( nTimeout );
|
||||
m_aMFZRotation.SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_aMFZRotation.SetModifyHdl( aAngleEditedLink );
|
||||
m_pMFZRotation->EnableUpdateData( nTimeout );
|
||||
m_pMFZRotation->SetUpdateDataHdl( aAngleChangedLink );
|
||||
m_pMFZRotation->SetModifyHdl( aAngleEditedLink );
|
||||
|
||||
drawing::ProjectionMode aProjectionMode = drawing::ProjectionMode_PERSPECTIVE;
|
||||
m_xSceneProperties->getPropertyValue( "D3DScenePerspective" ) >>= aProjectionMode;
|
||||
m_aCbxPerspective.Check( aProjectionMode == drawing::ProjectionMode_PERSPECTIVE );
|
||||
m_aCbxPerspective.SetToggleHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveToggled ));
|
||||
m_pCbxPerspective->Check( aProjectionMode == drawing::ProjectionMode_PERSPECTIVE );
|
||||
m_pCbxPerspective->SetToggleHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveToggled ));
|
||||
|
||||
sal_Int32 nPerspectivePercentage = 20;
|
||||
m_xSceneProperties->getPropertyValue( "Perspective" ) >>= nPerspectivePercentage;
|
||||
m_aMFPerspective.SetValue( nPerspectivePercentage );
|
||||
m_pMFPerspective->SetValue( nPerspectivePercentage );
|
||||
|
||||
m_aMFPerspective.EnableUpdateData( nTimeout );
|
||||
m_aMFPerspective.SetUpdateDataHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveChanged ) );
|
||||
m_aMFPerspective.SetModifyHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveEdited ) );
|
||||
m_aMFPerspective.Enable( m_aCbxPerspective.IsChecked() );
|
||||
m_pMFPerspective->EnableUpdateData( nTimeout );
|
||||
m_pMFPerspective->SetUpdateDataHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveChanged ) );
|
||||
m_pMFPerspective->SetModifyHdl( LINK( this, ThreeD_SceneGeometry_TabPage, PerspectiveEdited ) );
|
||||
m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() );
|
||||
|
||||
//RightAngledAxes
|
||||
sal_Bool bRightAngledAxes = false;
|
||||
@ -139,15 +137,15 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow
|
||||
DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
|
||||
{
|
||||
m_xSceneProperties->getPropertyValue( "RightAngledAxes" ) >>= bRightAngledAxes;
|
||||
m_aCbxRightAngledAxes.SetToggleHdl( LINK( this, ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled ));
|
||||
m_aCbxRightAngledAxes.Check( bRightAngledAxes );
|
||||
m_pCbxRightAngledAxes->SetToggleHdl( LINK( this, ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled ));
|
||||
m_pCbxRightAngledAxes->Check( bRightAngledAxes );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_aCbxRightAngledAxes.Enable(false);
|
||||
m_pCbxRightAngledAxes->Enable(false);
|
||||
}
|
||||
m_aMFPerspective.SetAccessibleName(m_aCbxPerspective.GetText());
|
||||
m_aMFPerspective.SetAccessibleRelationLabeledBy(&m_aCbxPerspective);
|
||||
m_pMFPerspective->SetAccessibleName(m_pCbxPerspective->GetText());
|
||||
m_pMFPerspective->SetAccessibleRelationLabeledBy(m_pCbxPerspective);
|
||||
}
|
||||
|
||||
ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage()
|
||||
@ -170,12 +168,12 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
|
||||
|
||||
double fXAngle = 0.0, fYAngle = 0.0, fZAngle = 0.0;
|
||||
|
||||
if( !m_aMFZRotation.IsEmptyFieldValue() )
|
||||
m_nZRotation = m_aMFZRotation.GetValue();
|
||||
if( !m_pMFZRotation->IsEmptyFieldValue() )
|
||||
m_nZRotation = m_pMFZRotation->GetValue();
|
||||
|
||||
fXAngle = double(m_nXRotation)/double(pow(10.0,m_aMFXRotation.GetDecimalDigits()));
|
||||
fYAngle = double(-1.0*m_nYRotation)/double(pow(10.0,m_aMFYRotation.GetDecimalDigits()));
|
||||
fZAngle = double(-1.0*m_nZRotation)/double(pow(10.0,m_aMFZRotation.GetDecimalDigits()));
|
||||
fXAngle = double(m_nXRotation)/double(pow(10.0,m_pMFXRotation->GetDecimalDigits()));
|
||||
fYAngle = double(-1.0*m_nYRotation)/double(pow(10.0,m_pMFYRotation->GetDecimalDigits()));
|
||||
fZAngle = double(-1.0*m_nZRotation)/double(pow(10.0,m_pMFZRotation->GetDecimalDigits()));
|
||||
|
||||
fXAngle = BaseGFXHelper::Deg2Rad( fXAngle );
|
||||
fYAngle = BaseGFXHelper::Deg2Rad( fYAngle );
|
||||
@ -188,8 +186,8 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
|
||||
|
||||
IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, AngleEdited)
|
||||
{
|
||||
m_nXRotation = m_aMFXRotation.GetValue();
|
||||
m_nYRotation = m_aMFYRotation.GetValue();
|
||||
m_nXRotation = m_pMFXRotation->GetValue();
|
||||
m_nYRotation = m_pMFYRotation->GetValue();
|
||||
|
||||
m_bAngleChangePending = true;
|
||||
return 0;
|
||||
@ -205,14 +203,14 @@ void ThreeD_SceneGeometry_TabPage::applyPerspectiveToModel()
|
||||
{
|
||||
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
|
||||
|
||||
drawing::ProjectionMode aMode = m_aCbxPerspective.IsChecked()
|
||||
drawing::ProjectionMode aMode = m_pCbxPerspective->IsChecked()
|
||||
? drawing::ProjectionMode_PERSPECTIVE
|
||||
: drawing::ProjectionMode_PARALLEL;
|
||||
|
||||
try
|
||||
{
|
||||
m_xSceneProperties->setPropertyValue( "D3DScenePerspective" , uno::makeAny( aMode ));
|
||||
m_xSceneProperties->setPropertyValue( "Perspective" , uno::makeAny( (sal_Int32)m_aMFPerspective.GetValue() ));
|
||||
m_xSceneProperties->setPropertyValue( "Perspective" , uno::makeAny( (sal_Int32)m_pMFPerspective->GetValue() ));
|
||||
}
|
||||
catch( const uno::Exception & ex )
|
||||
{
|
||||
@ -236,7 +234,7 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveChanged)
|
||||
|
||||
IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveToggled)
|
||||
{
|
||||
m_aMFPerspective.Enable( m_aCbxPerspective.IsChecked() );
|
||||
m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() );
|
||||
applyPerspectiveToModel();
|
||||
return 0;
|
||||
}
|
||||
@ -245,34 +243,34 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled)
|
||||
{
|
||||
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
|
||||
|
||||
bool bEnableZ = !m_aCbxRightAngledAxes.IsChecked();
|
||||
m_aFtZRotation.Enable( bEnableZ );
|
||||
m_aMFZRotation.Enable( bEnableZ );
|
||||
m_aMFZRotation.EnableEmptyFieldValue( !bEnableZ );
|
||||
bool bEnableZ = !m_pCbxRightAngledAxes->IsChecked();
|
||||
m_pFtZRotation->Enable( bEnableZ );
|
||||
m_pMFZRotation->Enable( bEnableZ );
|
||||
m_pMFZRotation->EnableEmptyFieldValue( !bEnableZ );
|
||||
if( !bEnableZ )
|
||||
{
|
||||
m_nXRotation = m_aMFXRotation.GetValue();
|
||||
m_nYRotation = m_aMFYRotation.GetValue();
|
||||
m_nZRotation = m_aMFZRotation.GetValue();
|
||||
m_nXRotation = m_pMFXRotation->GetValue();
|
||||
m_nYRotation = m_pMFYRotation->GetValue();
|
||||
m_nZRotation = m_pMFZRotation->GetValue();
|
||||
|
||||
m_aMFXRotation.SetValue(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nXRotation), ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes())));
|
||||
m_aMFYRotation.SetValue(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nYRotation), ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes())));
|
||||
m_aMFZRotation.SetEmptyFieldValue();
|
||||
m_pMFXRotation->SetValue(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nXRotation), ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes())));
|
||||
m_pMFYRotation->SetValue(static_cast<sal_Int64>(ThreeDHelper::getValueClippedToRange(static_cast<double>(m_nYRotation), ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes())));
|
||||
m_pMFZRotation->SetEmptyFieldValue();
|
||||
|
||||
lcl_SetMetricFieldLimits( m_aMFXRotation, static_cast<sal_Int64>(ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes()));
|
||||
lcl_SetMetricFieldLimits( m_aMFYRotation, static_cast<sal_Int64>(ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes()));
|
||||
lcl_SetMetricFieldLimits( *m_pMFXRotation, static_cast<sal_Int64>(ThreeDHelper::getXDegreeAngleLimitForRightAngledAxes()));
|
||||
lcl_SetMetricFieldLimits( *m_pMFYRotation, static_cast<sal_Int64>(ThreeDHelper::getYDegreeAngleLimitForRightAngledAxes()));
|
||||
}
|
||||
else
|
||||
{
|
||||
lcl_SetMetricFieldLimits( m_aMFXRotation, 180 );
|
||||
lcl_SetMetricFieldLimits( m_aMFYRotation, 180 );
|
||||
lcl_SetMetricFieldLimits( *m_pMFXRotation, 180 );
|
||||
lcl_SetMetricFieldLimits( *m_pMFYRotation, 180 );
|
||||
|
||||
m_aMFXRotation.SetValue(m_nXRotation);
|
||||
m_aMFYRotation.SetValue(m_nYRotation);
|
||||
m_aMFZRotation.SetValue(m_nZRotation);
|
||||
m_pMFXRotation->SetValue(m_nXRotation);
|
||||
m_pMFYRotation->SetValue(m_nYRotation);
|
||||
m_pMFZRotation->SetValue(m_nZRotation);
|
||||
}
|
||||
|
||||
ThreeDHelper::switchRightAngledAxes( m_xSceneProperties, m_aCbxRightAngledAxes.IsChecked(), true /*bRotateLights*/ );
|
||||
ThreeDHelper::switchRightAngledAxes( m_xSceneProperties, m_pCbxRightAngledAxes->IsChecked(), true /*bRotateLights*/ );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
/* -*- 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/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
#include "ResourceIds.hrc"
|
||||
|
||||
#define FT_X_ROTATION 1
|
||||
#define FT_Y_ROTATION 2
|
||||
#define FT_Z_ROTATION 3
|
||||
|
||||
#define MTR_FLD_X_ROTATION 1
|
||||
#define MTR_FLD_Y_ROTATION 2
|
||||
#define MTR_FLD_Z_ROTATION 3
|
||||
#define MTR_FLD_PERSPECTIVE 4
|
||||
|
||||
#define CBX_PERSPECTIVE 1
|
||||
#define CBX_RIGHT_ANGLED_AXES 2
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -68,19 +68,17 @@ private:
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet > m_xSceneProperties;
|
||||
|
||||
CheckBox m_aCbxRightAngledAxes;
|
||||
CheckBox* m_pCbxRightAngledAxes;
|
||||
|
||||
FixedText m_aFtXRotation;
|
||||
MetricField m_aMFXRotation;
|
||||
MetricField* m_pMFXRotation;
|
||||
|
||||
FixedText m_aFtYRotation;
|
||||
MetricField m_aMFYRotation;
|
||||
MetricField* m_pMFYRotation;
|
||||
|
||||
FixedText m_aFtZRotation;
|
||||
MetricField m_aMFZRotation;
|
||||
FixedText* m_pFtZRotation;
|
||||
MetricField* m_pMFZRotation;
|
||||
|
||||
CheckBox m_aCbxPerspective;
|
||||
MetricField m_aMFPerspective;
|
||||
CheckBox* m_pCbxPerspective;
|
||||
MetricField* m_pMFPerspective;
|
||||
|
||||
//to keep old values when switching to right angled axes
|
||||
sal_Int64 m_nXRotation;
|
||||
|
@ -1,143 +0,0 @@
|
||||
/* -*- 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/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include "tp_3D_SceneGeometry.hrc"
|
||||
#include "dlg_View3D.hrc"
|
||||
#include "HelpIds.hrc"
|
||||
#include <svtools/controldims.hrc>
|
||||
|
||||
#define WIDTH_FL 108
|
||||
#define WIDTH_MF 57
|
||||
#define WIDTH_FT 50
|
||||
|
||||
#define HEIGHT_FL 8
|
||||
#define HEIGHT_MF 12
|
||||
#define HEIGHT_FT 10
|
||||
|
||||
#define POS_X_0 6
|
||||
#define POS_X_1 6
|
||||
#define POS_X_2 POS_X_1+WIDTH_FT+4
|
||||
|
||||
#define POS_Y_0 (8)
|
||||
#define POS_Y_1 (POS_Y_0+RSC_CD_FIXEDTEXT_HEIGHT+10)
|
||||
#define POS_Y_2 (POS_Y_1+RSC_CD_FIXEDTEXT_HEIGHT+8)
|
||||
#define POS_Y_3 (POS_Y_2+RSC_CD_FIXEDTEXT_HEIGHT+8)
|
||||
#define POS_Y_4 (POS_Y_3+RSC_CD_FIXEDTEXT_HEIGHT+12)
|
||||
|
||||
#define CUSTOMUNITTEXT_DEGREE \
|
||||
Border = TRUE ; \
|
||||
TabStop = TRUE ; \
|
||||
Repeat = TRUE ; \
|
||||
Spin = TRUE ; \
|
||||
Minimum = -180 ; \
|
||||
Maximum = 180 ; \
|
||||
StrictFormat = TRUE ; \
|
||||
DecimalDigits = 0 ; \
|
||||
First = -180 ; \
|
||||
Last = 180 ; \
|
||||
SpinSize = 1 ; \
|
||||
Unit = FUNIT_CUSTOM ; \
|
||||
CustomUnitText [ en-US ] = " degrees" ;
|
||||
|
||||
TabPage TP_3D_SCENEGEOMETRY
|
||||
{
|
||||
HelpID = HID_3D_VIEW ;
|
||||
OutputSize = TRUE ;
|
||||
SVLook = TRUE ;
|
||||
Hide = TRUE ;
|
||||
Size = MAP_APPFONT ( VIEW3D_PAGE_WIDTH , VIEW3D_PAGE_HEIGHT ) ;
|
||||
|
||||
CheckBox CBX_RIGHT_ANGLED_AXES
|
||||
{
|
||||
HelpID = "chart2:CheckBox:TP_3D_SCENEGEOMETRY:CBX_RIGHT_ANGLED_AXES";
|
||||
Pos = MAP_APPFONT ( POS_X_1 , POS_Y_0 ) ;
|
||||
Size = MAP_APPFONT ( (WIDTH_FT+WIDTH_MF) , HEIGHT_FT ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "~Right-angled axes" ;
|
||||
};
|
||||
FixedText FT_X_ROTATION
|
||||
{
|
||||
Pos = MAP_APPFONT ( POS_X_1 , POS_Y_1 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_FT , HEIGHT_FT ) ;
|
||||
Text [ en-US ] = "~X rotation" ;
|
||||
};
|
||||
FixedText FT_Y_ROTATION
|
||||
{
|
||||
Pos = MAP_APPFONT ( POS_X_1 , POS_Y_2 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_FT , HEIGHT_FT ) ;
|
||||
Text [ en-US ] = "~Y rotation" ;
|
||||
};
|
||||
FixedText FT_Z_ROTATION
|
||||
{
|
||||
Pos = MAP_APPFONT ( POS_X_1 , POS_Y_3 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_FT , HEIGHT_FT ) ;
|
||||
Text [ en-US ] = "~Z rotation" ;
|
||||
};
|
||||
MetricField MTR_FLD_X_ROTATION
|
||||
{
|
||||
HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_X_ROTATION";
|
||||
Pos = MAP_APPFONT ( POS_X_2 , POS_Y_1-2 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ;
|
||||
CUSTOMUNITTEXT_DEGREE
|
||||
};
|
||||
MetricField MTR_FLD_Y_ROTATION
|
||||
{
|
||||
HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_Y_ROTATION";
|
||||
Pos = MAP_APPFONT ( POS_X_2 , POS_Y_2-2 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ;
|
||||
CUSTOMUNITTEXT_DEGREE
|
||||
};
|
||||
MetricField MTR_FLD_Z_ROTATION
|
||||
{
|
||||
HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_Z_ROTATION";
|
||||
Pos = MAP_APPFONT ( POS_X_2 , POS_Y_3-2 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ;
|
||||
CUSTOMUNITTEXT_DEGREE
|
||||
};
|
||||
|
||||
CheckBox CBX_PERSPECTIVE
|
||||
{
|
||||
HelpID = "chart2:CheckBox:TP_3D_SCENEGEOMETRY:CBX_PERSPECTIVE";
|
||||
Pos = MAP_APPFONT ( POS_X_1 , POS_Y_4 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_FT , HEIGHT_FT ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "~Perspective" ;
|
||||
};
|
||||
MetricField MTR_FLD_PERSPECTIVE
|
||||
{
|
||||
HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_PERSPECTIVE";
|
||||
Pos = MAP_APPFONT ( POS_X_2 , POS_Y_4-2 ) ;
|
||||
Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ;
|
||||
Border = TRUE ;
|
||||
TabStop = TRUE ;
|
||||
Repeat = TRUE ;
|
||||
Spin = TRUE ;
|
||||
Minimum = 0 ;
|
||||
Maximum = 100 ;
|
||||
StrictFormat = TRUE ;
|
||||
DecimalDigits = 0 ;
|
||||
First = 0 ;
|
||||
Last = 100 ;
|
||||
SpinSize = 5 ;
|
||||
Unit = FUNIT_CUSTOM ;
|
||||
CustomUnitText = "%" ;
|
||||
};
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
162
chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
Normal file
162
chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
Normal file
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkAdjustment" id="adjustmentPERSPECTIVE">
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustmentROTATION">
|
||||
<property name="lower">-180</property>
|
||||
<property name="upper">180</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkGrid" id="tp_3DSceneGeometry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="CBX_RIGHT_ANGLED_AXES">
|
||||
<property name="label" translatable="yes">_Right-angled axes</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="FT_X_ROTATION">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_X rotation</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">MTR_FLD_X_ROTATION:0degrees</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="FT_Y_ROTATION">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Y rotation</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">MTR_FLD_Y_ROTATION:0degrees</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="FT_Z_ROTATION">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Z rotation</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">MTR_FLD_Z_ROTATION:0degrees</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="CBX_PERSPECTIVE">
|
||||
<property name="label" translatable="yes">_Perspective</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="MTR_FLD_PERSPECTIVE:0%">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="adjustment">adjustmentPERSPECTIVE</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="MTR_FLD_Z_ROTATION:0degrees">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="input_purpose">alpha</property>
|
||||
<property name="adjustment">adjustmentROTATION</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="MTR_FLD_Y_ROTATION:0degrees">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="adjustment">adjustmentROTATION</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="MTR_FLD_X_ROTATION:0degrees">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="adjustment">adjustmentROTATION</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
x
Reference in New Issue
Block a user