OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.34 and 1.35
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.34 -> 1.35

--- as_slot.cpp  2002/12/04 14:50:08     1.34
+++ as_slot.cpp  2002/12/04 18:56:59     1.35
@@ -33,6 +33,7 @@
 #include <qfiledialog.h>
 #include <qcombobox.h>
 #include <qregexp.h>
+#include <qclipboard.h>
 
 // User interface
 #include "as_gui.h"             // Main classes
@@ -50,8 +51,8 @@
 //
 void Titraqform::cutEntry(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    this->copyEntry();  // Reuse slot
+    this->delEntry();   // Reuse slot
 }
 
 //
@@ -59,8 +60,15 @@
 //
 void Titraqform::copyEntry(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    QString Selection;  // Will hold the selected text
+    QClipboard *pClip;  // Will reference the global clipboard
+
+    // Initialize data and clipboard handle
+    Selection = getRowdata();   // Use accessor
+    pClip = QApplication::clipboard();
+
+    Q_ASSERT(!Selection.isNull());
+    pClip->setText(Selection, QClipboard::Clipboard);
 }
 
 //
@@ -68,8 +76,14 @@
 //
 void Titraqform::pasteEntry(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    QString Selection;          // Will receive the clipboard text
+    QClipboard *pClip;          // Will reference the global clipboard
+
+    this->addEntry();           // Reuse slot
+    Selection = pClip->text();  // Copy data
+
+    if (Selection)
+        setRowdata(Selection);  // Use accessor
 }
 
 //

CVSTrac 2.0.1