OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_gui.h versions 1.57 and 1.58
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_gui.h 1.57 -> 1.58

--- as_gui.h     2002/12/18 14:50:58     1.57
+++ as_gui.h     2002/12/19 20:46:26     1.58
@@ -48,6 +48,7 @@
 #include <qlayout.h>
 #include <qfile.h>
 
+#include "as_except.h"  // Exception classes
 #include "as_const.h"   // For general constants
 #include "as_pref.h"    // For class Preferences
 #include "as_amount.h"  // For class AmountBox
@@ -84,6 +85,32 @@
     const QString getRowdata(void) const;                   // Get a whole row of data
     void setRowdata(QString &) const;                       // Set a whole row of data
     const int getFirstcol(void) const;                      // Learn which col is first
+    const bool isOpen(void) {return (m_szFilename == NULL) ? false : true;}; // Doc state
+    void setOpen(bool bDocopen = true)                      // Set state of document
+    {
+        if (bDocopen) {
+            if (m_szFilename == NULL)
+                m_szFilename = new QString();
+        }
+        else
+            if (m_szFilename != NULL) {
+                delete m_szFilename;
+                m_szFilename = NULL;
+            }
+    };
+    const QString *getFilename(void) // Get the current file name
+    {
+        if (this->isOpen())
+            return m_szFilename;
+        else
+            throw Genexcept("File name does not exist.");
+    };
+    void setFilename(const QString &Fname) // Set file name
+    {
+        if (this->isOpen()) // If a file name exists
+            setOpen(false); // then get rid of it first
+        m_szFilename = new QString(Fname);
+    };
 
     // Top level members
     Preferences *m_pPrefs;
@@ -93,9 +120,8 @@
     QAction     *m_pFilesaveact,  *m_pFilesaveasact;
     QAction     *m_pFilecloseact, *m_pFilequitact;
     QAction     *m_pAddrowact,    *m_pDelrowact;
-    QAction     *m_pRefreshact;
-    QAction     *m_pCutact,       *m_pCopyact;
-    QAction     *m_pPasteact,     *m_pWritedataact;
+    QAction     *m_pRefreshact,   *m_pCutact;
+    QAction     *m_pCopyact,      *m_pPasteact;
 
     // Table, cells, and entries in package layout
     TiTable     *m_pMaintable;
@@ -208,6 +234,7 @@
     void setupEditlay(void);            // Editing lay
     void setupPieces(void);             // Assemble widget pieces
     void setupColumns(void);            // Arrange and configure columns
+    void enableIface(bool);             // [En/dis]able most ui pieces
 
     // Data processing
     void loadAccounts(QFile &);         // Load accounts from file

CVSTrac 2.0.1