OSSP CVS Repository

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

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

CVSTrac 2.0.1