[kde-doc-english] [labplot/frameworks] /: Merge branch 'master' into framet works

Alexander Semke alexander.semke at web.de
Tue Jun 14 20:18:20 UTC 2016


Git commit 8c149b9c0bd4b4eeaaf4b7c94de3a32292077ac9 by Alexander Semke.
Committed on 14/06/2016 at 20:18.
Pushed by asemke into branch 'frameworks'.

Merge branch 'master' into framet works

M  +35   -6    doc/index.docbook
M  +1    -1    src/CMakeLists.txt
M  +7    -0    src/backend/core/Project.cpp
M  +11   -3    src/backend/core/column/Column.cpp
M  +38   -28   src/backend/datasources/filters/HDFFilter.cpp
M  +7    -7    src/backend/datasources/filters/NetCDFFilter.cpp
M  +5    -4    src/backend/spreadsheet/Spreadsheet.cpp
M  +8    -1    src/backend/worksheet/Worksheet.cpp
M  +297  -297  src/backend/worksheet/plots/cartesian/Axis.cpp
M  +10   -10   src/backend/worksheet/plots/cartesian/CartesianCoordinateSystem.cpp
M  +56   -57   src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
M  +274  -274  src/backend/worksheet/plots/cartesian/CartesianPlotLegend.cpp
M  +10   -10   src/backend/worksheet/plots/cartesian/CustomPoint.cpp
M  +659  -682  src/backend/worksheet/plots/cartesian/XYCurve.cpp
M  +7    -7    src/backend/worksheet/plots/cartesian/XYEquationCurve.cpp
M  +285  -290  src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
M  +45   -181  src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
M  +17   -10   src/commonfrontend/ProjectExplorer.cpp
M  +1    -43   src/commonfrontend/matrix/MatrixView.cpp
M  +0    -4    src/commonfrontend/matrix/MatrixView.h
M  +12   -26   src/commonfrontend/spreadsheet/SpreadsheetView.cpp
M  +2    -3    src/commonfrontend/spreadsheet/SpreadsheetView.h
M  +11   -2    src/commonfrontend/worksheet/WorksheetView.cpp
M  +3    -1    src/commonfrontend/worksheet/WorksheetView.h
M  +1    -1    src/kdefrontend/LabPlot.cpp
M  +10   -5    src/kdefrontend/MainWin.cpp
M  +1    -2    src/kdefrontend/datasources/FileInfoDialog.cpp
M  +36   -32   src/kdefrontend/datasources/ImportFileWidget.cpp
M  +417  -418  src/kdefrontend/dockwidgets/AxisDock.cpp
M  +13   -44   src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/CartesianPlotLegendDock.cpp
M  +2    -2    src/kdefrontend/dockwidgets/CustomPointDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/WorksheetDock.cpp
M  +2    -2    src/kdefrontend/dockwidgets/XYCurveDock.cpp
M  +13   -13   src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
M  +27   -10   src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/XYInterpolationCurveDock.cpp
M  +44   -13   src/kdefrontend/dockwidgets/XYSmoothCurveDock.cpp
M  +2    -1    src/kdefrontend/spreadsheet/DropValuesDialog.cpp
M  +1    -1    src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
M  +2    -1    src/kdefrontend/spreadsheet/StatisticsDialog.cpp
M  +2    -2    src/kdefrontend/widgets/DatapickerCurveWidget.cpp
M  +2    -2    src/kdefrontend/widgets/DatapickerImageWidget.cpp
M  +0    -2    src/kdefrontend/widgets/LabelWidget.cpp

http://commits.kde.org/labplot/8c149b9c0bd4b4eeaaf4b7c94de3a32292077ac9

diff --cc doc/index.docbook
index 39bed53,084c795..67727e4
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@@ -96,11 -89,8 +96,12 @@@ Features
  <listitem><para>Cartesian plots, created either from imported or manually created data sets or via mathematical equation</para></listitem>
  <listitem><para>Definition of mathematical formulas is supported by syntax-highlighting and completion and by the list of thematicaly grouped mathematical and physical constants and functions</para></listitem>
  <listitem><para>Analysis of plotted data is supported by many zooming and navigation features</para></listitem>
