Import of point data from clipboard.
More...
#include <MimePointsImport.h>
Import of point data from clipboard.
Definition at line 15 of file MimePointsImport.h.
◆ MimePointsImport()
| MimePointsImport::MimePointsImport |
( |
| ) |
|
◆ ~MimePointsImport()
| MimePointsImport::~MimePointsImport |
( |
| ) |
|
|
virtual |
◆ retrievePoints()
| void MimePointsImport::retrievePoints |
( |
const Transformation & |
transformation, |
|
|
QList< QPoint > & |
points, |
|
|
QList< double > & |
ordinals |
|
) |
| const |
Retrieve points from clipboard.
Definition at line 20 of file MimePointsImport.cpp.
28 const QClipboard *clipboard = QApplication::clipboard();
29 QString text = clipboard->text ();
30 QStringList lines = text.split (
"\n");
34 for (
int i = 0; i < lines.count(); i++) {
36 QString line = lines.at (i);
40 if (!line.trimmed ().isEmpty () &&
41 fields.count () == 2) {
43 QString field0 = fields [0];
44 QString field1 = fields [1];
46 double value0 = field0.toDouble (&ok0);
47 double value1 = field1.toDouble (&ok1);
54 points.push_back (pointScreen.toPoint ());
55 ordinals.push_back (ordinal++);
The documentation for this class was generated from the following files: