labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

PlotDataDialog Class Reference

Dialog for generating plots for the spreadsheet data. More...

#include <PlotDataDialog.h>

Inheritance diagram for PlotDataDialog:
[legend]
Collaboration diagram for PlotDataDialog:
[legend]

Public Types

enum class  PlotType { XYCurve , Histogram }
 
enum class  AnalysisAction {
  DataReduction , Differentiation , Integration , Interpolation ,
  Smoothing , FitLinear , FitPower , FitExp1 ,
  FitExp2 , FitInvExp , FitGauss , FitCauchyLorentz ,
  FitTan , FitTanh , FitErrFunc , FitCustom ,
  FourierFilter
}
 

Public Member Functions

 PlotDataDialog (Spreadsheet *, PlotType=PlotType::XYCurve, QWidget *parent=nullptr)
 
 ~PlotDataDialog () override
 
void setAnalysisAction (AnalysisAction)
 

Private Slots

void plot ()
 
void curvePlacementChanged ()
 
void plotPlacementChanged ()
 
void checkOkButton ()
 

Private Member Functions

void processColumns ()
 
void processColumnsForXYCurve (const QStringList &columnNames, const QString &xColumnName)
 
void processColumnsForHistogram (const QStringList &)
 
void addCurvesToPlot (CartesianPlot *)
 
void addCurvesToPlots (Worksheet *)
 
void addCurve (const QString &name, Column *xColumn, Column *yColumn, CartesianPlot *)
 
void addHistogram (const QString &name, Column *column, CartesianPlot *)
 
ColumncolumnFromName (const QString &) const
 

Private Attributes

Ui::PlotDataWidget * ui
 
QPushButton * m_okButton
 
Spreadsheetm_spreadsheet
 
TreeViewComboBoxcbExistingPlots
 
TreeViewComboBoxcbExistingWorksheets
 
QVector< Column * > m_columns
 
QVector< QComboBox * > m_columnComboBoxes
 
AspectTreeModelm_plotsModel
 
AspectTreeModelm_worksheetsModel
 
PlotType m_plotType
 
AnalysisAction m_analysisAction {AnalysisAction::Differentiation}
 
bool m_analysisMode {false}
 
AbstractAspectm_lastAddedCurve {nullptr}
 

Detailed Description

Dialog for generating plots for the spreadsheet data.

File : PlotDataDialog.cpp Project : LabPlot

Description : Dialog for generating plots for the spreadsheet data

Copyright : (C) 2017-2019 by Alexander Semke (alexa.nosp@m.nder.nosp@m..semk.nosp@m.e@we.nosp@m.b.de)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
  • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 46 of file PlotDataDialog.h.

Member Enumeration Documentation

◆ AnalysisAction

Enumerator
DataReduction 
Differentiation 
Integration 
Interpolation 
Smoothing 
FitLinear 
FitPower 
FitExp1 
FitExp2 
FitInvExp 
FitGauss 
FitCauchyLorentz 
FitTan 
FitTanh 
FitErrFunc 
FitCustom 
FourierFilter 

Definition at line 51 of file PlotDataDialog.h.

◆ PlotType

Enumerator
XYCurve 
Histogram 

Definition at line 50 of file PlotDataDialog.h.

Constructor & Destructor Documentation

◆ PlotDataDialog()

◆ ~PlotDataDialog()

PlotDataDialog::~PlotDataDialog ( )
override

Definition at line 179 of file PlotDataDialog.cpp.

References m_plotsModel, m_worksheetsModel, and ui.

Member Function Documentation

◆ addCurve()

void PlotDataDialog::addCurve ( const QString &  name,
Column xColumn,
Column yColumn,
CartesianPlot plot 
)
private

◆ addCurvesToPlot()

void PlotDataDialog::addCurvesToPlot ( CartesianPlot plot)
private
  • for the selected columns in this dialog, creates a curve in the already existing plot plot.

Definition at line 580 of file PlotDataDialog.cpp.

References addCurve(), addHistogram(), columnFromName(), Histogram, m_columnComboBoxes, m_columns, m_plotType, plot(), ui, and XYCurve.

Referenced by plot().

◆ addCurvesToPlots()

void PlotDataDialog::addCurvesToPlots ( Worksheet worksheet)
private

for the selected columns in this dialog, creates a plot and a curve in the already existing worksheet worksheet.

Definition at line 614 of file PlotDataDialog.cpp.

References AbstractAspect::addChild(), addCurve(), addHistogram(), CartesianPlot, columnFromName(), CartesianPlot::FourAxes, Histogram, WorksheetElement::Horizontal, i18n, m_columnComboBoxes, m_plotType, plot(), Worksheet::setSuppressLayoutUpdate(), ui, Worksheet::updateLayout(), WorksheetElement::Vertical, and XYCurve.