+ <listitem><para>Several interpolation, smoothing and Fourier filter methods for filtering data</para></listitem>
  <listitem><para>Linear and non-linear fits to data, several fit-models are predefined and custom models with arbitrary number of parameters can be provided</para></listitem>
 +<listitem><para>Supports many CAS backends like Maxima, Python, KAlgebra, Sage</para></listitem>
 +<listitem><para>Nice Worksheet view for evaluating expressions</para></listitem>
 +<listitem><para>Easy plugin based structure to add different Backends</para></listitem>
 +<listitem><para>Plugin based assistant dialogs for common tasks (like integrating a function or entering a matrix)</para></listitem>
  <listitem><para>Datapicker for manual or (semi-)automatic data extraction from imported images containing plots and curves.</para></listitem>
  </itemizedlist>
  </para>
diff --cc src/backend/core/column/Column.cpp
index c0a5b23,9773a1f..891cff1
--- a/src/backend/core/column/Column.cpp
+++ b/src/backend/core/column/Column.cpp
@@@ -34,15 -34,17 +34,18 @@@
  #include "backend/core/datatypes/String2DateTimeFilter.h"
  #include "backend/core/datatypes/DateTime2StringFilter.h"
  
 +extern "C" {
  #include <gsl/gsl_sort.h>
 +}
- #include <cmath>
  
- #include <QMetaEnum>
+ #include <QFont>
+ #include <QFontMetrics>
  #include <QThreadPool>
 -
 -#include <KIcon>
 +#include <QIcon>
  #include <KLocale>
+ #ifndef NDEBUG
+ #include <QDebug>
+ #endif
  
  /**
   * \class Column
diff --cc src/backend/datasources/filters/NetCDFFilter.cpp
index c47c20b,161adb1..83d86d7
--- a/src/backend/datasources/filters/NetCDFFilter.cpp
+++ b/src/backend/datasources/filters/NetCDFFilter.cpp
@@@ -373,12 -373,12 +373,12 @@@ void NetCDFFilterPrivate::scanDims(int 
  #endif
  
  		QStringList props;
- 		props<<"length = "<<QString::number(len);
+ 		props<<i18n("length") << QLatin1String(" = ") << QString::number(len);
  		QString value;
  		if(i == ulid)
- 			value="unlimited";
- 		QTreeWidgetItem *attrItem = new QTreeWidgetItem((QTreeWidget*)0, QStringList()<<QString(name)<<"dimension"<<props.join("")<<value);
+ 			value = i18n("unlimited");
+ 		QTreeWidgetItem *attrItem = new QTreeWidgetItem((QTreeWidget*)0, QStringList()<<QString(name)<<i18n("dimension")<<props.join("")<<value);
 -		attrItem->setIcon(0,QIcon(KIcon("accessories-calculator")));
 +		attrItem->setIcon(0,QIcon::fromTheme("accessories-calculator"));
  		attrItem->setFlags(Qt::ItemIsEnabled);
  		parentItem->addChild(attrItem);
  	}
@@@ -412,8 -412,8 +412,8 @@@ void NetCDFFilterPrivate::scanVars(int 
  		}
  		props<<")";
  
- 		QTreeWidgetItem *varItem = new QTreeWidgetItem((QTreeWidget*)0, QStringList()<<QString(name)<<"variable"<<props.join("")<<"");
+ 		QTreeWidgetItem *varItem = new QTreeWidgetItem((QTreeWidget*)0, QStringList()<<QString(name)<<i18n("variable")<<props.join("")<<"");
 -		varItem->setIcon(0,QIcon(KIcon("x-office-spreadsheet")));
 +		varItem->setIcon(0,QIcon::fromTheme("x-office-spreadsheet"));
  		varItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
  		// highlight item
  		for(int c=0;c<varItem->columnCount();c++)
diff --cc src/backend/worksheet/plots/cartesian/XYCurve.cpp
index 942752d,1dbec1c..3fb3af8
--- a/src/backend/worksheet/plots/cartesian/XYCurve.cpp
+++ b/src/backend/worksheet/plots/cartesian/XYCurve.cpp
@@@ -54,8 -47,9 +47,8 @@@
  #include <QGraphicsSceneContextMenuEvent>
  #include <QMenu>
  #include <QtDebug>
- #include <QElapsedTimer>
+ // #include <QElapsedTimer>
  
 -#include <KIcon>
  #include <KConfigGroup>
  #include <KLocale>
  
@@@ -167,11 -161,11 +160,11 @@@ QMenu* XYCurve::createContextMenu() 
  /*!
  	Returns an icon to be used in the project explorer.
  */
