Git commit cbe3b1dcf87f94536d981fc76fe68ee37305b2d9 by Alexander Semke.
Committed on 16/03/2016 at 21:09.
Pushed by asemke into branch 'frameworks'.

Merge branch 'master' into frameworks

M  +71   -81   doc/index.docbook
M  +2    -4    src/backend/matrix/Matrix.cpp
M  +8    -5    src/commonfrontend/datapicker/DatapickerImageView.cpp
M  +107  -96   src/commonfrontend/worksheet/WorksheetView.cpp
M  +1    -0    src/commonfrontend/worksheet/WorksheetView.h
M  +1    -1    src/kdefrontend/GuiTools.cpp
M  +205  -188  src/kdefrontend/MainWin.cpp
M  +40   -33   src/kdefrontend/MainWin.h
M  +1    -1    src/kdefrontend/SettingsDialog.cpp
M  +8    -8    src/kdefrontend/datasources/ImportFileDialog.cpp
M  +26   -27   src/kdefrontend/datasources/ImportFileDialog.h
M  +51   -50   src/kdefrontend/datasources/ImportFileWidget.cpp
M  +1    -1    src/kdefrontend/dockwidgets/AxisDock.cpp
M  +105  -104  src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
M  +2    -0    src/kdefrontend/dockwidgets/CartesianPlotLegendDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/ColumnDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/MatrixDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/SpreadsheetDock.cpp
M  +1    -1    src/kdefrontend/dockwidgets/WorksheetDock.cpp
M  +7    -2    src/kdefrontend/dockwidgets/XYCurveDock.cpp
M  +6    -1    src/kdefrontend/dockwidgets/XYEquationCurveDock.cpp
M  +27   -18   src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
M  +1    -0    src/kdefrontend/matrix/MatrixFunctionDialog.cpp
M  +1    -0    src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
M  +5    -5    src/kdefrontend/widgets/DatapickerImageWidget.cpp
M  +1    -1    src/kdefrontend/widgets/FitOptionsWidget.cpp
M  +1    -1    src/kdefrontend/widgets/FitParametersWidget.cpp
M  +2    -2    src/kdefrontend/widgets/LabelWidget.cpp

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

