OSSP CVS Repository

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

Check-in Number: 4044
Date: 2003-Feb-14 20:27:03 (local)
2003-Feb-14 19:27:03 (UTC)
User:ms
Branch:
Comment: Added logic to include prefs pixmap in both menu and toolbar, removed optional 'this' parameter from all calls to connect(), ripped out more header includes from monolithic interface header, made call of prefs panel an instance of class QAction, changed .bak file message text in class Prefpanel, and renamed default RPC hosts to show what a proper format is.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.106 -> 1.107     80 inserted, 47 deleted
ossp-pkg/as/as-gui/as_const.h      1.54 -> 1.55     6 inserted, 3 deleted
ossp-pkg/as/as-gui/as_dataop.cpp      1.48 -> 1.49     3 inserted, 1 deleted
ossp-pkg/as/as-gui/as_gui.h      1.74 -> 1.75     14 inserted, 16 deleted
ossp-pkg/as/as-gui/as_main.cpp      1.13 -> 1.14     2 inserted, 0 deleted
ossp-pkg/as/as-gui/as_panel.cpp      1.8 -> 1.9     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.125 -> 1.126     20 inserted, 1 deleted
ossp-pkg/as/as-gui/as_table.cpp      1.21 -> 1.22     0 inserted, 1 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.106 -> 1.107

--- as_assist.cpp        2003/02/14 17:31:54     1.106
+++ as_assist.cpp        2003/02/14 19:27:03     1.107
@@ -41,13 +41,17 @@
 #include <qtooltip.h>
 #include <qwhatsthis.h>
 #include <qstringlist.h>
+#include <qpopupmenu.h>
 #include <qcombobox.h>
 #include <qlistbox.h>
+#include <qstatusbar.h>
+#include <qmenubar.h>
 #include <qcursor.h>
+#include <qaction.h>
+#include <qrect.h>
 #include <qdir.h>
 
 // User interface
-#include "as_gui.h"             // Main classes
 #include "as_amount.h"          // AmountBox class
 #include "as_user.h"            // User class
 #include "as_const.h"           // Application constants
@@ -81,6 +85,7 @@
 #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/prefs.xpm"     // static const char *s_kpcPrefs_xpm[]
 
 
 //
@@ -192,12 +197,13 @@
     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("prefs", QPixmap(s_kpcPrefs_xpm));
 
     // 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
         throw Genexcept("Main window file new action creation failed.");
-    connect(m_pFilenewact, SIGNAL(activated()), this, SLOT(newDoc()));
+    connect(m_pFilenewact, SIGNAL(activated()), SLOT(newDoc()));
     const char *kszFilenewtext = "<p><img source=\"filenew\"> "
                                         "Click this button to make a "
                                         "<em>blank file</em>. You can also "
@@ -209,7 +215,7 @@
     m_pFileopenact = new QAction(trUtf8("Open File"), QPixmap(s_kpcFileopen_xpm), trUtf8("&Open..."), CTRL+Key_O, this, "Open");
     if (m_pFileopenact == NULL) // Sanity check
         throw Genexcept("Main window file open action creation failed.");
-    connect(m_pFileopenact, SIGNAL(activated()), this, SLOT(openDoc()));
+    connect(m_pFileopenact, SIGNAL(activated()), SLOT(openDoc()));
     const char *kszFileopentext = "<p><img source=\"fileopen\"> "
                                   "Click this button to open a "
                                   "<em>new file</em>. You can also select "
@@ -221,7 +227,7 @@
     m_pFilesaveact = new QAction(trUtf8("Save File"), Saveiset, trUtf8("&Save"), CTRL+Key_S, this, "Save");
     if (m_pFilesaveact == NULL) // Sanity check
         throw Genexcept("Main window file save action creation failed.");
-    connect(m_pFilesaveact, SIGNAL(activated()), this, SLOT(saveFile()));
+    connect(m_pFilesaveact, SIGNAL(activated()), SLOT(saveFile()));
     const char *kszFilesavetext = "<p><img source=\"filesave\"> "
                                   "Click this button to <em>save</em> "
                                   "the file you are editing. You will be "
@@ -234,26 +240,26 @@
     m_pFilesaveasact = new QAction(trUtf8("Save File As"), trUtf8("Save &As..."), 0, this, "SaveAs");
     if (m_pFilesaveasact == NULL)   // Sanity check
         throw Genexcept("Main window file save as action creation failed.");
