OSSP CVS Repository

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

Check-in Number: 3915
Date: 2003-Jan-16 09:26:28 (local)
2003-Jan-16 08:26:28 (UTC)
User:ms
Branch:
Comment: Add GUI cod framework, graphics, and stub methods for server syncrhonization.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.59 -> 1.60     2 inserted, 0 deleted
ossp-pkg/as/as-gui/as_assist.cpp      1.79 -> 1.80     49 inserted, 8 deleted
ossp-pkg/as/as-gui/as_gfx/sync.xpm      added-> 1.1
ossp-pkg/as/as-gui/as_gui.h      1.58 -> 1.59     4 inserted, 0 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.75 -> 1.76     27 inserted, 0 deleted

ossp-pkg/as/as-gui/TODO 1.59 -> 1.60

--- TODO 2002/12/20 18:19:12     1.59
+++ TODO 2003/01/16 08:26:29     1.60
@@ -14,6 +14,7 @@
 Generally maintain Preference class
   Implement missing interface methods
 Review destruction of all members, compare with setupPrefs
+Some menus are defined QPopupMenu in header, some in code
 Memory optimization needed in tidataops
 Check all identifiers for undeutig unique scope
 Remove magic numbers from cpp files to titconst like TITRAQ_INDEXREMARK
@@ -39,6 +40,7 @@
 
 Nice to have
 ------------
+After undo and backup, implement drag and drop row swapping
 Implement an unlimited and generic undo and redo buffer class
 Support pasting into as_gui from other app (like vim)
 Add optional automatic file personal data file backup


ossp-pkg/as/as-gui/as_assist.cpp 1.79 -> 1.80

--- as_assist.cpp        2002/12/20 17:42:10     1.79
+++ as_assist.cpp        2003/01/16 08:26:29     1.80
@@ -80,6 +80,8 @@
 #include "as_gfx/statvoid.xpm"  // static const char *s_kpcStatvoid_xpm[]
 #include "as_gfx/refresh.xpm"   // static const char *s_kpcRefresh_xpm[]
 #include "as_gfx/refreshd.xpm"  // static const char *s_kpcDrefresh_xpm[]
+#include "as_gfx/sync.xpm"      // static const char *s_kpcSync_xpm[]
+#include "as_gfx/syncd.xpm"     // static const char *s_kpcDsync_xpm[]
 
 
 //
