filemanager/src/filemanager/src/fmfindresultmodel.h
changeset 35 060d0b1ab845
parent 30 6e96d2143d46
child 44 22e202702210
--- a/filemanager/src/filemanager/src/fmfindresultmodel.h	Tue Jul 06 14:06:28 2010 +0300
+++ b/filemanager/src/filemanager/src/fmfindresultmodel.h	Wed Aug 18 09:39:39 2010 +0300
@@ -21,6 +21,7 @@
 
 #include "fmcommon.h"
 
+#include <QPair>
 #include <QFileInfo>
 #include <QStringList>
 #include <QAbstractListModel>
@@ -50,7 +51,7 @@
     int columnCount( const QModelIndex &parent = QModelIndex() ) const;
     QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
     QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
-	bool insertRows( int row, int count, const QModelIndex &parent = QModelIndex() );
+    bool insertRows( int row, const QStringList &dataList, const QModelIndex &parent = QModelIndex() );
 	bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
     QString filePath ( const QModelIndex & index ) const;
 
@@ -68,20 +69,21 @@
 
     virtual void sort ( int column, Qt::SortOrder order = Qt::AscendingOrder );
 
-    static bool caseNameLessThan( const QString &s1, const QString &s2 );
-    static bool caseTimeLessThan( const QString &s1, const QString &s2 );
-    static bool caseSizeLessThan( const QString &s1, const QString &s2 );
-    static bool caseTypeLessThan( const QString &s1, const QString &s2 );
+    static bool caseNameLessThan( const QPair<QString,int> &s1,
+                                  const QPair<QString,int> &s2 );
+    static bool caseTimeLessThan( const QPair<QString,int> &s1,
+                                  const QPair<QString,int> &s2 );
+    static bool caseSizeLessThan( const QPair<QString,int> &s1,
+                                  const QPair<QString,int> &s2 );
+    static bool caseTypeLessThan( const QPair<QString,int> &s1,
+                                  const QPair<QString,int> &s2 );
 
 signals:
     void finished();
-
-    // pass modelCountChanged signal to parent widget
-    // so parent widget could change contentWiget between emptyTipsWidget and listWidget
     void modelCountChanged( int count );
 
 private slots:
-    void on_findThread_found( int count );
+    void on_findThread_found( const QStringList &dataList );
 
 private:
     bool indexValid( const QModelIndex &index ) const;