-    connect(m_pFilesaveasact, SIGNAL(activated()), this, SLOT(saveAs()));
+    connect(m_pFilesaveasact, SIGNAL(activated()), SLOT(saveAs()));
     m_pFilesaveasact->setWhatsThis(kszFilesavetext);
 
     // File close current action
     m_pFilecloseact = new QAction(trUtf8("Close"), trUtf8("&Close"), CTRL+Key_W, this, "Close");
     if (m_pFilecloseact == NULL)    // Sanity check
         throw Genexcept("Main window file close action creation failed.");
-    connect(m_pFilecloseact, SIGNAL(activated()), this, SLOT(close()));
+    connect(m_pFilecloseact, SIGNAL(activated()), SLOT(close()));
 
     // File quit action
     m_pFilequitact = new QAction(trUtf8("Exit"), trUtf8("E&xit"), CTRL+Key_Q, this, "Exit");
     if (m_pFilequitact == NULL)     // Sanity check
         throw Genexcept("Main window file quit action creation failed.");
-    connect(m_pFilequitact, SIGNAL(activated()), this, SLOT(quitApp()));
+    connect(m_pFilequitact, SIGNAL(activated()), SLOT(quitApp()));
 
     // Cut action
     m_pCutact = new QAction(trUtf8("Cut"), Cutiset, trUtf8("&Cut"), CTRL+Key_X, this, "Cut");
     if (m_pCutact == NULL)      // Sanity check
         throw Genexcept("Main window cut edit action creation failed.");
-    connect(m_pCutact, SIGNAL(activated()), this, SLOT(cutEntry()));
+    connect(m_pCutact, SIGNAL(activated()), SLOT(cutEntry()));
     const char *kszCuttext = "<p><img source=\"cut\"> "
                                    "Click this button to cut an <em>entry</em>. "
                                    "You can also select the <b>Cut</b> command "
@@ -264,7 +270,7 @@
     m_pCopyact = new QAction(trUtf8("Copy"), Copyiset, trUtf8("&Copy"), CTRL+Key_C, this, "Copy");
     if (m_pCopyact == NULL)     // Sanity check
         throw Genexcept("Main window copy edit action creation failed.");
-    connect(m_pCopyact, SIGNAL(activated()), this, SLOT(copyEntry()));
+    connect(m_pCopyact, SIGNAL(activated()), SLOT(copyEntry()));
     const char *kszCopytext = "<p><img source=\"copy\"> "
                                    "Click this button to copy an <em>entry</em>. "
                                    "You can also select the <b>Copy</b> command "
@@ -275,7 +281,7 @@
     m_pPasteact = new QAction(trUtf8("Paste"), Pasteiset, trUtf8("&Paste"), CTRL+Key_V, this, "Paste");
     if (m_pPasteact == NULL)    // Sanity check
         throw Genexcept("Main window paste edit action creation failed.");
-    connect(m_pPasteact, SIGNAL(activated()), this, SLOT(pasteEntry()));
+    connect(m_pPasteact, SIGNAL(activated()), SLOT(pasteEntry()));
     const char *kszPastetext = "<p><img source=\"paste\"> "
                                    "Click this button to paste an <em>entry</em>. "
                                    "You can also select the <b>Paste</b> command "
@@ -286,7 +292,7 @@
     m_pAddrowact = new QAction(trUtf8("Add Entry"), Rowaddiset, trUtf8("&Add entry"), Key_Insert, this, "Addentry");
     if (m_pAddrowact == NULL)   // Sanity check
         throw Genexcept("Main window add entry action creation failed.");
-    connect(m_pAddrowact, SIGNAL(activated()), this, SLOT(addEntry()));
+    connect(m_pAddrowact, SIGNAL(activated()), SLOT(addEntry()));
     const char *kszAddrowtext = "<p><img source=\"rowadd\"> "
                                 "Click this button to add a <em>new entry</em>. "
                                 "You can also select the <b>Add</b> command "
@@ -297,7 +303,7 @@
     m_pDelrowact = new QAction(trUtf8("Delete Entry"), Rowdeliset, trUtf8("&Delete entry"), Key_Delete, this, "Delentry");
     if (m_pDelrowact == NULL)   // Sanity check
         throw Genexcept("Main window delete entry action creation failed.");
-    connect(m_pDelrowact, SIGNAL(activated()), this, SLOT(delEntry()));
+    connect(m_pDelrowact, SIGNAL(activated()), SLOT(delEntry()));
     const char *kszDelrowtext = "<p><img source=\"rowdel\"> "
                                    "Click this button to delete a <em>entry</em>. "
                                    "You can also select the <b>Delete</b> command "
