Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / addresstablemodel.h
index 7fd07cf..ae3e3b2 100644 (file)
@@ -29,26 +29,27 @@ public:
 
     /** Return status of edit/insert operation */
     enum EditStatus {
-        OK,
-        INVALID_ADDRESS,   /**< Unparseable address */
-        DUPLICATE_ADDRESS,  /**< Address already in address book */
-        WALLET_UNLOCK_FAILURE, /**< Wallet could not be unlocked to create new receiving address */
-        KEY_GENERATION_FAILURE /**< Generating a new public key for a receiving address failed */
+        OK,                     /**< Everything ok */
+        NO_CHANGES,             /**< No changes were made during edit operation */
+        INVALID_ADDRESS,        /**< Unparseable address */
+        DUPLICATE_ADDRESS,      /**< Address already in address book */
+        WALLET_UNLOCK_FAILURE,  /**< Wallet could not be unlocked to create new receiving address */
+        KEY_GENERATION_FAILURE  /**< Generating a new public key for a receiving address failed */
     };
 
-    static const QString Send; /**< Specifies send address */
-    static const QString Receive; /**< Specifies receive address */
+    static const QString Send;      /**< Specifies send address */
+    static const QString Receive;   /**< Specifies receive address */
 
     /** @name Methods overridden from QAbstractTableModel
         @{*/
     int rowCount(const QModelIndex &parent) const;
     int columnCount(const QModelIndex &parent) const;
     QVariant data(const QModelIndex &index, int role) const;
-    bool setData(const QModelIndex & index, const QVariant & value, int role);
+    bool setData(const QModelIndex &index, const QVariant &value, int role);
     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-    QModelIndex index(int row, int column, const QModelIndex & parent) const;
-    bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
-    Qt::ItemFlags flags(const QModelIndex & index) const;
+    QModelIndex index(int row, int column, const QModelIndex &parent) const;
+    bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+    Qt::ItemFlags flags(const QModelIndex &index) const;
     /*@}*/
 
     /* Add an address to the model.
@@ -74,13 +75,18 @@ private:
     QStringList columns;
     EditStatus editStatus;
 
+    /** Notify listeners that data changed. */
+    void emitDataChanged(int index);
+
 signals:
     void defaultAddressChanged(const QString &address);
 
 public slots:
-    /* Update address list from core. Invalidates any indices.
+    /* Update address list from core.
      */
-    void update();
+    void updateEntry(const QString &address, const QString &label, bool isMine, int status);
+
+    friend class AddressTablePriv;
 };
 
 #endif // ADDRESSTABLEMODEL_H