diff --cc src/commonfrontend/worksheet/WorksheetView.cpp
index 9a81408,69aabce..18877b2
--- a/src/commonfrontend/worksheet/WorksheetView.cpp
+++ b/src/commonfrontend/worksheet/WorksheetView.cpp
@@@ -73,36 -73,37 +73,37 @@@ WorksheetView::WorksheetView(Worksheet
        m_fadeInTimeLine(0),
        m_fadeOutTimeLine(0),
        tbNewCartesianPlot(0),
-       tbZoom(0) {
+     tbZoom(0),
+     tbMagnification(0) {
  
 -      setScene(m_worksheet->scene());
 +    setScene(m_worksheet->scene());
  
 -      setRenderHint(QPainter::Antialiasing);
 -      setRubberBandSelectionMode(Qt::ContainsItemBoundingRect);
 -      setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
 -      setResizeAnchor(QGraphicsView::AnchorViewCenter);
 -      setMinimumSize(16, 16);
 -      setFocusPolicy(Qt::StrongFocus);
 +    setRenderHint(QPainter::Antialiasing);
 +    setRubberBandSelectionMode(Qt::ContainsItemBoundingRect);
 +    setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
 +    setResizeAnchor(QGraphicsView::AnchorViewCenter);
 +    setMinimumSize(16, 16);
 +    setFocusPolicy(Qt::StrongFocus);
  
 -      if (m_worksheet->useViewSize()) {
 -              setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 -              setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 -      }
 +    if (m_worksheet->useViewSize()) {
 +        setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 +        setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 +    }
  
 -      viewport()->setAttribute( Qt::WA_OpaquePaintEvent );
 -      viewport()->setAttribute( Qt::WA_NoSystemBackground );
 +    viewport()->setAttribute( Qt::WA_OpaquePaintEvent );
 +    viewport()->setAttribute( Qt::WA_NoSystemBackground );
  //    setAcceptDrops( true );
 -      setCacheMode(QGraphicsView::CacheBackground);
 +    setCacheMode(QGraphicsView::CacheBackground);
  
 -      m_gridSettings.style = WorksheetView::NoGrid;
 +    m_gridSettings.style = WorksheetView::NoGrid;
  
 -      initActions();
 -      initMenus();
 -      selectionModeAction->setChecked(true);
 -      handleCartesianPlotActions();
 +    initActions();
 +    initMenus();
 +    selectionModeAction->setChecked(true);
 +    handleCartesianPlotActions();
  
 -      changeZoom(zoomOriginAction);
 -      currentZoomAction=zoomInViewAction;
 +    changeZoom(zoomOriginAction);
 +    currentZoomAction=zoomInViewAction;
  
        currentMagnificationAction = noMagnificationAction;
  
@@@ -526,41 -527,20 +527,20 @@@ void WorksheetView::setScene(QGraphicsS
  }
  
  void WorksheetView::drawForeground(QPainter* painter, const QRectF& rect) {
 -      if (m_mouseMode==ZoomSelectionMode && m_selectionBandIsShown) {
 -              painter->save();
 -              const QRectF& selRect = mapToScene(QRect(m_selectionStart, 
m_selectionEnd).normalized()).boundingRect();
 -              painter->setPen(QPen(Qt::black, 5/transform().m11()));
 -              painter->drawRect(selRect);
 -              painter->setBrush(Qt::blue);
 -              painter->setOpacity(0.2);
 -              painter->drawRect(selRect);
 -              painter->restore();
 -      }
 -      QGraphicsView::drawForeground(painter, rect);
 +    if (m_mouseMode==ZoomSelectionMode && m_selectionBandIsShown) {
 +        painter->save();
 +        const QRectF& selRect = mapToScene(QRect(m_selectionStart, 
m_selectionEnd).normalized()).boundingRect();
 +        painter->setPen(QPen(Qt::black, 5/transform().m11()));
 +        painter->drawRect(selRect);
 +        painter->setBrush(Qt::blue);
 +        painter->setOpacity(0.2);
 +        painter->drawRect(selRect);
 +        painter->restore();
 +    }
 +    QGraphicsView::drawForeground(painter, rect);
  }
  
- void WorksheetView::drawBackground(QPainter* painter, const QRectF& rect) {
-     painter->save();
- 
-     //painter->setRenderHint(QPainter::Antialiasing);
-     QRectF scene_rect = sceneRect();
- 
-     if (!m_worksheet->useViewSize()) {
-         // background
-         if (!scene_rect.contains(rect))
-             painter->fillRect(rect, Qt::lightGray);
- 
-         //shadow
-         int shadowSize = scene_rect.width()*0.02;
-         QRectF rightShadowRect(scene_rect.right(), scene_rect.top() + 
shadowSize,
-                                             shadowSize, scene_rect.height());
-         QRectF bottomShadowRect(scene_rect.left() + shadowSize, 
scene_rect.bottom(),
-                                             scene_rect.width(), shadowSize);
- 
-         painter->fillRect(rightShadowRect.intersected(rect), Qt::darkGray);
-         painter->fillRect(bottomShadowRect.intersected(rect), Qt::darkGray);
-     }
- 
+ void WorksheetView::drawBackgroundItems(QPainter* painter, const QRectF& 
scene_rect) {
        // canvas
        painter->setOpacity(m_worksheet->backgroundOpacity());
        if (m_worksheet->backgroundType() == PlotArea::Color){
@@@ -643,51 -623,74 +623,74 @@@
                painter->drawRect(scene_rect);
        }
  
-   //grid
-     if (m_gridSettings.style != WorksheetView::NoGrid){
-         QColor c=m_gridSettings.color;
-         c.setAlphaF(m_gridSettings.opacity);
-         painter->setPen(c);
- 
-         qreal x, y;
-         qreal left = scene_rect.left();
-         qreal right = scene_rect.right();
-         qreal top = scene_rect.top();
-         qreal bottom = scene_rect.bottom();
- 
-         if (m_gridSettings.style==WorksheetView::LineGrid){
-             QLineF line;
- 
-             //horizontal lines
-             y = top + m_gridSettings.verticalSpacing;
-             while (y < bottom) {
-                 line.setLine( left, y,  right, y );
-                 painter->drawLine(line);
-                 y += m_gridSettings.verticalSpacing;
-             }
+       //grid
+       if (m_gridSettings.style != WorksheetView::NoGrid){
+               QColor c=m_gridSettings.color;
+               c.setAlphaF(m_gridSettings.opacity);
+               painter->setPen(c);
+ 
+               qreal x, y;
+               qreal left = scene_rect.left();
+               qreal right = scene_rect.right();
+               qreal top = scene_rect.top();
+               qreal bottom = scene_rect.bottom();
+ 
+               if (m_gridSettings.style==WorksheetView::LineGrid){
+                       QLineF line;
+ 
+                       //horizontal lines
+                       y = top + m_gridSettings.verticalSpacing;
+                       while (y < bottom) {
+                               line.setLine( left, y,  right, y );
+                               painter->drawLine(line);
+                               y += m_gridSettings.verticalSpacing;
+                       }
  
-             //vertical lines
-             x = left + m_gridSettings.horizontalSpacing;
-             while (x < right) {
-                 line.setLine( x, top,  x, bottom );
-                 painter->drawLine(line);
-                 x += m_gridSettings.horizontalSpacing;
-             }
-         }else{ //DotGrid
-             y = top + m_gridSettings.verticalSpacing;
-             while (y < bottom){
-                 x = left;// + m_gridSettings.horizontalSpacing;
-                 while (x < right){
-                     x += m_gridSettings.horizontalSpacing;
-                     painter->drawPoint(x, y);
-                 }
-                 y += m_gridSettings.verticalSpacing;
-             }
-         }
-     }
+                       //vertical lines
+                       x = left + m_gridSettings.horizontalSpacing;
+                       while (x < right) {
+                               line.setLine( x, top,  x, bottom );
+                               painter->drawLine(line);
+                               x += m_gridSettings.horizontalSpacing;
+                       }
+               }else{ //DotGrid
+                       y = top + m_gridSettings.verticalSpacing;
+                       while (y < bottom){
+                               x = left;// + m_gridSettings.horizontalSpacing;
+                               while (x < right){
+                                       x += m_gridSettings.horizontalSpacing;
+                                       painter->drawPoint(x, y);
+                               }
+                               y += m_gridSettings.verticalSpacing;
+                       }
+               }
+       }
+ }
+ 
+ void WorksheetView::drawBackground(QPainter* painter, const QRectF& rect) {
+       painter->save();
+ 
+       //painter->setRenderHint(QPainter::Antialiasing);
+       QRectF scene_rect = sceneRect();
+ 
+       if (!m_worksheet->useViewSize()) {
+               // background
+               if (!scene_rect.contains(rect))
+                       painter->fillRect(rect, Qt::lightGray);
+ 
+               //shadow
+               int shadowSize = scene_rect.width()*0.02;
+               QRectF rightShadowRect(scene_rect.right(), scene_rect.top() + 
shadowSize, shadowSize, scene_rect.height());
+               QRectF bottomShadowRect(scene_rect.left() + shadowSize, 
scene_rect.bottom(), scene_rect.width(), shadowSize);
+ 
+               painter->fillRect(rightShadowRect.intersected(rect), 
Qt::darkGray);
+               painter->fillRect(bottomShadowRect.intersected(rect), 
Qt::darkGray);
+       }
+ 
+       drawBackgroundItems(painter, scene_rect);
  
 -      invalidateScene(rect, QGraphicsScene::BackgroundLayer);
 -      painter->restore();
 +    invalidateScene(rect, QGraphicsScene::BackgroundLayer);
 +    painter->restore();
  }
  
  
//##############################################################################
@@@ -1236,120 -1238,119 +1239,119 @@@ void WorksheetView::selectionChanged()
  
  //check whether we have cartesian plots selected and activate/deactivate
  void WorksheetView::handleCartesianPlotActions() {
 -      bool plot = false;
 -      if (m_cartesianPlotActionMode == ApplyActionToSelection) {
 -              //check whether we have cartesian plots selected
 -              foreach (QGraphicsItem* item , m_selectedItems) {
 -                      if (item->data(0).toInt() == 
WorksheetElement::NameCartesianPlot) {
 -                              plot = true;
 -                              break;
 -                      }
 -              }
 -      } else {
 -              //actions are applied to all available plots -> check whether 
we have plots
 -              plot = (m_worksheet->children<CartesianPlot>().size() != 0);
 -      }
 +    bool plot = false;
 +    if (m_cartesianPlotActionMode == ApplyActionToSelection) {
 +        //check whether we have cartesian plots selected
 +        foreach (QGraphicsItem* item , m_selectedItems) {
 +            if (item->data(0).toInt() == WorksheetElement::NameCartesianPlot) 
{
 +                plot = true;
 +                break;
 +            }
 +        }
 +    } else {
 +        //actions are applied to all available plots -> check whether we have 
plots
 +        plot = (m_worksheet->children<CartesianPlot>().size() != 0);
 +    }
  
 -      cartesianPlotSelectionModeAction->setEnabled(plot);
 -      cartesianPlotZoomSelectionModeAction->setEnabled(plot);
 -      cartesianPlotZoomXSelectionModeAction->setEnabled(plot);
 -      cartesianPlotZoomYSelectionModeAction->setEnabled(plot);
 -
 -      addCurveAction->setEnabled(plot);
 -      addEquationCurveAction->setEnabled(plot);
 -      addFitCurveAction->setEnabled(plot);
 -      addHorizontalAxisAction->setEnabled(plot);
 -      addVerticalAxisAction->setEnabled(plot);
 -      addLegendAction->setEnabled(plot);
 -
 -      scaleAutoXAction->setEnabled(plot);
 -      scaleAutoYAction->setEnabled(plot);
 -      scaleAutoAction->setEnabled(plot);
 -      zoomInAction->setEnabled(plot);
 -      zoomOutAction->setEnabled(plot);
 -      zoomInXAction->setEnabled(plot);
 -      zoomOutXAction->setEnabled(plot);
 -      zoomInYAction->setEnabled(plot);
 -      zoomOutYAction->setEnabled(plot);
 -      shiftLeftXAction->setEnabled(plot);
 -      shiftRightXAction->setEnabled(plot);
 -      shiftUpYAction->setEnabled(plot);
 -      shiftDownYAction->setEnabled(plot);
 +    cartesianPlotSelectionModeAction->setEnabled(plot);
 +    cartesianPlotZoomSelectionModeAction->setEnabled(plot);
 +    cartesianPlotZoomXSelectionModeAction->setEnabled(plot);
 +    cartesianPlotZoomYSelectionModeAction->setEnabled(plot);
 +
 +    addCurveAction->setEnabled(plot);
 +    addEquationCurveAction->setEnabled(plot);
 +    addFitCurveAction->setEnabled(plot);
 +    addHorizontalAxisAction->setEnabled(plot);
 +    addVerticalAxisAction->setEnabled(plot);
 +    addLegendAction->setEnabled(plot);
 +
 +    scaleAutoXAction->setEnabled(plot);
 +    scaleAutoYAction->setEnabled(plot);
 +    scaleAutoAction->setEnabled(plot);
 +    zoomInAction->setEnabled(plot);
 +    zoomOutAction->setEnabled(plot);
 +    zoomInXAction->setEnabled(plot);
 +    zoomOutXAction->setEnabled(plot);
 +    zoomInYAction->setEnabled(plot);
 +    zoomOutYAction->setEnabled(plot);
 +    shiftLeftXAction->setEnabled(plot);
 +    shiftRightXAction->setEnabled(plot);
 +    shiftUpYAction->setEnabled(plot);
 +    shiftDownYAction->setEnabled(plot);
  }
  
- void WorksheetView::exportToFile(const QString& path, const ExportFormat 
format,
-                                  const ExportArea area, const bool 
background, const int resolution) {
-     QRectF sourceRect;
- 
-     //determine the rectangular to print
-     if (area==WorksheetView::ExportBoundingBox){
-         sourceRect = scene()->itemsBoundingRect();
-     }else if (area==WorksheetView::ExportSelection){
-         //TODO doesn't work: rect = scene()->selectionArea().boundingRect();
-         foreach(QGraphicsItem* item, m_selectedItems) {
-             sourceRect = sourceRect.united( 
item->mapToScene(item->boundingRect()).boundingRect() );
-         }
-     }else{
-         sourceRect = scene()->sceneRect();
-     }
+ void WorksheetView::exportToFile(const QString& path, const ExportFormat 
format, const ExportArea area, const bool background, const int resolution) {
+       QRectF sourceRect;
+ 
+       //determine the rectangular to print
+       if (area==WorksheetView::ExportBoundingBox){
+               sourceRect = scene()->itemsBoundingRect();
+       }else if (area==WorksheetView::ExportSelection){
+               //TODO doesn't work: rect = 
scene()->selectionArea().boundingRect();
+               foreach(QGraphicsItem* item, m_selectedItems) {
+                       sourceRect = sourceRect.united( 
item->mapToScene(item->boundingRect()).boundingRect() );
+               }
+       }else{
+               sourceRect = scene()->sceneRect();
+       }
  
 -      //print
 -      if (format==WorksheetView::Pdf || format==WorksheetView::Eps){
 -              QPrinter printer(QPrinter::HighResolution);
 -              if (format==WorksheetView::Pdf)
 -                      printer.setOutputFormat(QPrinter::PdfFormat);
 -              else
 -                      printer.setOutputFormat(QPrinter::PostScriptFormat);
 -
 -              printer.setOutputFileName(path);
 -              int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 -              int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 -              printer.setPaperSize( QSizeF(w, h), QPrinter::Millimeter);
 -              printer.setPageMargins(0,0,0,0, QPrinter::Millimeter);
 -              printer.setPrintRange(QPrinter::PageRange);
 -              printer.setCreator( QString("LabPlot ") + LVERSION );
 -
 -              QPainter painter(&printer);
 -              painter.setRenderHint(QPainter::Antialiasing);
 -              QRectF targetRect(0, 0, 
painter.device()->width(),painter.device()->height());
 -              painter.begin(&printer);
 -              exportPaint(&painter, targetRect, sourceRect, background);
 -              painter.end();
 -      }else if (format==WorksheetView::Svg){
 -              QSvgGenerator generator;
 -              generator.setFileName(path);
 -              int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 -              int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 -              w = w*QApplication::desktop()->physicalDpiX()/25.4;
 -              h = h*QApplication::desktop()->physicalDpiY()/25.4;
 -
 -              generator.setSize(QSize(w, h));
 -              QRectF targetRect(0, 0, w, h);
 -              generator.setViewBox(targetRect);
 -
 -              QPainter painter;
 -              painter.begin(&generator);
 -              exportPaint(&painter, targetRect, sourceRect, background);
 -              painter.end();
 -      }else{
 -              //PNG
 -              //TODO add all formats supported by Qt in QImage
 -              int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 -              int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 -              w = w*resolution/25.4;
 -              h = h*resolution/25.4;
 -              QImage image(QSize(w, h), QImage::Format_ARGB32_Premultiplied);
 -              image.fill(Qt::transparent);
 -              QRectF targetRect(0, 0, w, h);
 -
 -              QPainter painter;
 -              painter.begin(&image);
 -              painter.setRenderHint(QPainter::Antialiasing);
 -              exportPaint(&painter, targetRect, sourceRect, background);
 -              painter.end();
 -
 -              image.save(path, "png");
 -      }
 +    //print
 +    if (format==WorksheetView::Pdf || format==WorksheetView::Eps){
 +        QPrinter printer(QPrinter::HighResolution);
 +        if (format==WorksheetView::Pdf)
 +            printer.setOutputFormat(QPrinter::PdfFormat);
 +        else
 +//            printer.setOutputFormat(QPrinter::PostScriptFormat);
 +
 +        printer.setOutputFileName(path);
 +        int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 +        int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 +        printer.setPaperSize( QSizeF(w, h), QPrinter::Millimeter);
 +        printer.setPageMargins(0,0,0,0, QPrinter::Millimeter);
 +        printer.setPrintRange(QPrinter::PageRange);
 +        printer.setCreator( QString("LabPlot ") + LVERSION );
 +
 +        QPainter painter(&printer);
 +        painter.setRenderHint(QPainter::Antialiasing);
 +        QRectF targetRect(0, 0, 
painter.device()->width(),painter.device()->height());
 +        painter.begin(&printer);
 +        exportPaint(&painter, targetRect, sourceRect, background);
 +        painter.end();
 +    }else if (format==WorksheetView::Svg){
 +        QSvgGenerator generator;
 +        generator.setFileName(path);
 +        int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 +        int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 +        w = w*QApplication::desktop()->physicalDpiX()/25.4;
 +        h = h*QApplication::desktop()->physicalDpiY()/25.4;
 +
 +        generator.setSize(QSize(w, h));
 +        QRectF targetRect(0, 0, w, h);
 +        generator.setViewBox(targetRect);
 +
 +        QPainter painter;
 +        painter.begin(&generator);
 +        exportPaint(&painter, targetRect, sourceRect, background);
 +        painter.end();
 +    }else{
 +        //PNG
 +        //TODO add all formats supported by Qt in QImage
 +        int w = Worksheet::convertFromSceneUnits(sourceRect.width(), 
Worksheet::Millimeter);
 +        int h = Worksheet::convertFromSceneUnits(sourceRect.height(), 
Worksheet::Millimeter);
 +        w = w*resolution/25.4;
 +        h = h*resolution/25.4;
 +        QImage image(QSize(w, h), QImage::Format_ARGB32_Premultiplied);
 +        image.fill(Qt::transparent);
 +        QRectF targetRect(0, 0, w, h);
 +
 +        QPainter painter;
 +        painter.begin(&image);
 +        painter.setRenderHint(QPainter::Antialiasing);
 +        exportPaint(&painter, targetRect, sourceRect, background);
 +        painter.end();
 +
 +        image.save(path, "png");
 +    }
  }
  
  void WorksheetView::exportPaint(QPainter* painter, const QRectF& targetRect, 
const QRectF& sourceRect, const bool background) {
diff --cc src/kdefrontend/MainWin.cpp
index 7b7651c,b3c23c1..37dfc20
--- a/src/kdefrontend/MainWin.cpp
+++ b/src/kdefrontend/MainWin.cpp
@@@ -58,7 -58,6 +58,8 @@@
  #include <QStackedWidget>
  #include <QUndoStack>
  #include <QCloseEvent>
 +#include <QFileDialog>
++#include <QMimeData>
  #include <QElapsedTimer>
  #include <QDebug>
  
@@@ -69,15 -69,15 +70,15 @@@
  #include <KMessageBox>
  #include <KToolBar>
  #include <KStatusBar>
 -#include <KLocale>
 +#include <KLocalizedString>
  #include <KFilterDev>
  
-  /*!
-       \class MainWin
-       \brief Main application window.
+ /*!
+ \class MainWin
+ \brief Main application window.
  
-       \ingroup kdefrontend
-  */
+ \ingroup kdefrontend
+ */
  
  MainWin::MainWin(QWidget *parent, const QString& filename)
        : KXmlGuiWindow(parent),
@@@ -120,9 -121,9 +122,9 @@@ MainWin::~MainWin() 
  //    qDebug()<<"SAVED 
m_recentProjectsAction->urls()="<<m_recentProjectsAction->urls()<<endl;
        //etc...
  
 -      KGlobal::config()->sync();
 +      KSharedConfig::openConfig()->sync();
  
-       if (m_project!=0){
+       if (m_project!=0) {
                m_mdiArea->closeAllSubWindows();
                disconnect(m_project, 0, this, 0);
                delete m_aspectTreeModel;
@@@ -151,13 -152,13 +153,13 @@@ void MainWin::initGUI(const QString& fi
        QFont font;
        font.setFamily(font.defaultFamily());
        QFontMetrics fm(font);
-       statusBar()->setFixedHeight(fm.height());
+       statusBar()->setFixedHeight(fm.height()+5);
  
        //load recently used projects
 -      m_recentProjectsAction->loadEntries( KGlobal::config()->group("Recent 
Files") );
 +      m_recentProjectsAction->loadEntries( 
KSharedConfig::openConfig()->group("Recent Files") );
  
        //set the view mode of the mdi area
 -      KConfigGroup group = KGlobal::config()->group("General");
 +      KConfigGroup group = KSharedConfig::openConfig()->group("General");
        int viewMode = group.readEntry("ViewMode", 0);
        if (viewMode == 1) {
                m_mdiArea->setViewMode(QMdiArea::TabbedView);
@@@ -216,11 -218,11 +218,12 @@@ void MainWin::initActions() 
        actionCollection()->addAction("new_workbook", m_newWorkbookAction);
        connect(m_newWorkbookAction, SIGNAL(triggered()),SLOT(newWorkbook()));
  
-         m_newDatapickerAction = new 
QAction(QIcon::fromTheme("color-picker-black"), i18n("Datapicker"), this);
-         actionCollection()->addAction("new_datapicker", 
m_newDatapickerAction);
-         connect(m_newDatapickerAction, 
SIGNAL(triggered()),SLOT(newDatapicker()));
-         
 -      m_newDatapickerAction = new 
KAction(KIcon("color-picker-black"),i18n("Datapicker"),this);
++      m_newDatapickerAction = new 
QAction(QIcon::fromTheme("color-picker-black"), i18n("Datapicker"), this);
+       actionCollection()->addAction("new_datapicker", m_newDatapickerAction);
+       connect(m_newDatapickerAction, 
SIGNAL(triggered()),SLOT(newDatapicker()));
+ 
 -      m_newSpreadsheetAction = new 
KAction(KIcon("labplot-spreadsheet-new"),i18n("Spreadsheet"),this);
 +      m_newSpreadsheetAction = new 
QAction(QIcon::fromTheme("labplot-spreadsheet-new"),i18n("Spreadsheet"),this);
++
  //    m_newSpreadsheetAction->setShortcut(Qt::CTRL+Qt::Key_Equal);
        actionCollection()->addAction("new_spreadsheet", 
m_newSpreadsheetAction);
        connect(m_newSpreadsheetAction, 
SIGNAL(triggered()),SLOT(newSpreadsheet()));
@@@ -347,10 -350,10 +350,10 @@@
        connect(docksActions, SIGNAL(triggered(QAction*)), this, 
SLOT(toggleDockWidget(QAction*)));
  }
  
- void MainWin::initMenus(){
+ void MainWin::initMenus() {
        //menu for adding new aspects
        m_newMenu = new QMenu(i18n("Add new"));
 -      m_newMenu->setIcon(KIcon("document-new"));
 +      m_newMenu->setIcon(QIcon::fromTheme("document-new"));
        m_newMenu->addAction(m_newFolderAction);
        m_newMenu->addAction(m_newWorkbookAction);
        m_newMenu->addAction(m_newSpreadsheetAction);
@@@ -569,27 -572,27 +572,27 @@@ void MainWin::updateGUI() 
                factory->container("matrix", this)->setEnabled(false);
        }
  
-     const Datapicker* datapicker = this->activeDatapicker();
-     if (datapicker){
-         factory->container("datapicker", this)->setEnabled(true);
-         //populate datapicker-menu
-         DatapickerView* 
view=qobject_cast<DatapickerView*>(datapicker->view());
-         QMenu* menu=qobject_cast<QMenu*>(factory->container("datapicker", 
this));
-         menu->clear();
-         view->createContextMenu(menu);
- 
-         //populate spreadsheet-toolbar
-         QToolBar* 
toolbar=qobject_cast<QToolBar*>(factory->container("datapicker_toolbar", this));
-         if (group.groupList().indexOf("Toolbar datapicker_toolbar")==-1)
-             toolbar->setToolButtonStyle(Qt::ToolButtonFollowStyle);
- 
-         toolbar->setVisible(true);
-         toolbar->clear();
-         view->fillToolBar(toolbar);
-     }else{
-         factory->container("datapicker", this)->setEnabled(false);
-         factory->container("datapicker_toolbar", this)->setVisible(false);
-     }
+       const Datapicker* datapicker = this->activeDatapicker();
+       if (datapicker) {
+               factory->container("datapicker", this)->setEnabled(true);
+               //populate datapicker-menu
+               DatapickerView* 
view=qobject_cast<DatapickerView*>(datapicker->view());
+               QMenu* 
menu=qobject_cast<QMenu*>(factory->container("datapicker", this));
+               menu->clear();
+               view->createContextMenu(menu);
+ 
+               //populate spreadsheet-toolbar
+               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->setVisible(true);
+               toolbar->clear();
+               view->fillToolBar(toolbar);
+       } else {
+               factory->container("datapicker", this)->setEnabled(false);
+               factory->container("datapicker_toolbar", 
this)->setVisible(false);
+       }
  }
  
  /*!
@@@ -679,11 -682,10 +682,11 @@@ bool MainWin::newProject() 
        return true;
  }
  
- void MainWin::openProject(){
+ void MainWin::openProject() {
        KConfigGroup conf(KSharedConfig::openConfig(), "MainWin");
        QString dir = conf.readEntry("LastOpenDir", "");
 -      QString path = KFileDialog::getOpenFileName(KUrl(dir),i18n("LabPlot 
Projects (*.lml *.lml.gz *.lml.bz2 *.LML *.LML.GZ *.LML.BZ2)"),this, i18n("Open 
project"));
 +      QString path = QFileDialog::getOpenFileName(this,i18n("Open project"), 
dir,
-                       i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.LML 
*.LML.GZ *.LML.BZ2)"));
++                     i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.LML 
*.LML.GZ *.LML.BZ2)"));
  
        if (!path.isEmpty()) {
                this->openProject(path);
@@@ -828,8 -830,11 +831,10 @@@ bool MainWin::saveProject() 
  }
  
  bool MainWin::saveProjectAs() {
-       QString fileName = QFileDialog::getSaveFileName(this, i18n("Save 
project as"),QString::null,
-               i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 *.LML *.LML.GZ 
*.LML.BZ2)"));
+       KConfigGroup conf(KSharedConfig::openConfig(), "MainWin");
+       QString dir = conf.readEntry("LastOpenDir", "");
 -      QString fileName = KFileDialog::getSaveFileName(KUrl(dir),
 -                         i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 
*.LML *.LML.GZ *.LML.BZ2)"),
 -                         this, i18n("Save project as"));
++      QString fileName = QFileDialog::getSaveFileName(this, i18n("Save 
project as"), dir,
++                         i18n("LabPlot Projects (*.lml *.lml.gz *.lml.bz2 
*.LML *.LML.GZ *.LML.BZ2)"));
  
        if( fileName.isEmpty() )// "Cancel" was clicked
                return false;
@@@ -1171,10 -1176,10 +1176,10 @@@ void MainWin::handleAspectAboutToBeRemo
  }
  
  /*!
 -  called when the current aspect in the tree of the project explorer was 
changed.
 -  Selects the new aspect.
 +      called when the current aspect in the tree of the project explorer was 
changed.
 +      Selects the new aspect.
  */
- void MainWin::handleCurrentAspectChanged(AbstractAspect *aspect){
+ void MainWin::handleCurrentAspectChanged(AbstractAspect *aspect) {
        if (!aspect)
                aspect = m_project; // should never happen, just in case
  
@@@ -1368,8 -1373,20 +1373,20 @@@ void MainWin::closeEvent(QCloseEvent* e
        }
  }
  
+ void MainWin::dragEnterEvent(QDragEnterEvent* event) {
+       event->accept();
+ }
+ 
+ void MainWin::dropEvent(QDropEvent* event) {
+       if (!m_project)
+               newProject();
+ 
+       QUrl url = event->mimeData()->urls().at(0);
+       importFileDialog(url.toLocalFile());
+ }
+ 
  void MainWin::handleSettingsChanges() {
 -      const KConfigGroup group = KGlobal::config()->group( "General" );
 +      const KConfigGroup group = KSharedConfig::openConfig()->group( 
"General" );
  
        QMdiArea::ViewMode viewMode = 
QMdiArea::ViewMode(group.readEntry("ViewMode", 0));
        if (m_mdiArea->viewMode() != viewMode) {
@@@ -1431,10 -1448,10 +1448,10 @@@ void MainWin::historyDialog() 
  }
  
  /*!
 -  Opens the dialog to import data to the selected workbook, spreadsheet or 
matrix
 +      Opens the dialog to import data to the selected workbook, spreadsheet 
or matrix
  */
- void MainWin::importFileDialog(){
-       m_importFileDialog = new ImportFileDialog(this);
+ void MainWin::importFileDialog(const QString& fileName) {
+       m_importFileDialog = new ImportFileDialog(this, false, fileName);
  
        if ( m_currentAspect->inherits("Spreadsheet") || 
m_currentAspect->inherits("Matrix") || m_currentAspect->inherits("Workbook") ) {
                m_importFileDialog->setCurrentIndex( 
m_projectExplorer->currentIndex());
@@@ -1479,9 -1496,9 +1496,9 @@@ void MainWin::newFileDataSourceActionTr
  }
  
  /*!
 -  adds a new SQL data source to the current project.
 +      adds a new SQL data source to the current project.
  */
- void MainWin::newSqlDataSourceActionTriggered(){
+ void MainWin::newSqlDataSourceActionTriggered() {
        //TODO
  }
  
diff --cc src/kdefrontend/MainWin.h
index 08b1988,eb0801d..2cbcab5
--- a/src/kdefrontend/MainWin.h
+++ b/src/kdefrontend/MainWin.h
@@@ -94,55 -96,54 +96,55 @@@ private
        Qt::WindowStates m_lastWindowState; //< last window state before 
switching to full screen mode
  
        KRecentFilesAction* m_recentProjectsAction;
 -      KAction* m_saveAction;
 -      KAction* m_saveAsAction;
 -      KAction* m_printAction;
 -      KAction* m_printPreviewAction;
 -      KAction* m_importAction;
 -      KAction* m_exportAction;
 -      KAction* m_closeAction;
 -      KAction* m_newFolderAction;
 -      KAction* m_newWorkbookAction;
 -      KAction* m_newSpreadsheetAction;
 -      KAction* m_newMatrixAction;
 -      KAction* m_newWorksheetAction;
 -      KAction* m_newFileDataSourceAction;
 -      KAction* m_newSqlDataSourceAction;
 -      KAction* m_newScriptAction;
 -      KAction* m_newProjectAction;
 -      KAction* m_historyAction;
 -      KAction* m_undoAction;
 -      KAction* m_redoAction;
 -      KAction* m_tileWindows;
 -      KAction* m_cascadeWindows;
 -      KAction* m_newDatapickerAction;
 -
 +      QAction* m_saveAction;
 +      QAction* m_saveAsAction;
 +      QAction* m_printAction;
 +      QAction* m_printPreviewAction;
 +      QAction* m_importAction;
 +      QAction* m_exportAction;
 +      QAction* m_closeAction;
 +      QAction* m_newFolderAction;
 +      QAction* m_newWorkbookAction;
 +      QAction* m_newSpreadsheetAction;
 +      QAction* m_newMatrixAction;
 +      QAction* m_newWorksheetAction;
 +      QAction* m_newFileDataSourceAction;
 +      QAction* m_newSqlDataSourceAction;
 +      QAction* m_newScriptAction;
 +      QAction* m_newProjectAction;
 +      QAction* m_historyAction;
 +      QAction* m_undoAction;
 +      QAction* m_redoAction;
 +      QAction* m_tileWindows;
 +      QAction* m_cascadeWindows;
-         QAction* m_newDatapickerAction;
++      QAction* m_newDatapickerAction;
  
        //toggling doch widgets
-     QAction* m_toggleProjectExplorerDocQAction;
-     QAction* m_togglePropertiesDocQAction;
 -      KAction* m_toggleProjectExplorerDockAction;
 -      KAction* m_togglePropertiesDockAction;
++      QAction* m_toggleProjectExplorerDocQAction;
++      QAction* m_togglePropertiesDocQAction;
  
        //worksheet actions
-     QAction* worksheetZoomInAction;
-     QAction* worksheetZoomOutAction;
-     QAction* worksheetZoomOriginAction;
-     QAction* worksheetZoomFitPageHeightAction;
-     QAction* worksheetZoomFitPageWidthAction;
-     QAction* worksheetZoomFitSelectionAction;
- 
-     QAction* worksheetNavigationModeAction;
-     QAction* worksheetZoomModeAction;
-     QAction* worksheetSelectionModeAction;
- 
-     QAction* worksheetVerticalLayoutAction;
-     QAction* worksheetHorizontalLayoutAction;
-     QAction* worksheetGridLayoutAction;
-     QAction* worksheetBreakLayoutAction;
- 
-     QAction* m_visibilityFolderAction;
-     QAction* m_visibilitySubfolderAction;
-     QAction* m_visibilityAllAction;
-     QAction* m_toggleProjectExplorerDockAction;
-     QAction* m_togglePropertiesDockAction;
 -      KAction* worksheetZoomInAction;
 -      KAction* worksheetZoomOutAction;
 -      KAction* worksheetZoomOriginAction;
 -      KAction* worksheetZoomFitPageHeightAction;
 -      KAction* worksheetZoomFitPageWidthAction;
 -      KAction* worksheetZoomFitSelectionAction;
 -
 -      KAction* worksheetNavigationModeAction;
 -      KAction* worksheetZoomModeAction;
 -      KAction* worksheetSelectionModeAction;
 -
 -      KAction* worksheetVerticalLayoutAction;
 -      KAction* worksheetHorizontalLayoutAction;
 -      KAction* worksheetGridLayoutAction;
 -      KAction* worksheetBreakLayoutAction;
 -
 -      KAction* m_visibilityFolderAction;
 -      KAction* m_visibilitySubfolderAction;
 -      KAction* m_visibilityAllAction;
++      QAction* worksheetZoomInAction;
++      QAction* worksheetZoomOutAction;
++      QAction* worksheetZoomOriginAction;
++      QAction* worksheetZoomFitPageHeightAction;
++      QAction* worksheetZoomFitPageWidthAction;
++      QAction* worksheetZoomFitSelectionAction;
++
++      QAction* worksheetNavigationModeAction;
++      QAction* worksheetZoomModeAction;
++      QAction* worksheetSelectionModeAction;
++
++      QAction* worksheetVerticalLayoutAction;
++      QAction* worksheetHorizontalLayoutAction;
++      QAction* worksheetGridLayoutAction;
++      QAction* worksheetBreakLayoutAction;
++
++      QAction* m_visibilityFolderAction;
++      QAction* m_visibilitySubfolderAction;
++      QAction* m_visibilityAllAction;
++      QAction* m_toggleProjectExplorerDockAction;
++      QAction* m_togglePropertiesDockAction;
  
        //Menus
        QMenu* m_visibilityMenu;
@@@ -194,7 -200,7 +201,7 @@@ private slots
        bool newProject();
        void openProject();
        void openProject(const QString&);
-     void openRecentProject(const QUrl&);
 -      void openRecentProject(const KUrl&);
++      void openRecentProject(const QUrl&);
        bool closeProject();
        bool saveProject();
        bool saveProjectAs();
diff --cc src/kdefrontend/datasources/ImportFileDialog.h
index b1e9b7f,c2532f6..2d0f31c
--- a/src/kdefrontend/datasources/ImportFileDialog.h
+++ b/src/kdefrontend/datasources/ImportFileDialog.h
@@@ -49,36 -50,35 +49,35 @@@ class QToolButton
  class ImportFileDialog: public KDialog {
        Q_OBJECT
  
-       public:
-               explicit ImportFileDialog(MainWin*, bool fileDataSource = 
false);
-               ~ImportFileDialog();
+ public:
+       explicit ImportFileDialog(MainWin*, bool fileDataSource = false, const 
QString& fileName = QString());
+       ~ImportFileDialog();
  
-               void importToFileDataSource(FileDataSource*, QStatusBar*) const;
-               void importTo(QStatusBar*) const;
-               void setCurrentIndex(const QModelIndex&);
+       void importToFileDataSource(FileDataSource*, QStatusBar*) const;
+       void importTo(QStatusBar*) const;
+       void setCurrentIndex(const QModelIndex&);
+ private:
+       void setModel(QAbstractItemModel*);
  
-       private:
-               void setModel(QAbstractItemModel*);
+       MainWin* m_mainWin;
+       QVBoxLayout* vLayout;
+       ImportFileWidget* importFileWidget;
+       QGroupBox* frameAddTo;
+       TreeViewComboBox* cbAddTo;
+       QLabel* lPosition;
+       QComboBox* cbPosition;
+       QPushButton* bNewSpreadsheet;
+       QPushButton* bNewMatrix;
+       QPushButton* bNewWorkbook;
+       QToolButton* tbNewDataContainer;
+       bool m_showOptions;
 -      KMenu* m_newDataContainerMenu;
++      QMenu* m_newDataContainerMenu;
  
-               MainWin* m_mainWin;
-               QVBoxLayout* vLayout;
-               ImportFileWidget* importFileWidget;
-               QGroupBox* frameAddTo;
-               TreeViewComboBox* cbAddTo;
-               QLabel* lPosition;
-               QComboBox* cbPosition;
-               QPushButton* bNewSpreadsheet;
-               QPushButton* bNewMatrix;
-               QPushButton* bNewWorkbook;
-               QToolButton* tbNewDataContainer;
-               bool m_showOptions;
-               QMenu* m_newDataContainerMenu;
- 
-       private slots:
-               void toggleOptions();
-               void newDataContainerMenu();
-               void newDataContainer(QAction*);
-               void checkOkButton();
+ private slots:
+       void toggleOptions();
+       void newDataContainerMenu();
+       void newDataContainer(QAction*);
+       void checkOkButton();
  };
  
  #endif //IMPORTFILEDIALOG_H
diff --cc src/kdefrontend/datasources/ImportFileWidget.cpp
index 8f982f5,27d3199..29ada09
--- a/src/kdefrontend/datasources/ImportFileWidget.cpp
+++ b/src/kdefrontend/datasources/ImportFileWidget.cpp
@@@ -128,11 -127,13 +129,13 @@@ ImportFileWidget::ImportFileWidget(QWid
  
        ui.gbOptions->hide();
  
-     ui.bOpen->setIcon( QIcon::fromTheme("document-open") );
-     ui.bFileInfo->setIcon( QIcon::fromTheme("help-about") );
-     ui.bManageFilters->setIcon( QIcon::fromTheme("configure") );
-     ui.bSaveFilter->setIcon( QIcon::fromTheme("document-save") );
-     ui.bRefreshPreview->setIcon( QIcon::fromTheme("view-refresh") );
 -      ui.bOpen->setIcon( KIcon("document-open") );
 -      ui.bFileInfo->setIcon( KIcon("help-about") );
 -      ui.bManageFilters->setIcon( KIcon("configure") );
 -      ui.bSaveFilter->setIcon( KIcon("document-save") );
 -      ui.bRefreshPreview->setIcon( KIcon("view-refresh") );
 -      hdfOptionsWidget.bRefreshPreview->setIcon( KIcon("view-refresh") );
 -      netcdfOptionsWidget.bRefreshPreview->setIcon( KIcon("view-refresh") );
++      ui.bOpen->setIcon( QIcon::fromTheme("document-open") );
++      ui.bFileInfo->setIcon( QIcon::fromTheme("help-about") );
++      ui.bManageFilters->setIcon( QIcon::fromTheme("configure") );
++      ui.bSaveFilter->setIcon( QIcon::fromTheme("document-save") );
++      ui.bRefreshPreview->setIcon( QIcon::fromTheme("view-refresh") );
++      hdfOptionsWidget.bRefreshPreview->setIcon( 
QIcon::fromTheme("view-refresh") );
++      netcdfOptionsWidget.bRefreshPreview->setIcon( 
QIcon::fromTheme("view-refresh") );
  
        connect( ui.kleFileName, SIGNAL(textChanged(QString)), 
SLOT(fileNameChanged(QString)) );
        connect( ui.bOpen, SIGNAL(clicked()), this, SLOT (selectFile()) );
diff --cc src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
index 31c4ea9,0f66633..f4d6a43
--- a/src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
+++ b/src/kdefrontend/dockwidgets/CartesianPlotDock.cpp
@@@ -50,111 -49,112 +50,112 @@@
    \ingroup kdefrontend
  */
  
- CartesianPlotDock::CartesianPlotDock(QWidget *parent):
-     QWidget(parent),
-     m_initializing(false)
- {
-     ui.setupUi(this);
- 
-     //"Coordinate system"-tab
-     ui.bAddXBreak->setIcon( QIcon::fromTheme("list-add") );
-     ui.bRemoveXBreak->setIcon( QIcon::fromTheme("list-remove") );
-     ui.cbXBreak->addItem("1");
- 
-     ui.bAddYBreak->setIcon( QIcon::fromTheme("list-add") );
-     ui.bRemoveYBreak->setIcon( QIcon::fromTheme("list-remove") );
-     ui.cbYBreak->addItem("1");
- 
-     //"Background"-tab
-     ui.kleBackgroundFileName->setClearButtonShown(true);
-     ui.bOpen->setIcon( QIcon::fromTheme("document-open") );
- 
-     KUrlCompletion *comp = new KUrlCompletion();
-     ui.kleBackgroundFileName->setCompletionObject(comp);
- 
-     //"Title"-tab
-     QHBoxLayout* hboxLayout = new QHBoxLayout(ui.tabTitle);
-     labelWidget=new LabelWidget(ui.tabTitle);
-     hboxLayout->addWidget(labelWidget);
-     hboxLayout->setContentsMargins(2,2,2,2);
-     hboxLayout->setSpacing(2);
- 
-     //adjust layouts in the tabs
-     for (int i=0; i<ui.tabWidget->count(); ++i){
-         QGridLayout* layout = 
dynamic_cast<QGridLayout*>(ui.tabWidget->widget(i)->layout());
-         if (!layout)
-             continue;
- 
-         layout->setContentsMargins(2,2,2,2);
-         layout->setHorizontalSpacing(2);
-         layout->setVerticalSpacing(2);
-     }
- 
-     //Validators
-     ui.leXBreakStart->setValidator( new QDoubleValidator(ui.leXBreakStart) );
-     ui.leXBreakEnd->setValidator( new QDoubleValidator(ui.leXBreakEnd) );
-     ui.leYBreakStart->setValidator( new QDoubleValidator(ui.leYBreakStart) );
-     ui.leYBreakEnd->setValidator( new QDoubleValidator(ui.leYBreakEnd) );
- 
-     //SIGNAL/SLOT
-     //General
-     connect( ui.leName, SIGNAL(returnPressed()), this, SLOT(nameChanged()) );
-     connect( ui.leComment, SIGNAL(returnPressed()), this, 
SLOT(commentChanged()) );
-     connect( ui.chkVisible, SIGNAL(stateChanged(int)), this, 
SLOT(visibilityChanged(int)) );
-     connect( ui.sbLeft, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
-     connect( ui.sbTop, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
-     connect( ui.sbWidth, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
-     connect( ui.sbHeight, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
- 
-     connect( ui.chkAutoScaleX, SIGNAL(stateChanged(int)), this, 
SLOT(autoScaleXChanged(int)) );
-     connect( ui.kleXMin, SIGNAL(returnPressed()), this, SLOT(xMinChanged()) );
-     connect( ui.kleXMax, SIGNAL(returnPressed()), this, SLOT(xMaxChanged()) );
-     connect( ui.cbXScaling, SIGNAL(currentIndexChanged(int)), this, 
SLOT(xScaleChanged(int)) );
- 
-     connect( ui.chkAutoScaleY, SIGNAL(stateChanged(int)), this, 
SLOT(autoScaleYChanged(int)) );
-     connect( ui.kleYMin, SIGNAL(returnPressed()), this, SLOT(yMinChanged()) );
-     connect( ui.kleYMax, SIGNAL(returnPressed()), this, SLOT(yMaxChanged()) );
-     connect( ui.cbYScaling, SIGNAL(currentIndexChanged(int)), this, 
SLOT(yScaleChanged(int)) );
- 
-     //Scale breakings
-     connect( ui.chkXBreak, SIGNAL(stateChanged(int)), this, 
SLOT(toggleXBreak(int)) );
-     connect( ui.bAddXBreak, SIGNAL(clicked()), this, SLOT(addXBreak()) );
-     connect( ui.bRemoveXBreak, SIGNAL(clicked()), this, SLOT(removeXBreak()) 
);
-     connect( ui.cbXBreak, SIGNAL(currentIndexChanged(int)), this, 
SLOT(currentXBreakChanged(int)) );
-     connect( ui.leXBreakStart, SIGNAL(returnPressed()), this, 
SLOT(xBreakStartChanged()) );
-     connect( ui.leXBreakEnd, SIGNAL(returnPressed()), this, 
SLOT(xBreakEndChanged()) );
-     connect( ui.sbXBreakPosition, SIGNAL(valueChanged(int)), this, 
SLOT(xBreakPositionChanged(int)) );
- 
-     connect( ui.chkYBreak, SIGNAL(stateChanged(int)), this, 
SLOT(toggleYBreak(int)) );
-     connect( ui.bAddYBreak, SIGNAL(clicked()), this, SLOT(addYBreak()) );
-     connect( ui.bRemoveYBreak, SIGNAL(clicked()), this, SLOT(removeYBreak()) 
);
-     connect( ui.cbYBreak, SIGNAL(currentIndexChanged(int)), this, 
SLOT(currentYBreakChanged(int)) );
-     connect( ui.leYBreakStart, SIGNAL(returnPressed()), this, 
SLOT(yBreakStartChanged()) );
-     connect( ui.leYBreakEnd, SIGNAL(returnPressed()), this, 
SLOT(yBreakEndChanged()) );
-     connect( ui.sbYBreakPosition, SIGNAL(valueChanged(int)), this, 
SLOT(yBreakPositionChanged(int)) );
- 
-     //Background
-     connect( ui.cbBackgroundType, SIGNAL(currentIndexChanged(int)), this, 
SLOT(backgroundTypeChanged(int)) );
-     connect( ui.cbBackgroundColorStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundColorStyleChanged(int)) );
-     connect( ui.cbBackgroundImageStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundImageStyleChanged(int)) );
-     connect( ui.cbBackgroundBrushStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundBrushStyleChanged(int)) );
-     connect(ui.bOpen, SIGNAL(clicked(bool)), this, SLOT(selectFile()));
-     connect( ui.kleBackgroundFileName, SIGNAL(returnPressed()), this, 
SLOT(fileNameChanged()) );
-     connect( ui.kleBackgroundFileName, SIGNAL(clearButtonClicked()), this, 
SLOT(fileNameChanged()) );
-     connect( ui.kcbBackgroundFirstColor, SIGNAL(changed(QColor)), this, 
SLOT(backgroundFirstColorChanged(QColor)) );
-     connect( ui.kcbBackgroundSecondColor, SIGNAL(changed(QColor)), this, 
SLOT(backgroundSecondColorChanged(QColor)) );
-     connect( ui.sbBackgroundOpacity, SIGNAL(valueChanged(int)), this, 
SLOT(backgroundOpacityChanged(int)) );
- 
-     //Border
-     connect( ui.cbBorderStyle, SIGNAL(currentIndexChanged(int)), this, 
SLOT(borderStyleChanged(int)) );
-     connect( ui.kcbBorderColor, SIGNAL(changed(QColor)), this, 
SLOT(borderColorChanged(QColor)) );
-     connect( ui.sbBorderWidth, SIGNAL(valueChanged(double)), this, 
SLOT(borderWidthChanged(double)) );
-     connect( ui.sbBorderCornerRadius, SIGNAL(valueChanged(double)), this, 
SLOT(borderCornerRadiusChanged(double)) );
-     connect( ui.sbBorderOpacity, SIGNAL(valueChanged(int)), this, 
SLOT(borderOpacityChanged(int)) );
- 
-     //Padding
-     connect( ui.sbPaddingHorizontal, SIGNAL(valueChanged(double)), this, 
SLOT(horizontalPaddingChanged(double)) );
-     connect( ui.sbPaddingVertical, SIGNAL(valueChanged(double)), this, 
SLOT(verticalPaddingChanged(double)) );
+ CartesianPlotDock::CartesianPlotDock(QWidget *parent): QWidget(parent),
+       m_plot(0),
+       labelWidget(0),
+       m_initializing(false) {
+ 
+       ui.setupUi(this);
+ 
+       //"Coordinate system"-tab
 -      ui.bAddXBreak->setIcon( KIcon("list-add") );
 -      ui.bRemoveXBreak->setIcon( KIcon("list-remove") );
++      ui.bAddXBreak->setIcon( QIcon::fromTheme("list-add") );
++      ui.bRemoveXBreak->setIcon( QIcon::fromTheme("list-remove") );
+       ui.cbXBreak->addItem("1");
+ 
 -      ui.bAddYBreak->setIcon( KIcon("list-add") );
 -      ui.bRemoveYBreak->setIcon( KIcon("list-remove") );
++      ui.bAddYBreak->setIcon( QIcon::fromTheme("list-add") );
++      ui.bRemoveYBreak->setIcon( QIcon::fromTheme("list-remove") );
+       ui.cbYBreak->addItem("1");
+ 
+       //"Background"-tab
+       ui.kleBackgroundFileName->setClearButtonShown(true);
 -      ui.bOpen->setIcon( KIcon("document-open") );
++      ui.bOpen->setIcon( QIcon::fromTheme("document-open") );
+ 
+       KUrlCompletion *comp = new KUrlCompletion();
+       ui.kleBackgroundFileName->setCompletionObject(comp);
+ 
+       //"Title"-tab
+       QHBoxLayout* hboxLayout = new QHBoxLayout(ui.tabTitle);
+       labelWidget=new LabelWidget(ui.tabTitle);
+       hboxLayout->addWidget(labelWidget);
+       hboxLayout->setContentsMargins(2,2,2,2);
+       hboxLayout->setSpacing(2);
+ 
+       //adjust layouts in the tabs
+       for (int i=0; i<ui.tabWidget->count(); ++i){
+               QGridLayout* layout = 
dynamic_cast<QGridLayout*>(ui.tabWidget->widget(i)->layout());
+               if (!layout)
+                       continue;
+ 
+               layout->setContentsMargins(2,2,2,2);
+               layout->setHorizontalSpacing(2);
+               layout->setVerticalSpacing(2);
+       }
+ 
+       //Validators
+       ui.leXBreakStart->setValidator( new QDoubleValidator(ui.leXBreakStart) 
);
+       ui.leXBreakEnd->setValidator( new QDoubleValidator(ui.leXBreakEnd) );
+       ui.leYBreakStart->setValidator( new QDoubleValidator(ui.leYBreakStart) 
);
+       ui.leYBreakEnd->setValidator( new QDoubleValidator(ui.leYBreakEnd) );
+ 
+       //SIGNAL/SLOT
+       //General
+       connect( ui.leName, SIGNAL(returnPressed()), this, SLOT(nameChanged()) 
);
+       connect( ui.leComment, SIGNAL(returnPressed()), this, 
SLOT(commentChanged()) );
+       connect( ui.chkVisible, SIGNAL(clicked(bool)), this, 
SLOT(visibilityChanged(bool)) );
+       connect( ui.sbLeft, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
+       connect( ui.sbTop, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
+       connect( ui.sbWidth, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
+       connect( ui.sbHeight, SIGNAL(valueChanged(double)), this, 
SLOT(geometryChanged()) );
+ 
+       connect( ui.chkAutoScaleX, SIGNAL(stateChanged(int)), this, 
SLOT(autoScaleXChanged(int)) );
+       connect( ui.kleXMin, SIGNAL(returnPressed()), this, SLOT(xMinChanged()) 
);
+       connect( ui.kleXMax, SIGNAL(returnPressed()), this, SLOT(xMaxChanged()) 
);
+       connect( ui.cbXScaling, SIGNAL(currentIndexChanged(int)), this, 
SLOT(xScaleChanged(int)) );
+ 
+       connect( ui.chkAutoScaleY, SIGNAL(stateChanged(int)), this, 
SLOT(autoScaleYChanged(int)) );
+       connect( ui.kleYMin, SIGNAL(returnPressed()), this, SLOT(yMinChanged()) 
);
+       connect( ui.kleYMax, SIGNAL(returnPressed()), this, SLOT(yMaxChanged()) 
);
+       connect( ui.cbYScaling, SIGNAL(currentIndexChanged(int)), this, 
SLOT(yScaleChanged(int)) );
+ 
+       //Scale breakings
+       connect( ui.chkXBreak, SIGNAL(stateChanged(int)), this, 
SLOT(toggleXBreak(int)) );
+       connect( ui.bAddXBreak, SIGNAL(clicked()), this, SLOT(addXBreak()) );
+       connect( ui.bRemoveXBreak, SIGNAL(clicked()), this, 
SLOT(removeXBreak()) );
+       connect( ui.cbXBreak, SIGNAL(currentIndexChanged(int)), this, 
SLOT(currentXBreakChanged(int)) );
+       connect( ui.leXBreakStart, SIGNAL(returnPressed()), this, 
SLOT(xBreakStartChanged()) );
+       connect( ui.leXBreakEnd, SIGNAL(returnPressed()), this, 
SLOT(xBreakEndChanged()) );
+       connect( ui.sbXBreakPosition, SIGNAL(valueChanged(int)), this, 
SLOT(xBreakPositionChanged(int)) );
+ 
+       connect( ui.chkYBreak, SIGNAL(stateChanged(int)), this, 
SLOT(toggleYBreak(int)) );
+       connect( ui.bAddYBreak, SIGNAL(clicked()), this, SLOT(addYBreak()) );
+       connect( ui.bRemoveYBreak, SIGNAL(clicked()), this, 
SLOT(removeYBreak()) );
+       connect( ui.cbYBreak, SIGNAL(currentIndexChanged(int)), this, 
SLOT(currentYBreakChanged(int)) );
+       connect( ui.leYBreakStart, SIGNAL(returnPressed()), this, 
SLOT(yBreakStartChanged()) );
+       connect( ui.leYBreakEnd, SIGNAL(returnPressed()), this, 
SLOT(yBreakEndChanged()) );
+       connect( ui.sbYBreakPosition, SIGNAL(valueChanged(int)), this, 
SLOT(yBreakPositionChanged(int)) );
+ 
+       //Background
+       connect( ui.cbBackgroundType, SIGNAL(currentIndexChanged(int)), this, 
SLOT(backgroundTypeChanged(int)) );
+       connect( ui.cbBackgroundColorStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundColorStyleChanged(int)) );
+       connect( ui.cbBackgroundImageStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundImageStyleChanged(int)) );
+       connect( ui.cbBackgroundBrushStyle, SIGNAL(currentIndexChanged(int)), 
this, SLOT(backgroundBrushStyleChanged(int)) );
+       connect(ui.bOpen, SIGNAL(clicked(bool)), this, SLOT(selectFile()));
+       connect( ui.kleBackgroundFileName, SIGNAL(returnPressed()), this, 
SLOT(fileNameChanged()) );
+       connect( ui.kleBackgroundFileName, SIGNAL(clearButtonClicked()), this, 
SLOT(fileNameChanged()) );
+       connect( ui.kcbBackgroundFirstColor, SIGNAL(changed(QColor)), this, 
SLOT(backgroundFirstColorChanged(QColor)) );
+       connect( ui.kcbBackgroundSecondColor, SIGNAL(changed(QColor)), this, 
SLOT(backgroundSecondColorChanged(QColor)) );
+       connect( ui.sbBackgroundOpacity, SIGNAL(valueChanged(int)), this, 
SLOT(backgroundOpacityChanged(int)) );
+ 
+       //Border
+       connect( ui.cbBorderStyle, SIGNAL(currentIndexChanged(int)), this, 
SLOT(borderStyleChanged(int)) );
+       connect( ui.kcbBorderColor, SIGNAL(changed(QColor)), this, 
SLOT(borderColorChanged(QColor)) );
+       connect( ui.sbBorderWidth, SIGNAL(valueChanged(double)), this, 
SLOT(borderWidthChanged(double)) );
+       connect( ui.sbBorderCornerRadius, SIGNAL(valueChanged(double)), this, 
SLOT(borderCornerRadiusChanged(double)) );
+       connect( ui.sbBorderOpacity, SIGNAL(valueChanged(int)), this, 
SLOT(borderOpacityChanged(int)) );
+ 
+       //Padding
+       connect( ui.sbPaddingHorizontal, SIGNAL(valueChanged(double)), this, 
SLOT(horizontalPaddingChanged(double)) );
+       connect( ui.sbPaddingVertical, SIGNAL(valueChanged(double)), this, 
SLOT(verticalPaddingChanged(double)) );
  
        TemplateHandler* templateHandler = new TemplateHandler(this, 
TemplateHandler::CartesianPlot);
        ui.verticalLayout->addWidget(templateHandler);
diff --cc src/kdefrontend/dockwidgets/XYEquationCurveDock.cpp
index 5a753db,7529e5e..ddf2542
--- a/src/kdefrontend/dockwidgets/XYEquationCurveDock.cpp
+++ b/src/kdefrontend/dockwidgets/XYEquationCurveDock.cpp
@@@ -38,9 -38,7 +38,9 @@@
  #include <QKeyEvent>
  #include <QMenu>
  #include <QWidgetAction>
- #include <QScrollBar>
+ 
 +#include <KLocalizedString>
 +
  /*!
    \class XYEquationCurveDock
    \brief  Provides a widget for editing the properties of the XYEquationCurves
diff --cc src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
index 7936f60,6e9de8e..5548abc
--- a/src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
+++ b/src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
@@@ -89,10 -93,12 +93,13 @@@ void XYFitCurveDock::setupGeneral() 
        uiGeneralTab.cbModel->addItem(i18n("Maxwell-Boltzmann"));
        uiGeneralTab.cbModel->addItem(i18n("Custom"));
  
+       
uiGeneralTab.teEquation->setMaximumHeight(uiGeneralTab.leName->sizeHint().height()*2);
+ 
 -      uiGeneralTab.tbConstants->setIcon( KIcon("labplot-format-text-symbol") 
);
 -      uiGeneralTab.tbFunctions->setIcon( KIcon("preferences-desktop-font") );
 -      uiGeneralTab.pbRecalculate->setIcon(KIcon("run-build"));
 +      uiGeneralTab.tbConstants->setIcon( 
QIcon::fromTheme("labplot-format-text-symbol") );
 +      uiGeneralTab.tbFunctions->setIcon( 
QIcon::fromTheme("preferences-desktop-font") );
 +      uiGeneralTab.pbRecalculate->setIcon(QIcon::fromTheme("run-build"));
 +
+ 
        QHBoxLayout* layout = new QHBoxLayout(ui.tabGeneral);
        layout->setMargin(0);
        layout->addWidget(generalTab);
diff --cc src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
index cc6333d,c5b9be6..8310b8c
--- a/src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
+++ b/src/kdefrontend/spreadsheet/FunctionValuesDialog.cpp
@@@ -57,9 -56,10 +57,10 @@@ FunctionValuesDialog::FunctionValuesDia
        ui.setupUi(mainWidget);
        setMainWidget(mainWidget);
  
 -      ui.tbConstants->setIcon( KIcon("labplot-format-text-symbol") );
 -      ui.tbFunctions->setIcon( KIcon("preferences-desktop-font") );
 +      ui.tbConstants->setIcon( QIcon::fromTheme("labplot-format-text-symbol") 
);
 +      ui.tbFunctions->setIcon( QIcon::fromTheme("preferences-desktop-font") );
  
+       ui.teEquation->setMaximumHeight(QLineEdit().sizeHint().height()*2);
        ui.teEquation->setFocus();
  
        
m_topLevelClasses<<"Folder"<<"Workbook"<<"Spreadsheet"<<"FileDataSource"<<"Column";
diff --cc src/kdefrontend/widgets/DatapickerImageWidget.cpp
index 9d8574e,f19cdc9..3bf508a
--- a/src/kdefrontend/widgets/DatapickerImageWidget.cpp
+++ b/src/kdefrontend/widgets/DatapickerImageWidget.cpp
@@@ -44,12 -44,9 +44,13 @@@
  #include <QGraphicsScene>
  #include <QImageReader>
  
 +#include <KSharedConfig>
 +#include <KConfigGroup>
 +#include <KLocalizedString>
 +
  HistogramView::HistogramView(QWidget* parent, int range) :
        QGraphicsView(parent),
+       bins(0),
        m_scene(new QGraphicsScene()),
        m_range(range) {
  
@@@ -60,12 -57,7 +61,7 @@@
        setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  
-       //initialize bins
-       bins = new int[range + 1];
-       for (int i = 0; i <= range; i++)
-               bins [i] = 0;
- 
 -      lowerSlider = new QGraphicsRectItem(pageRect, 0, m_scene);
 +      lowerSlider = new QGraphicsRectItem(pageRect, 0);
        lowerSlider->setPen(QPen(Qt::black, 0.5));
        lowerSlider->setBrush(Qt::blue);
        lowerSlider->setOpacity(0.2);
diff --cc src/kdefrontend/widgets/FitOptionsWidget.cpp
index 9654c7e,2e9fe58..73ed0af
--- a/src/kdefrontend/widgets/FitOptionsWidget.cpp
+++ b/src/kdefrontend/widgets/FitOptionsWidget.cpp
@@@ -33,10 -33,10 +33,10 @@@
  
        \ingroup kdefrontend
   */
- FitOptionsWidget::FitOptionsWidget(QWidget *parent, XYFitCurve::FitData* 
fitData): QWidget(parent), m_fitData(fitData) {
+ FitOptionsWidget::FitOptionsWidget(QWidget *parent, XYFitCurve::FitData* 
fitData): QWidget(parent), m_fitData(fitData), m_changed(false) {
        ui.setupUi(this);
 -      ui.pbApply->setIcon(KIcon("dialog-ok-apply"));
 -      ui.pbCancel->setIcon(KIcon("dialog-cancel"));
 +    ui.pbApply->setIcon(QIcon::fromTheme("dialog-ok-apply"));
 +    ui.pbCancel->setIcon(QIcon::fromTheme("dialog-cancel"));
  
        //TODO: show "robust" option when robust fitting is possible
  //    ui.cbRobust->addItem(i18n("on"));
diff --cc src/kdefrontend/widgets/FitParametersWidget.cpp
index 0d32572,9100f33..0b2dc4f
--- a/src/kdefrontend/widgets/FitParametersWidget.cpp
+++ b/src/kdefrontend/widgets/FitParametersWidget.cpp
@@@ -37,10 -36,10 +37,10 @@@
  
        \ingroup kdefrontend
   */
- FitParametersWidget::FitParametersWidget(QWidget* parent, 
XYFitCurve::FitData* data) : QWidget(parent), m_fitData(data) {
+ FitParametersWidget::FitParametersWidget(QWidget* parent, 
XYFitCurve::FitData* data) : QWidget(parent), m_fitData(data), m_changed(false) 
{
        ui.setupUi(this);
 -      ui.pbApply->setIcon(KIcon("dialog-ok-apply"));
 -      ui.pbCancel->setIcon(KIcon("dialog-cancel"));
 +    ui.pbApply->setIcon(QIcon::fromTheme("dialog-ok-apply"));
 +    ui.pbCancel->setIcon(QIcon::fromTheme("dialog-cancel"));
  
        ui.tableWidget->setColumnCount(2);
  
diff --cc src/kdefrontend/widgets/LabelWidget.cpp
index 33b3326,834634c..4ac385c
--- a/src/kdefrontend/widgets/LabelWidget.cpp
+++ b/src/kdefrontend/widgets/LabelWidget.cpp
@@@ -48,76 -47,76 +48,76 @@@
   */
  
  // see legacy/LabelWidget.cpp
- LabelWidget::LabelWidget(QWidget *parent): QWidget(parent), 
m_dateTimeMenu(new QMenu(this)) {
-     ui.setupUi(this);
 -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") );
 -
 -      //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.sbOffset, SIGNAL(valueChanged(double)), this, 
SLOT(offsetChanged(double)) );
 +      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.sbOffset, SIGNAL(valueChanged(double)), this, 
SLOT(offsetChanged(double)) );
  
        connect( ui.chbVisible, SIGNAL(clicked(bool)), this, 
SLOT(visibilityChanged(bool)) );
  
_______________________________________________
kde-doc-english mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-doc-english

Reply via email to