[kde-doc-english] [labplot/frameworks] /: Merge branch 'master' into frameworks
Alexander Semke
alexander.semke at web.de
Mon Apr 25 07:39:33 UTC 2016
Git commit 6850798e10239e5b8998b861fbb54923170c3e7b by Alexander Semke.
Committed on 25/04/2016 at 06:39.
Pushed by asemke into branch 'frameworks'.
Merge branch 'master' into frameworks
M +25 -2 CMakeLists.txt
M +82 -13 doc/index.docbook
M +11 -4 src/CMakeLists.txt
M +1 -2 src/backend/core/AbstractColumn.cpp
M +15 -9 src/backend/core/Workbook.cpp
M +148 -2 src/backend/core/column/Column.cpp
M +40 -0 src/backend/core/column/Column.h
M +15 -9 src/backend/datapicker/Datapicker.cpp
M +10 -6 src/backend/datapicker/DatapickerImage.cpp
M +28 -14 src/backend/matrix/Matrix.cpp
M +29 -15 src/backend/spreadsheet/Spreadsheet.cpp
M +4 -3 src/backend/spreadsheet/Spreadsheet.h
M +10 -6 src/backend/worksheet/Worksheet.cpp
M +3 -3 src/backend/worksheet/Worksheet.h
M +115 -38 src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
M +26 -15 src/backend/worksheet/plots/cartesian/CartesianPlot.h
M +5 -6 src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
M +503 -116 src/commonfrontend/matrix/MatrixView.cpp
M +8 -1 src/commonfrontend/matrix/MatrixView.h
M +582 -240 src/commonfrontend/spreadsheet/SpreadsheetView.cpp
M +8 -3 src/commonfrontend/spreadsheet/SpreadsheetView.h
M +8 -9 src/commonfrontend/widgets/TreeViewComboBox.cpp
M +47 -0 src/commonfrontend/worksheet/WorksheetView.cpp
M +9 -0 src/commonfrontend/worksheet/WorksheetView.h
M +36 -0 src/kdefrontend/GuiObserver.cpp
M +29 -17 src/kdefrontend/MainWin.cpp
M +4 -0 src/kdefrontend/MainWin.h
M +1 -1 src/kdefrontend/dockwidgets/AxisDock.cpp
M +196 -172 src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/CartesianPlotDock.h
M +5 -3 src/kdefrontend/dockwidgets/XYCurveDock.cpp
M +1 -1 src/kdefrontend/dockwidgets/XYCurveDock.h
M +3 -2 src/kdefrontend/dockwidgets/XYEquationCurveDock.cpp
M +7 -8 src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
M +106 -23 src/kdefrontend/spreadsheet/ExportSpreadsheetDialog.cpp
M +92 -52 src/kdefrontend/ui/dockwidgets/cartesianplotdock.ui
M +199 -198 src/kdefrontend/widgets/LabelWidget.cpp
M +4 -4 src/kdefrontend/worksheet/ExportWorksheetDialog.cpp
http://commits.kde.org/labplot/6850798e10239e5b8998b861fbb54923170c3e7b
diff --cc CMakeLists.txt
index 74de7bf,4d97ff7..197f45d
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -4,19 -4,17 +4,19 @@@ cmake_minimum_required(VERSION 2.8.12
find_package(ECM 1.3.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
-find_package(Qt4 REQUIRED)
-find_package(KDE4 REQUIRED)
+find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg Concurrent)
+find_package(KF5 REQUIRED COMPONENTS I18n KDELibs4Support)
+include(FeatureSummary)
include(ECMInstallIcons)
include(KDEInstallDirs)
-include(KDE4Defaults)
+include(KDECompilerSettings)
+include(KDECMakeSettings)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector -fno-exceptions")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -Wunused -fno-omit-frame-pointer -fstack-protector -fno-exceptions")
-add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
+add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS})
+include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
add_definitions (-DLVERSION=\"2.2.0\")
# add_definitions (-DLDEBUG='1')
diff --cc src/backend/core/column/Column.cpp
index 5801b0c,c26efd8..458df16
--- a/src/backend/core/column/Column.cpp
+++ b/src/backend/core/column/Column.cpp
@@@ -34,9 -34,13 +34,12 @@@
#include "backend/core/datatypes/String2DateTimeFilter.h"
#include "backend/core/datatypes/DateTime2StringFilter.h"
+ #include <gsl/gsl_sort.h>
+ #include <math.h>
+
#include <QMetaEnum>
#include <QThreadPool>
-
-#include <KIcon>
+#include <QIcon>
#include <KLocale>
/**
diff --cc src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
index ac8ed50,6d9199a..e3692a7
--- a/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
+++ b/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
@@@ -342,13 -344,15 +344,15 @@@ void CartesianPlot::initDefault(Type ty
void CartesianPlot::initActions(){
//"add new" actions
- addCurveAction = new KAction(KIcon("labplot-xy-curve"), i18n("xy-curve"), this);
- addEquationCurveAction = new KAction(KIcon("labplot-xy-equation-curve"), i18n("xy-curve from a mathematical equation"), this);
- addFitCurveAction = new KAction(KIcon("labplot-xy-fit-curve"), i18n("xy-curve from a fit to data"), this);
- addFourierFilterCurveAction = new KAction(KIcon("labplot-xy-fourier_filter-curve"), i18n("xy-curve from a Fourier filter"), this);
- addInterpolationCurveAction = new KAction(KIcon("labplot-xy-interpolation-curve"), i18n("xy-curve from an interpolation"), this);
- addLegendAction = new KAction(KIcon("text-field"), i18n("legend"), this);
- addHorizontalAxisAction = new KAction(KIcon("labplot-axis-horizontal"), i18n("horizontal axis"), this);
- addVerticalAxisAction = new KAction(KIcon("labplot-axis-vertical"), i18n("vertical axis"), this);
- addCustomPointAction = new KAction(KIcon("draw-cross"), i18n("custom point"), this);
+ addCurveAction = new QAction(QIcon::fromTheme("labplot-xy-curve"), i18n("xy-curve"), this);
+ addEquationCurveAction = new QAction(QIcon::fromTheme("labplot-xy-equation-curve"), i18n("xy-curve from a mathematical equation"), this);
+ addFitCurveAction = new QAction(QIcon::fromTheme("labplot-xy-fit-curve"), i18n("xy-curve from a fit to data"), this);
++ addFourierFilterCurveAction = QAction(QIcon::fromTheme("labplot-xy-fourier_filter-curve"), i18n("xy-curve from a Fourier filter"), this);
++ addInterpolationCurveAction = QAction(QIcon::fromTheme("labplot-xy-interpolation-curve"), i18n("xy-curve from an interpolation"), this);
+ addLegendAction = new QAction(QIcon::fromTheme("text-field"), i18n("legend"), this);
+ addHorizontalAxisAction = new QAction(QIcon::fromTheme("labplot-axis-horizontal"), i18n("horizontal axis"), this);
+ addVerticalAxisAction = new QAction(QIcon::fromTheme("labplot-axis-vertical"), i18n("vertical axis"), this);
+ addCustomPointAction = new QAction(QIcon::fromTheme("draw-cross"), i18n("custom point"), this);
connect(addCurveAction, SIGNAL(triggered()), SLOT(addCurve()));
connect(addEquationCurveAction, SIGNAL(triggered()), SLOT(addEquationCurve()));
diff --cc src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
index 4a47356,8b9e598..b660eb1
--- a/src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
+++ b/src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
@@@ -46,12 -46,13 +46,11 @@@
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_version.h>
-#include <KIcon>
-#include <KLocale>
#include <QElapsedTimer>
- #include <QIcon>
- #include <KLocale>
+ #include <QDebug>
XYFitCurve::XYFitCurve(const QString& name)
- : XYCurve(name, new XYFitCurvePrivate(this)){
+ : XYCurve(name, new XYFitCurvePrivate(this)) {
init();
}
diff --cc src/commonfrontend/matrix/MatrixView.cpp
index d2b1e08,bfbd9af..65877c7
--- a/src/commonfrontend/matrix/MatrixView.cpp
+++ b/src/commonfrontend/matrix/MatrixView.cpp
@@@ -168,16 -171,18 +171,18 @@@ void MatrixView::initActions()
connect(headerFormatActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(headerFormatChanged(QAction*)));
// column related actions
- action_add_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-right"), i18n("&Add Columns"), this);
- action_insert_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-left"), i18n("&Insert Empty Columns"), this);
- action_remove_columns = new QAction(QIcon::fromTheme("edit-table-delete-column"), i18n("Remo&ve Columns"), this);
- action_clear_columns = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Columns"), this);
- action_add_columns = new KAction(KIcon("edit-table-insert-column-right"), i18n("&Add Columns"), this);
- action_insert_columns = new KAction(KIcon("edit-table-insert-column-left"), i18n("&Insert Empty Columns"), this);
- action_remove_columns = new KAction(KIcon("edit-table-delete-column"), i18n("Remo&ve Columns"), this);
- action_clear_columns = new KAction(KIcon("edit-clear"), i18n("Clea&r Columns"), this);
- action_statistics_columns = new KAction(KIcon("view-statistics"), i18n("Statisti&cs"), this);
++ action_add_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-right"), i18n("&Add Columns"), this);
++ action_insert_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-left"), i18n("&Insert Empty Columns"), this);
++ action_remove_columns = new QAction(QIcon::fromTheme("edit-table-delete-column"), i18n("Remo&ve Columns"), this);
++ action_clear_columns = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Columns"), this);
++ action_statistics_columns = new QAction(QIcon::fromTheme("view-statistics"), i18n("Statisti&cs"), this);
// row related actions
- action_add_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above"), i18n("&Add Rows"), this);
- action_insert_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above") ,i18n("&Insert Empty Rows"), this);
- action_remove_rows = new QAction(QIcon::fromTheme("edit-table-delete-row"), i18n("Remo&ve Rows"), this);
- action_clear_rows = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Rows"), this);
- action_add_rows = new KAction(KIcon("edit-table-insert-row-above"), i18n("&Add Rows"), this);
- action_insert_rows = new KAction(KIcon("edit-table-insert-row-above") ,i18n("&Insert Empty Rows"), this);
- action_remove_rows = new KAction(KIcon("edit-table-delete-row"), i18n("Remo&ve Rows"), this);
- action_clear_rows = new KAction(KIcon("edit-clear"), i18n("Clea&r Rows"), this);
- action_statistics_rows = new KAction(KIcon("view-statistics"), i18n("Statisti&cs"), this);
++ action_add_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above"), i18n("&Add Rows"), this);
++ action_insert_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above") ,i18n("&Insert Empty Rows"), this);
++ action_remove_rows = new QAction(QIcon::fromTheme("edit-table-delete-row"), i18n("Remo&ve Rows"), this);
++ action_clear_rows = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Rows"), this);
++ action_statistics_rows = new QAction(QIcon::fromTheme("view-statistics"), i18n("Statisti&cs"), this);
}
void MatrixView::connectActions() {
diff --cc src/commonfrontend/spreadsheet/SpreadsheetView.cpp
index ff9ed46,95ba572..53b547c
--- a/src/commonfrontend/spreadsheet/SpreadsheetView.cpp
+++ b/src/commonfrontend/spreadsheet/SpreadsheetView.cpp
@@@ -155,59 -155,60 +156,60 @@@ void SpreadsheetView::init()
void SpreadsheetView::initActions() {
// selection related actions
- action_cut_selection = new KAction(KIcon("edit-cut"), i18n("Cu&t"), this);
- action_copy_selection = new KAction(KIcon("edit-copy"), i18n("&Copy"), this);
- action_paste_into_selection = new KAction(KIcon("edit-paste"), i18n("Past&e"), this);
- action_mask_selection = new KAction(KIcon("edit-node"), i18n("&Mask Selection"), this);
- action_unmask_selection = new KAction(KIcon("format-remove-node"), i18n("&Unmask Selection"), this);
- action_clear_selection = new KAction(KIcon("edit-clear"), i18n("Clea&r Selection"), this);
- action_select_all = new KAction(KIcon("edit-select-all"), i18n("Select All"), this);
-
-// action_set_formula = new KAction(KIcon(""), i18n("Assign &Formula"), this);
-// action_recalculate = new KAction(KIcon(""), i18n("Recalculate"), this);
- action_fill_row_numbers = new KAction(KIcon(""), i18n("Row Numbers"), this);
- action_fill_random = new KAction(KIcon(""), i18n("Uniform Random Values"), this);
- action_fill_random_nonuniform = new KAction(KIcon(""), i18n("Random Values"), this);
- action_fill_equidistant = new KAction(KIcon(""), i18n("Equidistant Values"), this);
- action_fill_function = new KAction(KIcon(""), i18n("Function Values"), this);
- action_fill_const = new KAction(KIcon(""), i18n("Const Values"), this);
+ action_cut_selection = new QAction(QIcon::fromTheme("edit-cut"), i18n("Cu&t"), this);
+ action_copy_selection = new QAction(QIcon::fromTheme("edit-copy"), i18n("&Copy"), this);
+ action_paste_into_selection = new QAction(QIcon::fromTheme("edit-paste"), i18n("Past&e"), this);
+ action_mask_selection = new QAction(QIcon::fromTheme("edit-node"), i18n("&Mask Selection"), this);
+ action_unmask_selection = new QAction(QIcon::fromTheme("format-remove-node"), i18n("&Unmask Selection"), this);
+ action_clear_selection = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Selection"), this);
+ action_select_all = new QAction(QIcon::fromTheme("edit-select-all"), i18n("Select All"), this);
+
+// action_set_formula = new QAction(QIcon::fromTheme(""), i18n("Assign &Formula"), this);
+// action_recalculate = new QAction(QIcon::fromTheme(""), i18n("Recalculate"), this);
+ action_fill_row_numbers = new QAction(QIcon::fromTheme(""), i18n("Row Numbers"), this);
+ action_fill_random = new QAction(QIcon::fromTheme(""), i18n("Uniform Random Values"), this);
+ action_fill_random_nonuniform = new QAction(QIcon::fromTheme(""), i18n("Random Values"), this);
+ action_fill_equidistant = new QAction(QIcon::fromTheme(""), i18n("Equidistant Values"), this);
+ action_fill_function = new QAction(QIcon::fromTheme(""), i18n("Function Values"), this);
+ action_fill_const = new QAction(QIcon::fromTheme(""), i18n("Const Values"), this);
//spreadsheet related actions
- action_toggle_comments = new KAction(KIcon("document-properties"), i18n("Show Comments"), this);
- action_add_column = new KAction(KIcon("edit-table-insert-column-left"), i18n("&Add Column"), this);
- action_clear_spreadsheet = new KAction(KIcon("edit-clear"), i18n("Clear Spreadsheet"), this);
- action_clear_masks = new KAction(KIcon("format-remove-node"), i18n("Clear Masks"), this);
- action_sort_spreadsheet = new KAction(KIcon("view-sort-ascending"), i18n("&Sort Spreadsheet"), this);
- action_go_to_cell = new KAction(KIcon("go-jump"), i18n("&Go to Cell"), this);
- action_statistics_all_columns = new KAction(KIcon("view-statistics"), i18n("Statisti&cs"), this );
+ action_toggle_comments = new QAction(QIcon::fromTheme("document-properties"), i18n("Show Comments"), this);
+ action_add_column = new QAction(QIcon::fromTheme("edit-table-insert-column-left"), i18n("&Add Column"), this);
+ action_clear_spreadsheet = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clear Spreadsheet"), this);
+ action_clear_masks = new QAction(QIcon::fromTheme("format-remove-node"), i18n("Clear Masks"), this);
+ action_sort_spreadsheet = new QAction(QIcon::fromTheme("view-sort-ascending"), i18n("&Sort Spreadsheet"), this);
+ action_go_to_cell = new QAction(QIcon::fromTheme("go-jump"), i18n("&Go to Cell"), this);
++ action_statistics_all_columns = new QAction(QIcon::fromTheme("view-statistics"), i18n("Statisti&cs"), this );
// column related actions
- action_insert_columns = new KAction(KIcon("edit-table-insert-column-left"), i18n("&Insert Empty Columns"), this);
- action_remove_columns = new KAction(KIcon("edit-table-delete-column"), i18n("Remo&ve Columns"), this);
- action_clear_columns = new KAction(KIcon("edit-clear"), i18n("Clea&r Columns"), this);
- action_add_columns = new KAction(KIcon("edit-table-insert-column-right"), i18n("&Add Columns"), this);
-// action_set_as_x = new KAction(KIcon(""), i18n("X, Plot Designation"), this);
-// action_set_as_y = new KAction(KIcon(""), i18n("Y, Plot Designation"), this);
-// action_set_as_z = new KAction(KIcon(""), i18n("Z, Plot Designation"), this);
-// action_set_as_xerr = new KAction(KIcon(""), i18n("X Error, Plot Designation"), this);
-// action_set_as_yerr = new KAction(KIcon(""), i18n("Y Error, Plot Designation"), this);
-// action_set_as_none = new KAction(KIcon(""), i18n("None, Plot Designation"), this);
- action_reverse_columns = new KAction(KIcon(""), i18n("Reverse"), this);
- action_drop_values = new KAction(KIcon(""), i18n("Drop Values"), this);
- action_mask_values = new KAction(KIcon(""), i18n("Mask Values"), this);
-// action_join_columns = new KAction(KIcon(""), i18n("Join"), this);
- action_normalize_columns = new KAction(KIcon(""), i18n("&Normalize"), this);
- action_normalize_selection = new KAction(KIcon(""), i18n("&Normalize Selection"), this);
- action_sort_columns = new KAction(KIcon(""), i18n("&Selected Columns"), this);
- action_sort_asc_column = new KAction(KIcon("view-sort-ascending"), i18n("&Ascending"), this);
- action_sort_desc_column = new KAction(KIcon("view-sort-descending"), i18n("&Descending"), this);
- action_statistics_columns = new KAction(KIcon("view-statistics"), i18n("Column Statisti&cs"), this);
+ action_insert_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-left"), i18n("&Insert Empty Columns"), this);
+ action_remove_columns = new QAction(QIcon::fromTheme("edit-table-delete-column"), i18n("Remo&ve Columns"), this);
+ action_clear_columns = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Columns"), this);
+ action_add_columns = new QAction(QIcon::fromTheme("edit-table-insert-column-right"), i18n("&Add Columns"), this);
+// action_set_as_x = new QAction(QIcon::fromTheme(""), i18n("X, Plot Designation"), this);
+// action_set_as_y = new QAction(QIcon::fromTheme(""), i18n("Y, Plot Designation"), this);
+// action_set_as_z = new QAction(QIcon::fromTheme(""), i18n("Z, Plot Designation"), this);
+// action_set_as_xerr = new QAction(QIcon::fromTheme(""), i18n("X Error, Plot Designation"), this);
+// action_set_as_yerr = new QAction(QIcon::fromTheme(""), i18n("Y Error, Plot Designation"), this);
+// action_set_as_none = new QAction(QIcon::fromTheme(""), i18n("None, Plot Designation"), this);
+ action_reverse_columns = new QAction(QIcon::fromTheme(""), i18n("Reverse"), this);
+ action_drop_values = new QAction(QIcon::fromTheme(""), i18n("Drop Values"), this);
+ action_mask_values = new QAction(QIcon::fromTheme(""), i18n("Mask Values"), this);
+// action_join_columns = new QAction(QIcon::fromTheme(""), i18n("Join"), this);
+ action_normalize_columns = new QAction(QIcon::fromTheme(""), i18n("&Normalize"), this);
+ action_normalize_selection = new QAction(QIcon::fromTheme(""), i18n("&Normalize Selection"), this);
+ action_sort_columns = new QAction(QIcon::fromTheme(""), i18n("&Selected Columns"), this);
+ action_sort_asc_column = new QAction(QIcon::fromTheme("view-sort-ascending"), i18n("&Ascending"), this);
+ action_sort_desc_column = new QAction(QIcon::fromTheme("view-sort-descending"), i18n("&Descending"), this);
+ action_statistics_columns = new QAction(QIcon::fromTheme("view-statistics"), i18n("Column Statisti&cs"), this);
// row related actions
- action_insert_rows = new KAction(KIcon("edit-table-insert-row-above") ,i18n("&Insert Empty Rows"), this);
- action_remove_rows = new KAction(KIcon("edit-table-delete-row"), i18n("Remo&ve Rows"), this);
- action_clear_rows = new KAction(KIcon("edit-clear"), i18n("Clea&r Rows"), this);
- action_add_rows = new KAction(KIcon("edit-table-insert-row-above"), i18n("&Add Rows"), this);
- action_statistics_rows = new KAction(KIcon("view-statistics"), i18n("Row Statisti&cs"), this);
+ action_insert_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above") ,i18n("&Insert Empty Rows"), this);
+ action_remove_rows = new QAction(QIcon::fromTheme("edit-table-delete-row"), i18n("Remo&ve Rows"), this);
+ action_clear_rows = new QAction(QIcon::fromTheme("edit-clear"), i18n("Clea&r Rows"), this);
+ action_add_rows = new QAction(QIcon::fromTheme("edit-table-insert-row-above"), i18n("&Add Rows"), this);
+ action_statistics_rows = new QAction(QIcon::fromTheme("view-statistics"), i18n("Row Statisti&cs"), this);
}
void SpreadsheetView::initMenus() {
@@@ -1133,47 -1119,47 +1120,48 @@@ void SpreadsheetView::fillSelectedCells
int col = m_spreadsheet->indexOfChild<Column>(col_ptr);
col_ptr->setSuppressDataChangedSignal(true);
switch (col_ptr->columnMode()) {
- case AbstractColumn::Numeric: {
- if (!doubleOk)
- doubleValue = QInputDialog::getDouble(this, i18n("Fill the selection with constant value"),
- i18n("Value"), 0, -2147483647, 2147483647, 6, &doubleOk);
- if (doubleOk) {
- WAIT_CURSOR;
- QVector<double> results(last-first+1);
- for (int row=first; row<=last; row++) {
- if(isCellSelected(row, col))
- results[row-first] = doubleValue;
- else
- results[row-first] = col_ptr->valueAt(row);
+ case AbstractColumn::Numeric: {
+ if (!doubleOk)
+ doubleValue = QInputDialog::getDouble(this, i18n("Fill the selection with constant value"),
+ i18n("Value"), 0, -2147483647, 2147483647, 6, &doubleOk);
+ if (doubleOk) {
+ WAIT_CURSOR;
+ QVector<double> results(last-first+1);
+ for (int row=first; row<=last; row++) {
+ if(isCellSelected(row, col))
+ results[row-first] = doubleValue;
+ else
+ results[row-first] = col_ptr->valueAt(row);
+ }
+ col_ptr->replaceValues(first, results);
+ RESET_CURSOR;
}
- break;
+ col_ptr->replaceValues(first, results);
+ RESET_CURSOR;
}
- break;
- }
- case AbstractColumn::Text: {
- if (!stringOk)
- stringValue = QInputDialog::getText(this, i18n("Fill the selection with constant value"),
- i18n("Value"), QLineEdit::Normal, 0, &stringOk);
- if (stringOk && !stringValue.isEmpty()) {
- WAIT_CURSOR;
- QStringList results;
- for (int row=first; row<=last; row++) {
- if (isCellSelected(row, col))
- results << stringValue;
- else
- results << col_ptr->textAt(row);
+ case AbstractColumn::Text: {
+ if (!stringOk)
+ stringValue = QInputDialog::getText(this, i18n("Fill the selection with constant value"),
+ i18n("Value"), QLineEdit::Normal, 0, &stringOk);
+ if (stringOk && !stringValue.isEmpty()) {
+ WAIT_CURSOR;
+ QStringList results;
+ for (int row=first; row<=last; row++) {
+ if (isCellSelected(row, col))
+ results << stringValue;
+ else
+ results << col_ptr->textAt(row);
+ }
+ col_ptr->replaceTexts(first, results);
+ RESET_CURSOR;
}
- col_ptr->replaceTexts(first, results);
- RESET_CURSOR;
+ break;
}
- break;
- }
- //TODO: handle other modes
- case AbstractColumn::DateTime:
- case AbstractColumn::Month:
- case AbstractColumn::Day:
- break;
+ //TODO: handle other modes
+ case AbstractColumn::DateTime:
+ case AbstractColumn::Month:
+ case AbstractColumn::Day:
+ break;
}
col_ptr->setSuppressDataChangedSignal(false);
diff --cc src/commonfrontend/widgets/TreeViewComboBox.cpp
index 12743ef,67b69e1..fc0cefe
--- a/src/commonfrontend/widgets/TreeViewComboBox.cpp
+++ b/src/commonfrontend/widgets/TreeViewComboBox.cpp
@@@ -200,7 -199,6 +199,7 @@@ void TreeViewComboBox::treeViewIndexAct
setCurrentIndex(0);
QComboBox::setItemText(0, "");
emit currentModelIndexChanged(QModelIndex());
- // m_treeView->hide();
++
m_groupBox->hide();
}
diff --cc src/commonfrontend/worksheet/WorksheetView.cpp
index 5751fa1,3c815dc..522094d
--- a/src/commonfrontend/worksheet/WorksheetView.cpp
+++ b/src/commonfrontend/worksheet/WorksheetView.cpp
@@@ -271,41 -272,48 +272,48 @@@ 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);
- addInterpolationCurveAction = new KAction(KIcon("labplot-xy-interpolation-curve"), i18n("xy-curve from an interpolation"), 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);
- 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);
+ 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);
++ addInterpolationCurveAction = new QAction(QIcon::fromTheme("labplot-xy-interpolation-curve"), i18n("xy-curve from an interpolation"), 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);
+ 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
- addInterpolationAction = new KAction(KIcon("labplot-xy-interpolation-curve"), i18n("Interpolation"), cartesianPlotAddNewActionGroup);
- addFitAction = new KAction(KIcon("labplot-xy-fit-curve"), i18n("Data fitting"), cartesianPlotAddNewActionGroup);
- addFourierFilterAction = new KAction(KIcon("labplot-xy-fourier_filter-curve"), i18n("Fourier filter"), cartesianPlotAddNewActionGroup);
++ addInterpolationAction = new QAction(QIcon::fromTheme("labplot-xy-interpolation-curve"), i18n("Interpolation"), cartesianPlotAddNewActionGroup);
++ addFitAction = new QAction(QIcon::fromThemeKAction(KIcon("labplot-xy-fit-curve"), i18n("Data fitting"), cartesianPlotAddNewActionGroup);
++ addFourierFilterAction = new QAction(QIcon::fromTheme("labplot-xy-fourier_filter-curve"), i18n("Fourier filter"), cartesianPlotAddNewActionGroup);
+
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*)));
diff --cc src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
index 8eefb4d,d04b044..8b8a5b2
--- a/src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
+++ b/src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
@@@ -39,8 -39,7 +39,8 @@@
#include <QFileDialog>
#include <QImageReader>
#include <KUrlCompletion>
- #include <KLocalizedString>
+
+ #include <QDebug>
#include <math.h>
/*!
@@@ -497,24 -493,22 +494,22 @@@ void CartesianPlotDock::yScaleChanged(i
CartesianPlot::Scale scale = (CartesianPlot::Scale)index;
foreach(CartesianPlot* plot, m_plotList)
- plot->setYScale(scale);
+ plot->setYScale(scale);
}
- // "Scale Breakings"-tab
- void CartesianPlotDock::toggleXBreak(int state){
- bool b = (state==Qt::Checked);
- ui.frameXBreakEdit->setVisible(b);
- ui.lXBreakStart->setVisible(b);
- ui.leXBreakStart->setVisible(b);
- ui.lXBreakEnd->setVisible(b);
- ui.leXBreakEnd->setVisible(b);
- ui.lXBreakPosition->setVisible(b);
- ui.sbXBreakPosition->setVisible(b);
- ui.lXBreakStyle->setVisible(b);
- ui.cbXBreakStyle->setVisible(b);
+ // "Range Breaks"-tab
+ void CartesianPlotDock::toggleXBreak(bool b){
+ ui.frameXBreakEdit->setEnabled(b);
+ ui.leXBreakStart->setEnabled(b);
+ ui.leXBreakEnd->setEnabled(b);
+ ui.sbXBreakPosition->setEnabled(b);
+ ui.cbXBreakStyle->setEnabled(b);
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
+
+ foreach(CartesianPlot* plot, m_plotList)
+ plot->setXRangeBreakingEnabled(b);
}
void CartesianPlotDock::addXBreak() {
@@@ -568,24 -562,33 +563,33 @@@ void CartesianPlotDock::xBreakEndChange
}
void CartesianPlotDock::xBreakPositionChanged(int) {
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
+
+ int index = ui.cbXBreak->currentIndex();
+ CartesianPlot::RangeBreaks breaks = m_plot->xRangeBreaks();
+ if (index==0 && breaks.list.size()==0) {
+ //no range break avaiable yet, create a new one
+ CartesianPlot::RangeBreak b;
+ b.position = ui.sbXBreakPosition->value()/100;
+ breaks.list<<b;
+ } else {
+ breaks.list[index].position = ui.sbXBreakPosition->value()/100;
+ }
+
+ foreach(CartesianPlot* plot, m_plotList)
+ plot->setXRangeBreaks(breaks);
}
- void CartesianPlotDock::toggleYBreak(int state){
- bool b = (state==Qt::Checked);
- ui.frameYBreakEdit->setVisible(b);
- ui.lYBreakStart->setVisible(b);
- ui.leYBreakStart->setVisible(b);
- ui.lYBreakEnd->setVisible(b);
- ui.leYBreakEnd->setVisible(b);
- ui.lYBreakPosition->setVisible(b);
- ui.sbYBreakPosition->setVisible(b);
- ui.lYBreakStyle->setVisible(b);
- ui.cbYBreakStyle->setVisible(b);
+ void CartesianPlotDock::toggleYBreak(bool b){
+ ui.frameYBreakEdit->setEnabled(b);
+ ui.leYBreakStart->setEnabled(b);
+ ui.leYBreakEnd->setEnabled(b);
+ ui.sbYBreakPosition->setEnabled(b);
+ ui.cbYBreakStyle->setEnabled(b);
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
}
void CartesianPlotDock::addYBreak() {
@@@ -944,18 -947,18 +948,18 @@@ void CartesianPlotDock::plotYScaleChang
}
void CartesianPlotDock::plotVisibleChanged(bool on){
- m_initializing = true;
- ui.chkVisible->setChecked(on);
- m_initializing = false;
+ m_initializing = true;
+ ui.chkVisible->setChecked(on);
+ m_initializing = false;
}
- //scale breakings
- void CartesianPlotDock::plotXScaleBreakingChanged(const CartesianPlot::ScaleBreakings& breakings) {
- Q_UNUSED(breakings);
+ //scale breaks
+ void CartesianPlotDock::plotXRangeBreaksChanged(const CartesianPlot::RangeBreaks& breaks) {
+ Q_UNUSED(breaks);
}
- void CartesianPlotDock::plotYScaleBreakingChanged(const CartesianPlot::ScaleBreakings& breakings) {
- Q_UNUSED(breakings);
+ void CartesianPlotDock::plotYRangeBreaksChanged(const CartesianPlot::RangeBreaks& breaks) {
+ Q_UNUSED(breaks);
}
//background
@@@ -1185,53 -1209,52 +1210,52 @@@ void CartesianPlotDock::loadConfig(KCon
}
void CartesianPlotDock::saveConfigAsTemplate(KConfig& config) {
-// KConfigGroup group = config.group( "CartesianPlot" );
-
- //General-tab
- //TODO: decide whether to save properties, not related to the appearance/style of the plot
-// group.writeEntry("Visible", ui.chkVisible->isChecked());
-// group.writeEntry("Left", Worksheet::convertToSceneUnits(ui.sbLeft->value(), Worksheet::Centimeter));
-// group.writeEntry("Top", Worksheet::convertToSceneUnits(ui.sbTop->value(), Worksheet::Centimeter));
-// group.writeEntry("Width", Worksheet::convertToSceneUnits(ui.sbWidth->value(), Worksheet::Centimeter));
-// group.writeEntry("Height", Worksheet::convertToSceneUnits(ui.sbHeight->value(), Worksheet::Centimeter));
+// KConfigGroup group = config.group( "CartesianPlot" );
+
+ //General-tab
+ //TODO: decide whether to save properties, not related to the appearance/style of the plot
+// group.writeEntry("Visible", ui.chkVisible->isChecked());
+// group.writeEntry("Left", Worksheet::convertToSceneUnits(ui.sbLeft->value(), Worksheet::Centimeter));
+// group.writeEntry("Top", Worksheet::convertToSceneUnits(ui.sbTop->value(), Worksheet::Centimeter));
+// group.writeEntry("Width", Worksheet::convertToSceneUnits(ui.sbWidth->value(), Worksheet::Centimeter));
+// group.writeEntry("Height", Worksheet::convertToSceneUnits(ui.sbHeight->value(), Worksheet::Centimeter));
//
-// group.writeEntry("AutoScaleX", ui.chkAutoScaleX->isChecked());
-// group.writeEntry("xMin", ui.kleXMin->text());
-// group.writeEntry("xMax", ui.kleXMax->text());
-// group.writeEntry("xScale", ui.cbXScaling->currentIndex());
+// group.writeEntry("AutoScaleX", ui.chkAutoScaleX->isChecked());
+// group.writeEntry("xMin", ui.kleXMin->text());
+// group.writeEntry("xMax", ui.kleXMax->text());
+// group.writeEntry("xScale", ui.cbXScaling->currentIndex());
//
-// group.writeEntry("AutoScaleY", ui.chkAutoScaleY->isChecked());
-// group.writeEntry("yMin", ui.kleYMin->text());
-// group.writeEntry("yMax", ui.kleYMax->text());
-// group.writeEntry("yScale", ui.cbYScaling->currentIndex());
-
- //Title
- KConfigGroup group = config.group("PlotTitle");
- labelWidget->saveConfig(group);
-
- //Scale breakings
- //TODO
-
- //Background
- group = config.group("PlotArea");
- group.writeEntry("BackgroundType", ui.cbBackgroundType->currentIndex());
- group.writeEntry("BackgroundColorStyle", ui.cbBackgroundColorStyle->currentIndex());
- group.writeEntry("BackgroundImageStyle", ui.cbBackgroundImageStyle->currentIndex());
- group.writeEntry("BackgroundBrushStyle", ui.cbBackgroundBrushStyle->currentIndex());
- group.writeEntry("BackgroundFileName", ui.kleBackgroundFileName->text());
- group.writeEntry("BackgroundFirstColor", ui.kcbBackgroundFirstColor->color());
- group.writeEntry("BackgroundSecondColor", ui.kcbBackgroundSecondColor->color());
- group.writeEntry("BackgroundOpacity", ui.sbBackgroundOpacity->value()/100.0);
- group.writeEntry("HorizontalPadding", Worksheet::convertToSceneUnits(ui.sbPaddingHorizontal->value(), Worksheet::Centimeter));
- group.writeEntry("VerticalPadding", Worksheet::convertToSceneUnits(ui.sbPaddingVertical->value(), Worksheet::Centimeter));
-
- //Border
- group.writeEntry("BorderStyle", ui.cbBorderStyle->currentIndex());
- group.writeEntry("BorderColor", ui.kcbBorderColor->color());
- group.writeEntry("BorderWidth", Worksheet::convertToSceneUnits(ui.sbBorderWidth->value(), Worksheet::Point));
- group.writeEntry("BorderCornerRadius", Worksheet::convertToSceneUnits(ui.sbBorderCornerRadius->value(), Worksheet::Centimeter));
- group.writeEntry("BorderOpacity", ui.sbBorderOpacity->value()/100.0);
-
- config.sync();
+// group.writeEntry("AutoScaleY", ui.chkAutoScaleY->isChecked());
+// group.writeEntry("yMin", ui.kleYMin->text());
+// group.writeEntry("yMax", ui.kleYMax->text());
+// group.writeEntry("yScale", ui.cbYScaling->currentIndex());
+
+ //Title
+ KConfigGroup group = config.group("PlotTitle");
+ labelWidget->saveConfig(group);
+
+ //Scale breakings
+ //TODO
+
+ //Background
+ group = config.group("PlotArea");
+ group.writeEntry("BackgroundType", ui.cbBackgroundType->currentIndex());
+ group.writeEntry("BackgroundColorStyle", ui.cbBackgroundColorStyle->currentIndex());
+ group.writeEntry("BackgroundImageStyle", ui.cbBackgroundImageStyle->currentIndex());
+ group.writeEntry("BackgroundBrushStyle", ui.cbBackgroundBrushStyle->currentIndex());
+ group.writeEntry("BackgroundFileName", ui.kleBackgroundFileName->text());
+ group.writeEntry("BackgroundFirstColor", ui.kcbBackgroundFirstColor->color());
+ group.writeEntry("BackgroundSecondColor", ui.kcbBackgroundSecondColor->color());
+ group.writeEntry("BackgroundOpacity", ui.sbBackgroundOpacity->value()/100.0);
+ group.writeEntry("HorizontalPadding", Worksheet::convertToSceneUnits(ui.sbPaddingHorizontal->value(), Worksheet::Centimeter));
+ group.writeEntry("VerticalPadding", Worksheet::convertToSceneUnits(ui.sbPaddingVertical->value(), Worksheet::Centimeter));
+
+ //Border
+ group.writeEntry("BorderStyle", ui.cbBorderStyle->currentIndex());
+ group.writeEntry("BorderColor", ui.kcbBorderColor->color());
+ group.writeEntry("BorderWidth", Worksheet::convertToSceneUnits(ui.sbBorderWidth->value(), Worksheet::Point));
+ group.writeEntry("BorderCornerRadius", Worksheet::convertToSceneUnits(ui.sbBorderCornerRadius->value(), Worksheet::Centimeter));
+ group.writeEntry("BorderOpacity", ui.sbBorderOpacity->value()/100.0);
+
+ config.sync();
}
-
diff --cc src/kdefrontend/spreadsheet/ExportSpreadsheetDialog.cpp
index f2ac4b5,70ad0b1..5cf8d86
--- a/src/kdefrontend/spreadsheet/ExportSpreadsheetDialog.cpp
+++ b/src/kdefrontend/spreadsheet/ExportSpreadsheetDialog.cpp
@@@ -29,11 -29,7 +29,10 @@@
#include "ExportSpreadsheetDialog.h"
#include <QFileDialog>
- #include <KUrlCompletion>
#include <KMessageBox>
+#include <KLocalizedString>
+#include <KConfigGroup>
+#include <KSharedConfig>
/*!
\class ExportSpreadsheetDialog
@@@ -77,9 -76,10 +79,10 @@@ ExportSpreadsheetDialog::ExportSpreadsh
connect( ui.bOpen, SIGNAL(clicked()), this, SLOT (selectFile()) );
connect( ui.kleFileName, SIGNAL(textChanged(QString)), this, SLOT(fileNameChanged(QString)) );
connect(this,SIGNAL(user1Clicked()), this, SLOT(toggleOptions()));
+ connect(ui.cbFormat, SIGNAL(currentIndexChanged(int)), this, SLOT(formatChanged(int)));
setCaption(i18n("Export spreadsheet"));
- setWindowIcon(KIcon("document-export-database"));
+ setWindowIcon(QIcon::fromTheme("document-export-database"));
//restore saved settings
KConfigGroup conf(KSharedConfig::openConfig(), "ExportSpreadsheetDialog");
diff --cc src/kdefrontend/ui/dockwidgets/cartesianplotdock.ui
index 429107e,ff7608c..788b202
--- a/src/kdefrontend/ui/dockwidgets/cartesianplotdock.ui
+++ b/src/kdefrontend/ui/dockwidgets/cartesianplotdock.ui
@@@ -686,11 -726,11 +726,11 @@@
</property>
</widget>
</item>
- <item row="11" column="2" colspan="3">
- <widget class="QComboBox" name="cbYBreakStyle"/>
+ <item row="5" column="3" colspan="3">
- <widget class="KComboBox" name="cbXBreakStyle"/>
++ <widget class="QComboBox" name="cbXBreakStyle"/>
</item>
- <item row="3" column="2" colspan="3">
- <widget class="QSpinBox" name="sbXBreakPosition">
+ <item row="11" column="3" colspan="3">
+ <widget class="QSpinBox" name="sbYBreakPosition">
<property name="suffix">
<string> %</string>
</property>
@@@ -699,8 -739,8 +739,8 @@@
</property>
</widget>
</item>
- <item row="4" column="2" colspan="3">
- <widget class="QComboBox" name="cbXBreakStyle"/>
+ <item row="12" column="3" colspan="3">
- <widget class="KComboBox" name="cbYBreakStyle"/>
++ <widget class="QComboBox" name="cbYBreakStyle"/>
</item>
</layout>
</widget>
diff --cc src/kdefrontend/widgets/LabelWidget.cpp
index 4f32048,ead296b..4d9bc88
--- a/src/kdefrontend/widgets/LabelWidget.cpp
+++ b/src/kdefrontend/widgets/LabelWidget.cpp
@@@ -48,77 -47,77 +48,77 @@@
*/
// see legacy/LabelWidget.cpp
-LabelWidget::LabelWidget(QWidget *parent): QWidget(parent), m_initializing(false), m_dateTimeMenu(new KMenu(this)) {
+LabelWidget::LabelWidget(QWidget *parent): QWidget(parent), m_initializing(false), m_dateTimeMenu(new QMenu(this)) {
ui.setupUi(this);
- m_dateTimeMenu->setSeparatorsCollapsible(false); //we don't want the first separator to be removed
+ m_dateTimeMenu->setSeparatorsCollapsible(false); //we don't want the first separator to be removed
- QGridLayout* layout =static_cast<QGridLayout*>(this->layout());
- layout->setContentsMargins(2,2,2,2);
- layout->setHorizontalSpacing(2);
- layout->setVerticalSpacing(2);
- ui.kcbFontColor->setColor(Qt::black); // default color
+ QGridLayout* layout =static_cast<QGridLayout*>(this->layout());
+ layout->setContentsMargins(2,2,2,2);
+ layout->setHorizontalSpacing(2);
+ layout->setVerticalSpacing(2);
+ ui.kcbFontColor->setColor(Qt::black); // default color
//Icons
- ui.tbFontBold->setIcon( KIcon("format-text-bold") );
- ui.tbFontItalic->setIcon( KIcon("format-text-italic") );
- ui.tbFontUnderline->setIcon( KIcon("format-text-underline") );
- ui.tbFontStrikeOut->setIcon( KIcon("format-text-strikethrough") );
- ui.tbFontSuperScript->setIcon( KIcon("format-text-superscript") );
- ui.tbFontSubScript->setIcon( KIcon("format-text-subscript") );
- ui.tbSymbols->setIcon( KIcon("labplot-format-text-symbol") );
- ui.tbDateTime->setIcon( KIcon("chronometer") );
+ ui.tbFontBold->setIcon( QIcon::fromTheme("format-text-bold") );
+ ui.tbFontItalic->setIcon( QIcon::fromTheme("format-text-italic") );
+ ui.tbFontUnderline->setIcon( QIcon::fromTheme("format-text-underline") );
+ ui.tbFontStrikeOut->setIcon( QIcon::fromTheme("format-text-strikethrough") );
+ ui.tbFontSuperScript->setIcon( QIcon::fromTheme("format-text-superscript") );
+ ui.tbFontSubScript->setIcon( QIcon::fromTheme("format-text-subscript") );
+ ui.tbSymbols->setIcon( QIcon::fromTheme("labplot-format-text-symbol") );
+ ui.tbDateTime->setIcon( QIcon::fromTheme("chronometer") );
ui.tbTexUsed->setIconSize(QSize(20, 20));
- ui.tbTexUsed->setIcon( KIcon("labplot-TeX-logo") );
+ ui.tbTexUsed->setIcon( QIcon::fromTheme("labplot-TeX-logo") );
- //Positioning and alignment
- ui.cbPositionX->addItem(i18n("left"));
- ui.cbPositionX->addItem(i18n("center"));
- ui.cbPositionX->addItem(i18n("right"));
- ui.cbPositionX->addItem(i18n("custom"));
-
- ui.cbPositionY->addItem(i18n("top"));
- ui.cbPositionY->addItem(i18n("center"));
- ui.cbPositionY->addItem(i18n("bottom"));
- ui.cbPositionY->addItem(i18n("custom"));
-
- ui.cbHorizontalAlignment->addItem(i18n("left"));
- ui.cbHorizontalAlignment->addItem(i18n("center"));
- ui.cbHorizontalAlignment->addItem(i18n("right"));
-
- ui.cbVerticalAlignment->addItem(i18n("top"));
- ui.cbVerticalAlignment->addItem(i18n("center"));
- ui.cbVerticalAlignment->addItem(i18n("bottom"));
-
- //SLOTS
- // text properties
- connect(ui.tbTexUsed, SIGNAL(clicked(bool)), this, SLOT(teXUsedChanged(bool)) );
- connect(ui.teLabel, SIGNAL(textChanged()), this, SLOT(textChanged()));
- connect(ui.teLabel, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
- this, SLOT(charFormatChanged(QTextCharFormat)));
- connect(ui.kcbFontColor, SIGNAL(changed(QColor)), this, SLOT(fontColorChanged(QColor)));
- connect(ui.tbFontBold, SIGNAL(clicked(bool)), this, SLOT(fontBoldChanged(bool)));
- connect(ui.tbFontItalic, SIGNAL(clicked(bool)), this, SLOT(fontItalicChanged(bool)));
- connect(ui.tbFontUnderline, SIGNAL(clicked(bool)), this, SLOT(fontUnderlineChanged(bool)));
- connect(ui.tbFontStrikeOut, SIGNAL(clicked(bool)), this, SLOT(fontStrikeOutChanged(bool)));
- connect(ui.tbFontSuperScript, SIGNAL(clicked(bool)), this, SLOT(fontSuperScriptChanged(bool)));
- connect(ui.tbFontSubScript, SIGNAL(clicked(bool)), this, SLOT(fontSubScriptChanged(bool)));
- connect(ui.tbSymbols, SIGNAL(clicked(bool)), this, SLOT(charMenu()));
- connect(ui.tbDateTime, SIGNAL(clicked(bool)), this, SLOT(dateTimeMenu()));
- connect(m_dateTimeMenu, SIGNAL(triggered(QAction*)), this, SLOT(insertDateTime(QAction*)) );
- connect(ui.kfontRequester, SIGNAL(fontSelected(QFont)), this, SLOT(fontChanged(QFont)));
- connect(ui.sbFontSize, SIGNAL(valueChanged(int)), this, SLOT(fontSizeChanged(int)) );
-
- // geometry
- connect( ui.cbPositionX, SIGNAL(currentIndexChanged(int)), this, SLOT(positionXChanged(int)) );
- connect( ui.cbPositionY, SIGNAL(currentIndexChanged(int)), this, SLOT(positionYChanged(int)) );
- connect( ui.sbPositionX, SIGNAL(valueChanged(double)), this, SLOT(customPositionXChanged(double)) );
- connect( ui.sbPositionY, SIGNAL(valueChanged(double)), this, SLOT(customPositionYChanged(double)) );
- connect( ui.cbHorizontalAlignment, SIGNAL(currentIndexChanged(int)), this, SLOT(horizontalAlignmentChanged(int)) );
- connect( ui.cbVerticalAlignment, SIGNAL(currentIndexChanged(int)), this, SLOT(verticalAlignmentChanged(int)) );
- connect( ui.sbRotation, SIGNAL(valueChanged(int)), this, SLOT(rotationChanged(int)) );
- connect( ui.sbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(offsetXChanged(double)) );
- connect( ui.sbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(offsetYChanged(double)) );
+ //Positioning and alignment
+ ui.cbPositionX->addItem(i18n("left"));
+ ui.cbPositionX->addItem(i18n("center"));
+ ui.cbPositionX->addItem(i18n("right"));
+ ui.cbPositionX->addItem(i18n("custom"));
+
+ ui.cbPositionY->addItem(i18n("top"));
+ ui.cbPositionY->addItem(i18n("center"));
+ ui.cbPositionY->addItem(i18n("bottom"));
+ ui.cbPositionY->addItem(i18n("custom"));
+
+ ui.cbHorizontalAlignment->addItem(i18n("left"));
+ ui.cbHorizontalAlignment->addItem(i18n("center"));
+ ui.cbHorizontalAlignment->addItem(i18n("right"));
+
+ ui.cbVerticalAlignment->addItem(i18n("top"));
+ ui.cbVerticalAlignment->addItem(i18n("center"));
+ ui.cbVerticalAlignment->addItem(i18n("bottom"));
+
+ //SLOTS
+ // text properties
+ connect(ui.tbTexUsed, SIGNAL(clicked(bool)), this, SLOT(teXUsedChanged(bool)) );
+ connect(ui.teLabel, SIGNAL(textChanged()), this, SLOT(textChanged()));
+ connect(ui.teLabel, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
+ this, SLOT(charFormatChanged(QTextCharFormat)));
+ connect(ui.kcbFontColor, SIGNAL(changed(QColor)), this, SLOT(fontColorChanged(QColor)));
+ connect(ui.tbFontBold, SIGNAL(clicked(bool)), this, SLOT(fontBoldChanged(bool)));
+ connect(ui.tbFontItalic, SIGNAL(clicked(bool)), this, SLOT(fontItalicChanged(bool)));
+ connect(ui.tbFontUnderline, SIGNAL(clicked(bool)), this, SLOT(fontUnderlineChanged(bool)));
+ connect(ui.tbFontStrikeOut, SIGNAL(clicked(bool)), this, SLOT(fontStrikeOutChanged(bool)));
+ connect(ui.tbFontSuperScript, SIGNAL(clicked(bool)), this, SLOT(fontSuperScriptChanged(bool)));
+ connect(ui.tbFontSubScript, SIGNAL(clicked(bool)), this, SLOT(fontSubScriptChanged(bool)));
+ connect(ui.tbSymbols, SIGNAL(clicked(bool)), this, SLOT(charMenu()));
+ connect(ui.tbDateTime, SIGNAL(clicked(bool)), this, SLOT(dateTimeMenu()));
+ connect(m_dateTimeMenu, SIGNAL(triggered(QAction*)), this, SLOT(insertDateTime(QAction*)) );
+ connect(ui.kfontRequester, SIGNAL(fontSelected(QFont)), this, SLOT(fontChanged(QFont)));
+ connect(ui.sbFontSize, SIGNAL(valueChanged(int)), this, SLOT(fontSizeChanged(int)) );
+
+ // geometry
+ connect( ui.cbPositionX, SIGNAL(currentIndexChanged(int)), this, SLOT(positionXChanged(int)) );
+ connect( ui.cbPositionY, SIGNAL(currentIndexChanged(int)), this, SLOT(positionYChanged(int)) );
+ connect( ui.sbPositionX, SIGNAL(valueChanged(double)), this, SLOT(customPositionXChanged(double)) );
+ connect( ui.sbPositionY, SIGNAL(valueChanged(double)), this, SLOT(customPositionYChanged(double)) );
+ connect( ui.cbHorizontalAlignment, SIGNAL(currentIndexChanged(int)), this, SLOT(horizontalAlignmentChanged(int)) );
+ connect( ui.cbVerticalAlignment, SIGNAL(currentIndexChanged(int)), this, SLOT(verticalAlignmentChanged(int)) );
+ connect( ui.sbRotation, SIGNAL(valueChanged(int)), this, SLOT(rotationChanged(int)) );
- connect( ui.sbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(offsetXChanged(double)) );
- connect( ui.sbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(offsetYChanged(double)) );
++ connect( ui.sbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(offsetXChanged(double)) );
++ connect( ui.sbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(offsetYChanged(double)) );
connect( ui.chbVisible, SIGNAL(clicked(bool)), this, SLOT(visibilityChanged(bool)) );
@@@ -128,33 -127,33 +128,33 @@@
}
void LabelWidget::setLabels(QList<TextLabel*> labels){
- m_labelsList = labels;
- m_label = labels.first();
+ m_labelsList = labels;
+ m_label = labels.first();
- ui.lOffsetX->hide();
- ui.lOffsetY->hide();
+ ui.lOffsetX->hide();
+ ui.lOffsetY->hide();
- ui.sbOffsetX->hide();
- ui.sbOffsetY->hide();
+ ui.sbOffsetX->hide();
+ ui.sbOffsetY->hide();
- this->load();
- initConnections();
+ this->load();
+ initConnections();
}
void LabelWidget::setAxes(QList<Axis*> axes){
- m_labelsList.clear();
- foreach(Axis* axis, axes) {
- m_labelsList.append(axis->title());
- connect(axis, SIGNAL(titleOffsetXChanged(float)), this, SLOT(labelOffsetxChanged(float)) );
- connect(axis, SIGNAL(titleOffsetYChanged(float)), this, SLOT(labelOffsetyChanged(float)) );
- connect(axis->title(), SIGNAL(rotationAngleChanged(float)), this, SLOT(labelRotationAngleChanged(float)) );
- }
+ m_labelsList.clear();
+ foreach(Axis* axis, axes) {
+ m_labelsList.append(axis->title());
+ connect(axis, SIGNAL(titleOffsetXChanged(float)), this, SLOT(labelOffsetxChanged(float)) );
+ connect(axis, SIGNAL(titleOffsetYChanged(float)), this, SLOT(labelOffsetyChanged(float)) );
+ connect(axis->title(), SIGNAL(rotationAngleChanged(float)), this, SLOT(labelRotationAngleChanged(float)) );
+ }
- m_axesList = axes;
- m_label = m_labelsList.first();
+ m_axesList = axes;
+ m_label = m_labelsList.first();
- this->load();
- initConnections();
+ this->load();
+ initConnections();
}
void LabelWidget::initConnections() {
@@@ -523,25 -522,27 +523,27 @@@ void LabelWidget::rotationChanged(int v
}
void LabelWidget::offsetXChanged(double value){
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
- foreach(Axis* axis, m_axesList)
- axis->setTitleOffsetX( Worksheet::convertToSceneUnits(value, Worksheet::Point) );
+ foreach(Axis* axis, m_axesList)
+ axis->setTitleOffsetX( Worksheet::convertToSceneUnits(value, Worksheet::Point) );
}
+
void LabelWidget::offsetYChanged(double value){
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
- foreach(Axis* axis, m_axesList)
- axis->setTitleOffsetY( Worksheet::convertToSceneUnits(value, Worksheet::Point) );
+ foreach(Axis* axis, m_axesList)
+ axis->setTitleOffsetY( Worksheet::convertToSceneUnits(value, Worksheet::Point) );
}
+
void LabelWidget::visibilityChanged(bool state){
- if (m_initializing)
- return;
+ if (m_initializing)
+ return;
- foreach(TextLabel* label, m_labelsList)
- label->setVisible(state);
+ foreach(TextLabel* label, m_labelsList)
+ label->setVisible(state);
}
//*********************************************************
@@@ -704,11 -704,11 +705,11 @@@ void LabelWidget::loadConfig(KConfigGro
ui.sbOffsetX->setValue( Worksheet::convertFromSceneUnits(group.readEntry("OffsetX", m_axesList.first()->titleOffsetX()), Worksheet::Point) );
ui.sbOffsetY->setValue( Worksheet::convertFromSceneUnits(group.readEntry("OffsetY", m_axesList.first()->titleOffsetY()), Worksheet::Point) );
}
- ui.cbHorizontalAlignment->setCurrentIndex( group.readEntry("HorizontalAlignment", (int) m_label->horizontalAlignment()) );
- ui.cbVerticalAlignment->setCurrentIndex( group.readEntry("VerticalAlignment", (int) m_label->verticalAlignment()) );
- ui.sbRotation->setValue( group.readEntry("Rotation", m_label->rotationAngle()) );
+ ui.cbHorizontalAlignment->setCurrentIndex( group.readEntry("HorizontalAlignment", (int) m_label->horizontalAlignment()) );
+ ui.cbVerticalAlignment->setCurrentIndex( group.readEntry("VerticalAlignment", (int) m_label->verticalAlignment()) );
+ ui.sbRotation->setValue( group.readEntry("Rotation", m_label->rotationAngle()) );
- m_initializing = false;
+ m_initializing = false;
}
void LabelWidget::saveConfig(KConfigGroup &group) {
diff --cc src/kdefrontend/worksheet/ExportWorksheetDialog.cpp
index f59e21d,a568acb..e372742
--- a/src/kdefrontend/worksheet/ExportWorksheetDialog.cpp
+++ b/src/kdefrontend/worksheet/ExportWorksheetDialog.cpp
@@@ -29,13 -29,8 +29,12 @@@
#include "ExportWorksheetDialog.h"
#include <QFileDialog>
- #include <KUrlCompletion>
#include <KMessageBox>
#include <QDesktopWidget>
+#include <KLocalizedString>
+#include <KSharedConfig>
+#include <QDebug>
+#include <QWidget>
/*!
\class ExportWorksheetDialog
@@@ -48,15 -44,15 +48,14 @@@ ExportWorksheetDialog::ExportWorksheetD
mainWidget = new QWidget(this);
ui.setupUi(mainWidget);
- KUrlCompletion *comp = new KUrlCompletion();
- ui.kleFileName->setCompletionObject(comp);
+ ui.kleFileName->setCompletionObject(urlCompletion);
- ui.bOpen->setIcon( KIcon("document-open") );
+ ui.bOpen->setIcon( QIcon::fromTheme("document-open") );
- ui.cbFormat->addItem(KIcon("application-pdf"), "Portable data format (PDF)");
- ui.cbFormat->addItem(KIcon("image-x-eps"), "Encapsulated PostScript (EPS)");
- ui.cbFormat->addItem(KIcon("image-svg+xml"), "Scalable Vector Graphics (SVG)");
+ ui.cbFormat->addItem(QIcon::fromTheme("application-pdf"), "Portable data format (PDF)");
+ ui.cbFormat->addItem(QIcon::fromTheme("image-svg+xml"), "Scalable Vector Graphics (SVG)");
ui.cbFormat->insertSeparator(3);
- ui.cbFormat->addItem(KIcon("image-x-generic"), "Portable Network Graphics (PNG)");
+ ui.cbFormat->addItem(QIcon::fromTheme("image-x-generic"), "Portable Network Graphics (PNG)");
ui.cbExportArea->addItem(i18n("Object's bounding box"));
ui.cbExportArea->addItem(i18n("Current selection"));
More information about the kde-doc-english
mailing list