18 #include <QFileDialog> 19 #include <QMessageBox> 66 std::ostringstream stream;
67 stream.imbue(std::locale(
"C"));
71 for (
int col = 0; col < colCount; ++col)
83 for (
int row = 0; row < rowCount; ++row)
85 for (
int col = 0; col < colCount; ++col)
102 QApplication::clipboard()->setText(QString::fromStdString(this->
StreamModelToString()), QClipboard::Clipboard);
108 QString fileName = QFileDialog::getSaveFileName(
nullptr, tr(
"Save plot data to csv file"));
110 if (fileName.isEmpty())
112 QMessageBox::critical(
nullptr, tr(
"No file selected!"),
113 tr(
"Cannot export pixel dump. Please selected a file."));
119 std::ios_base::openmode iOpenFlag = std::ios_base::out | std::ios_base::trunc;
120 file.open(fileName.toStdString().c_str(), iOpenFlag);
124 QMessageBox::critical(
nullptr, tr(
"Cannot create/open selected file!"),
125 tr(
"Cannot open or create the selected file. Export will be aborted. Selected file name: ") +
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
const mitk::ModelFitPlotData * GetPlotData() const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
const std::string & GetXName() const
void SetPlotData(const mitk::ModelFitPlotData *data)
QVariant data(const QModelIndex &index, int role) const override
void SetXName(const std::string &xName)