OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_assist.cpp 1.71 -> 1.72

--- as_assist.cpp        2002/12/16 14:07:59     1.71
+++ as_assist.cpp        2002/12/16 16:05:57     1.72
@@ -73,6 +73,7 @@
 #include "as_gfx/staterr.xpm"   // static const char *s_kpcStaterror_xpm[]
 #include "as_gfx/statwrn.xpm"   // static const char *s_kpcStatwarn_xpm[]
 #include "as_gfx/statvoid.xpm"  // static const char *s_kpcStatvoid_xpm[]
+#include "as_gfx/refresh.xpm"   // static const char *s_kpcRefresh_xpm[]
 
 
 //
@@ -132,7 +133,8 @@
         m_pPrefs->setString(TITRAQ_PREFLOCALLOG, TITRAQ_DEFLOCALLOG);
         m_pPrefs->flush();  // Write the new conf file
         QTextStream cerr(stderr, IO_WriteOnly);
-        cerr << trUtf8("Created new preferences file ") << Homedir + QChar('/') + QString::fromLocal8Bit(TITRAQ_PREFNAME) << endl;
+        cerr << trUtf8("Created new preferences file ") << Homedir << QChar('/')
+             << QString::fromLocal8Bit(TITRAQ_PREFNAME) << endl;
     }
 
     // Use the preferred configuration values to initialize titraq
@@ -176,6 +178,7 @@
     QMimeSourceFactory::defaultFactory()->setPixmap("paste", QPixmap(s_kpcPaste_xpm));
     QMimeSourceFactory::defaultFactory()->setPixmap("rowadd", QPixmap(s_kpcRowadd_xpm));
     QMimeSourceFactory::defaultFactory()->setPixmap("rowdel", QPixmap(s_kpcRowdel_xpm));
+    QMimeSourceFactory::defaultFactory()->setPixmap("refresh", QPixmap(s_kpcRefresh_xpm));
 
     // File new action
     m_pFilenewact = new QAction(trUtf8("New File"), QPixmap(s_kpcFilenew_xpm), trUtf8("&New..."), CTRL+Key_N, this, "New");
@@ -287,6 +290,17 @@
                                    "You can also select the <b>Delete</b> command "
                                    "from the <b>Edit</b> menu.</p>";
     m_pDelrowact->setWhatsThis(kszDelrowtext);
+
+    // Refresh data display action
+    m_pRefreshact = new QAction(trUtf8("Refresh Display"), QPixmap(s_kpcRefresh_xpm), trUtf8("&Refresh display"), CTRL+Key_R, this, "Refresh");
+    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\"> "
+                                 "Click this button to <em>refresh the display</em>. "
+                                 "You can also select the <b>Refresh</b> command "
+                                 "from the <b>View</b> menu.</p>";
+    m_pRefreshact->setWhatsThis(kszRefreshtext);
 }
 
 //
@@ -356,6 +370,8 @@
     nMenuid = m_pViewpopup->insertItem(trUtf8("&Timing"), this, SLOT(timingView()));
     m_pViewpopup->setItemEnabled(nMenuid, false);
     m_pViewpopup->insertSeparator();
+    m_pRefreshact->addTo(m_pViewpopup); // Refresh action
+    m_pViewpopup->insertSeparator();
     m_pViewpopup->insertItem(trUtf8("&Toolbars"), m_pTbarspopup);
     nMenuid = m_pTbarspopup->insertItem(trUtf8("&File"), this, SLOT(showFilebar()));
     m_pTbarspopup->setItemChecked(nMenuid, true);
@@ -438,6 +454,15 @@
     m_pAddrowact->addTo(m_pEdittools);
     m_pDelrowact->addTo(m_pEdittools);
 
+    // Construct and populate the view tool bar
+    m_pViewtools = new QToolBar("Toolview", this, DockTop);
+    if (m_pViewtools == NULL)                   // Sanity check
+        throw Genexcept("View tool bar creation failed.");
+    m_pViewtools->setLabel(trUtf8("View Ops"));
+    m_pViewtools->setOpaqueMoving(false);
+    m_pViewtools->setCloseMode(QDockWindow::Never);
+    m_pRefreshact->addTo(m_pViewtools);
+
     // Construct and populate the lonely whatsthis tool bar
     m_pWhatstools = new QToolBar("Toolwhats", this, DockTop);
     if (m_pWhatstools == NULL)                  // Sanity check
@@ -507,7 +532,7 @@
     m_pMaintable->horizontalHeader()->setClickEnabled(true); // Allow click signals
     m_pMaintable->horizontalHeader()->setTracking(false); // No continuous tracking
     m_pMaintable->setColumnStretchable(TITRAQ_IDXTAIL - 1, true);
-    m_pMaintable->setSorting(false);
+    m_pMaintable->setSorting(true);
 
     // Table header row
     m_pTablehead = m_pMaintable->horizontalHeader();
@@ -852,6 +877,10 @@
         m_pEdittools->hide();
         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false);
     }
+    if (!m_pPrefs->getBool(TITRAQ_PREFVIEWBAR, TITRAQ_DEFVIEWBAR)) {
+        m_pViewtools->hide();
+        m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false);
+    }
     if (!m_pPrefs->getBool(TITRAQ_PREFWHATBAR, TITRAQ_DEFWHATBAR)) {
         m_pWhatstools->hide();
         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false);

CVSTrac 2.0.1