summaryrefslogtreecommitdiffstats
path: root/kchart/kdchart/KDChartParamsWrapper.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kchart/kdchart/KDChartParamsWrapper.h
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kchart/kdchart/KDChartParamsWrapper.h')
-rw-r--r--kchart/kdchart/KDChartParamsWrapper.h175
1 files changed, 175 insertions, 0 deletions
diff --git a/kchart/kdchart/KDChartParamsWrapper.h b/kchart/kdchart/KDChartParamsWrapper.h
new file mode 100644
index 00000000..827cef11
--- /dev/null
+++ b/kchart/kdchart/KDChartParamsWrapper.h
@@ -0,0 +1,175 @@
+#ifndef KDCHARTPARAMSWRAPPER_H
+#define KDCHARTPARAMSWRAPPER_H
+#include <qobject.h>
+#include <KDFrame.h>
+#include <KDChartParams.h>
+#include <qvariant.h>
+class KDChartAxisParams;
+
+class KDChartParamsWrapper :public QObject
+{
+ Q_OBJECT
+
+public:
+ KDChartParamsWrapper( KDChartParams* );
+public slots:
+ const KDChartAxisParams* axisParams( uint n ) const;
+ void setExplodeValues( QVariant explodeList );
+ void setExplodeFactors( QVariant factors );
+ void setAxisLabelStringParams( uint n,
+ QVariant axisLabelStringList,
+ QVariant axisShortLabelStringList,
+ const QString& valueStart = QString::null,
+ const QString& valueEnd = QString::null );
+
+ // These methods need to be here, for the enums to work.
+ void setSimpleFrame( uint area,
+ int outerGapX = 0,
+ int outerGapY = 0,
+ int innerGapX = 0,
+ int innerGapY = 0,
+ bool addFrameWidthToLayout = true,
+ bool addFrameHeightToLayout = true,
+ int simpleFrame = KDFrame::FrameFlat,
+ int lineWidth = 1,
+ int midLineWidth = 0,
+ QPen pen = QPen(),
+ QBrush background = QBrush( Qt::NoBrush ),
+ const QPixmap* backPixmap = 0, // no pixmap
+ int backPixmapMode = KDFrame::PixStretched,
+ int shadowWidth = 0,
+ int sunPos = KDFrame::CornerTopLeft )
+ {
+ _data->setSimpleFrame(area, outerGapX, outerGapY, innerGapX, innerGapY, addFrameWidthToLayout, addFrameHeightToLayout,
+ (KDFrame::SimpleFrame) simpleFrame, lineWidth, midLineWidth, pen, background, backPixmap,
+ (KDFrame::BackPixmapMode) backPixmapMode, shadowWidth, (KDFrame::CornerName) sunPos );
+ }
+
+ void setDataRegionFrame( uint dataRow,
+ uint dataCol,
+ uint data3rd, // important: we ignore the data3rd parameter for now!
+ int innerGapX = 0,
+ int innerGapY = 0,
+ bool addFrameWidthToLayout = true,
+ bool addFrameHeightToLayout = true,
+ int simpleFrame = KDFrame::FrameFlat,
+ int lineWidth = 1,
+ int midLineWidth = 0,
+ QPen pen = QPen(),
+ int shadowWidth = 0,
+ int sunPos = KDFrame::CornerTopLeft )
+ {
+ _data->setDataRegionFrame( dataRow, dataCol,
+ data3rd, innerGapX, innerGapY, addFrameWidthToLayout, addFrameHeightToLayout,
+ (KDFrame::SimpleFrame) simpleFrame, lineWidth, midLineWidth, pen, shadowWidth, (KDFrame::CornerName) sunPos );
+ }
+
+ bool moveDataRegionFrame( uint oldDataRow,
+ uint oldDataCol,
+ uint oldData3rd, // important: we ignore the data3rd parameter for now!
+ uint newDataRow,
+ uint newDataCol,
+ uint newData3rd// important: we ignore the data3rd parameter for now!
+ )
+ {
+ return _data->moveDataRegionFrame(
+ oldDataRow, oldDataCol, oldData3rd, newDataRow, newDataCol, newData3rd );
+ }
+
+ void setPrintDataValues( bool active,
+ uint chart = KDCHART_ALL_CHARTS,
+ int divPow10 = 0,
+ int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
+ QFont* font = 0,
+ uint size = UINT_MAX, // <-- makes us use the *default* font params
+ // by IGNORING settings of
+ // the following parameters!
+ const QColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
+ int negativePosition = KDChartEnums::PosCenter,
+ uint negativeAlign = Qt::AlignCenter,
+ int negativeDeltaX = 0,
+ int negativeDeltaY = 0,
+ int negativeRotation = 0,
+ int positivePosition = KDChartEnums::PosCenter,
+ uint positiveAlign = Qt::AlignCenter,
+ int positiveDeltaX = 0,
+ int positiveDeltaY = 0,
+ int positiveRotation = 0,
+ int policy = KDChartEnums::LayoutPolicyRotate )
+ {
+ _data->setPrintDataValues( active, chart, divPow10, digitsBehindComma,font, size, color, (KDChartEnums::PositionFlag) negativePosition,
+ negativeAlign, negativeDeltaX, negativeDeltaY, negativeRotation, (KDChartEnums::PositionFlag) positivePosition,
+ positiveAlign, positiveDeltaX, positiveDeltaY, positiveRotation, (KDChartEnums::TextLayoutPolicy) policy );
+ }
+
+
+ void setDataValuesPlacing( int position,
+ uint align,
+ int deltaX,
+ int deltaY,
+ int rotation,
+ bool specifyingPositiveValues = true,
+ uint chart = KDCHART_ALL_CHARTS )
+ {
+ _data->setDataValuesPlacing( (KDChartEnums::PositionFlag) position, align, deltaX, deltaY, rotation, specifyingPositiveValues, chart );
+ }
+
+
+ void setDataValuesPolicy( int policy = KDChartEnums::LayoutPolicyRotate,
+ uint chart = KDCHART_ALL_CHARTS )
+ {
+ _data->setDataValuesPolicy( (KDChartEnums::TextLayoutPolicy) policy, chart );
+ }
+
+
+ void setPolarDelimsAndLabelsAtPos( int pos,
+ bool showDelimiters,
+ bool showLabels )
+ {
+ _data->setPolarDelimsAndLabelsAtPos( (KDChartEnums::PositionFlag) pos, showDelimiters, showLabels );
+ }
+
+
+ bool polarDelimAtPos( int pos ) const
+ {
+ return _data->polarDelimAtPos( (KDChartEnums::PositionFlag) pos );
+ }
+
+
+
+ bool polarLabelsAtPos( int pos ) const
+ {
+ return _data->polarLabelsAtPos( (KDChartEnums::PositionFlag) pos );
+ }
+
+
+ void setAxisType( uint n, int axisType )
+ {
+ _data->setAxisType( n, (KDChartAxisParams::AxisType) axisType );
+ }
+
+
+ void setAxisLabelTextParams( uint n,
+ bool axisSteadyValueCalc = true,
+ QVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ QVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
+ int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
+ int axisMaxEmptyInnerSpan = 67,
+ int takeLabelsFromDataRow = KDChartAxisParams::LabelsFromDataRowNo,
+ int labelTextsDataRow = 0,
+ const QVariant& axisLabelStringList = QStringList(),
+ const QVariant& axisShortLabelsStringList = QStringList(),
+ int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
+ int axisValueDeltaScale = KDChartAxisParams::ValueScaleNumerical );
+
+
+
+private:
+ KDChartParams* _data;
+};
+
+
+
+#endif /* KDCHARTPARAMSWRAPPER_H */
+