[kde-doc-english] [labplot/frameworks] /: Merge branch 'master' into framew:wqorks

Alexander Semke alexander.semke at web.de
Sat Jul 2 08:08:24 UTC 2016


Git commit df946cb34dd1a5dc85a321b4fcb97827d124a3a5 by Alexander Semke.
Committed on 02/07/2016 at 08:08.
Pushed by asemke into branch 'frameworks'.

Merge branch 'master' into framew:wqorks

M  +1    -0    INSTALL
M  +4    -4    doc/index.docbook
M  +6    -2    src/backend/core/column/Column.cpp
M  +19   -19   src/backend/datasources/filters/AsciiFilter.cpp
M  +9    -11   src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
M  +3    -1    src/commonfrontend/ProjectExplorer.cpp
M  +28   -22   src/commonfrontend/widgets/TreeViewComboBox.cpp
M  +85   -86   src/kdefrontend/GuiObserver.cpp
M  +13   -0    src/kdefrontend/TemplateHandler.cpp
M  +6    -5    src/kdefrontend/datasources/ImportFileWidget.cpp
M  +2    -0    src/kdefrontend/dockwidgets/NotesDock.cpp
M  +1    -0    src/kdefrontend/dockwidgets/NotesDock.h
M  +109  -38   src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
M  +17   -13   src/kdefrontend/dockwidgets/XYInterpolationCurveDock.cpp

http://commits.kde.org/labplot/df946cb34dd1a5dc85a321b4fcb97827d124a3a5