@@ -177,7 +179,7 @@
 void Titraqform::setupActions(void)
 {
     QIconSet Saveiset, Cutiset, Copyiset, Pasteiset;
-    QIconSet Rowaddiset, Rowdeliset, Refreshiset;
+    QIconSet Rowaddiset, Rowdeliset, Refreshiset, Synciset;
 
     // Construct iconsets to use later for multistate action images
     Saveiset.setPixmap(QPixmap(s_kpcFilesave_xpm), QIconSet::Automatic, QIconSet::Normal);
@@ -194,6 +196,8 @@
     Rowdeliset.setPixmap(QPixmap(s_kpcDrowdel_xpm), QIconSet::Automatic, QIconSet::Disabled);
     Refreshiset.setPixmap(QPixmap(s_kpcRefresh_xpm), QIconSet::Automatic, QIconSet::Normal);
     Refreshiset.setPixmap(QPixmap(s_kpcDrefresh_xpm), QIconSet::Automatic, QIconSet::Disabled);
+    Synciset.setPixmap(QPixmap(s_kpcSync_xpm), QIconSet::Automatic, QIconSet::Normal);
+    Synciset.setPixmap(QPixmap(s_kpcDsync_xpm), QIconSet::Automatic, QIconSet::Disabled);
 
     // First associate the graphics with MIME types
     QMimeSourceFactory::defaultFactory()->setPixmap("osspicon", QPixmap(s_kpcOsspicon_xpm));
@@ -209,7 +213,7 @@
 
     // File new action
     m_pFilenewact = new QAction(trUtf8("New File"), QPixmap(s_kpcFilenew_xpm), trUtf8("&New..."), CTRL+Key_N, this, "New");
-    if (m_pFilenewact == NULL) // Sanity check
+    if (m_pFilenewact == NULL)  // Sanity check
         throw Genexcept("Main window file new action creation failed.");
     connect(m_pFilenewact, SIGNAL(activated()), this, SLOT(newDoc()));
     const char *kszFilenewtext = "<p><img source=\"filenew\"> "
@@ -266,7 +270,7 @@
 
     // Cut action
     m_pCutact = new QAction(trUtf8("Cut"), Cutiset, trUtf8("&Cut"), CTRL+Key_X, this, "Cut");
-    if (m_pCutact == NULL)          // Sanity check
+    if (m_pCutact == NULL)      // Sanity check
         throw Genexcept("Main window cut edit action creation failed.");
     connect(m_pCutact, SIGNAL(activated()), this, SLOT(cutEntry()));
     const char *kszCuttext = "<p><img source=\"cut\"> "
@@ -277,7 +281,7 @@
 
     // Copy action
     m_pCopyact = new QAction(trUtf8("Copy"), Copyiset, trUtf8("&Copy"), CTRL+Key_C, this, "Copy");
-    if (m_pCopyact == NULL)         // Sanity check
+    if (m_pCopyact == NULL)     // Sanity check
         throw Genexcept("Main window copy edit action creation failed.");
     connect(m_pCopyact, SIGNAL(activated()), this, SLOT(copyEntry()));
     const char *kszCopytext = "<p><img source=\"copy\"> "
@@ -288,7 +292,7 @@
 
     // Paste action
     m_pPasteact = new QAction(trUtf8("Paste"), Pasteiset, trUtf8("&Paste"), CTRL+Key_V, this, "Paste");
-    if (m_pPasteact == NULL)         // Sanity check
+    if (m_pPasteact == NULL)    // Sanity check
         throw Genexcept("Main window paste edit action creation failed.");
     connect(m_pPasteact, SIGNAL(activated()), this, SLOT(pasteEntry()));
     const char *kszPastetext = "<p><img source=\"paste\"> "
@@ -299,7 +303,7 @@
 
     // Add data row action
     m_pAddrowact = new QAction(trUtf8("Add Row"), Rowaddiset, trUtf8("&Add row"), Key_Insert, this, "Addrow");
-    if (m_pAddrowact == NULL)       // Sanity check
+    if (m_pAddrowact == NULL)   // Sanity check
         throw Genexcept("Main window add row action creation failed.");
     connect(m_pAddrowact, SIGNAL(activated()), this, SLOT(addEntry()));
     const char *kszAddrowtext = "<p><img source=\"rowadd\"> "
@@ -310,7 +314,7 @@
 
     // Delete data row action
     m_pDelrowact = new QAction(trUtf8("Delete Row"), Rowdeliset, trUtf8("&Delete row"), Key_Delete, this, "Delrow");
-    if (m_pDelrowact == NULL)       // Sanity check
+    if (m_pDelrowact == NULL)   // Sanity check
         throw Genexcept("Main window delete row action creation failed.");
     connect(m_pDelrowact, SIGNAL(activated()), this, SLOT(delEntry()));
     const char *kszDelrowtext = "<p><img source=\"rowdel\"> "
@@ -321,7 +325,7 @@
 
     // Refresh data display action
     m_pRefreshact = new QAction(trUtf8("Refresh Display"), Refreshiset, trUtf8("&Refresh display"), CTRL+Key_R, this, "Refresh");
-    if (m_pRefreshact == NULL)      // Sanity check
+    if (m_pRefreshact == NULL)  // Sanity check
         throw Genexcept("Main window refresh action creation failed.");
     connect(m_pRefreshact, SIGNAL(activated()), this, SLOT(refreshDisplay()));
     const char *kszRefreshtext = "<p><img source=\"refresh\"> "
@@ -329,6 +333,30 @@
                                  "You can also select the <b>Refresh</b> command "
                                  "from the <b>View</b> menu.</p>";
     m_pRefreshact->setWhatsThis(kszRefreshtext);
+
+    // Syncronize data with remote server over IIOP action
+    m_pSynciiopact = new QAction(trUtf8("Synchronize over IIOP"), Synciset, trUtf8("&Synchronize IIOP"), CTRL+Key_E, this, "Synchronizeiiop");
+    if (m_pSynciiopact == NULL) // Sanity check
+        throw Genexcept("Main window synchronize IIOP action creation failed.");
+    connect(m_pSynciiopact, SIGNAL(activated()), this, SLOT(syncIiop()));
+    const char *kszSynciioptext = "<p><img source=\"synchronize\"> "
+                                  "Click this button to <em>synchronize the data</em>. "
+                                  "Your changed entries will be sent to the server. "
+                                  "You can also select the <b>Synchronize</b> command "
+                                  "from the <b>Report</b> menu.</p>";
+    m_pSynciiopact->setWhatsThis(kszSynciioptext);
+
+    // Syncronize data with remote server over SOAP action
+    m_pSyncsoapact = new QAction(trUtf8("Synchronize over SOAP"), Synciset, trUtf8("&Synchronize SOAP"), CTRL+Key_E, this, "Synchronizesoap");
+    if (m_pSyncsoapact == NULL) // Sanity check
+        throw Genexcept("Main window synchronize SOAP action creation failed.");
+    connect(m_pSyncsoapact, SIGNAL(activated()), this, SLOT(syncSoap()));
+    const char *kszSyncsoaptext = "<p><img source=\"synchronize\"> "
+                                  "Click this button to <em>synchronize the data</em>. "
+                                  "Your changed entries will be sent to the server. "
+                                  "You can also select the <b>Synchronize</b> command "
+                                  "from the <b>Report</b> menu.</p>";
+    m_pSyncsoapact->setWhatsThis(kszSyncsoaptext);
 }
 
 //
