2010-10-27 12:43:08 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-17 12:30:48 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2003-10-06 08:58:36 +00:00
|
|
|
#ifndef _CHART2_TP_SCALES_HXX
|
|
|
|
#define _CHART2_TP_SCALES_HXX
|
|
|
|
|
|
|
|
// header for SfxTabPage
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
// header for class FormattedField
|
|
|
|
#include <svtools/fmtfield.hxx>
|
|
|
|
// header for FixedText
|
|
|
|
#include <vcl/fixed.hxx>
|
|
|
|
// header for CheckBox
|
|
|
|
#include <vcl/button.hxx>
|
|
|
|
// header for MetricField
|
|
|
|
#include <vcl/field.hxx>
|
2010-11-30 01:45:03 +01:00
|
|
|
// header for class ListBox
|
|
|
|
#include <vcl/lstbox.hxx>
|
2003-10-06 08:58:36 +00:00
|
|
|
|
|
|
|
namespace chart
|
|
|
|
{
|
|
|
|
|
2007-10-22 15:48:24 +00:00
|
|
|
class ScaleTabPage : public SfxTabPage
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
2008-12-12 12:17:17 +00:00
|
|
|
public:
|
|
|
|
ScaleTabPage( Window* pParent, const SfxItemSet& rInAttrs );
|
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
|
2011-01-14 15:18:08 +01:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs );
|
2008-12-12 12:17:17 +00:00
|
|
|
virtual void Reset( const SfxItemSet& rInAttrs );
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
virtual int DeactivatePage( SfxItemSet* pItemSet = NULL );
|
|
|
|
|
|
|
|
void SetNumFormatter( SvNumberFormatter* pFormatter );
|
|
|
|
void SetNumFormat();
|
|
|
|
|
|
|
|
void ShowAxisOrigin( bool bShowOrigin );
|
|
|
|
|
2009-03-03 11:39:43 +00:00
|
|
|
virtual void StateChanged( StateChangedType nType );
|
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
private:
|
|
|
|
FixedLine aFlScale;
|
|
|
|
|
2010-11-30 01:45:03 +01:00
|
|
|
CheckBox aCbxReverse;
|
|
|
|
|
|
|
|
CheckBox aCbxLogarithm;
|
|
|
|
|
|
|
|
FixedText m_aTxt_AxisType;
|
|
|
|
ListBox m_aLB_AxisType;
|
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
FixedText aTxtMin;
|
|
|
|
FormattedField aFmtFldMin;
|
|
|
|
CheckBox aCbxAutoMin;
|
|
|
|
|
|
|
|
FixedText aTxtMax;
|
|
|
|
FormattedField aFmtFldMax;
|
|
|
|
CheckBox aCbxAutoMax;
|
|
|
|
|
2010-11-30 01:45:03 +01:00
|
|
|
FixedText m_aTxt_TimeResolution;
|
|
|
|
ListBox m_aLB_TimeResolution;
|
|
|
|
CheckBox m_aCbx_AutoTimeResolution;
|
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
FixedText aTxtMain;
|
|
|
|
FormattedField aFmtFldStepMain;
|
2010-11-30 01:45:03 +01:00
|
|
|
MetricField m_aMt_MainDateStep;
|
|
|
|
ListBox m_aLB_MainTimeUnit;
|
2003-10-06 08:58:36 +00:00
|
|
|
CheckBox aCbxAutoStepMain;
|
|
|
|
|
2010-11-30 01:45:03 +01:00
|
|
|
FixedText aTxtHelpCount;
|
2003-10-06 08:58:36 +00:00
|
|
|
FixedText aTxtHelp;
|
|
|
|
MetricField aMtStepHelp;
|
2010-11-30 01:45:03 +01:00
|
|
|
ListBox m_aLB_HelpTimeUnit;
|
2003-10-06 08:58:36 +00:00
|
|
|
CheckBox aCbxAutoStepHelp;
|
|
|
|
|
|
|
|
FixedText aTxtOrigin;
|
|
|
|
FormattedField aFmtFldOrigin;
|
|
|
|
CheckBox aCbxAutoOrigin;
|
2008-12-12 12:17:17 +00:00
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
double fMin;
|
|
|
|
double fMax;
|
|
|
|
double fStepMain;
|
|
|
|
sal_Int32 nStepHelp;
|
|
|
|
double fOrigin;
|
2010-11-30 01:45:03 +01:00
|
|
|
sal_Int32 m_nTimeResolution;
|
|
|
|
sal_Int32 m_nMainTimeUnit;
|
|
|
|
sal_Int32 m_nHelpTimeUnit;
|
|
|
|
int m_nAxisType;
|
|
|
|
bool m_bAllowDateAxis;
|
2003-10-06 08:58:36 +00:00
|
|
|
SvNumberFormatter* pNumFormatter;
|
|
|
|
|
2008-12-12 12:17:17 +00:00
|
|
|
bool m_bShowAxisOrigin;
|
|
|
|
|
2009-03-03 11:39:43 +00:00
|
|
|
void AdjustControlPositions();
|
2007-10-22 15:48:24 +00:00
|
|
|
void EnableControls();
|
2010-11-30 01:45:03 +01:00
|
|
|
void PlaceIntervalControlsAccordingToAxisType();
|
2007-10-22 15:48:24 +00:00
|
|
|
|
2010-11-30 01:45:03 +01:00
|
|
|
DECL_LINK( SelectAxisTypeHdl, void* );
|
2003-10-06 08:58:36 +00:00
|
|
|
DECL_LINK( EnableValueHdl, CheckBox* );
|
2011-01-14 18:59:53 +01:00
|
|
|
DECL_LINK( FmtFieldModifiedHdl, FormattedField* );
|
2003-10-06 08:58:36 +00:00
|
|
|
|
|
|
|
/** shows a warning window due to an invalid input.
|
|
|
|
|
|
|
|
@param nResIdMessage
|
|
|
|
The resource identifier that represents the localized warning text.
|
|
|
|
If this is 0, no warning is shown and false is returned.
|
|
|
|
|
|
|
|
@param pControl
|
|
|
|
If non-NULL, contains a pointer to the control in which the
|
|
|
|
errornous value was in. This method gives this control the focus
|
|
|
|
and selects its content.
|
|
|
|
|
|
|
|
@return false, if nResIdMessage was 0, true otherwise
|
|
|
|
*/
|
2011-02-07 13:06:08 +01:00
|
|
|
bool ShowWarning( sal_uInt16 nResIdMessage, Control* pControl = NULL );
|
2011-05-06 22:34:11 -04:00
|
|
|
|
|
|
|
void HideAllControls();
|
2003-10-06 08:58:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} //namespace chart
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 12:43:08 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|