diff --cc src/backend/datasources/filters/AsciiFilter.cpp
index 7d2aea0,3f5c523..9bc4559
--- a/src/backend/datasources/filters/AsciiFilter.cpp
+++ b/src/backend/datasources/filters/AsciiFilter.cpp
@@@ -279,25 -283,22 +279,25 @@@ QString AsciiFilterPrivate::readData(co
  	//skip rows, if required
  	for (int i=0; i < startRow-1; i++) {
  		//if the number of rows to skip is bigger then the actual number of the rows in the file, then quit the function.
 -		if (in.atEnd()) {
 +		if( device.atEnd() ) {
  			if (mode == AbstractFileFilter::Replace) {
  				//file with no data to be imported. In replace-mode clear the data source
- 				if(dataSource != NULL)
+ 				if (dataSource != NULL)
  					dataSource->clear();
  			}
  			return QString();
  		}
  
 -		in.readLine();
 +		device.readLine();
  	}
  
 -	if (in.atEnd()) {
 +	//parse the first row:
 +	//use the first row to determine the number of columns,
 +	//create the columns and use (optionaly) the first row to name them
 +	if( device.atEnd() ) {
  		if (mode == AbstractFileFilter::Replace) {
  			//file with no data to be imported. In replace-mode clear the data source
- 			if(dataSource != NULL)
+ 			if (dataSource != NULL)
  				dataSource->clear();
  		}
  		return QString();
@@@ -406,9 -410,9 +406,9 @@@
  
  	//Read the remainder of the file.
  	for (int i=currentRow; i < qMin(lines,actualRows); i++) {
 -		line = in.readLine();
 +		line = device.readLine();
  
- 		if(simplifyWhitespacesEnabled)
+ 		if (simplifyWhitespacesEnabled)
  			line = line.simplified();
  
  		//skip empty lines
diff --cc src/commonfrontend/ProjectExplorer.cpp
index ac886a9,fc07a5e..606a8cb
--- a/src/commonfrontend/ProjectExplorer.cpp
+++ b/src/commonfrontend/ProjectExplorer.cpp
@@@ -44,9 -44,10 +44,10 @@@
  #include <QSignalMapper>
  #include <QTimer>
  
+ #include <KIconLoader>
  #include <KLineEdit>
  #include <KLocale>
 -#include <KMenu>
 +#include <QMenu>
  
  /*!
    \class ProjectExplorer
diff --cc src/kdefrontend/GuiObserver.cpp
index 94b9b35,e617791..1ba7df2
--- a/src/kdefrontend/GuiObserver.cpp
+++ b/src/kdefrontend/GuiObserver.cpp
@@@ -416,31 -408,11 +416,31 @@@ void GuiObserver::selectedAspectsChange
  		mainWindow->projectDock->setProject(mainWindow->m_project);
  
  		mainWindow->stackedWidget->setCurrentWidget(mainWindow->projectDock);
 +	} else if (className=="CantorWorksheet"){
 +		#ifdef HAVE_CANTOR_LIBS
 +		if (!mainWindow->cantorWorksheetDock){
 +			mainWindow->cantorWorksheetDock = new CantorWorksheetDock(mainWindow->stackedWidget);
 +			connect(mainWindow->cantorWorksheetDock, SIGNAL(info(QString)), mainWindow->statusBar(), SLOT(showMessage(QString)));
 +			mainWindow->stackedWidget->addWidget(mainWindow->cantorWorksheetDock);
 +		}
  
 +		QList<CantorWorksheet*> list;
 +		foreach(aspect, selectedAspects){
 +			list<<qobject_cast<CantorWorksheet *>(aspect);
 +		}
 +		if (list.size()==1){
 +			mainWindow->m_propertiesDock->setWindowTitle(list.first()->backendName() + " Properties");
 +		} else {
 +			mainWindow->m_propertiesDock->setWindowTitle("CAS Properties");
 +		}
 +		mainWindow->cantorWorksheetDock->setCantorWorksheets(list);
 +
 +		mainWindow->stackedWidget->setCurrentWidget(mainWindow->cantorWorksheetDock);
 +		#endif
  	} else if (className == "Notes") {
- 		mainWindow->m_propertiesDock->setWindowTitle(i18n("Notes properties"));
+ 		mainWindow->m_propertiesDock->setWindowTitle(i18n("Notes"));
  
- 		if (!mainWindow->notesDock){
+ 		if (!mainWindow->notesDock) {
  			mainWindow->notesDock = new NotesDock(mainWindow->stackedWidget);
  			mainWindow->stackedWidget->addWidget(mainWindow->notesDock);
  		}
diff --cc src/kdefrontend/TemplateHandler.cpp
index 40fc539,e441996..be5c116
--- a/src/kdefrontend/TemplateHandler.cpp
+++ b/src/kdefrontend/TemplateHandler.cpp
@@@ -35,10 -35,14 +35,12 @@@
  #include <QFileInfo>
  #include <QWidgetAction>
  
 -#include <KLocale>
 -#include <KStandardDirs>
 -#include <KLineEdit>
 -#include <KIcon>
+ #include <KIconLoader>
 -#include <KMenu>
 +#include <KLocalizedString>
 +#include <KLineEdit>
 +#include <QMenu>
  #include <KConfig>
+ 
   /*!
    \class TemplateHandler
    \brief Provides a widget with buttons for saving and loading of templates.
@@@ -94,8 -105,12 +103,12 @@@ TemplateHandler::TemplateHandler(QWidge
  	this->retranslateUi();
  
  	//disable the load-button if no templates are available yet
 -	QStringList list = KGlobal::dirs()->findAllResources("appdata", "templates/" + dirNames.at(className) + "/*");
 +    QStringList list = QStandardPaths::locateAll(QStandardPaths::ApplicationsLocation, "templates/" + dirNames.at(className) + "/*");
  	tbLoad->setEnabled(list.size());
+ 
+ 	//TODO: implement copy&paste of properties and activate copy- and paste-buttons again
+ 	tbCopy->hide();
+ 	tbPaste->hide();
  }
  
  void TemplateHandler::retranslateUi(){
diff --cc src/kdefrontend/dockwidgets/NotesDock.cpp
index 4bb4f04,4bb4f04..0d1d687
--- a/src/kdefrontend/dockwidgets/NotesDock.cpp
+++ b/src/kdefrontend/dockwidgets/NotesDock.cpp
@@@ -30,6 -30,6 +30,8 @@@
  #include "kdefrontend/TemplateHandler.h"
  
  #include <QDir>
++#include <KConfigGroup>
++#include <KLocale>
  
  NotesDock::NotesDock(QWidget *parent) : QWidget(parent), m_initializing(false) {
  	ui.setupUi(this);
diff --cc src/kdefrontend/dockwidgets/NotesDock.h
index 6ead200,6ead200..c13d8c7
--- a/src/kdefrontend/dockwidgets/NotesDock.h
+++ b/src/kdefrontend/dockwidgets/NotesDock.h
@@@ -32,6 -32,6 +32,7 @@@
  #include <QWidget>
  #include "backend/notes/Notes.h"
  #include "ui_notesdock.h"
++#include <KConfig>
  
  class NotesDock : public QWidget {
  	Q_OBJECT
diff --cc src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
index 75de0db,fe6183d..b8a4f88
--- a/src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
+++ b/src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
@@@ -88,13 -88,13 +88,13 @@@ void XYFourierFilterCurveDock::setupGen
  	uiGeneralTab.cbForm->addItem(i18n("Chebyshev type I"));
  	uiGeneralTab.cbForm->addItem(i18n("Chebyshev type II"));
  
- 	uiGeneralTab.cbUnit->addItem(i18n("Frequency (Hz)"));
+ 	uiGeneralTab.cbUnit->addItem(i18n("Frequency"));
  	uiGeneralTab.cbUnit->addItem(i18n("Fraction"));
  	uiGeneralTab.cbUnit->addItem(i18n("Index"));
- 	uiGeneralTab.cbUnit2->addItem(i18n("Frequency (Hz)"));
+ 	uiGeneralTab.cbUnit2->addItem(i18n("Frequency"));
  	uiGeneralTab.cbUnit2->addItem(i18n("Fraction"));
  	uiGeneralTab.cbUnit2->addItem(i18n("Index"));
 -	uiGeneralTab.pbRecalculate->setIcon(KIcon("run-build"));
 +	uiGeneralTab.pbRecalculate->setIcon(QIcon::fromTheme("run-build"));
  
  	QHBoxLayout* layout = new QHBoxLayout(ui.tabGeneral);
  	layout->setMargin(0);


More information about the kde-doc-english mailing list