[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [labplot/frameworks] /: Merge branch 'master' into frameworks
From:       Alexander Semke <alexander.semke () web ! de>
Date:       2016-11-20 12:42:37
Message-ID: E1c8RS9-0001D0-E4 () code ! kde ! org
[Download RAW message or body]

Git commit 9b504443330c014ec891655d4f35592c3e24bc3e by Alexander Semke.
Committed on 20/11/2016 at 12:42.
Pushed by asemke into branch 'frameworks'.

Merge branch 'master' into frameworks

M  +1    -0    INSTALL
M  +10   -12   src/backend/core/column/Column.cpp
M  +1    -1    src/commonfrontend/spreadsheet/SpreadsheetView.cpp
M  +94   -95   src/commonfrontend/worksheet/WorksheetView.cpp
M  +68   -68   src/kdefrontend/GuiObserver.cpp
M  +64   -67   src/kdefrontend/MainWin.cpp
M  +69   -38   src/kdefrontend/SettingsGeneralPage.cpp
M  +9    -18   src/kdefrontend/widgets/LabelWidget.cpp
M  +1    -1    src/kdefrontend/widgets/LabelWidget.h
M  +45   -0    src/tools/TeXRenderer.cpp

http://commits.kde.org/labplot/9b504443330c014ec891655d4f35592c3e24bc3e

diff --cc src/backend/core/column/Column.cpp
index b133a39,8c98fa6..fd7bfd3
--- a/src/backend/core/column/Column.cpp
+++ b/src/backend/core/column/Column.cpp
@@@ -625,19 -622,17 +625,17 @@@ void Column::setChanged() 
   * \brief Return an icon to be used for decorating the views and spreadsheet column \
                headers
   */
  QIcon Column::icon() const {
- 	//TODO: provide type-specific icons
- // 	switch(columnMode()) {
- // 		case AbstractColumn::Numeric:
- // 			return KIcon("x-shape-text");
- // 		case AbstractColumn::Text:
- // 			return QIcon::fromTheme(QPixmap(":/texttype.png"));
- // 		case AbstractColumn::DateTime:
- // 		case AbstractColumn::Month:
- // 		case AbstractColumn::Day:
- // 			return QIcon::fromTheme(QPixmap(""));
- // 	}
- 
+ 	switch(columnMode()) {
+ 		case AbstractColumn::Numeric:
 -			return KIcon("x-shape-text");
++			return QIcon::fromTheme("x-shape-text");
+ 		case AbstractColumn::Text:
 -			return KIcon("draw-text");
++			return QIcon::fromTheme("draw-text");
+ 		case AbstractColumn::DateTime:
+ 		case AbstractColumn::Month:
+ 		case AbstractColumn::Day:
 -			return KIcon("chronometer");
++			return QIcon::fromTheme("chronometer");
+ 	}
 -	return KIcon("x-shape-text");
 +	return QIcon::fromTheme("x-shape-text");
  }
  
  ////////////////////////////////////////////////////////////////////////////////////////////////////
                
diff --cc src/commonfrontend/spreadsheet/SpreadsheetView.cpp
index 258415d,cad5ccd..f77e5a5
--- a/src/commonfrontend/spreadsheet/SpreadsheetView.cpp
+++ b/src/commonfrontend/spreadsheet/SpreadsheetView.cpp
@@@ -54,10 -53,10 +54,10 @@@
  #include <QToolBar>
  #include <QTextStream>
  #include <QProcess>
- // #include <QDebug>
  
 -#include <KAction>
 +#include <QAction>
  #include <KLocale>
+ 
  #include "kdefrontend/spreadsheet/DropValuesDialog.h"
  #include "kdefrontend/spreadsheet/SortDialog.h"
  #include "kdefrontend/spreadsheet/RandomValuesDialog.h"
diff --cc src/commonfrontend/worksheet/WorksheetView.cpp
index 3d22faf,33e983c..5fd6e86
--- a/src/commonfrontend/worksheet/WorksheetView.cpp
+++ b/src/commonfrontend/worksheet/WorksheetView.cpp
@@@ -275,70 -277,71 +275,71 @@@ void WorksheetView::initActions() 
  	connect(cartesianPlotMouseModeActionGroup, SIGNAL(triggered(QAction*)), \
SLOT(cartesianPlotMouseModeChanged(QAction*)));  
  	QActionGroup* cartesianPlotAddNewActionGroup = new QActionGroup(this);
 -	addCurveAction = new KAction(KIcon("labplot-xy-curve"), i18n("xy-curve"), \
                cartesianPlotAddNewActionGroup);
 -	addEquationCurveAction = new KAction(KIcon("labplot-xy-equation-curve"), \
                i18n("xy-curve from a mathematical equation"), \
                cartesianPlotAddNewActionGroup);
 -	addDataOperationCurveAction = new KAction(i18n("xy-curve from a data operation"), \
                cartesianPlotAddNewActionGroup);
 -	addDataReductionCurveAction = new KAction(i18n("xy-curve from a data reduction"), \
                cartesianPlotAddNewActionGroup);
 -	addDifferentiationCurveAction = new KAction(i18n("xy-curve from a \
                differentiation"), cartesianPlotAddNewActionGroup);
 -	addIntegrationCurveAction = new KAction(i18n("xy-curve from an integration"), \
cartesianPlotAddNewActionGroup);  +	addCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-curve"), i18n("xy-curve"), \
cartesianPlotAddNewActionGroup);  +	addEquationCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-equation-curve"), i18n("xy-curve from a \
mathematical equation"), cartesianPlotAddNewActionGroup);  \
+	addDataOperationCurveAction = new QAction(i18n("xy-curve from a data operation"), \
cartesianPlotAddNewActionGroup);  +	addDataReductionCurveAction = new \
QAction(i18n("xy-curve from a data reduction"), cartesianPlotAddNewActionGroup);  \
+	addDifferentiationCurveAction = new QAction(i18n("xy-curve from a \
differentiation"), cartesianPlotAddNewActionGroup);  +	addIntegrationCurveAction = \
new QAction(i18n("xy-curve from an integration"), cartesianPlotAddNewActionGroup);  \
                // no icons yet
 -	addInterpolationCurveAction = new KAction(i18n("xy-curve from an interpolation"), \
                cartesianPlotAddNewActionGroup);
 -	addSmoothCurveAction = new KAction(i18n("xy-curve from a smooth"), \
                cartesianPlotAddNewActionGroup);
 -	addFourierFilterCurveAction = new KAction(i18n("xy-curve from a Fourier filter"), \
                cartesianPlotAddNewActionGroup);
 -	addFourierTransformCurveAction = new KAction(i18n("xy-curve from a Fourier \
                transform"), cartesianPlotAddNewActionGroup);
 -//	addInterpolationCurveAction = new \
