OSSP CVS Repository

ossp - Check-in [3834]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3834
Date: 2002-Dec-04 19:56:59 (local)
2002-Dec-04 18:56:59 (UTC)
User:ms
Branch:
Comment: Implemented row by row editing, introduced working cut copy and paste methods.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/Makefile.in      1.23 -> 1.24     2 inserted, 2 deleted
ossp-pkg/as/as-gui/as_const.h      1.14 -> 1.15     1 inserted, 0 deleted
ossp-pkg/as/as-gui/as_gui.h      1.39 -> 1.40     4 inserted, 2 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.34 -> 1.35     20 inserted, 6 deleted

ossp-pkg/as/as-gui/Makefile.in 1.23 -> 1.24

--- Makefile.in  2002/12/03 17:05:11     1.23
+++ Makefile.in  2002/12/04 18:56:59     1.24
@@ -66,9 +66,9 @@
 TARGET_PROGS    = as_gui
 TARGET_MANS     = as_gui.1 as_gui.conf.5
 
-SRCS            = as_main.cpp as_gui.cpp as_assist.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_pref.cpp as_uuidgen.cpp as_version.cpp
+SRCS            = as_main.cpp as_gui.cpp as_assist.cpp as_util.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_pref.cpp as_uuidgen.cpp as_version.cpp
 
-OBJS            = as_main.o as_gui.o as_assist.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_pref.o as_uuidgen.o as_version.o
+OBJS            = as_main.o as_gui.o as_assist.o as_util.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_pref.o as_uuidgen.o as_version.o
 
 GRAFX           = gfx/ossplogo.xpm
 


ossp-pkg/as/as-gui/as_const.h 1.14 -> 1.15

--- as_const.h   2002/12/04 16:00:48     1.14
+++ as_const.h   2002/12/04 18:56:59     1.15
@@ -51,6 +51,7 @@
 
 // Other string constants
 #define TITRAQ_DATEZERO         "0000-00-00"
+#define TITRAQ_SEPARATORTOK     " "
 
 // Indexes of table columns
 #define TITRAQ_IDXALLCTRLS     -1


ossp-pkg/as/as-gui/as_gui.h 1.39 -> 1.40

--- as_gui.h     2002/12/04 11:34:08     1.39
+++ as_gui.h     2002/12/04 18:56:59     1.40
@@ -81,8 +81,10 @@
     ~Titraqform(void);
 
     // Accessor methods
-    const bool isDirty(void) {return m_bDirt;};     // Check for changed state danger
-    void setDirty(bool bDirty = true) {m_bDirt = bDirty;};      // Clean or dirty
+    const bool isDirty(void) {return m_bDirt;};             // Check for changed state danger
+    void setDirty(bool bDirty = true) {m_bDirt = bDirty;};  // Clean or dirty
+    const QString getRowdata(void) const;                   // Get a whole row of data
+    void setRowdata(QString &) const;                       // Set a whole row of data
 
     // Top level members
     Preferences *m_pPrefs;


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