[Kst] branches/work/kst/portto4/kst/src
Peter Kümmel
syntheticpp at gmx.net
Wed Oct 17 18:09:23 UTC 2012
SVN commit 1320973 by kuemmel:
Qt5 fixes: QVariant is now in QtCore
M +2 -0 datasources/ascii/asciifiledata.cpp
M +14 -14 libkstapp/axistab.cpp
M +16 -16 libkstapp/filltab.cpp
M +7 -7 libkstapp/markerstab.cpp
M +4 -4 libkstapp/plotaxis.cpp
M +1 -1 libkstapp/plotmarkers.cpp
M +24 -24 libkstapp/stroketab.cpp
M +1 -1 libkstapp/view.cpp
M +3 -3 libkstapp/viewitem.cpp
M +3 -3 widgets/dialogdefaults.cpp
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciifiledata.cpp #1320972:1320973
@@ -10,6 +10,7 @@
* *
***************************************************************************/
+#ifndef QT5
// needed to track memeory usage
#include "qplatformdefs.h"
#include <stdlib.h>
@@ -24,6 +25,7 @@
#undef qMalloc
#undef free
#undef qFree
+#endif
#include "asciifiledata.h"
#include "debug.h"
--- branches/work/kst/portto4/kst/src/libkstapp/axistab.cpp #1320972:1320973
@@ -28,20 +28,20 @@
_axisMajorTickSpacing->addItem(tr("VeryFine"), 15);
setAxisMajorTickSpacing(TicksNormal);
- _axisMajorLineStyle->addItem("SolidLine", Qt::SolidLine);
- _axisMajorLineStyle->addItem("DashLine", Qt::DashLine);
- _axisMajorLineStyle->addItem("DotLine", Qt::DotLine);
- _axisMajorLineStyle->addItem("DashDotLine", Qt::DashDotLine);
- _axisMajorLineStyle->addItem("DashDotDotLine", Qt::DashDotDotLine);
- _axisMajorLineStyle->addItem("CustomDashLine", Qt::CustomDashLine);
+ _axisMajorLineStyle->addItem("SolidLine", (int)Qt::SolidLine);
+ _axisMajorLineStyle->addItem("DashLine", (int)Qt::DashLine);
+ _axisMajorLineStyle->addItem("DotLine", (int)Qt::DotLine);
+ _axisMajorLineStyle->addItem("DashDotLine", (int)Qt::DashDotLine);
+ _axisMajorLineStyle->addItem("DashDotDotLine", (int)Qt::DashDotDotLine);
+ _axisMajorLineStyle->addItem("CustomDashLine", (int)Qt::CustomDashLine);
setAxisMajorGridLineStyle(Qt::DashLine);
- _axisMinorLineStyle->addItem("SolidLine", Qt::SolidLine);
- _axisMinorLineStyle->addItem("DashLine", Qt::DashLine);
- _axisMinorLineStyle->addItem("DotLine", Qt::DotLine);
- _axisMinorLineStyle->addItem("DashDotLine", Qt::DashDotLine);
- _axisMinorLineStyle->addItem("DashDotDotLine", Qt::DashDotDotLine);
- _axisMinorLineStyle->addItem("CustomDashLine", Qt::CustomDashLine);
+ _axisMinorLineStyle->addItem("SolidLine", (int)Qt::SolidLine);
+ _axisMinorLineStyle->addItem("DashLine", (int)Qt::DashLine);
+ _axisMinorLineStyle->addItem("DotLine", (int)Qt::DotLine);
+ _axisMinorLineStyle->addItem("DashDotLine", (int)Qt::DashDotLine);
+ _axisMinorLineStyle->addItem("DashDotDotLine", (int)Qt::DashDotDotLine);
+ _axisMinorLineStyle->addItem("CustomDashLine", (int)Qt::CustomDashLine);
setAxisMinorGridLineStyle(Qt::DashLine);
setAxisMajorGridLineColor(Qt::gray);
@@ -216,7 +216,7 @@
void AxisTab::setAxisMajorGridLineStyle(Qt::PenStyle style) {
- _axisMajorLineStyle->setCurrentIndex(_axisMajorLineStyle->findData(QVariant(style)));
+ _axisMajorLineStyle->setCurrentIndex(_axisMajorLineStyle->findData(QVariant((int)style)));
}
@@ -261,7 +261,7 @@
void AxisTab::setAxisMinorGridLineStyle(Qt::PenStyle style) {
- _axisMinorLineStyle->setCurrentIndex(_axisMinorLineStyle->findData(QVariant(style)));
+ _axisMinorLineStyle->setCurrentIndex(_axisMinorLineStyle->findData(QVariant((int)style)));
}
--- branches/work/kst/portto4/kst/src/libkstapp/filltab.cpp #1320972:1320973
@@ -23,21 +23,21 @@
setupUi(this);
setTabTitle(tr("Fill"));
- _style->addItem("NoBrush", Qt::NoBrush);
- _style->addItem("SolidPattern", Qt::SolidPattern);
- _style->addItem("Dense1Pattern", Qt::Dense1Pattern);
- _style->addItem("Dense2Pattern", Qt::Dense2Pattern);
- _style->addItem("Dense3Pattern", Qt::Dense3Pattern);
- _style->addItem("Dense4Pattern", Qt::Dense4Pattern);
- _style->addItem("Dense5Pattern", Qt::Dense5Pattern);
- _style->addItem("Dense6Pattern", Qt::Dense6Pattern);
- _style->addItem("Dense7Pattern", Qt::Dense7Pattern);
- _style->addItem("HorPattern", Qt::HorPattern);
- _style->addItem("VerPattern", Qt::VerPattern);
- _style->addItem("CrossPattern", Qt::CrossPattern);
- _style->addItem("BDiagPattern", Qt::BDiagPattern);
- _style->addItem("FDiagPattern", Qt::FDiagPattern);
- _style->addItem("DiagCrossPattern", Qt::DiagCrossPattern);
+ _style->addItem("NoBrush", (int)Qt::NoBrush);
+ _style->addItem("SolidPattern", (int)Qt::SolidPattern);
+ _style->addItem("Dense1Pattern", (int)Qt::Dense1Pattern);
+ _style->addItem("Dense2Pattern", (int)Qt::Dense2Pattern);
+ _style->addItem("Dense3Pattern", (int)Qt::Dense3Pattern);
+ _style->addItem("Dense4Pattern", (int)Qt::Dense4Pattern);
+ _style->addItem("Dense5Pattern", (int)Qt::Dense5Pattern);
+ _style->addItem("Dense6Pattern", (int)Qt::Dense6Pattern);
+ _style->addItem("Dense7Pattern", (int)Qt::Dense7Pattern);
+ _style->addItem("HorPattern", (int)Qt::HorPattern);
+ _style->addItem("VerPattern", (int)Qt::VerPattern);
+ _style->addItem("CrossPattern", (int)Qt::CrossPattern);
+ _style->addItem("BDiagPattern", (int)Qt::BDiagPattern);
+ _style->addItem("FDiagPattern", (int)Qt::FDiagPattern);
+ _style->addItem("DiagCrossPattern", (int)Qt::DiagCrossPattern);
connect(_color, SIGNAL(changed(const QColor &)), this, SIGNAL(modified()));
connect(_style, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
@@ -98,7 +98,7 @@
if (style == Qt::LinearGradientPattern) {
_style->setCurrentIndex(Qt::SolidPattern);
} else {
- _style->setCurrentIndex(_style->findData(QVariant(style)));
+ _style->setCurrentIndex(_style->findData(QVariant((int)style)));
}
}
--- branches/work/kst/portto4/kst/src/libkstapp/markerstab.cpp #1320972:1320973
@@ -24,12 +24,12 @@
setupUi(this);
setTabTitle(tr("Markers"));
- _markerLineStyle->addItem("SolidLine", Qt::SolidLine);
- _markerLineStyle->addItem("DashLine", Qt::DashLine);
- _markerLineStyle->addItem("DotLine", Qt::DotLine);
- _markerLineStyle->addItem("DashDotLine", Qt::DashDotLine);
- _markerLineStyle->addItem("DashDotDotLine", Qt::DashDotDotLine);
- _markerLineStyle->addItem("CustomDashLine", Qt::CustomDashLine);
+ _markerLineStyle->addItem("SolidLine", (int)Qt::SolidLine);
+ _markerLineStyle->addItem("DashLine", (int)Qt::DashLine);
+ _markerLineStyle->addItem("DotLine", (int)Qt::DotLine);
+ _markerLineStyle->addItem("DashDotLine", (int)Qt::DashDotLine);
+ _markerLineStyle->addItem("DashDotDotLine", (int)Qt::DashDotDotLine);
+ _markerLineStyle->addItem("CustomDashLine", (int)Qt::CustomDashLine);
connect(_curveMarkers, SIGNAL(stateChanged(int)), this, SLOT(update()));
connect(_vectorMarkers, SIGNAL(stateChanged(int)), this, SLOT(update()));
@@ -111,7 +111,7 @@
void MarkersTab::setLineStyle(Qt::PenStyle style) {
- _markerLineStyle->setCurrentIndex(_markerLineStyle->findData(QVariant(style)));
+ _markerLineStyle->setCurrentIndex(_markerLineStyle->findData(QVariant((int)style)));
}
--- branches/work/kst/portto4/kst/src/libkstapp/plotaxis.cpp #1320972:1320973
@@ -1142,8 +1142,8 @@
_dialogDefaults->setValue(group+"DrawMinorGridLines", QVariant(drawAxisMinorGridLines()).toString());
_dialogDefaults->setValue(group+"DrawMajorGridLinecolor", QVariant(axisMajorGridLineColor()).toString());
_dialogDefaults->setValue(group+"DrawMinorGridLinecolor", QVariant(axisMinorGridLineColor()).toString());
- _dialogDefaults->setValue(group+"DrawMajorGridLinestyle", QVariant(axisMajorGridLineStyle()).toString());
- _dialogDefaults->setValue(group+"DrawMinorGridLinestyle", QVariant(axisMinorGridLineStyle()).toString());
+ _dialogDefaults->setValue(group+"DrawMajorGridLinestyle", QVariant((int)axisMajorGridLineStyle()).toString());
+ _dialogDefaults->setValue(group+"DrawMinorGridLinestyle", QVariant((int)axisMinorGridLineStyle()).toString());
_dialogDefaults->setValue(group+"DrawMajorGridLinewidth", QVariant(axisMajorGridLineWidth()).toString());
_dialogDefaults->setValue(group+"DrawMinorGridLinewidth", QVariant(axisMinorGridLineWidth()).toString());
_dialogDefaults->setValue(group+"SignificantDigits", QVariant(axisSignificantDigits()).toString());
@@ -1170,8 +1170,8 @@
xml.writeAttribute("drawminorgridlines", QVariant(drawAxisMinorGridLines()).toString());
xml.writeAttribute("drawmajorgridlinecolor", QVariant(axisMajorGridLineColor()).toString());
xml.writeAttribute("drawminorgridlinecolor", QVariant(axisMinorGridLineColor()).toString());
- xml.writeAttribute("drawmajorgridlinestyle", QVariant(axisMajorGridLineStyle()).toString());
- xml.writeAttribute("drawminorgridlinestyle", QVariant(axisMinorGridLineStyle()).toString());
+ xml.writeAttribute("drawmajorgridlinestyle", QVariant((int)axisMajorGridLineStyle()).toString());
+ xml.writeAttribute("drawminorgridlinestyle", QVariant((int)axisMinorGridLineStyle()).toString());
xml.writeAttribute("drawmajorgridlinewidth", QVariant(axisMajorGridLineWidth()).toString());
xml.writeAttribute("drawminorgridlinewidth", QVariant(axisMinorGridLineWidth()).toString());
xml.writeAttribute("significantdigits", QVariant(axisSignificantDigits()).toString());
--- branches/work/kst/portto4/kst/src/libkstapp/plotmarkers.cpp #1320972:1320973
@@ -83,7 +83,7 @@
xml.writeStartElement("plotmarkers");
xml.writeAttribute("xaxis", QVariant(_xAxis).toString());
xml.writeAttribute("linecolor", QVariant(_lineColor).toString());
- xml.writeAttribute("linestyle", QVariant(_lineStyle).toString());
+ xml.writeAttribute("linestyle", QVariant((int)_lineStyle).toString());
xml.writeAttribute("linewidth", QVariant(_lineWidth).toString());
xml.writeAttribute("curvemode", QVariant(_curveMode).toString());
if (_vector != 0) {
--- branches/work/kst/portto4/kst/src/libkstapp/stroketab.cpp #1320972:1320973
@@ -20,29 +20,29 @@
setupUi(this);
setTabTitle(tr("Stroke"));
- _style->addItem("NoPen", Qt::NoPen);
- _style->addItem("SolidLine", Qt::SolidLine);
- _style->addItem("DashLine", Qt::DashLine);
- _style->addItem("DotLine", Qt::DotLine);
- _style->addItem("DashDotLine", Qt::DashDotLine);
- _style->addItem("DashDotDotLine", Qt::DashDotDotLine);
- _style->addItem("CustomDashLine", Qt::CustomDashLine);
+ _style->addItem("NoPen", (int)Qt::NoPen);
+ _style->addItem("SolidLine", (int)Qt::SolidLine);
+ _style->addItem("DashLine", (int)Qt::DashLine);
+ _style->addItem("DotLine", (int)Qt::DotLine);
+ _style->addItem("DashDotLine", (int)Qt::DashDotLine);
+ _style->addItem("DashDotDotLine", (int)Qt::DashDotDotLine);
+ _style->addItem("CustomDashLine", (int)Qt::CustomDashLine);
- _brushStyle->addItem("NoBrush", Qt::NoBrush);
- _brushStyle->addItem("SolidPattern", Qt::SolidPattern);
- _brushStyle->addItem("Dense1Pattern", Qt::Dense1Pattern);
- _brushStyle->addItem("Dense2Pattern", Qt::Dense2Pattern);
- _brushStyle->addItem("Dense3Pattern", Qt::Dense3Pattern);
- _brushStyle->addItem("Dense4Pattern", Qt::Dense4Pattern);
- _brushStyle->addItem("Dense5Pattern", Qt::Dense5Pattern);
- _brushStyle->addItem("Dense6Pattern", Qt::Dense6Pattern);
- _brushStyle->addItem("Dense7Pattern", Qt::Dense7Pattern);
- _brushStyle->addItem("HorPattern", Qt::HorPattern);
- _brushStyle->addItem("VerPattern", Qt::VerPattern);
- _brushStyle->addItem("CrossPattern", Qt::CrossPattern);
- _brushStyle->addItem("BDiagPattern", Qt::BDiagPattern);
- _brushStyle->addItem("FDiagPattern", Qt::FDiagPattern);
- _brushStyle->addItem("DiagCrossPattern", Qt::DiagCrossPattern);
+ _brushStyle->addItem("NoBrush", (int)Qt::NoBrush);
+ _brushStyle->addItem("SolidPattern", (int)Qt::SolidPattern);
+ _brushStyle->addItem("Dense1Pattern", (int)Qt::Dense1Pattern);
+ _brushStyle->addItem("Dense2Pattern", (int)Qt::Dense2Pattern);
+ _brushStyle->addItem("Dense3Pattern", (int)Qt::Dense3Pattern);
+ _brushStyle->addItem("Dense4Pattern", (int)Qt::Dense4Pattern);
+ _brushStyle->addItem("Dense5Pattern", (int)Qt::Dense5Pattern);
+ _brushStyle->addItem("Dense6Pattern", (int)Qt::Dense6Pattern);
+ _brushStyle->addItem("Dense7Pattern", (int)Qt::Dense7Pattern);
+ _brushStyle->addItem("HorPattern", (int)Qt::HorPattern);
+ _brushStyle->addItem("VerPattern", (int)Qt::VerPattern);
+ _brushStyle->addItem("CrossPattern", (int)Qt::CrossPattern);
+ _brushStyle->addItem("BDiagPattern", (int)Qt::BDiagPattern);
+ _brushStyle->addItem("FDiagPattern", (int)Qt::FDiagPattern);
+ _brushStyle->addItem("DiagCrossPattern", (int)Qt::DiagCrossPattern);
_joinStyle->addItem("MiterJoin", Qt::MiterJoin);
_joinStyle->addItem("BevelJoin", Qt::BevelJoin);
@@ -122,7 +122,7 @@
void StrokeTab::setStyle(Qt::PenStyle style) {
- _style->setCurrentIndex(_style->findData(QVariant(style)));
+ _style->setCurrentIndex(_style->findData(QVariant((int)style)));
}
@@ -167,7 +167,7 @@
void StrokeTab::setBrushStyle(Qt::BrushStyle style) {
- _brushStyle->setCurrentIndex(_brushStyle->findData(QVariant(style)));
+ _brushStyle->setCurrentIndex(_brushStyle->findData(QVariant((int)style)));
}
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1320972:1320973
@@ -174,7 +174,7 @@
xml.writeAttribute("width", QVariant(sceneRect().width()).toString());
xml.writeAttribute("height", QVariant(sceneRect().height()).toString());
xml.writeAttribute("color", backgroundBrush().color().name());
- xml.writeAttribute("style", QVariant(backgroundBrush().style()).toString());
+ xml.writeAttribute("style", QVariant((int)backgroundBrush().style()).toString());
if (backgroundBrush().gradient()) {
QString stopList;
foreach(const QGradientStop &stop, backgroundBrush().gradient()->stops()) {
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1320972:1320973
@@ -219,19 +219,19 @@
xml.writeAttribute("m33", QVariant(tr.m33()).toString());
xml.writeEndElement();
xml.writeStartElement("pen");
- xml.writeAttribute("style", QVariant(pen().style()).toString());
+ xml.writeAttribute("style", QVariant((int)pen().style()).toString());
xml.writeAttribute("width", QVariant(pen().widthF()).toString());
xml.writeAttribute("miterlimit", QVariant(pen().miterLimit()).toString());
xml.writeAttribute("cap", QVariant(pen().capStyle()).toString());
xml.writeAttribute("joinStyle", QVariant(pen().joinStyle()).toString());
xml.writeStartElement("brush");
xml.writeAttribute("color", pen().brush().color().name());
- xml.writeAttribute("style", QVariant(pen().brush().style()).toString());
+ xml.writeAttribute("style", QVariant((int)pen().brush().style()).toString());
xml.writeEndElement();
xml.writeEndElement();
xml.writeStartElement("brush");
xml.writeAttribute("color", brush().color().name());
- xml.writeAttribute("style", QVariant(brush().style()).toString());
+ xml.writeAttribute("style", QVariant((int)brush().style()).toString());
if (brush().gradient()) {
QString stopList;
foreach(const QGradientStop &stop, brush().gradient()->stops()) {
--- branches/work/kst/portto4/kst/src/widgets/dialogdefaults.cpp #1320972:1320973
@@ -59,7 +59,7 @@
void saveDialogDefaultsBrush(const QString &group_name, const QBrush &b) {
// Save the brush
_dialogDefaults->setValue(group_name+"/fillBrushColor", QVariant(b.color()).toString());
- _dialogDefaults->setValue(group_name+"/fillBrushStyle", QVariant(b.style()).toString());
+ _dialogDefaults->setValue(group_name+"/fillBrushStyle", QVariant((int)b.style()).toString());
_dialogDefaults->setValue(group_name+"/fillBrushUseGradient", QVariant(bool(b.gradient())).toString());
if (b.gradient()) {
QString stopList;
@@ -80,12 +80,12 @@
// Save stroke...
QBrush b = p.brush();
- _dialogDefaults->setValue(group_name+"/strokeStyle", QVariant(p.style()).toString());
+ _dialogDefaults->setValue(group_name+"/strokeStyle", QVariant((int)p.style()).toString());
_dialogDefaults->setValue(group_name+"/strokeWidth", p.widthF());
_dialogDefaults->setValue(group_name+"/strokeJoinStyle", QVariant(p.joinStyle()).toString());
_dialogDefaults->setValue(group_name+"/strokeCapStyle", QVariant(p.capStyle()).toString());
_dialogDefaults->setValue(group_name+"/strokeBrushColor", QVariant(b.color()).toString());
- _dialogDefaults->setValue(group_name+"/strokeBrushStyle", QVariant(b.style()).toString());
+ _dialogDefaults->setValue(group_name+"/strokeBrushStyle", QVariant((int)b.style()).toString());
}
More information about the Kst
mailing list