KAction(KIcon("labplot-xy-interpolation-curve"), i18n("xy-curve from an \
                interpolation"), cartesianPlotAddNewActionGroup);
 -//	addSmoothCurveAction = new KAction(KIcon("labplot-xy-smooth-curve"), \
                i18n("xy-curve from a smooth"), cartesianPlotAddNewActionGroup);
 -	addFitCurveAction = new KAction(KIcon("labplot-xy-fit-curve"), i18n("xy-curve from \
                a fit to data"), cartesianPlotAddNewActionGroup);
 -//	addFourierFilterCurveAction = new \
KAction(KIcon("labplot-xy-fourier_filter-curve"), i18n("xy-curve from a Fourier \
                filter"), cartesianPlotAddNewActionGroup);
 -//	addFourierTransformCurveAction = new \
KAction(KIcon("labplot-xy-fourier_transform-curve"), i18n("xy-curve from a Fourier \
                transform"), cartesianPlotAddNewActionGroup);
 -	addLegendAction = new KAction(KIcon("text-field"), i18n("legend"), \
                cartesianPlotAddNewActionGroup);
 -	addHorizontalAxisAction = new KAction(KIcon("labplot-axis-horizontal"), \
                i18n("horizontal axis"), cartesianPlotAddNewActionGroup);
 -	addVerticalAxisAction = new KAction(KIcon("labplot-axis-vertical"), i18n("vertical \
                axis"), cartesianPlotAddNewActionGroup);
 -	addCustomPointAction = new KAction(KIcon("draw-cross"), i18n("custom point"), \
cartesianPlotAddNewActionGroup);  +	addInterpolationCurveAction = new \
QAction(i18n("xy-curve from an interpolation"), cartesianPlotAddNewActionGroup);  \
+	addSmoothCurveAction = new QAction(i18n("xy-curve from a smooth"), \
cartesianPlotAddNewActionGroup);  +	addFourierFilterCurveAction = new \
QAction(i18n("xy-curve from a Fourier filter"), cartesianPlotAddNewActionGroup);  \
+	addFourierTransformCurveAction = new QAction(i18n("xy-curve from a Fourier \
transform"), cartesianPlotAddNewActionGroup);  +//	addInterpolationCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-interpolation-curve"), i18n("xy-curve from an \
interpolation"), cartesianPlotAddNewActionGroup);  +//	addSmoothCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-smooth-curve"), i18n("xy-curve from a smooth"), \
cartesianPlotAddNewActionGroup);  +	addFitCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-fit-curve"), i18n("xy-curve from a fit to \
data"), cartesianPlotAddNewActionGroup);  +//	addFourierFilterCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-fourier_filter-curve"), i18n("xy-curve from a \
Fourier filter"), cartesianPlotAddNewActionGroup);  \
+//	addFourierTransformCurveAction = new \
QAction(QIcon::fromTheme("labplot-xy-fourier_transform-curve"), i18n("xy-curve from a \
Fourier transform"), cartesianPlotAddNewActionGroup);  +	addLegendAction = new \
QAction(QIcon::fromTheme("text-field"), i18n("legend"), \
cartesianPlotAddNewActionGroup);  +	addHorizontalAxisAction = new \
QAction(QIcon::fromTheme("labplot-axis-horizontal"), i18n("horizontal axis"), \
cartesianPlotAddNewActionGroup);  +	addVerticalAxisAction = new \
QAction(QIcon::fromTheme("labplot-axis-vertical"), i18n("vertical axis"), \
cartesianPlotAddNewActionGroup);  +	addCustomPointAction = new \
QAction(QIcon::fromTheme("draw-cross"), i18n("custom point"), \
                cartesianPlotAddNewActionGroup);
