OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_table.h 1.12 -> 1.13

--- as_table.h   2002/12/17 16:55:08     1.12
+++ as_table.h   2002/12/18 14:50:58     1.13
@@ -40,15 +40,17 @@
     Q_OBJECT
 
 private:
-    int m_nSortcol;
+    int  m_nSortcol;    // To track current sort column
+    bool m_bDirt;       // To track dirty and clean states
 
 public:
     // Try to match QTable's default constructor with an initializer list
     TiTable(QWidget *pParent = 0, const char *szName = 0) : QTable(pParent, szName)
     {
-        m_nSortcol = 0;
-        horizontalHeader()->installEventFilter(this);
+        this->setSortcol(0);
+        this->setDirty(false);
         this->setEdition(); // Reset edition state
+        horizontalHeader()->installEventFilter(this);
     };
 
     bool eventFilter(QObject *, QEvent *);
@@ -57,7 +59,9 @@
     int m_nEdit;    // To track edition state
 
     // Accessor methods
-    const int getEdition(void) {return m_nEdit;};   // Which edited column was confirmed
+    const bool isDirty(void) {return m_bDirt;};             // Check for changed state danger
+    void setDirty(bool bDirty = true) {m_bDirt = bDirty;};  // Clean or dirty
+    const int getEdition(void) {return m_nEdit;};           // Which edited column was confirmed
     void setEdition(const int nEdit = -1) {m_nEdit = nEdit;};   // Set edition status
     const int getSortcol(void) {return m_nSortcol;};
     void setSortcol(const int nColin) {m_nSortcol = nColin;};
@@ -78,7 +82,7 @@
     virtual void activateNextCell(void);
 
 signals:
-    void textEdited(void);  // A cell was edited and data was modified
+    void textEdited(int, int);  // A cell was edited and data was modified
 };
 
 #endif // TITABLE_H

CVSTrac 2.0.1