Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -9,6 +9,7 @@ · 8 unmodified lines | |||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | // | 10 | // |
| 11 | 11 | ||
| 12 | #include <QClipboard> | ||
| 12 | #include <QtCore/QDir> | 13 | #include <QtCore/QDir> |
| 13 | #include <QMessageBox> | 14 | #include <QMessageBox> |
| 14 | #include <QScriptValue> | 15 | #include <QScriptValue> |
| @@ -139,3 +140,8 @@ int WindowScriptingInterface::getX() { · 124 unmodified lines | |||
| 139 | int WindowScriptingInterface::getY() { | 140 | int WindowScriptingInterface::getY() { |
| 140 | return qApp->getWindow()->y(); | 141 | return qApp->getWindow()->y(); |
| 141 | } | 142 | } |
| 143 | |||
| 144 | void WindowScriptingInterface::copyToClipboard(const QString& text) { | ||
| 145 | qDebug() << "Copying"; | ||
| 146 | QApplication::clipboard()->setText(text); | ||
| 147 | } | ||