- 	connect(cartesianPlotAddNewActionGroup, SIGNAL(triggered(QAction*)), \
SLOT(cartesianPlotAddNew(QAction*)));  
  	// Analysis menu
 -	addDataOperationAction = new KAction(i18n("Data operation"), \
                cartesianPlotAddNewActionGroup);
 -	addDataReductionAction = new KAction(i18n("Data reduction"), \
                cartesianPlotAddNewActionGroup);
 -	addDifferentiationAction = new KAction(i18n("Differentiation"), \
                cartesianPlotAddNewActionGroup);
 -	addIntegrationAction = new KAction(i18n("Integration"), \
cartesianPlotAddNewActionGroup);  +	addDataOperationAction = new QAction(i18n("Data \
operation"), cartesianPlotAddNewActionGroup);  +	addDataReductionAction = new \
QAction(i18n("Data reduction"), cartesianPlotAddNewActionGroup);  \
+	addDifferentiationAction = new QAction(i18n("Differentiation"), \
cartesianPlotAddNewActionGroup);  +	addIntegrationAction = new \
QAction(i18n("Integration"), cartesianPlotAddNewActionGroup);  // no icons yet
 -	addInterpolationAction = new KAction(i18n("Interpolation"), \
                cartesianPlotAddNewActionGroup);
 -	addSmoothAction = new KAction(i18n("Smooth"), cartesianPlotAddNewActionGroup);
 -	addFitAction = new KAction(KIcon("labplot-xy-fit-curve"), i18n("Data fitting"), \
                cartesianPlotAddNewActionGroup);
 -	addFourierFilterAction = new KAction(i18n("Fourier filter"), \
                cartesianPlotAddNewActionGroup);
 -	addFourierTransformAction = new KAction(i18n("Fourier transform"), \
                cartesianPlotAddNewActionGroup);
 -//	addInterpolationAction = new KAction(KIcon("labplot-xy-interpolation-curve"), \
                i18n("Interpolation"), cartesianPlotAddNewActionGroup);
 -//	addSmoothAction = new KAction(KIcon("labplot-xy-smooth-curve"), i18n("Smooth"), \
                cartesianPlotAddNewActionGroup);
 -//	addFourierFilterAction = new KAction(KIcon("labplot-xy-fourier_filter-curve"), \
                i18n("Fourier filter"), cartesianPlotAddNewActionGroup);
 -//	addFourierTransformAction = new \