@@ -436,6 +464,17 @@
     nMenuid = m_pColspopup->insertItem(trUtf8("&Remark"), this, SLOT(showRemarkcol()));
     m_pColspopup->setItemChecked(nMenuid, true);
 
+    // Construct and populate the report menu with subitems
+    QPopupMenu *pReportpopup = new QPopupMenu(this);
+    if (pReportpopup == NULL) // Sanity check
+        throw Genexcept("Main window report popup creation failed.");
+    m_pMenubar->insertItem(trUtf8("&Report"), pReportpopup);
+    m_pSynciiopact->addTo(pReportpopup);
+    m_pSyncsoapact->addTo(pReportpopup);
+    pReportpopup->insertSeparator();
+    nMenuid = pReportpopup->insertItem(trUtf8("&Local Report"), this, SLOT(genReport()));
+    pReportpopup->setItemEnabled(nMenuid, false);
+
     // Pad spacing to force help menu to appear far right
     m_pMenubar->insertSeparator();
 
@@ -951,6 +990,8 @@
     m_pCutact->setEnabled(bTurned);
     m_pCopyact->setEnabled(bTurned);
     m_pPasteact->setEnabled(bTurned);
+    m_pSynciiopact->setEnabled(bTurned);
+    m_pSyncsoapact->setEnabled(bTurned);
 
     // Unconditional settings
     this->updEdit(m_pMaintable->currentRow(), 0);   // Update edit controls


ossp-pkg/as/as-gui/as_gfx/sync.xpm -> 1.1

