bluetoothengine/btui/inc/btdevicemodel.h
changeset 41 0b2439c3e397
parent 40 997690c3397a
child 63 bcf742120177
--- a/bluetoothengine/btui/inc/btdevicemodel.h	Wed Jun 23 18:23:52 2010 +0300
+++ b/bluetoothengine/btui/inc/btdevicemodel.h	Tue Jul 06 14:27:09 2010 +0300
@@ -23,7 +23,7 @@
 #include <QSharedPointer>
 #include <btuimodeltypes.h>
 
-class BtDeviceData;
+class BtDeviceModelPrivate;
 
 /*!
     \class BtDeviceModel
@@ -69,6 +69,7 @@
         MajorPropertyRole,  // QVariant::Int, bits of DevMajorProperty
         MinorPropertyRole,  // QVariant::Int, bits of DevMinorProperty
         CoDRole,  // QVariant::Int, the value of Class of Device
+        SeqNumRole    // sequence number indicating order in which device was found
     };
     
 public:
@@ -101,19 +102,27 @@
 signals:
 
     void deviceSearchCompleted(int error);
+
+private slots:
+
+    void deviceDataChanged( int row, void *parent );
     
+    void deviceDataChanged( int first, int last, void *parent );
+    
+    void beginInsertDevices(int first, int last, void *parent);
+    void endInsertDevices();
+    
+    void beginRemoveDevices(int first, int last, void *parent);
+    void endRemoveDevices();
+
+    void emitDeviceSearchCompleted( int error );
+
 private:
     
-    void emitDataChanged(int row, int column, void *parent );
-    
-    void emitDataChanged(const QModelIndex &top, const QModelIndex &bottom );
-    
-    void emitdeviceSearchCompleted(int error);
+    void connectModelSignals();
     
 private:
-    QSharedPointer<BtDeviceData> mDeviceData;
-
-    friend class BtDeviceData;
+    QSharedPointer<BtDeviceModelPrivate> d;
 };
 
 #endif // BTUIMODEL_H