diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-20 19:59:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-20 19:59:54 +0800 |
commit | 982f73fa6d6f12874729faacd0db14fc78d518dd (patch) | |
tree | 9234eea5a981d73985c6127d5a1ea1cc09cce151 /ui | |
parent | 000658539136645e743d83d57a8106b2a9796b93 (diff) | |
download | go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar.gz go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar.bz2 go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar.lz go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar.xz go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.tar.zst go-tangerine-982f73fa6d6f12874729faacd0db14fc78d518dd.zip |
Added timeout for filter & removed clipboard. Closes #350
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/clipboard/capi.hpp | 11 | ||||
-rw-r--r-- | ui/qt/clipboard/clipboard.cpp | 20 | ||||
-rw-r--r-- | ui/qt/clipboard/clipboard.go | 15 | ||||
-rw-r--r-- | ui/qt/clipboard/clipboard.hpp | 23 |
4 files changed, 0 insertions, 69 deletions
diff --git a/ui/qt/clipboard/capi.hpp b/ui/qt/clipboard/capi.hpp deleted file mode 100644 index 202613469..000000000 --- a/ui/qt/clipboard/capi.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "clipboard.hpp" - -typedef void Clipboard_; - -Clipboard_ *initClipboard() -{ - Clipboard *clipboard = new(Clipboard); - return static_cast<Clipboard_*>(clipboard); -} diff --git a/ui/qt/clipboard/clipboard.cpp b/ui/qt/clipboard/clipboard.cpp deleted file mode 100644 index 192aa7a2b..000000000 --- a/ui/qt/clipboard/clipboard.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "clipboard.h" - -#include <QClipboard> - -Clipboard::Clipboard() -{ - connect(QApplication::clipboard(), &QClipboard::dataChanged, [this] { emit clipboardChanged();}); -} - -QString Clipboard::get() const -{ - QClipboard *clipboard = QApplication::clipboard(); - return clipboard->text(); -} - -void Clipboard::toClipboard(QString _text) -{ - QClipboard *clipboard = QApplicationion::clipboard(); - clipboard->setText(_text); -} diff --git a/ui/qt/clipboard/clipboard.go b/ui/qt/clipboard/clipboard.go deleted file mode 100644 index 064ee954d..000000000 --- a/ui/qt/clipboard/clipboard.go +++ /dev/null @@ -1,15 +0,0 @@ -package clipboard - -// #cgo CPPFLAGS: -I./ -// #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing -// #cgo LDFLAGS: -lstdc++ -// #cgo pkg-config: Qt5Quick -// -// #include "capi.hpp" -import "C" - -import "github.com/obscuren/qml" - -func SetQMLClipboard(context *qml.Context) { - context.SetVar("clipboard", (unsafe.Pointer)(C.initClipboard())) -} diff --git a/ui/qt/clipboard/clipboard.hpp b/ui/qt/clipboard/clipboard.hpp deleted file mode 100644 index 1aa213ceb..000000000 --- a/ui/qt/clipboard/clipboard.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -class Clipboard : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString get READ get WRITE toClipboard NOTIFY clipboardChanged) -public: - Clipboard(); - virtual ~Clipboard(){} - - Q_INVOKABLE void toClipboard(QString _text); - -signals: - void clipboardChanged(); -}; - -#ifdef __cplusplus -} // extern "C" -#endif |