3 #include "ui_plotviewer.h" 11 workspace_ = workspace;
21 if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
23 plot_widget->
AddPlot(paired_data);
27 plot_widget->
AddPlot(paired_data);
28 ui->tabWidget->addTab(plot_widget, tab_title);
29 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
35 if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
37 plot_widget->
AddPlot(abscissa, data);
41 plot_widget->
AddPlot(abscissa, data);
42 ui->tabWidget->addTab(plot_widget, tab_title);
43 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
49 if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
56 ui->tabWidget->addTab(plot_widget, tab_title);
57 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
63 if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
70 ui->tabWidget->addTab(plot_widget, tab_title);
71 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
76 {
if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
78 plot_widget->
AddPlot(paired_data);
83 ui->tabWidget->addTab(plot_widget, tab_title);
84 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
91 if (ui->holdCheckBox->isChecked() && ui->tabWidget->count()){
93 plot_widget->
AddPlot(abscissa, data);
98 ui->tabWidget->addTab(plot_widget, tab_title);
99 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
111 ui->tabWidget->addTab(plot_widget, tab_title);
112 ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
117 ui->holdCheckBox->setChecked(checked);
123 if (plot_widget->
TransientOnly()) ui->tabWidget->removeTab(ui->tabWidget->currentIndex());
128 QDockWidget::closeEvent(ev);
132 void PlotViewer::on_tabWidget_tabCloseRequested(
int index)
134 ui->tabWidget->removeTab(index);
138 void PlotViewer::on_exportPushButton_clicked()
141 if (plot_widget != 0){
142 QString filename = QFileDialog::getSaveFileName(
this,
"Export Plot",
143 workspace_->directory(),
144 "Tagged Image File Format (*.tif);;" 145 "Portable Network Graphics (*.png);;" 146 "Joint Photographic Experts Group (*.jpg);;" 147 "Scalable Vector Graphics (*.svg);;" 148 "Windows Bitmap (*.bmp)");
void AddTab(const QString &tab_title)
PlotViewer::AddTab.
void closeEvent(QCloseEvent *ev)
void SetHoldCheckBoxChecked(bool checked)
void SetActionChecked(bool checked)
PlotViewer(MainWindow *parent, QSharedPointer< VespucciWorkspace > workspace)
void AddPlot(const mat &paired_data, const QString &tab_title)
void AddScatterPlot(const mat &paired_data, const QString &tab_title)
The MainWindow class The main window of the program, this is where the user performs most operations...
void AddTransientPlot(const vec &abscissa, const vec &data, const QString &tab_title)