hgcacheproxymodel/tsrc/fute/HgCacheProxyModelTestApp/src/mywindow.cpp
changeset 2 49c70dcc3f17
parent 1 e48454f237ca
child 3 c863538fcbb6
--- a/hgcacheproxymodel/tsrc/fute/HgCacheProxyModelTestApp/src/mywindow.cpp	Mon May 03 13:32:54 2010 +0300
+++ b/hgcacheproxymodel/tsrc/fute/HgCacheProxyModelTestApp/src/mywindow.cpp	Fri May 14 16:57:01 2010 +0300
@@ -127,7 +127,7 @@
 			view->setColumnCount( 3 );
 			view->setRowCount( 5 );			
 		}
-        view->setTextVisible(false);
+//        view->setTextVisible(false);
 		view->setUniformItemSizes( true );
 		view->setItemRecycling( true );
 		//this could be done to change mode, for images it doesn't make sence, becouse images thumbnails are created by default only for medium and fullsize
@@ -167,15 +167,15 @@
         mModel->sort(0);
     } else if (command == 201) { //disable filter
         QRegExp reg = QRegExp();
-//        mModel->setFilterRegExp(reg);
+        mModel->setFilterRegExp(reg);
     } else if (command == 202) { //Filter ITEM* (Case Sensitive)
         QRegExp reg = QRegExp("ITEM*", Qt::CaseSensitive, QRegExp::Wildcard);
-//        mModel->setFilterCaseSensitivity(Qt::CaseSensitive);
-//        mModel->setFilterRegExp(reg);        
+        mModel->setFilterCaseSensitivity(Qt::CaseSensitive);
+        mModel->setFilterRegExp(reg);        
     } else if (command == 203) { //Filter ITEM1*(Case Insensitive)
         QRegExp reg = QRegExp("ITEM1*", Qt::CaseInsensitive, QRegExp::Wildcard);
-//        mModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
-//        mModel->setFilterRegExp(reg);
+        mModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+        mModel->setFilterRegExp(reg);
     } else if (command == 1000) { //reset
         mMyDataProvider->resetModel();
     } else if (command == 1001) { //reset
@@ -190,7 +190,7 @@
         mTestVal = 500;
         timeout();
     } else if (command == 1003) {
-        mTestVal = 0;
+        mTestVal = -1;
     }
 }
 
@@ -205,9 +205,13 @@
     action.setData ( QVariant(101 + mTestVal%4) );
     processAction(&action);
 
-    if (mTestVal>0){
+    
+    if (mTestVal>=0){
         mTestVal--;
-        mTimer->start(1000);
+        if (mTestVal==0){
+            mTestVal = 500;
+        }
+        mTimer->start(2000);
     }
 }