@@ -308,7 +314,7 @@
     m_pRefreshact = new QAction(trUtf8("Refresh Display"), Refreshiset, 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()));
+    connect(m_pRefreshact, SIGNAL(activated()), 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 "
@@ -319,14 +325,26 @@
     m_pSyncact = new QAction(trUtf8("Synchronize with server"), Synciset, trUtf8("&Synchronize"), CTRL+Key_E, this, "Synchronize");
     if (m_pSyncact == NULL) // Sanity check
         throw Genexcept("Main window synchronize RPC action creation failed.");
-    connect(m_pSyncact, SIGNAL(activated()), this, SLOT(syncIiop()));
-    connect(m_pSyncact, SIGNAL(activated()), this, SLOT(syncSoap()));
+    connect(m_pSyncact, SIGNAL(activated()), SLOT(syncIiop()));
+    connect(m_pSyncact, SIGNAL(activated()), SLOT(syncSoap()));
     const char *kszSynctext = "<p><img source=\"syncrpc\"> "
                               "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_pSyncact->setWhatsThis(kszSynctext);
+
+    // 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
+        throw Genexcept("Main window preferences panel action creation failed.");
+    connect(m_pPrefsact, SIGNAL(activated()), SLOT(configPrefs()));
+    const char *kszPrefstext = "<p><img source=\"prefs\"> "
+                               "Click this button to <em>edit the preferences</em>. "
+                               "You can then apply, accept, or cancel your changes. "
+                               "You can also select the <b>Preferences</b> command "
+                               "from the <b>Edit</b> menu.</p>";
+    m_pPrefsact->setWhatsThis(kszPrefstext);
 }
 
 //
@@ -340,8 +358,8 @@
     if (m_pMenubar == NULL) // Sanity check
         throw Genexcept("Main window menu bar nonexistant.");
 
-    // Make an easter egg ;-)
-    QToolTip::add(m_pMenubar, QRect(0, 0, 2, 2), "Easter Egg");
+//    // Make an easter egg ;-)
+//    QToolTip::add(m_pMenubar, QRect(0, 0, 2, 2), trUtf8("Easter Egg"));
 
     // Construct and populate the file menu with actions
     QPopupMenu *pFilepopup = new QPopupMenu(this);
@@ -370,7 +388,7 @@
     m_pAddrowact->addTo(pEditpopup);
     m_pDelrowact->addTo(pEditpopup);
     pEditpopup->insertSeparator();
-    pEditpopup->insertItem("Preferences...", this, SLOT(configPrefs()));
+    m_pPrefsact->addTo(pEditpopup);
 
     // Construct the view menu and submenus
     m_pViewpopup = new QPopupMenu(this);
@@ -404,6 +422,8 @@
     m_pTbarspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pTbarspopup->insertItem(trUtf8("&View"), this, SLOT(showViewbar()));
     m_pTbarspopup->setItemChecked(nMenuid, true);
+    nMenuid = m_pTbarspopup->insertItem(trUtf8("&Prefs"), this, SLOT(showPrefsbar()));
+    m_pTbarspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pTbarspopup->insertItem(trUtf8("&Whats"), this, SLOT(showWhatsbar()));
     m_pTbarspopup->setItemChecked(nMenuid, true);
     m_pViewpopup->insertItem(trUtf8("&Columns"), m_pColspopup);
@@ -503,6 +523,15 @@
     m_pRefreshact->addTo(m_pViewtools);
     m_pSyncact->addTo(m_pViewtools);
 
+    // Construct and populate the lonely preferences tool bar
+    m_pPrefstools = new QToolBar("Preferences", this, DockTop);
+    if (m_pPrefstools == NULL)                   // Sanity check
+        throw Genexcept("Prefs tool bar creation failed.");
+    m_pPrefstools->setLabel(trUtf8("Preferences editor"));
+    m_pPrefstools->setOpaqueMoving(false);
+    m_pPrefstools->setCloseMode(QDockWindow::Never);
+    m_pPrefsact->addTo(m_pPrefstools);
+
     // Construct and populate the lonely whatsthis tool bar
     m_pWhatstools = new QToolBar("Toolwhats", this, DockTop);
     if (m_pWhatstools == NULL)                  // Sanity check
@@ -612,11 +641,11 @@
     m_pPackagelayout->addWidget(m_pMaintable);  // Finally add the damn table
 
     // Table update signals