Referenced by plot().

◆ addHistogram()

void PlotDataDialog::addHistogram ( const QString &  name,
Column column,
CartesianPlot plot 
)
private

Definition at line 753 of file PlotDataDialog.cpp.

References m_lastAddedCurve, and plot().

Referenced by addCurvesToPlot(), and addCurvesToPlots().

◆ checkOkButton

void PlotDataDialog::checkOkButton ( )
privateslot

◆ columnFromName()

Column * PlotDataDialog::columnFromName ( const QString &  name) const
private

Definition at line 569 of file PlotDataDialog.cpp.

References m_columns.

Referenced by addCurvesToPlot(), and addCurvesToPlots().

◆ curvePlacementChanged

void PlotDataDialog::curvePlacementChanged ( )
privateslot

Definition at line 765 of file PlotDataDialog.cpp.

References i18n, and ui.

Referenced by PlotDataDialog().

◆ plot

◆ plotPlacementChanged

void PlotDataDialog::plotPlacementChanged ( )
privateslot

Definition at line 779 of file PlotDataDialog.cpp.

References cbExistingPlots, cbExistingWorksheets, checkOkButton(), and ui.

Referenced by PlotDataDialog().

◆ processColumns()

◆ processColumnsForHistogram()

void PlotDataDialog::processColumnsForHistogram ( const QStringList &  columnNames)
private

Definition at line 326 of file PlotDataDialog.cpp.

References i18n, m_columnComboBoxes, m_columns, and ui.

Referenced by processColumns().

◆ processColumnsForXYCurve()

void PlotDataDialog::processColumnsForXYCurve ( const QStringList &  columnNames,
const QString &  xColumnName 
)
private

Definition at line 275 of file PlotDataDialog.cpp.

References i18n, m_columnComboBoxes, m_columns, and ui.

Referenced by processColumns().

◆ setAnalysisAction()

void PlotDataDialog::setAnalysisAction ( AnalysisAction  action)

Definition at line 198 of file PlotDataDialog.cpp.

References asan_symbolize::action, m_analysisAction, m_analysisMode, and ui.

Member Data Documentation

◆ cbExistingPlots

TreeViewComboBox* PlotDataDialog::cbExistingPlots
private

Definition at line 65 of file PlotDataDialog.h.

Referenced by checkOkButton(), plot(), PlotDataDialog(), and plotPlacementChanged().

◆ cbExistingWorksheets

TreeViewComboBox* PlotDataDialog::cbExistingWorksheets
private

Definition at line 66 of file PlotDataDialog.h.

Referenced by checkOkButton(), plot(), PlotDataDialog(), and plotPlacementChanged().

◆ m_analysisAction

AnalysisAction PlotDataDialog::m_analysisAction {AnalysisAction::Differentiation}
private

Definition at line 72 of file PlotDataDialog.h.

Referenced by addCurve(), plot(), and setAnalysisAction().

◆ m_analysisMode

bool PlotDataDialog::m_analysisMode {false}
private

Definition at line 73 of file PlotDataDialog.h.

Referenced by addCurve(), plot(), and setAnalysisAction().

◆ m_columnComboBoxes

QVector<QComboBox*> PlotDataDialog::m_columnComboBoxes
private

◆ m_columns

QVector<Column*> PlotDataDialog::m_columns
private

◆ m_lastAddedCurve

AbstractAspect* PlotDataDialog::m_lastAddedCurve {nullptr}
private

Definition at line 74 of file PlotDataDialog.h.

Referenced by addCurve(), addHistogram(), and plot().

◆ m_okButton

QPushButton* PlotDataDialog::m_okButton
private

Definition at line 63 of file PlotDataDialog.h.

Referenced by checkOkButton(), and PlotDataDialog().

◆ m_plotsModel

AspectTreeModel* PlotDataDialog::m_plotsModel
private

Definition at line 69 of file PlotDataDialog.h.

Referenced by PlotDataDialog(), and ~PlotDataDialog().

◆ m_plotType

PlotType PlotDataDialog::m_plotType
private

Definition at line 71 of file PlotDataDialog.h.

Referenced by addCurvesToPlot(), addCurvesToPlots(), checkOkButton(), and processColumns().

◆ m_spreadsheet

Spreadsheet* PlotDataDialog::m_spreadsheet
private

Definition at line 64 of file PlotDataDialog.h.

Referenced by plot(), PlotDataDialog(), and processColumns().

◆ m_worksheetsModel

AspectTreeModel* PlotDataDialog::m_worksheetsModel
private

Definition at line 70 of file PlotDataDialog.h.

Referenced by PlotDataDialog(), and ~PlotDataDialog().

◆ ui


The documentation for this class was generated from the following files: