summaryrefslogtreecommitdiff
path: root/chart2/source/controller/inc/res_ErrorBar.hxx
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2013-12-25 14:39:59 -0200
committerCaolán McNamara <caolanm@redhat.com>2013-12-27 20:20:35 +0000
commitacf3949da96d678239e83df5b47c2f20014ca71f (patch)
tree71e40dbe5c9d98688ee1fc3eab8a0ffae615c630 /chart2/source/controller/inc/res_ErrorBar.hxx
parent6a59fbefbfbc90d6febd43e689773f88deaf36b3 (diff)
Convert chart error bars tab page to widget UI
Change-Id: I9f3cb1fb3186e77b5c5ee57ff3e6086022c80bfd Note: kept old resouce to allow dialog to be called by dlg_InsertErrorBars, util we find a way to have a dialog to call a tab page and access the resources. Once a solution is found, old- resources can be deleted, RangeEdit and RangeSelectionHelper can be nuked too. Reviewed-on: https://gerrit.libreoffice.org/7198 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller/inc/res_ErrorBar.hxx')
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx100
1 files changed, 99 insertions, 1 deletions
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 51033432e196..c568560ebde6 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -20,6 +20,8 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
#include <vcl/button.hxx>
+// #include <vcl/dialog.hxx>
+#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
@@ -51,10 +53,106 @@ public:
};
ErrorBarResources(
+ SfxTabPage* pParent, Dialog* pParentDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::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);
+ sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
+
+ void FillValueSets();
+
+ // ____ RangeSelectionListenerParent ____
+ virtual void listeningFinished( const OUString & rNewRange );
+ virtual void disposingRangeSelection();
+
+private:
+ // category
+// FixedLine m_pFlErrorCategory;
+ RadioButton* m_pRbNone;
+ RadioButton* m_pRbConst;
+ RadioButton* m_pRbPercent;
+ RadioButton* m_pRbFunction;
+ RadioButton* m_pRbRange;
+ ListBox* m_pLbFunction;
+
+ // parameters
+ VclFrame* m_pFlParameters;
+ VclBox* m_pBxPositive;
+ MetricField* m_pMfPositive;
+ Edit* m_pEdRangePositive;
+ PushButton* m_pIbRangePositive;
+ VclBox* m_pBxNegative;
+ MetricField* m_pMfNegative;
+ Edit* m_pEdRangeNegative;
+ PushButton* m_pIbRangeNegative;
+ CheckBox* m_pCbSyncPosNeg;
+
+ // indicator
+// FixedLine* m_pFlIndicate;
+ RadioButton* m_pRbBoth;
+ RadioButton* m_pRbPositive;
+ RadioButton* m_pRbNegative;
+ FixedImage* m_pFiBoth;
+ FixedImage* m_pFiPositive;
+ FixedImage* m_pFiNegative;
+
+ FixedText* m_pUIStringPos;
+ FixedText* m_pUIStringNeg;
+ FixedText* m_pUIStringRbRange;
+
+ SvxChartKindError m_eErrorKind;
+ SvxChartIndicate m_eIndicate;
+
+ 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;
+
+ SfxTabPage* m_pParentWindow;
+ Dialog * m_pParentDialog;
+ boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
+ Edit * m_pCurrentRangeChoosingField;
+ bool m_bHasInternalDataProvider;
+ bool m_bDisableDataTableDialog;
+
+ 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 );
+};
+
+class oldErrorBarResources : public RangeSelectionListenerParent
+{
+public:
+ enum tErrorBarType
+ {
+ ERROR_BAR_X,
+ ERROR_BAR_Y
+ };
+
+ oldErrorBarResources(
Window* pParent, Dialog * pParentDialog, const SfxItemSet& rInAttrst,
bool bNoneAvailable,
tErrorBarType eType = ERROR_BAR_Y );
- virtual ~ErrorBarResources();
+ virtual ~oldErrorBarResources();
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
void SetErrorBarType( tErrorBarType eNewType );