diff libgui/src/m-editor/file-editor.h @ 18651:992b6354c8c6 gui-release

GUI: implement file drag and drop to command and edit window (Bug #41443) * libgui/src/m-editor/file-editor.h, ibgui/src/m-editor/file-editor.cpp (file_editor::file_editor): call setAcceptDrops. (file_editor::dragEnterEvent): New function. (file_editor::dropEvent): New function. * libgui/qterminal/libqterminal/unix/TerminalView.cpp (TerminalView::dropEvent): get URL names on drop event.
author John Donoghue
date Wed, 16 Apr 2014 16:19:45 -0400
parents 26d15a57f45b
children 1b289f45187f
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.h	Mon Apr 07 13:31:33 2014 -0400
+++ b/libgui/src/m-editor/file-editor.h	Wed Apr 16 16:19:45 2014 -0400
@@ -30,6 +30,9 @@
 #include <QCloseEvent>
 #include <QTabWidget>
 
+#include <QDragEnterEvent>
+#include <QDropEvent>
+
 #include <map>
 
 #include "file-editor-interface.h"
@@ -205,6 +208,11 @@
   void zoom_out (bool);
   void zoom_normal (bool);
 
+protected:
+
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+  
 private:
 
   bool is_editor_console_tabbed ();