-    connect(m_pMaintable, SIGNAL(currentChanged(int, int)), this, SLOT(updEdit(int, int)));
-    connect(m_pMaintable, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(onClick(int, int, int, const QPoint&)));
-    connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), this, SLOT(inplaceEdit(int, int, int, const QPoint&)));
-    connect(m_pTablehead, SIGNAL(sizeChange(int, int, int)), this, SLOT(updSizes(int, int, int)));
-    connect(m_pMaintable, SIGNAL(textEdited(int, int)), this, SLOT(dataChanged(int, int)));
+    connect(m_pMaintable, SIGNAL(currentChanged(int, int)), SLOT(updEdit(int, int)));
+    connect(m_pMaintable, SIGNAL(clicked(int, int, int, const QPoint&)), SLOT(onClick(int, int, int, const QPoint&)));
+    connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), SLOT(inplaceEdit(int, int, int, const QPoint&)));
+    connect(m_pTablehead, SIGNAL(sizeChange(int, int, int)), SLOT(updSizes(int, int, int)));
+    connect(m_pMaintable, SIGNAL(textEdited(int, int)), SLOT(dataChanged(int, int)));
 }
 
 //
@@ -875,34 +904,34 @@
     this->updSizes(TITRAQ_IDXALLCTRLS, -1, -1);
 
     // Validate data just as it is being entered
-    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(validateData(void)));
-    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void)));
-    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void)));
-    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(validateData(void)));
-    connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void)));
-    connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(validateData(void)));
+    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(validateData(void)));
+    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(validateData(void)));
+    connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(validateData(void)));
+    connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(validateData(void)));
 
     // Signals sent between table cells and corresponding edit control widgets
-    connect(m_pLineedit, SIGNAL(textChanged(const QString &)), this, SLOT(updateLine(const QString &)));
-    connect(m_pUseredit, SIGNAL(textChanged(const QString &)), this, SLOT(updateUser(const QString &)));
-    connect(m_pGuidedit, SIGNAL(textChanged(const QString &)), this, SLOT(updateGuid(const QString &)));
-    connect(m_pCrcedit, SIGNAL(textChanged(const QString &)), this, SLOT(updateCrc(const QString &)));
-    connect(m_pRevedit, SIGNAL(textChanged(const QString &)), this, SLOT(updateRev(const QString &)));
-    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(updateDate(const QDate &)));
-    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateStart(const QTime &)));
-    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateFinish(const QTime &)));
-    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(updateAmount(const QTime &)));
-    connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(updateTask(const QString &)));
-    connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(updateRemark(const QString &)));
+    connect(m_pLineedit, SIGNAL(textChanged(const QString &)), SLOT(updateLine(const QString &)));
+    connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(updateUser(const QString &)));
+    connect(m_pGuidedit, SIGNAL(textChanged(const QString &)), SLOT(updateGuid(const QString &)));
+    connect(m_pCrcedit, SIGNAL(textChanged(const QString &)), SLOT(updateCrc(const QString &)));
+    connect(m_pRevedit, SIGNAL(textChanged(const QString &)), SLOT(updateRev(const QString &)));
+    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(updateDate(const QDate &)));
+    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(updateStart(const QTime &)));
+    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(updateFinish(const QTime &)));
+    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(updateAmount(const QTime &)));
+    connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(updateTask(const QString &)));
+    connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(updateRemark(const QString &)));
 
     // Correctly update checksum and revision fields also
-    connect(m_pUseredit, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
-    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), this, SLOT(calcCrc(void)));
-    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void)));
-    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void)));
-    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), this, SLOT(calcCrc(void)));
-    connect(m_pTasks, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
-    connect(m_pRemark, SIGNAL(textChanged(const QString &)), this, SLOT(calcCrc(void)));
+    connect(m_pUseredit, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
+    connect(m_pDateedit, SIGNAL(valueChanged(const QDate &)), SLOT(calcCrc(void)));
+    connect(m_pStarttime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+    connect(m_pEndtime, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+    connect(m_pAmount, SIGNAL(valueChanged(const QTime &)), SLOT(calcCrc(void)));
+    connect(m_pTasks, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
+    connect(m_pRemark, SIGNAL(textChanged(const QString &)), SLOT(calcCrc(void)));
 }
 
 //
@@ -949,6 +978,10 @@
         m_pViewtools->hide();
         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR), false);
     }
+    if (!m_pPrefs->getBool(TITRAQ_PREFPREFBAR, TITRAQ_DEFPREFBAR)) {
+        m_pPrefstools->hide();
+        m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false);
+    }
     if (!m_pPrefs->getBool(TITRAQ_PREFWHATBAR, TITRAQ_DEFWHATBAR)) {
         m_pWhatstools->hide();
         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false);


