equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * Zhiqiang Yang <zhiqiang.yang@nokia.com> |
|
14 * |
|
15 * Description: |
|
16 * The find thread header file of file manager |
|
17 */ |
|
18 |
|
19 #ifndef FMFINDTHREAD_H |
|
20 #define FMFINDTHREAD_H |
|
21 |
|
22 #include "fmcommon.h" |
|
23 |
|
24 #include <QTime> |
|
25 #include <QThread> |
|
26 #include <QRegExp> |
|
27 #include <QStringList> |
|
28 |
|
29 class FmFindThread : public QThread |
|
30 { |
|
31 Q_OBJECT |
|
32 public: |
|
33 explicit FmFindThread( QObject *parent = 0 ); |
|
34 ~FmFindThread(); |
|
35 |
|
36 QString findPath() const; |
|
37 void setFindPath( const QString &path ); |
|
38 |
|
39 QRegExp pattern() const; |
|
40 void setPattern( const QRegExp ®Exp ); |
|
41 |
|
42 void setLastResult( QStringList r ); |
|
43 |
|
44 void stop(); |
|
45 |
|
46 signals: |
|
47 void found( const QStringList &dataList ); |
|
48 |
|
49 protected: |
|
50 void run(); |
|
51 |
|
52 private: |
|
53 void emitFound(); |
|
54 void findInResult(); |
|
55 |
|
56 volatile bool mStop; |
|
57 int count; |
|
58 QString mFindPath; |
|
59 QTime time; |
|
60 QRegExp findPattern; |
|
61 QStringList mLastResult; |
|
62 // Used to store temp search result. if emit found, the result will be cleared. |
|
63 QStringList tempResultList; |
|
64 }; |
|
65 |
|
66 #endif |
|