The copy button was pressed
| 891 | |
| 892 | // The copy button was pressed |
| 893 | void NBrowserWindow::copyButtonPressed() { |
| 894 | // editor->downloadImageAction()->setEnabled(true); |
| 895 | // selectedFileName = f; |
| 896 | // selectedFileLid = l.toInt(); |
| 897 | |
| 898 | // If we have text selected |
| 899 | if (this->editor->selectedText().trimmed() != "") { |
| 900 | this->editor->triggerPageAction(QWebPage::Copy); |
| 901 | this->editor->setFocus(); |
| 902 | } else { |
| 903 | // If we have an image selected, we copy it to the clipboard. |
| 904 | if (editor->downloadImageAction()->isEnabled()) { |
| 905 | QString fileName = global.fileManager.getDbaDirPath()+selectedFileName; |
| 906 | QApplication::clipboard()->setPixmap(QPixmap(fileName)); |
| 907 | } |
| 908 | } |
| 909 | |
| 910 | microFocusChanged(); |
| 911 | |
| 912 | } |
| 913 | |
| 914 | |
| 915 | // Build URL from pasted text |
nothing calls this directly
no test coverage detected