ossp-pkg/as/as-gui/as_const.h 1.54 -> 1.55

--- as_const.h   2003/02/13 21:56:12     1.54
+++ as_const.h   2003/02/14 19:27:03     1.55
@@ -55,9 +55,9 @@
 #define TITRAQ_PREFLOCALLOG     "loglocal"
 #define TITRAQ_DEFLOCALLOG      "no"
 #define TITRAQ_PREFCORBHOST     "corbahost"
-#define TITRAQ_DEFCORBHOST      "localhost"
+#define TITRAQ_DEFCORBHOST      "localhost:8914"
 #define TITRAQ_PREFSOAPHOST     "soaphost"
-#define TITRAQ_DEFSOAPHOST      "localhost"
+#define TITRAQ_DEFSOAPHOST      "localhost/cgi-bin/asdbserv"
 #define TITRAQ_PREFCORBON       "corbaenable"
 #define TITRAQ_DEFCORBON        0
 #define TITRAQ_PREFSOAPON       "soapenable"
@@ -133,6 +133,8 @@
 #define TITRAQ_DEFEDITBAR       true
 #define TITRAQ_PREFVIEWBAR      "viewtoolbar"
 #define TITRAQ_DEFVIEWBAR       true
+#define TITRAQ_PREFPREFBAR      "preftoolbar"
+#define TITRAQ_DEFPREFBAR       true
 #define TITRAQ_PREFWHATBAR      "whattoolbar"
 #define TITRAQ_DEFWHATBAR       true
 
@@ -214,7 +216,8 @@
 #define TITRAQ_IDXFILEBAR       1
 #define TITRAQ_IDXEDITBAR       2
 #define TITRAQ_IDXVIEWBAR       3
-#define TITRAQ_IDXWHATBAR       4
+#define TITRAQ_IDXPREFBAR       4
+#define TITRAQ_IDXWHATBAR       5
 
 // Indexes of character tokens in strings
 #define TITRAQ_IDXSTATERROR     0


ossp-pkg/as/as-gui/as_dataop.cpp 1.48 -> 1.49

--- as_dataop.cpp        2003/02/14 17:31:54     1.48
+++ as_dataop.cpp        2003/02/14 19:27:03     1.49
@@ -37,9 +37,11 @@
 #include <qregexp.h>            // Portable regular expressions
 #include <qdatetime.h>
 #include <qmessagebox.h>
+#include <qtextstream.h>
+#include <qpopupmenu.h>
+#include <qfile.h>
 
 // User interface
-#include "as_gui.h"             // Main classes
 #include "as_const.h"           // Application constants
 #include "as_tableitem.h"       // For class RtTableItem
 #include "as_crc.h"             // For quality strings


ossp-pkg/as/as-gui/as_gui.h 1.74 -> 1.75

--- as_gui.h     2003/02/14 17:31:54     1.74
+++ as_gui.h     2003/02/14 19:27:03     1.75
@@ -32,21 +32,7 @@
 #ifndef AS_GUI_MWIN_H
 #define AS_GUI_MWIN_H
 
-#include <qapplication.h>
 #include <qmainwindow.h>
-#include <qaction.h>
-#include <qtable.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qstatusbar.h>
-#include <qimage.h>
-#include <qdatetimeedit.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qfile.h>
 
 #ifdef HAVE_CONFIG_H
 #include "ac_config.h"
@@ -59,7 +45,17 @@
 #include "as_version.cpp"
 #undef  _AS_VERSION_CPP_AS_HEADER_
 
-// Method prototypes
+// Trolltech class prototypes
+class QAction;
+class QHeader;
+class QTimeEdit;
+class QComboBox;
+class QLineEdit;
+class QLabel;
+class QDate;
+class QFile;
+
+// Local class prototypes
 // class AmountBox; // Warning: Might be replaced with QTimeEdit
 class Daydatedit;
 class TiTable;
@@ -207,7 +203,7 @@
     QAction     *m_pAddrowact,    *m_pDelrowact;
     QAction     *m_pRefreshact,   *m_pCutact;
     QAction     *m_pCopyact,      *m_pPasteact;
