OSSP CVS Repository

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

Check-in Number: 3867
Date: 2002-Dec-12 22:13:29 (local)
2002-Dec-12 21:13:29 (UTC)
User:ms
Branch:
Comment: Implement persistent frame layout and dock positions.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_const.h      1.22 -> 1.23     1 inserted, 0 deleted
ossp-pkg/as/as-gui/as_gui.cpp      1.29 -> 1.30     5 inserted, 0 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.54 -> 1.55     6 inserted, 0 deleted

ossp-pkg/as/as-gui/as_const.h 1.22 -> 1.23

--- as_const.h   2002/12/12 20:52:13     1.22
+++ as_const.h   2002/12/12 21:13:29     1.23
@@ -76,6 +76,7 @@
 #define TITRAQ_DEFREMCOLON      true
 
 // Frame geometry preferences
+#define TITRAQ_PREFFRAMELAY     "framelayout"
 #define TITRAQ_PREFFRAMEWIDTH   "framewidth"
 #define TITRAQ_DEFFRAMEWIDTH    640
 #define TITRAQ_PREFFRAMEHEIGHT  "frameheight"


ossp-pkg/as/as-gui/as_gui.cpp 1.29 -> 1.30

--- as_gui.cpp   2002/12/12 20:52:13     1.29
+++ as_gui.cpp   2002/12/12 21:13:29     1.30
@@ -68,6 +68,11 @@
         m_pPrefs->getNumber(TITRAQ_PREFFRAMEHEIGHT, TITRAQ_DEFFRAMEHEIGHT));
     setCaption("OSSP Titraq");
 
+    // Rehydrate main window layout and doc positions
+    QString Laystring = m_pPrefs->getString(TITRAQ_PREFFRAMELAY, NULL); // FIXME: Handle first case better
+    QTextStream Laystream(&Laystring, IO_ReadOnly);
+    Laystream >> *this; // Persist the main window
+
 //    // Lock down window size
 //    setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0,
 //        (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth()));


ossp-pkg/as/as-gui/as_slot.cpp 1.54 -> 1.55

--- as_slot.cpp  2002/12/12 20:52:13     1.54
+++ as_slot.cpp  2002/12/12 21:13:29     1.55
@@ -1066,6 +1066,12 @@
     // Set frame geometry preferences
     m_pPrefs->setNumber(TITRAQ_PREFFRAMEWIDTH, (long)this->width());
     m_pPrefs->setNumber(TITRAQ_PREFFRAMEHEIGHT, (long)this->height());
+
+    // Remember main window layout and doc positions
+    QString Laystring;
+    QTextStream Laystream(&Laystring, IO_WriteOnly);
+    Laystream << *this; // Persist the main window
+    m_pPrefs->setString(TITRAQ_PREFFRAMELAY, Laystring);
 }
 
 //

CVSTrac 2.0.1