*** /dev/null    Sat Nov 23 06:09:04 2024
--- -    Sat Nov 23 06:09:07 2024
***************
*** 0 ****
--- 1,46 ----
+ /* XPM */
+ static const char *s_kpcSync_xpm[] = {
+ "22 22 21 1",
+ "      c None",
+ ".     c #000000",
+ "+     c #55551D",
+ "@     c #4C4C16",
+ "#     c #343408",
+ "$     c #555555",
+ "%     c #4C4C4C",
+ "&     c #343434",
+ "*     c #B6DB45",
+ "=     c #A7D31C",
+ "-     c #0082F1",
+ ";     c #0075D8",
+ ">     c #4A4A14",
+ ",     c #B2D93A",
+ "'     c #85A900",
+ ")     c #4A4A4A",
+ "!     c #007EEC",
+ "~     c #004ACC",
+ "{     c #363636",
+ "]     c #799A00",
+ "^     c #003AC9",
+ "                      ",
+ "    .          ....   ",
+ "   ..              .  ",
+ "    .           ...   ",
+ "    .          .      ",
+ "    .     ..   .....  ",
+ "                      ",
+ "  +@#.    ..    $%&.  ",
+ "  @*=.          %-;.  ",
+ "  >,'.    ..    )!~.  ",
+ "  >,'.          )!~.  ",
+ "  >,'.    .. .  )!~.  ",
+ "  >,'.       .. )!~.  ",
+ "  >,'...........{!~.  ",
+ "  >,'.       .. )!~.  ",
+ "  >,'.    .. .  )!~.  ",
+ "  >,'.          )!~.  ",
+ "  >,'.    ..    )!~.  ",
+ "  #=].          &;^.  ",
+ "  ....    ..    ....  ",
+ "                      ",
+ "                      "};


ossp-pkg/as/as-gui/as_gui.h 1.58 -> 1.59

--- as_gui.h     2002/12/19 20:46:26     1.58
+++ as_gui.h     2003/01/16 08:26:29     1.59
@@ -122,6 +122,7 @@
     QAction     *m_pAddrowact,    *m_pDelrowact;
     QAction     *m_pRefreshact,   *m_pCutact;
     QAction     *m_pCopyact,      *m_pPasteact;
+    QAction     *m_pSynciiopact,  *m_pSyncsoapact;
 
     // Table, cells, and entries in package layout
     TiTable     *m_pMaintable;
@@ -150,6 +151,8 @@
     void addEntry(int nRows= -1);       // Add task entries to the list
     void delEntry(int nRows= -1);       // Delete task entries from the list
     void refreshDisplay(void);          // Refresh the display of all data items
+    void syncIiop(void);                // Syncronize data with server using IIOP
+    void syncSoap(void);                // Syncronize data with server using SOAP
     void newDoc(void);                  // Make and display a new document window
     void openDoc(void);                 // Open and display an existing document
     void saveFile(void);                // Serialize to the current file
@@ -196,6 +199,7 @@
     void showAmountcol(void);           // View menu show Amounts column
     void showTaskcol(void);             // View menu show Tasks column
     void showRemarkcol(void);           // View menu show Remarks column
+    void genReport(void);               // Generate a local formatted report
     void savePrefs(void);               // Save user preferences
 
 protected:


ossp-pkg/as/as-gui/as_slot.cpp 1.75 -> 1.76

--- as_slot.cpp  2002/12/20 17:42:10     1.75
+++ as_slot.cpp  2003/01/16 08:26:29     1.76
@@ -1138,6 +1138,33 @@
 }
 
 //
+// Generate a local formatted report
+//
+void Titraqform::genReport(void)
+{
+    Prototype Unimp;
+    Unimp.doMbox();
+}
+
+//
+// Syncronize data with server using IIOP
+//
+void Titraqform::syncIiop(void)
+{
+    Prototype Unimp;
+    Unimp.doMbox();
+}
+
+//
+// Syncronize data with server using SOAP
+//
+void Titraqform::syncSoap(void)
+{
+    Prototype Unimp;
+    Unimp.doMbox();
+}
+
+//
 // Save user preferences
 //
 void Titraqform::savePrefs(void)

CVSTrac 2.0.1