Files
libreoffice/chart2/source/controller/dialogs/tp_Scale.hxx

113 lines
4.3 KiB
C++
Raw Normal View History

2010-10-27 12:43:08 +01:00
/* -*- 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 .
*/
#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_SCALE_HXX
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_SCALE_HXX
2003-10-06 08:58:36 +00:00
#include <sfx2/tabdlg.hxx>
namespace chart
{
class ScaleTabPage : public SfxTabPage
2003-10-06 08:58:36 +00:00
{
2008-12-12 12:17:17 +00:00
public:
ScaleTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
virtual ~ScaleTabPage() override;
2008-12-12 12:17:17 +00:00
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs );
virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
virtual void Reset( const SfxItemSet* rInAttrs ) override;
2008-12-12 12:17:17 +00:00
using TabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet ) override;
2008-12-12 12:17:17 +00:00
void SetNumFormatter( SvNumberFormatter* pFormatter );
void SetNumFormat();
void ShowAxisOrigin( bool bShowOrigin );
2003-10-06 08:58:36 +00:00
private:
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;
std::unique_ptr<weld::CheckButton> m_xCbxReverse;
std::unique_ptr<weld::CheckButton> m_xCbxLogarithm;
std::unique_ptr<weld::Widget> m_xBxType;
std::unique_ptr<weld::ComboBox> m_xLB_AxisType;
std::unique_ptr<weld::Widget> m_xBxMinMax;
std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldMin;
std::unique_ptr<weld::CheckButton> m_xCbxAutoMin;
std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldMax;
std::unique_ptr<weld::CheckButton> m_xCbxAutoMax;
std::unique_ptr<weld::Widget> m_xBxResolution;
std::unique_ptr<weld::ComboBox> m_xLB_TimeResolution;
std::unique_ptr<weld::CheckButton> m_xCbx_AutoTimeResolution;
std::unique_ptr<weld::Label> m_xTxtMain;
std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldStepMain;
std::unique_ptr<weld::SpinButton> m_xMt_MainDateStep;
std::unique_ptr<weld::ComboBox> m_xLB_MainTimeUnit;
std::unique_ptr<weld::CheckButton> m_xCbxAutoStepMain;
std::unique_ptr<weld::Label> m_xTxtHelpCount;
std::unique_ptr<weld::Label> m_xTxtHelp;
std::unique_ptr<weld::SpinButton> m_xMtStepHelp;
std::unique_ptr<weld::ComboBox> m_xLB_HelpTimeUnit;
std::unique_ptr<weld::CheckButton> m_xCbxAutoStepHelp;
std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldOrigin;
std::unique_ptr<weld::CheckButton> m_xCbxAutoOrigin;
std::unique_ptr<weld::Widget> m_xBxOrigin;
void EnableControls();
DECL_LINK(SelectAxisTypeHdl, weld::ComboBox&, void);
DECL_LINK(EnableValueHdl, weld::ToggleButton&, void);
2003-10-06 08:58:36 +00:00
/** shows a warning window due to an invalid input.
migrate to boost::gettext * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-11 20:56:30 +01:00
@param pResIdMessage
2003-10-06 08:58:36 +00:00
The resource identifier that represents the localized warning text.
migrate to boost::gettext * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-11 20:56:30 +01:00
If this is nullptr, no warning is shown and false is returned.
2003-10-06 08:58:36 +00:00
@param pControl
If non-NULL, contains a pointer to the control in which the
erroneous value was in. This method gives this control the focus
2003-10-06 08:58:36 +00:00
and selects its content.
@return false, if nResIdMessage was 0, true otherwise
*/
bool ShowWarning(const char* pResIdMessage, weld::Widget* pControl);
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: */