OSDN Git Service

Support symbolic links in the file manager.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / find / ifindfilter.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** Commercial Usage
10 **
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** If you are unsure which license is appropriate for your use, please
26 ** contact the sales department at http://qt.nokia.com/contact.
27 **
28 **************************************************************************/
29
30 #ifndef IFINDFILTER_H
31 #define IFINDFILTER_H
32
33 #include "find_global.h"
34 #include "textfindconstants.h"
35
36 #include <QtGui/QTextDocument>
37 #include <QtGui/QKeySequence>
38
39 QT_BEGIN_NAMESPACE
40 class QWidget;
41 class QSettings;
42 QT_END_NAMESPACE
43
44 namespace Find {
45
46 class FIND_EXPORT IFindFilter : public QObject
47 {
48     Q_OBJECT
49 public:
50
51     virtual ~IFindFilter() {}
52
53     virtual QString id() const = 0;
54     virtual QString displayName() const = 0;
55     ///
56     virtual bool isEnabled() const = 0;
57     virtual bool canCancel() const = 0;
58     virtual void cancel() = 0;
59     virtual QKeySequence defaultShortcut() const { return QKeySequence(); }
60     virtual bool isReplaceSupported() const { return false; }
61     virtual FindFlags supportedFindFlags() const;
62
63     virtual void findAll(const QString &txt, Find::FindFlags findFlags) = 0;
64     virtual void replaceAll(const QString &txt, Find::FindFlags findFlags)
65     { Q_UNUSED(txt) Q_UNUSED(findFlags) }
66
67     virtual QWidget *createConfigWidget() { return 0; }
68     virtual void writeSettings(QSettings *settings) { Q_UNUSED(settings) }
69     virtual void readSettings(QSettings *settings) { Q_UNUSED(settings) }
70
71 signals:
72     void changed();
73 };
74
75 } // namespace Find
76
77 #endif // IFINDFILTER_H