OSSP CVS Repository

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

Check-in Number: 2873
Date: 2002-Nov-24 18:56:54 (local)
2002-Nov-24 17:56:54 (UTC)
User:ms
Branch:
Comment: Add a DOM based configuration file.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/Makefile.in      1.14 -> 1.15     2 inserted, 2 deleted
ossp-pkg/as/as-gui/TODO      1.11 -> 1.12     3 inserted, 0 deleted
ossp-pkg/as/as-gui/as_assist.cpp      1.10 -> 1.11     18 inserted, 0 deleted
ossp-pkg/as/as-gui/as_gui.cpp      1.17 -> 1.18     1 inserted, 0 deleted
ossp-pkg/as/as-gui/as_gui.h      1.18 -> 1.19     7 inserted, 0 deleted
ossp-pkg/titraq/Makefile.in      1.14 -> 1.15     2 inserted, 2 deleted
ossp-pkg/titraq/TODO      1.11 -> 1.12     3 inserted, 0 deleted
ossp-pkg/titraq/titassist.cpp      1.10 -> 1.11     18 inserted, 0 deleted
ossp-pkg/titraq/titprefs.cpp      added-> 1.1
ossp-pkg/titraq/titprefs.h      added-> 1.1
ossp-pkg/titraq/titraq.cpp      1.17 -> 1.18     1 inserted, 0 deleted
ossp-pkg/titraq/titraq.h      1.18 -> 1.19     7 inserted, 0 deleted

ossp-pkg/as/as-gui/Makefile.in 1.14 -> 1.15

--- Makefile.in  2002/11/22 11:46:32     1.14
+++ Makefile.in  2002/11/24 17:56:54     1.15
@@ -65,9 +65,9 @@
 TARGET_PROGS    = titraq
 TARGET_MANS     = titraq.1 titraq.conf.5
 
-SRCS            = main.cpp titraq.cpp titassist.cpp titslot.cpp tidatops.cpp titrex.cpp generic.cpp titraq_version.c
+SRCS            = main.cpp titraq.cpp titassist.cpp titslot.cpp tidatops.cpp titrex.cpp generic.cpp prefs.cpp titraq_version.c
 
-OBJS            = main.o titraq.o titassist.o titslot.o tidatops.o titrex.o generic.o titraq_version.o
+OBJS            = main.o titraq.o titassist.o titslot.o tidatops.o titrex.o generic.o prefs.o titraq_version.o
 
 GRAFX           = gfx/ossplogo.xpm
 


ossp-pkg/as/as-gui/TODO 1.11 -> 1.12

--- TODO 2002/11/22 21:14:27     1.11
+++ TODO 2002/11/24 17:56:54     1.12
@@ -20,6 +20,9 @@
 Report errors in all slot code
 Add preferences file format XML
 Read username from Betriebsysteme
+Rework error handling in prefs
+Generally maintain Preference class
+  Implement missing interface methods
 
 Dreams
 ------


ossp-pkg/as/as-gui/as_assist.cpp 1.10 -> 1.11

--- as_assist.cpp        2002/11/22 21:14:27     1.10
+++ as_assist.cpp        2002/11/24 17:56:54     1.11
@@ -6,6 +6,8 @@
 #include <qlistbox.h>
 #include <qcursor.h>
 
+#include <iostream>
+
 // User interface
 #include "titraq.h"
 #include "titrex.h"             // Exception classes
@@ -427,3 +429,19 @@
     connect(m_pQuitbutton, SIGNAL(clicked()), qApp, SLOT(quit()));
     m_pControllayout->addWidget(m_pQuitbutton);
 }
+
+//
+// Construct the preferences
+//
+void Titraqform::setupPrefs(void)
+{
+    m_pPrefs = new Preferences(TITRAQ_PREFNAME, TITRAQ_APPTITLE, TITRAQ_PREFVER);
+    if (m_pPrefs->fileState()) { // No file was found, so create a new one
+std::cout << "Executing if" << std::endl;
+        m_pPrefs->setString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE);
+        m_pPrefs->setString(TITRAQ_PREFSTYLE, TITRAQ_DEFSTYLE);
+        m_pPrefs->setString(TITRAQ_PREFVIEW, TITRAQ_DEFVIEW);
+        m_pPrefs->setString(TITRAQ_PREFREMOTELOG, TITRAQ_DEFREMOTELOG);
+        m_pPrefs->setString(TITRAQ_PREFLOCALLOG, TITRAQ_DEFLOCALLOG);
+    }
+}


ossp-pkg/as/as-gui/as_gui.cpp 1.17 -> 1.18

--- as_gui.cpp   2002/11/20 11:06:32     1.17
+++ as_gui.cpp   2002/11/24 17:56:54     1.18
@@ -46,6 +46,7 @@
         setupTable();
         setupEditlay();
         setupButtons();
+        setupPrefs();
     }
     catch (Genexcept& Genex) {
         Genex.reportErr();


ossp-pkg/as/as-gui/as_gui.h 1.18 -> 1.19

--- as_gui.h     2002/11/22 19:42:25     1.18
+++ as_gui.h     2002/11/24 17:56:54     1.19
@@ -16,6 +16,9 @@
 #include <qlayout.h>
 #include <qfile.h>
 
+#include "prefs.h"
+#include "titconst.h"
+
 // Intentional no operation
 #define TITRAQ_NOP ((void)0)
 
@@ -33,6 +36,9 @@
     Titraqform(QWidget *pParent = 0, const char *kszName = 0, WFlags Flags = 0);
     ~Titraqform(void);
 
+    // Top level members
+    Preferences *m_pPrefs;
+
     // Main application actions
     QAction     *m_pFilenewact,   *m_pFileopenact;
     QAction     *m_pFilesaveact,  *m_pFilesaveasact;
@@ -118,6 +124,7 @@
     void setupEditlay(void);            // Editing lay
     void setupButtons(void);            // Push button widgets
     void setupPieces(void);             // Assemble widget pieces
+    void setupPrefs(void);              // Preferences
 
     // Data processing
     void loadData(QFile &);             // Load accounting data from file








CVSTrac 2.0.1