-    QAction     *m_pSyncact;
+    QAction     *m_pSyncact,      *m_pPrefsact;
 
     // Table, cells, and entries in package layout
     TiTable     *m_pMaintable;
@@ -277,6 +273,7 @@
     void showFilebar(void);             // View menu show file toolbar
     void showEditbar(void);             // View menu show edit toolbar
     void showViewbar(void);             // View menu show view toolbar
+    void showPrefsbar(void);            // View menu show prefs toolbar
     void showWhatsbar(void);            // View menu show whats this toolbar
     void showStatcol(void);             // View menu show status column
     void showLinecol(void);             // View menu show line numbers column
@@ -317,6 +314,7 @@
     QToolBar    *m_pFiletools;
     QToolBar    *m_pEdittools;
     QToolBar    *m_pViewtools;
+    QToolBar    *m_pPrefstools;
     QToolBar    *m_pWhatstools;
     QString     *m_szFilename;
 


ossp-pkg/as/as-gui/as_main.cpp 1.13 -> 1.14

--- as_main.cpp  2003/01/29 17:05:31     1.13
+++ as_main.cpp  2003/02/14 19:27:03     1.14
@@ -29,6 +29,8 @@
 //  main.cpp: ISO C++ implementation
 //
 
+#include <qapplication.h>
+
 #include "as_gui.h"
 
 


ossp-pkg/as/as-gui/as_panel.cpp 1.8 -> 1.9

--- as_panel.cpp 2003/02/14 17:31:55     1.8
+++ as_panel.cpp 2003/02/14 19:27:03     1.9
@@ -101,7 +101,7 @@
 
     // Optional file backups with hard coded extension .bak
     m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton");
-    m_pBackupcheck->setText(tr("Leave a .bak file", "Comment for Backupcheck"));
+    m_pBackupcheck->setText(tr("Make .bak file on save", "Comment for Backupcheck"));
     QToolTip::add(m_pBackupcheck, tr("Will make a .bak file when saving", "Comment for toolTip Backupcheck"));
     QWhatsThis::add(m_pBackupcheck, tr("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck"));
     m_pSwitchlay->addWidget(m_pBackupcheck);


ossp-pkg/as/as-gui/as_slot.cpp 1.125 -> 1.126

--- as_slot.cpp  2003/02/14 17:31:55     1.125
+++ as_slot.cpp  2003/02/14 19:27:03     1.126
@@ -39,6 +39,9 @@
 #include <qclipboard.h>
 #include <qmenudata.h>
 #include <qdatastream.h>
+#include <qstatusbar.h>
+#include <qaction.h>
+#include <qpopupmenu.h>
 
 // Qt style headers
 #include <qcdestyle.h>
@@ -49,7 +52,6 @@
 #include <qwindowsstyle.h>
 
 // User interface
-#include "as_gui.h"             // Main classes
 #include "as_const.h"           // Application constants
 #include "as_except.h"          // Exception classes
 #include "as_tableitem.h"       // For our custom table items
@@ -1256,6 +1258,21 @@
 }
 
 //
+// View menu show prefs toolbar
+//
+void Titraqform::showPrefsbar(void)
+{
+    if (m_pPrefstools->isVisible()) {
+        m_pPrefstools->hide();
+        m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), false);
+    }
+    else {
+        m_pPrefstools->show();
+        m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR), true);
+    }
+}
+
+//
 // View menu show whats this toolbar
 //
 void Titraqform::showWhatsbar(void)
@@ -1751,6 +1768,8 @@
     // Get check status from toolbar menu and pass it to prefs handler
     m_pPrefs->setBool(TITRAQ_PREFFILEBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR)));
     m_pPrefs->setBool(TITRAQ_PREFEDITBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR)));
+    m_pPrefs->setBool(TITRAQ_PREFVIEWBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXVIEWBAR)));
+    m_pPrefs->setBool(TITRAQ_PREFPREFBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXPREFBAR)));
     m_pPrefs->setBool(TITRAQ_PREFWHATBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR)));
 
     // Get column widths from main table and pass it to prefs handler


ossp-pkg/as/as-gui/as_table.cpp 1.21 -> 1.22

--- as_table.cpp 2003/02/14 17:31:55     1.21
+++ as_table.cpp 2003/02/14 19:27:03     1.22
@@ -31,7 +31,6 @@
 
 #include <qheader.h>
 
-#include "as_gui.h"
 #include "as_const.h"
 #include "as_table.h"
 

CVSTrac 2.0.1