KAction(KIcon("labplot-xy-fourier_transform-curve"), i18n("Fourier transform"), \
cartesianPlotAddNewActionGroup);  +	addInterpolationAction = new \
QAction(i18n("Interpolation"), cartesianPlotAddNewActionGroup);  +	addSmoothAction = \
new QAction(i18n("Smooth"), cartesianPlotAddNewActionGroup);  +	addFitAction = new \
QAction(QIcon::fromTheme("labplot-xy-fit-curve"), i18n("Data fitting"), \
cartesianPlotAddNewActionGroup);  +	addFourierFilterAction = new \
QAction(i18n("Fourier filter"), cartesianPlotAddNewActionGroup);  \
+	addFourierTransformAction = new QAction(i18n("Fourier transform"), \
cartesianPlotAddNewActionGroup);  +//	addInterpolationAction = new \
QAction(QIcon::fromTheme("labplot-xy-interpolation-curve"), i18n("Interpolation"), \
cartesianPlotAddNewActionGroup);  +//	addSmoothAction = new \
QAction(QIcon::fromTheme("labplot-xy-smooth-curve"), i18n("Smooth"), \
cartesianPlotAddNewActionGroup);  +//	addFourierFilterAction = new \
QAction(QIcon::fromTheme("labplot-xy-fourier_filter-curve"), i18n("Fourier filter"), \
cartesianPlotAddNewActionGroup);  +//	addFourierTransformAction = new \
QAction(QIcon::fromTheme("labplot-xy-fourier_transform-curve"), i18n("Fourier \
transform"), cartesianPlotAddNewActionGroup);  
+ 	connect(cartesianPlotAddNewActionGroup, SIGNAL(triggered(QAction*)), \
SLOT(cartesianPlotAddNew(QAction*))); + 
  	QActionGroup* cartesianPlotNavigationGroup = new QActionGroup(this);
 -	scaleAutoAction = new KAction(KIcon("labplot-auto-scale-all"), i18n("auto scale"), \
cartesianPlotNavigationGroup);  +	scaleAutoAction = new \
QAction(QIcon::fromTheme("labplot-auto-scale-all"), i18n("auto scale"), \
cartesianPlotNavigationGroup);  scaleAutoAction->setData(CartesianPlot::ScaleAuto);
 -	scaleAutoXAction = new KAction(KIcon("labplot-auto-scale-x"), i18n("auto scale \
X"), cartesianPlotNavigationGroup);  +	scaleAutoXAction = new \
QAction(QIcon::fromTheme("labplot-auto-scale-x"), i18n("auto scale X"), \
cartesianPlotNavigationGroup);  scaleAutoXAction->setData(CartesianPlot::ScaleAutoX);
 -	scaleAutoYAction = new KAction(KIcon("labplot-auto-scale-y"), i18n("auto scale \
Y"), cartesianPlotNavigationGroup);  +	scaleAutoYAction = new \
QAction(QIcon::fromTheme("labplot-auto-scale-y"), i18n("auto scale Y"), \
cartesianPlotNavigationGroup);  scaleAutoYAction->setData(CartesianPlot::ScaleAutoY);
 -	zoomInAction = new KAction(KIcon("zoom-in"), i18n("zoom in"), \
cartesianPlotNavigationGroup);  +	zoomInAction = new \
QAction(QIcon::fromTheme("zoom-in"), i18n("zoom in"), cartesianPlotNavigationGroup);  \
                zoomInAction->setData(CartesianPlot::ZoomIn);
 -	zoomOutAction = new KAction(KIcon("zoom-out"), i18n("zoom out"), \
cartesianPlotNavigationGroup);  +	zoomOutAction = new \
QAction(QIcon::fromTheme("zoom-out"), i18n("zoom out"), \
cartesianPlotNavigationGroup);  zoomOutAction->setData(CartesianPlot::ZoomOut);
 -	zoomInXAction = new KAction(KIcon("labplot-zoom-in-x"), i18n("zoom in X"), \
cartesianPlotNavigationGroup);  +	zoomInXAction = new \
QAction(QIcon::fromTheme("labplot-zoom-in-x"), i18n("zoom in X"), \
cartesianPlotNavigationGroup);  zoomInXAction->setData(CartesianPlot::ZoomInX);
 -	zoomOutXAction = new KAction(KIcon("labplot-zoom-out-x"), i18n("zoom out X"), \
cartesianPlotNavigationGroup);  +	zoomOutXAction = new \
QAction(QIcon::fromTheme("labplot-zoom-out-x"), i18n("zoom out X"), \
cartesianPlotNavigationGroup);  zoomOutXAction->setData(CartesianPlot::ZoomOutX);
 -	zoomInYAction = new KAction(KIcon("labplot-zoom-in-y"), i18n("zoom in Y"), \
cartesianPlotNavigationGroup);  +	zoomInYAction = new \
QAction(QIcon::fromTheme("labplot-zoom-in-y"), i18n("zoom in Y"), \
cartesianPlotNavigationGroup);  zoomInYAction->setData(CartesianPlot::ZoomInY);
 -	zoomOutYAction = new KAction(KIcon("labplot-zoom-out-y"), i18n("zoom out Y"), \
cartesianPlotNavigationGroup);  +	zoomOutYAction = new \
QAction(QIcon::fromTheme("labplot-zoom-out-y"), i18n("zoom out Y"), \
cartesianPlotNavigationGroup);  zoomOutYAction->setData(CartesianPlot::ZoomOutY);
 -	shiftLeftXAction = new KAction(KIcon("labplot-shift-left-x"), i18n("shift left \
X"), cartesianPlotNavigationGroup);  +	shiftLeftXAction = new \
QAction(QIcon::fromTheme("labplot-shift-left-x"), i18n("shift left X"), \
cartesianPlotNavigationGroup);  shiftLeftXAction->setData(CartesianPlot::ShiftLeftX);
 -	shiftRightXAction = new KAction(KIcon("labplot-shift-right-x"), i18n("shift right \
X"), cartesianPlotNavigationGroup);  +	shiftRightXAction = new \
QAction(QIcon::fromTheme("labplot-shift-right-x"), i18n("shift right X"), \
cartesianPlotNavigationGroup);  \
                shiftRightXAction->setData(CartesianPlot::ShiftRightX);
 -	shiftUpYAction = new KAction(KIcon("labplot-shift-up-y"), i18n("shift up Y"), \
cartesianPlotNavigationGroup);  +	shiftUpYAction = new \
QAction(QIcon::fromTheme("labplot-shift-up-y"), i18n("shift up Y"), \
cartesianPlotNavigationGroup);  shiftUpYAction->setData(CartesianPlot::ShiftUpY);
 -	shiftDownYAction = new KAction(KIcon("labplot-shift-down-y"), i18n("shift down \
Y"), cartesianPlotNavigationGroup);  +	shiftDownYAction = new \
QAction(QIcon::fromTheme("labplot-shift-down-y"), i18n("shift down Y"), \
cartesianPlotNavigationGroup);  shiftDownYAction->setData(CartesianPlot::ShiftDownY);
  
  	connect(cartesianPlotNavigationGroup, SIGNAL(triggered(QAction*)), \
SLOT(cartesianPlotNavigationChanged(QAction*))); @@@ -1372,21 -1371,22 +1368,19 @@@ \
void WorksheetView::exportToFile(const   QRectF sourceRect;
  
  	//determine the rectangular to print
- 	if (area == WorksheetView::ExportBoundingBox) {
+ 	if (area == WorksheetView::ExportBoundingBox)
  		sourceRect = scene()->itemsBoundingRect();
- 	} else if (area == WorksheetView::ExportSelection) {
+ 	else if (area == WorksheetView::ExportSelection) {
  		//TODO doesn't work: rect = scene()->selectionArea().boundingRect();
- 		foreach (QGraphicsItem* item, m_selectedItems) {
+ 		foreach (QGraphicsItem* item, m_selectedItems)
  			sourceRect = sourceRect.united( \
                item->mapToScene(item->boundingRect()).boundingRect() );
- 		}
- 	} else {
+ 	} else
  		sourceRect = scene()->sceneRect();
- 	}
  
  	//print
 -	if (format == WorksheetView::Pdf || format == WorksheetView::Eps) {
 +	if (format == WorksheetView::Pdf) {
  		QPrinter printer(QPrinter::HighResolution);
 -		if (format == WorksheetView::Pdf)
 -			printer.setOutputFormat(QPrinter::PdfFormat);
 -		else
 -			printer.setOutputFormat(QPrinter::PostScriptFormat);
 +		printer.setOutputFormat(QPrinter::PdfFormat);
  
  		printer.setOutputFileName(path);
  		int w = Worksheet::convertFromSceneUnits(sourceRect.width(), \
                Worksheet::Millimeter);
diff --cc src/kdefrontend/MainWin.cpp
index 665e8fb,706af33..e1b6eb3
--- a/src/kdefrontend/MainWin.cpp
+++ b/src/kdefrontend/MainWin.cpp
@@@ -96,48 -83,45 +96,48 @@@
  */
  
  MainWin::MainWin(QWidget *parent, const QString& filename)
- 		: KXmlGuiWindow(parent),
+ 	: KXmlGuiWindow(parent),
 -	  m_currentSubWindow(0),
 -	  m_project(0),
 -	  m_aspectTreeModel(0),
 -	  m_projectExplorer(0),
 -	  m_projectExplorerDock(0),
 -	  m_propertiesDock(0),
 -	  m_currentAspect(0),
 -	  m_currentFolder(0),
 -	  m_suppressCurrentSubWindowChangedEvent(false),
 -	  m_closing(false),
 -	  m_autoSaveActive(false),
 -	  m_visibilityMenu(0),
 -	  m_newMenu(0),
 -	  m_editMenu(0),
 -	  axisDock(0),
 -	  notesDock(0),
 -	  cartesianPlotDock(0),
 -	  cartesianPlotLegendDock(0),
 -	  columnDock(0),
 -	  matrixDock(0),
 -	  spreadsheetDock(0),
 -	  projectDock(0),
 -	  xyCurveDock(0),
 -	  xyEquationCurveDock(0),
 -	  xyDataReductionCurveDock(0),
 -	  xyDifferentiationCurveDock(0),
 -	  xyIntegrationCurveDock(0),
 -	  xyInterpolationCurveDock(0),
 -	  xySmoothCurveDock(0),
 -	  xyFitCurveDock(0),
 -	  xyFourierFilterCurveDock(0),
 -	  xyFourierTransformCurveDock(0),
 -	  worksheetDock(0),
 -	  textLabelDock(0),
 -	  customPointDock(0),
 -	  datapickerImageDock(0),
 -	  datapickerCurveDock(0),
 -	  m_guiObserver(0) {
 +	m_currentSubWindow(0),
 +	m_project(0),
 +	m_aspectTreeModel(0),
 +	m_projectExplorer(0),
 +	m_projectExplorerDock(0),
 +	m_propertiesDock(0),
 +	m_currentAspect(0),
 +	m_currentFolder(0),
 +	m_suppressCurrentSubWindowChangedEvent(false),
 +	m_closing(false),
 +	m_autoSaveActive(false),
 +	m_visibilityMenu(0),
 +	m_newMenu(0),
 +	m_editMenu(0),
 +	axisDock(0),
 +	notesDock(0),
 +	cartesianPlotDock(0),
 +	cartesianPlotLegendDock(0),
 +	columnDock(0),
 +	matrixDock(0),
 +	spreadsheetDock(0),
 +	projectDock(0),
 +	xyCurveDock(0),
 +	xyEquationCurveDock(0),
 +	xyDataReductionCurveDock(0),
 +	xyDifferentiationCurveDock(0),
 +	xyIntegrationCurveDock(0),
 +	xyInterpolationCurveDock(0),
 +	xySmoothCurveDock(0),
 +	xyFitCurveDock(0),
 +	xyFourierFilterCurveDock(0),
 +	xyFourierTransformCurveDock(0),
 +	worksheetDock(0),
 +	textLabelDock(0),
 +	customPointDock(0),
 +	datapickerImageDock(0),
 +	datapickerCurveDock(0),
 +#ifdef HAVE_CANTOR_LIBS
 +	cantorWorksheetDock(0),
 +#endif
 +	m_guiObserver(0) {
  
  // 	QTimer::singleShot( 0, this, SLOT(initGUI(filename)) );  //TODO doesn't work \
anymore  initGUI(filename);
@@@ -173,19 -155,13 +173,20 @@@ void MainWin::initGUI(const QString& fi
  	m_mdiArea = new QMdiArea;
  	setCentralWidget(m_mdiArea);
  	connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
 -	        this, SLOT(handleCurrentSubWindowChanged(QMdiSubWindow*)));
 +		this, SLOT(handleCurrentSubWindowChanged(QMdiSubWindow*)));
 +#ifdef _WIN32
 +	QIcon::setThemeName("hicolor");
 +#endif
+ 
  	statusBar()->showMessage(i18nc("%1 is the LabPlot version", "Welcome to LabPlot \
%1", QLatin1String(LVERSION)));  initActions();
 +#ifdef __APPLE__
 +	setupGUI(Default, \
QLatin1String("/Applications/labplot2.app/Contents/share/labplot2ui.rc"));  +#else
 +	setupGUI(Default, QLatin1String("labplot2ui.rc"));
 +#endif
  	initMenus();
 -	setupGUI();
 -	setWindowIcon(KIcon("LabPlot2"));
 +	setWindowIcon(QIcon::fromTheme("LabPlot2"));
  	setAttribute( Qt::WA_DeleteOnClose );
  
  	//make the status bar of a fixed size in order to avoid height changes when \
placing a ProgressBar there. @@@ -276,8 -252,8 +277,8 @@@ void MainWin::initActions() \
  // 	m_newWorksheetAction->setShortcut(Qt::ALT+Qt::Key_X);
  	actionCollection()->addAction("new_worksheet", m_newWorksheetAction);
  	connect(m_newWorksheetAction, SIGNAL(triggered()), SLOT(newWorksheet()));
- 	
+ 
 -	m_newNotesAction= new KAction(KIcon("document-new"),i18n("Note"),this);
 +	m_newNotesAction= new QAction(QIcon::fromTheme("document-new"),i18n("Note"),this);
  	actionCollection()->addAction("new_notes", m_newNotesAction);
  	connect(m_newNotesAction, SIGNAL(triggered()), SLOT(newNotes()));
  
@@@ -605,9 -540,9 +607,9 @@@ void MainWin::updateGUI() 
  		view->createAnalysisMenu(menu);
  
  		//populate worksheet-toolbar
- 		QToolBar* toolbar=qobject_cast<QToolBar*>(factory->container("worksheet_toolbar", \
                this));
- 		if (group.groupList().indexOf("Toolbar worksheet_toolbar")==-1)
+ 		QToolBar* toolbar = \
qobject_cast<QToolBar*>(factory->container("worksheet_toolbar", this)); + 		if \
                (group.groupList().indexOf("Toolbar worksheet_toolbar") == -1)
 -			toolbar->setToolButtonStyle(KToolBar::toolButtonStyleSetting());
 +			toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
  
  		toolbar->clear();
  		view->fillToolBar(toolbar);
@@@ -615,8 -550,8 +617,8 @@@
  
  		//populate the toolbar for cartesian plots
  		toolbar=qobject_cast<QToolBar*>(factory->container("cartesian_plot_toolbar", \
                this));
- 		if (group.groupList().indexOf("Toolbar cartesian_plot_toolbar")==-1)
+ 		if (group.groupList().indexOf("Toolbar cartesian_plot_toolbar") == -1)
 -			toolbar->setToolButtonStyle(KToolBar::toolButtonStyleSetting());
 +			toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
  
  		toolbar->clear();
  		view->fillCartesianPlotToolBar(toolbar);
@@@ -645,9 -580,9 +647,9 @@@
  		view->createContextMenu(menu);
  
  		//populate spreadsheet-toolbar
- 		QToolBar* toolbar=qobject_cast<QToolBar*>(factory->container("spreadsheet_toolbar", \
                this));
- 		if (group.groupList().indexOf("Toolbar spreadsheet_toolbar")==-1)
+ 		QToolBar* toolbar = \
qobject_cast<QToolBar*>(factory->container("spreadsheet_toolbar", this)); + 		if \
                (group.groupList().indexOf("Toolbar spreadsheet_toolbar") == -1)
 -			toolbar->setToolButtonStyle(KToolBar::toolButtonStyleSetting());
 +			toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
  
  		toolbar->setVisible(true);
  		toolbar->clear();
@@@ -663,34 -598,13 +665,33 @@@
  		factory->container("matrix", this)->setEnabled(true);
  
  		//populate matrix-menu
- 		MatrixView* view=qobject_cast<MatrixView*>(matrix->view());
- 		QMenu* menu=qobject_cast<QMenu*>(factory->container("matrix", this));
+ 		MatrixView* view = qobject_cast<MatrixView*>(matrix->view());
+ 		QMenu* menu = qobject_cast<QMenu*>(factory->container("matrix", this));
  		menu->clear();
  		view->createContextMenu(menu);
- 	} else {
+ 	} else
  		factory->container("matrix", this)->setEnabled(false);
- 	}
  
 +#ifdef HAVE_CANTOR_LIBS
 +	CantorWorksheet* cantorworksheet = this->activeCantorWorksheet();
 +	if(cantorworksheet) {
 +		// enable Cantor Worksheet related menues
 +		factory->container("cas_worksheet", this)->setEnabled(true);
 +		CantorWorksheetView* \
view=qobject_cast<CantorWorksheetView*>(cantorworksheet->view());  +		QMenu* \
menu=qobject_cast<QMenu*>(factory->container("cas_worksheet", this));  \
+		menu->clear();  +		view->createContextMenu(menu);
 +		QToolBar* toolbar=qobject_cast<QToolBar*>(factory->container("cas_worksheet_toolbar", \
this));  +		toolbar->setVisible(true);
 +		toolbar->clear();
 +		view->fillToolBar(toolbar);
 +	} else {
 +		//no cantor worksheet selected -> deactivate cantor worksheet related menu and \
toolbar  +		factory->container("cas_worksheet", this)->setEnabled(false);
 +		factory->container("cas_worksheet_toolbar", this)->setVisible(false);
 +	}
 +#endif
 +
  	const Datapicker* datapicker = this->activeDatapicker();
  	if (datapicker) {
  		factory->container("datapicker", this)->setEnabled(true);
@@@ -701,9 -615,9 +702,9 @@@
  		view->createContextMenu(menu);
  
  		//populate spreadsheet-toolbar
- 		QToolBar* toolbar=qobject_cast<QToolBar*>(factory->container("datapicker_toolbar", \
                this));
- 		if (group.groupList().indexOf("Toolbar datapicker_toolbar")==-1)
+ 		QToolBar* toolbar = \
qobject_cast<QToolBar*>(factory->container("datapicker_toolbar", this)); + 		if \
                (group.groupList().indexOf("Toolbar datapicker_toolbar") == -1)
 -			toolbar->setToolButtonStyle(KToolBar::toolButtonStyleSetting());
 +			toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
  
  		toolbar->clear();
  		view->fillToolBar(toolbar);
@@@ -826,13 -740,13 +827,13 @@@ void MainWin::openProject(const QString
  	}
  
  	QIODevice *file;
- 	// first try gzip compression, because older files are gzipped but end with .lml
+ 	// first try gzip compression, because projects can be gzipped and 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);
 +		file = new KFilterDev(filename);
  
- 	if (file==0)
+ 	if (file == 0)
  		file = new QFile(filename);
  
  	if (!file->open(QIODevice::ReadOnly)) {
@@@ -1621,11 -1506,11 +1618,11 @@@ void MainWin::importFileDialog(const QS
  	m_importFileDialog = new ImportFileDialog(this, false, fileName);
  
  	// select existing container
- 	if (m_currentAspect->inherits("Spreadsheet") || \
                m_currentAspect->inherits("Matrix") || \
                m_currentAspect->inherits("Workbook")) {
- 		m_importFileDialog->setCurrentIndex(m_projectExplorer->currentIndex());
- 	} else if (m_currentAspect->inherits("Column")) {
+ 	if (m_currentAspect->inherits("Spreadsheet") || \
m_currentAspect->inherits("Matrix") || m_currentAspect->inherits("Workbook")) + \
m_importFileDialog->setCurrentIndex( m_projectExplorer->currentIndex()); + 	else if \
(m_currentAspect->inherits("Column")) {  if \
                (m_currentAspect->parentAspect()->inherits("Spreadsheet"))
 -			m_importFileDialog->setCurrentIndex( \
m_aspectTreeModel->modelIndexOfAspect(m_currentAspect->parentAspect()));  \
+			m_importFileDialog->setCurrentIndex(m_aspectTreeModel->modelIndexOfAspect(m_currentAspect->parentAspect()));
  }
  
  	if (m_importFileDialog->exec() == QDialog::Accepted) {
diff --cc src/kdefrontend/SettingsGeneralPage.cpp
index 09bad06,80b54cd..accd1e0
--- a/src/kdefrontend/SettingsGeneralPage.cpp
+++ b/src/kdefrontend/SettingsGeneralPage.cpp
@@@ -28,28 -28,36 +28,37 @@@
  
  #include "SettingsGeneralPage.h"
  #include "MainWin.h"
+ #include "tools/TeXRenderer.h"
  
 -#include <KDialog>
 -#include <KLocale>
 +#include <KLocalizedString>
 +#include <KConfigGroup>
 +#include <KSharedConfig>
  #include <kfiledialog.h>
  
- #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- #include <QStandardPaths>
- #else
- #include <KStandardDirs>
- #endif
- 
  /**
   * \brief Page for the 'General' settings of the Labplot settings dialog.
-  *
   */
- SettingsGeneralPage::SettingsGeneralPage(QWidget* parent) :
- 	SettingsPage(parent), m_changed(false) {
+ SettingsGeneralPage::SettingsGeneralPage(QWidget* parent) : SettingsPage(parent),
+ 	m_changed(false) {
  
  	ui.setupUi(this);
  	retranslateUi();
  
 -	ui.lLatexWarning->setPixmap( KIcon("state-warning").pixmap(QSize(48,48)) );
++	ui.lLatexWarning->setPixmap( \
QIcon::fromTheme("state-warning").pixmap(QSize(48,48)) ); + 
+ 	//add available TeX typesetting engines
+ 	if (TeXRenderer::executableExists(QLatin1String("lualatex")))
+ 		ui.cbTexEngine->addItem(QLatin1String("LuaLaTeX"), QLatin1String("lualatex"));
+ 
+ 	if (TeXRenderer::executableExists(QLatin1String("xelatex")))
+ 		ui.cbTexEngine->addItem(QLatin1String("XeLaTex"), QLatin1String("xelatex"));
+ 
+ 	if (TeXRenderer::executableExists(QLatin1String("pdflatex")))
+ 		ui.cbTexEngine->addItem(QLatin1String("pdfLaTeX"), QLatin1String("pdflatex"));
+ 
+ 	if (TeXRenderer::executableExists(QLatin1String("latex")))
+ 		ui.cbTexEngine->addItem(QLatin1String("LaTeX"), QLatin1String("latex"));
+ 
  	connect(ui.cbLoadOnStart, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()) \
);  connect(ui.cbInterface, SIGNAL(currentIndexChanged(int)), this, \
SLOT(interfaceChanged(int)) );  connect(ui.cbMdiVisibility, \
                SIGNAL(currentIndexChanged(int)), this, SLOT(changed()) );
diff --cc src/kdefrontend/widgets/LabelWidget.cpp
index 7058475,81ffca5..c53a2d2
--- a/src/kdefrontend/widgets/LabelWidget.cpp
+++ b/src/kdefrontend/widgets/LabelWidget.cpp
@@@ -34,32 -34,24 +34,26 @@@
  #include <QWidgetAction>
  
  #include <KConfigGroup>
 +#include <KSharedConfig>
  #include <KCharSelect>
 -#include <KGlobal>
 -#include <KMenu>
 +#include <KLocalizedString>
 +#include <QMenu>
  
- #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- #include <QStandardPaths>
- #else
- #include <KStandardDirs>
- #endif
- 
  /*!
  	\class LabelWidget
 - 	\brief Widget for editing the properties of a TextLabel object, mostly used in an \
an appropriate dock widget.  +	\brief Widget for editing the properties of a \
TextLabel object, mostly used in an an appropriate dock widget.  
 - 	In order the properties of the label to be shown, \c loadConfig() has to be \
                called with the correspondig KConfigGroup
 - 	(settings for a label in *Plot, Axis etc. or for an independent label on the \
worksheet).  +	In order the properties of the label to be shown, \c loadConfig() has \
to be called with the correspondig KConfigGroup  +	(settings for a label in *Plot, \
Axis etc. or for an independent label on the worksheet).  
 - 	\ingroup kdefrontend
 +	\ingroup kdefrontend
   */
  LabelWidget::LabelWidget(QWidget* parent) : QWidget(parent),
  	m_initializing(false),
 -	m_dateTimeMenu(new KMenu(this)),
 +	m_dateTimeMenu(new QMenu(this)),
- 	m_teXAvailable(false) {
+ 	m_teXEnabled(false) {
  
 +// see legacy/LabelWidget.cpp
  	ui.setupUi(this);
  
  	m_dateTimeMenu->setSeparatorsCollapsible(false); //we don't want the first \
                separator to be removed
diff --cc src/kdefrontend/widgets/LabelWidget.h
index f23c520,5e151b8..f4376cf
--- a/src/kdefrontend/widgets/LabelWidget.h
+++ b/src/kdefrontend/widgets/LabelWidget.h
@@@ -59,8 -58,8 +59,8 @@@ private
  	QList<TextLabel*> m_labelsList;
  	QList<Axis*> m_axesList;
  	bool m_initializing;
 -	KMenu* m_dateTimeMenu;
 +	QMenu* m_dateTimeMenu;
- 	bool m_teXAvailable;
+ 	bool m_teXEnabled;
  
  	void initConnections() const;
  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic