Engauge Digitizer 2
Loading...
Searching...
No Matches
ExportImageForRegression.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
8#include <QFile>
9#include <QMessageBox>
10#include <QObject>
11#include <QPixmap>
12#include <QString>
13#include <QTextStream>
14
16 m_width (pixmap.width ()),
17 m_height (pixmap.height ())
18{
19}
20
22{
24 if (!file.open (QIODevice::WriteOnly)) {
25 QMessageBox::critical (nullptr,
26 QObject::tr ("Export Image"),
27 QObject::tr ("Cannot export file"));
28 } else {
29
31
32 str << m_width << "x" << m_height << "\n";
33
34 file.close ();
35 }
36}
const int INNER_RADIUS_MIN
void fileExport(const QString &filename) const
Export to the specified file. This is called when the Transformation has not been defined.
ExportImageForRegression(const QPixmap &pixmap)
Single constructor.