Files
libreoffice/chart2/source/controller/inc/res_ErrorBar.hxx
Kurt Zenker 09383fc314 INTEGRATION: CWS chart20_DEV300 (1.2.4); FILE MERGED
2008/02/29 16:17:47 bm 1.2.4.3: #i10000# declaring Dialog forward. Tinderbox breakage
2008/02/22 16:52:33 bm 1.2.4.2: #i366# correct handling for Writer: uses ranges from outside, but has no range chooser
2008/02/21 15:59:26 bm 1.2.4.1: #i366# error bars from ranges
2008-03-06 15:49:24 +00:00

163 lines
5.3 KiB
C++

/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: res_ErrorBar.hxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: kz $ $Date: 2008-03-06 16:49:24 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef CHART2_RES_ERRORBAR_HXX
#define CHART2_RES_ERRORBAR_HXX
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
#include <svtools/valueset.hxx>
#include <svtools/itemset.hxx>
#include <svx/chrtitem.hxx>
#include "chartview/ChartSfxItemIds.hxx"
#include "RangeSelectionButton.hxx"
#include "RangeSelectionListener.hxx"
#include "RangeEdit.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <memory>
class Dialog;
//.............................................................................
namespace chart
{
//.............................................................................
class RangeSelectionHelper;
class ErrorBarResources : public RangeSelectionListenerParent
{
public:
enum tErrorBarType
{
ERROR_BAR_X,
ERROR_BAR_Y
};
ErrorBarResources(
Window* pParent, Dialog * pParentDialog, const SfxItemSet& rInAttrst,
bool bNoneAvailable,
tErrorBarType eType = ERROR_BAR_Y );
virtual ~ErrorBarResources();
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
void SetErrorBarType( tErrorBarType eNewType );
void SetChartDocumentForRangeChoosing(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDocument );
void Reset(const SfxItemSet& rInAttrs);
BOOL FillItemSet(SfxItemSet& rOutAttrs) const;
void FillValueSets();
// ____ RangeSelectionListenerParent ____
virtual void listeningFinished( const ::rtl::OUString & rNewRange );
virtual void disposingRangeSelection();
private:
// category
FixedLine m_aFlErrorCategory;
RadioButton m_aRbNone;
RadioButton m_aRbConst;
RadioButton m_aRbPercent;
RadioButton m_aRbFunction;
RadioButton m_aRbRange;
ListBox m_aLbFunction;
// parameters
FixedLine m_aFlParameters;
FixedText m_aFtPositive;
MetricField m_aMfPositive;
RangeEdit m_aEdRangePositive;
RangeSelectionButton m_aIbRangePositive;
FixedText m_aFtNegative;
MetricField m_aMfNegative;
RangeEdit m_aEdRangeNegative;
RangeSelectionButton m_aIbRangeNegative;
CheckBox m_aCbSyncPosNeg;
// indicator
FixedLine m_aFlIndicate;
RadioButton m_aRbBoth;
RadioButton m_aRbPositive;
RadioButton m_aRbNegative;
FixedImage m_aFiBoth;
FixedImage m_aFiPositive;
FixedImage m_aFiNegative;
SvxChartKindError m_eErrorKind;
SvxChartIndicate m_eIndicate;
SvxChartRegress m_eTrendLineType;
bool m_bErrorKindUnique;
bool m_bIndicatorUnique;
bool m_bPlusUnique;
bool m_bMinusUnique;
bool m_bRangePosUnique;
bool m_bRangeNegUnique;
bool m_bNoneAvailable;
tErrorBarType m_eErrorBarType;
sal_uInt16 m_nConstDecimalDigits;
sal_Int64 m_nConstSpinSize;
Window * m_pParentWindow;
Dialog * m_pParentDialog;
::std::auto_ptr< RangeSelectionHelper >
m_apRangeSelectionHelper;
Edit * m_pCurrentRangeChoosingField;
bool m_bHasInternalDataProvider;
DECL_LINK( CategoryChosen, void * );
DECL_LINK( SynchronizePosAndNeg, void * );
DECL_LINK( PosValueChanged, void * );
DECL_LINK( IndicatorChanged, void * );
DECL_LINK( ChooseRange, RangeSelectionButton * );
DECL_LINK( RangeChanged, Edit * );
void UpdateControlStates();
bool isRangeFieldContentValid( Edit & rEdit );
};
//.............................................................................
} //namespace chart
//.............................................................................
#endif