aboutsummaryrefslogtreecommitdiffstats
path: root/textedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'textedit.cpp')
-rw-r--r--textedit.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/textedit.cpp b/textedit.cpp
index ead8f2c..9fa7e9c 100644
--- a/textedit.cpp
+++ b/textedit.cpp
@@ -1,4 +1,5 @@
#include "QDebug"
+#include "QUrl"
class QString;
#include "textedit.h"
TextEdit::TextEdit(QWidget *parent)
@@ -9,18 +10,23 @@ TextEdit::TextEdit(QWidget *parent)
void TextEdit::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/plain"))
- qDebug() << "enter drag action";
+ qDebug() << "enter textedit drag action";
- //event->acceptProposedAction();
+ event->acceptProposedAction();
}
void TextEdit::dropEvent(QDropEvent* event)
{
this->setPlainText(event->mimeData()->text());
- qDebug() << "enter drop action";
+ qDebug() << "enter textedit drop action";
qDebug() << event->mimeData()->text();
- event->acceptProposedAction();
+ foreach (QUrl tmp, event->mimeData()->urls())
+ {
+ qDebug() << "hallo" << tmp;
+ }
+
+ //event->acceptProposedAction();
}
void TextEdit::comment()
@@ -30,3 +36,9 @@ void TextEdit::comment()
text.insert(0,QString("> "));
this->setPlainText(text);
}
+
+bool TextEdit::isKey(QString key)
+{
+ qDebug() << key.contains("-----BEGIN PGP PUBLIC KEY BLOCK-----", Qt::CaseSensitive);
+ return true;
+}