OSSP CVS Repository

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

Check-in Number: 4049
Date: 2003-Feb-17 18:18:24 (local)
2003-Feb-17 17:18:24 (UTC)
User:ms
Branch:
Comment: Implemented a local report action, and inserted local reporting logic in the report menu and view toolbar using new class Reportpanel.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.108 -> 1.109     22 inserted, 3 deleted
ossp-pkg/as/as-gui/as_gui.h      1.76 -> 1.77     1 inserted, 0 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.108 -> 1.109

--- as_assist.cpp        2003/02/17 13:38:22     1.108
+++ as_assist.cpp        2003/02/17 17:18:24     1.109
@@ -85,6 +85,8 @@
 #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[]
+#include "as_gfx/report.xpm"    // static const char *s_kpcReport_xpm[]
+#include "as_gfx/reportd.xpm"   // static const char *s_kpcDreport_xpm[]
 #include "as_gfx/prefs.xpm"     // static const char *s_kpcPrefs_xpm[]
 
 
@@ -165,7 +167,8 @@
 void Titraqform::setupActions(void)
 {
     QIconSet Saveiset, Cutiset, Copyiset, Pasteiset;
-    QIconSet Rowaddiset, Rowdeliset, Refreshiset, Synciset;
+    QIconSet Rowaddiset, Rowdeliset, Refreshiset;
+    QIconSet Synciset, Reportiset;
 
     // Construct iconsets to use later for multistate action images
     Saveiset.setPixmap(QPixmap(s_kpcFilesave_xpm), QIconSet::Automatic, QIconSet::Normal);
@@ -184,6 +187,8 @@
     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);
+    Reportiset.setPixmap(QPixmap(s_kpcReport_xpm), QIconSet::Automatic, QIconSet::Normal);
+    Reportiset.setPixmap(QPixmap(s_kpcDreport_xpm), QIconSet::Automatic, QIconSet::Disabled);
 
     // First associate the graphics with MIME types
     QMimeSourceFactory::defaultFactory()->setPixmap("osspicon", QPixmap(s_kpcOsspicon_xpm));
@@ -197,6 +202,7 @@
     QMimeSourceFactory::defaultFactory()->setPixmap("rowdel", QPixmap(s_kpcRowdel_xpm));
     QMimeSourceFactory::defaultFactory()->setPixmap("refresh", QPixmap(s_kpcRefresh_xpm));
     QMimeSourceFactory::defaultFactory()->setPixmap("syncrpc", QPixmap(s_kpcSync_xpm));
+    QMimeSourceFactory::defaultFactory()->setPixmap("locreport", QPixmap(s_kpcReport_xpm));
     QMimeSourceFactory::defaultFactory()->setPixmap("prefs", QPixmap(s_kpcPrefs_xpm));
 
     // File new action
@@ -334,6 +340,18 @@
                               "from the <b>Report</b> menu.</p>";
     m_pSyncact->setWhatsThis(kszSynctext);
 
+    // Local report generation action
+    m_pReportact = new QAction(trUtf8("Generate a local report"), Reportiset, trUtf8("&Report"), CTRL+Key_T, this, "LocalReport");
+    if (m_pReportact == NULL) // Sanity check
+        throw Genexcept("Main window local report action creation failed.");
+    connect(m_pReportact, SIGNAL(activated()), SLOT(genReport()));
+    const char *kszReporttext = "<p><img source=\"locreport\"> "
+                                "Click this button to <em>report your data</em>. "
+                                "A local report will be generated for you to view. "
+                                "You can also select the <b>Local Report</b> command "
+                                "from the <b>Report</b> menu.</p>";
+    m_pReportact->setWhatsThis(kszReporttext);
+
     // Offer a formatted preferences panel for intuitive prefs object editing
     m_pPrefsact = new QAction(trUtf8("Edit the preferences"), QPixmap(s_kpcPrefs_xpm), trUtf8("P&references..."), CTRL+Key_F, this, "Prefspanel");
     if (m_pPrefsact == NULL) // Sanity check
@@ -462,8 +480,7 @@
     m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)
         | m_pPrefs->getBool(TITRAQ_PREFSOAPON, TITRAQ_DEFSOAPON));
 #endif // defined HAVE_MICO || defined HAVE_ESOAP
-    nMenuid = pReportpopup->insertItem(trUtf8("&Local Report"), this, SLOT(genReport()));
-    pReportpopup->setItemEnabled(nMenuid, false);
+    m_pReportact->addTo(pReportpopup);
 
     // Pad spacing to force help menu to appear far right
     m_pMenubar->insertSeparator();
@@ -521,6 +538,7 @@
     m_pViewtools->setOpaqueMoving(false);
     m_pViewtools->setCloseMode(QDockWindow::Never);
     m_pRefreshact->addTo(m_pViewtools);
+    m_pReportact->addTo(m_pViewtools);
     m_pSyncact->addTo(m_pViewtools);
 
     // Construct and populate the lonely preferences tool bar
@@ -1020,6 +1038,7 @@
     m_pCutact->setEnabled(bTurned);
     m_pCopyact->setEnabled(bTurned);
     m_pPasteact->setEnabled(bTurned);
+    m_pReportact->setEnabled(bTurned);
 #if defined HAVE_MICO || defined HAVE_ESOAP
     if (bTurned)
         m_pSyncact->setEnabled(m_pPrefs->getBool(TITRAQ_PREFCORBON, TITRAQ_DEFCORBON)


ossp-pkg/as/as-gui/as_gui.h 1.76 -> 1.77

--- as_gui.h     2003/02/17 13:38:22     1.76
+++ as_gui.h     2003/02/17 17:18:24     1.77
@@ -204,6 +204,7 @@
     QAction     *m_pRefreshact,   *m_pCutact;
     QAction     *m_pCopyact,      *m_pPasteact;
     QAction     *m_pSyncact,      *m_pPrefsact;
+    QAction     *m_pReportact;
 
     // Table, cells, and entries in package layout
     TiTable     *m_pMaintable;

CVSTrac 2.0.1