- QIcon XYCurve::icon() const{
+ QIcon XYCurve::icon() const {
 -	return KIcon("labplot-xy-curve");
 +	return QIcon::fromTheme("labplot-xy-curve");
  }
  
- QGraphicsItem* XYCurve::graphicsItem() const{
+ QGraphicsItem* XYCurve::graphicsItem() const {
  	return d_ptr;
  }
  
diff --cc src/kdefrontend/MainWin.cpp
index 759e736,e93bbb2..56117d9
--- a/src/kdefrontend/MainWin.cpp
+++ b/src/kdefrontend/MainWin.cpp
@@@ -773,8 -700,7 +773,8 @@@ bool MainWin::newProject() 
  void MainWin::openProject() {
  	KConfigGroup conf(KSharedConfig::openConfig(), "MainWin");
  	QString dir = conf.readEntry("LastOpenDir", "");
 -	QString path = KFileDialog::getOpenFileName(KUrl(dir),i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.lml.xz *.LML *.LML.GZ *.LML.BZ2 *.LML.XZ)"),this, i18n("Open project"));
 +	QString path = QFileDialog::getOpenFileName(this,i18n("Open project"), dir,
- 	               i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.LML *.LML.GZ *.LML.BZ2)"));
++	               i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.lml.xz *.LML *.LML.GZ *.LML.BZ2 *.LML.XZ)"));
  
  	if (!path.isEmpty()) {
  		this->openProject(path);
@@@ -795,7 -720,13 +794,13 @@@ void MainWin::openProject(const QString
  		return;
  	}
  
- 	QIODevice *file = new KCompressionDevice(filename,KFilterDev::compressionTypeForMimeType("application/x-gzip"));
+ 	QIODevice *file;
+ 	// first try gzip compression, because older files are gzipped but end with .lml
+ 	if (filename.endsWith(".lml", Qt::CaseInsensitive))
 -		file = KFilterDev::deviceForFile(filename, "application/x-gzip", true);
++		file = new KCompressionDevice(filename,KFilterDev::compressionTypeForMimeType("application/x-gzip"));
+ 	else	// opens filename using file ending
+ 		file = KFilterDev::deviceForFile(filename);
+ 
  	if (file==0)
  		file = new QFile(filename);
  
@@@ -921,8 -852,9 +926,8 @@@ bool MainWin::saveProject() 
  bool MainWin::saveProjectAs() {
  	KConfigGroup conf(KSharedConfig::openConfig(), "MainWin");
  	QString dir = conf.readEntry("LastOpenDir", "");
 -	QString fileName = KFileDialog::getSaveFileName(KUrl(dir),
 -	                   i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.lml.xz *.LML *.LML.GZ *.LML.BZ2 *.LML.XZ)"),
 -	                   this, i18n("Save project as"));
 +	QString fileName = QFileDialog::getSaveFileName(this, i18n("Save project as"), dir,
- 	                   i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.LML *.LML.GZ *.LML.BZ2)"));
++	                   i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.lml.xz *.LML *.LML.GZ *.LML.BZ2 *.LML.XZ)"));
  
  	if( fileName.isEmpty() )// "Cancel" was clicked
  		return false;
diff --cc src/kdefrontend/datasources/FileInfoDialog.cpp
index 4d6fa72,397613e..c7a5e45
--- a/src/kdefrontend/datasources/FileInfoDialog.cpp
+++ b/src/kdefrontend/datasources/FileInfoDialog.cpp
@@@ -31,12 -31,8 +31,11 @@@
  #include "backend/datasources/FileDataSource.h"
  
  #include <KLocale>
- #include <KFilterDev>
  #include <QFileInfo>
  #include <QProcess>
 +#include <QDialogButtonBox>
 +#include <QIcon>
 +#include <QVBoxLayout>
  
   /*!
  	\class ImportWidget
@@@ -49,25 -45,14 +48,25 @@@ FileInfoDialog::FileInfoDialog(QWidget
  
  	textEditWidget.setReadOnly(true);
  	textEditWidget.setLineWrapMode(QTextEdit::NoWrap);
 -	setMainWidget( &textEditWidget );
 - 	setButtons( KDialog::Ok);
 - 	setWindowIcon(KIcon("help-about"));
 -	setCaption(i18n("File info"));
 - 	resize( QSize(500,300) );
 +
 +	QVBoxLayout *layout = new QVBoxLayout(this);
 +	layout->addWidget(&textEditWidget);
 +
 +	QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
 +	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
 +	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
 +
 +	layout->addWidget(buttonBox);
 +
 +	setWindowIcon(QIcon::fromTheme("help-about"));
 +	setWindowTitle(i18n("File info"));
 +
 +	setLayout(layout);
 +
 +	resize( QSize(500,300) );
  }
  
- void FileInfoDialog::setFiles(QStringList& files){
+ void FileInfoDialog::setFiles(QStringList& files) {
  	QString fileName;
  	QString infoString;
  	QFileInfo fileInfo;
diff --cc src/kdefrontend/dockwidgets/AxisDock.cpp
index c2e86f1,33efde4..bfe5218
--- a/src/kdefrontend/dockwidgets/AxisDock.cpp
+++ b/src/kdefrontend/dockwidgets/AxisDock.cpp
@@@ -39,16 -39,16 +39,17 @@@
  #include <QTimer>
  #include <QDir>
  #include <QPainter>
- #include <KMessageBox>
 +#include <KLocalizedString>
  #include <QDebug>
- #include <math.h>
+ #include <KMessageBox>
+ 
+ #include <cmath>
  
-  /*!
-   \class AxisDock
-   \brief Provides a widget for editing the properties of the axes currently selected in the project explorer.
+ /*!
+  \class AxisDock
+  \brief Provides a widget for editing the properties of the axes currently selected in the project explorer.
  
-   \ingroup kdefrontend
+  \ingroup kdefrontend
  */
  
  AxisDock::AxisDock(QWidget* parent):QWidget(parent), m_axis(0), m_aspectTreeModel(0), m_dataChanged(0), m_initializing(false) {
diff --cc src/kdefrontend/dockwidgets/CartesianPlotLegendDock.cpp
index 75596db,5bd5a5a..0895517
--- a/src/kdefrontend/dockwidgets/CartesianPlotLegendDock.cpp
+++ b/src/kdefrontend/dockwidgets/CartesianPlotLegendDock.cpp
@@@ -37,9 -37,8 +37,9 @@@
  #include <QFileDialog>
  #include <QImageReader>
  #include <KUrlCompletion>
 +#include <KLocalizedString>
+ #include <cmath>
  
- #include <math.h>
  
  /*!
    \class CartesianPlotLegendDock
diff --cc src/kdefrontend/dockwidgets/CustomPointDock.cpp
index 861d07f,64676ad..26e6953
--- a/src/kdefrontend/dockwidgets/CustomPointDock.cpp
+++ b/src/kdefrontend/dockwidgets/CustomPointDock.cpp
@@@ -31,14 -31,11 +31,14 @@@
  #include "kdefrontend/TemplateHandler.h"
  #include "kdefrontend/GuiTools.h"
  
- #include "math.h"
- 
  #include <QPainter>
  #include <QDir>
 +#include <KLocale>
 +#include <KConfig>
 +#include <KConfigGroup>
  
+ #include <cmath>
+ 
  CustomPointDock::CustomPointDock(QWidget *parent): QWidget(parent) {
  	ui.setupUi(this);
  
diff --cc src/kdefrontend/dockwidgets/WorksheetDock.cpp
index e5a00a2,ce8bce4..4cda2bb
--- a/src/kdefrontend/dockwidgets/WorksheetDock.cpp
+++ b/src/kdefrontend/dockwidgets/WorksheetDock.cpp
@@@ -35,10 -35,8 +35,10 @@@
  #include <QFileDialog>
  #include <QImageReader>
  #include <KUrlCompletion>
 +#include <KLocalizedString>
 +#include <KConfigGroup>
  
- #include <math.h>
+ #include <cmath>
  
  // a couple of standard sizes in mm, taken from qprinter.cpp
  const int numOfPaperSizes = 30;
diff --cc src/kdefrontend/dockwidgets/XYSmoothCurveDock.cpp
index 8fc3150,c5c0cca..62cb5f9
--- a/src/kdefrontend/dockwidgets/XYSmoothCurveDock.cpp
+++ b/src/kdefrontend/dockwidgets/XYSmoothCurveDock.cpp
@@@ -106,9 -110,9 +110,9 @@@ void XYSmoothCurveDock::setupGeneral() 
  	uiGeneralTab.cbMode->addItem(i18n("mirror"));
  	uiGeneralTab.cbMode->addItem(i18n("nearest"));
  	uiGeneralTab.cbMode->addItem(i18n("constant"));
- 	uiGeneralTab.cbMode->addItem(i18n("wrap"));
+ 	uiGeneralTab.cbMode->addItem(i18n("periodic"));
  
 -	uiGeneralTab.pbRecalculate->setIcon(KIcon("run-build"));
 +	uiGeneralTab.pbRecalculate->setIcon(QIcon::fromTheme("run-build"));
  
  	QHBoxLayout* layout = new QHBoxLayout(ui.tabGeneral);
  	layout->setMargin(0);
diff --cc src/kdefrontend/spreadsheet/DropValuesDialog.cpp
index 3b5c1fe,6bf4dc0..6974c19
--- a/src/kdefrontend/spreadsheet/DropValuesDialog.cpp
+++ b/src/kdefrontend/spreadsheet/DropValuesDialog.cpp
@@@ -31,8 -31,8 +31,9 @@@
  #include "backend/spreadsheet/Spreadsheet.h"
  
  #include <QThreadPool>
 +#include <KLocalizedString>
- #include <math.h>
+ 
+ #include <cmath>
  
  /*!
  	\class DropValuesDialog
diff --cc src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
index a0f058f,ccc976c..71a2d65
--- a/src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
+++ b/src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
@@@ -38,9 -38,8 +38,9 @@@
  
  #include <QMenu>
  #include <QWidgetAction>
 +#include <KLocalizedString>
  
- #include <math.h>
+ #include <cmath>
  
  /*!
  	\class FunctionValuesDialog
diff --cc src/kdefrontend/widgets/DatapickerCurveWidget.cpp
index ee6012a,4a97ca4..a6cd45d
--- a/src/kdefrontend/widgets/DatapickerCurveWidget.cpp
+++ b/src/kdefrontend/widgets/DatapickerCurveWidget.cpp
@@@ -31,12 -31,10 +31,12 @@@
  #include "backend/worksheet/Worksheet.h"
  #include "kdefrontend/GuiTools.h"
  
- #include "math.h"
- 
  #include <QPainter>
  
 +#include <KLocale>
 +
+ #include <cmath>
+ 
  DatapickerCurveWidget::DatapickerCurveWidget(QWidget *parent) : QWidget(parent), m_suppressTypeChange(false) {
  	ui.setupUi(this);
  
diff --cc src/kdefrontend/widgets/DatapickerImageWidget.cpp
index cde0325,e6736e1..3c30bdb
--- a/src/kdefrontend/widgets/DatapickerImageWidget.cpp
+++ b/src/kdefrontend/widgets/DatapickerImageWidget.cpp
@@@ -44,10 -42,8 +42,12 @@@
  #include <QGraphicsScene>
  #include <QImageReader>
  
 +#include <KSharedConfig>
 +#include <KConfigGroup>
 +#include <KLocalizedString>
 +
+ #include <cmath>
+ 
  HistogramView::HistogramView(QWidget* parent, int range) :
  	QGraphicsView(parent),
  	bins(0),


More information about the kde-doc-english mailing list