kexi
kexisearchandreplaceiface.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KexiSearchAndReplaceViewInterface_H
00021 #define KexiSearchAndReplaceViewInterface_H
00022
00023 #include <kexiutils/tristate.h>
00024 #include <qstring.h>
00025 class QVariant;
00026 class QStringList;
00027
00029 class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
00030 {
00031 public:
00032 KexiSearchAndReplaceViewInterface();
00033 virtual ~KexiSearchAndReplaceViewInterface();
00034
00036
00037 class KEXICORE_EXPORT Options {
00038 public:
00039 Options();
00040
00042 enum SpecialLookInValue {
00043 AllColumns = -1,
00044 CurrentColumn = -2
00045 };
00048 int columnNumber;
00049
00051 enum TextMatching {
00052 MatchAnyPartOfField = 0,
00053 MatchWholeField = 1,
00054 MatchStartOfField = 2
00055 };
00056
00058 TextMatching textMatching;
00059
00061 enum SearchDirection {
00062 SearchUp = 0,
00063 SearchDown = 1,
00064 SearchAllRows = 2,
00065 DefaultSearchDirection = SearchDown
00066 };
00067
00069 SearchDirection searchDirection;
00070
00072 bool caseSensitive : 1;
00073
00075 bool wholeWordsOnly : 1;
00076
00078 bool promptOnReplace : 1;
00079 };
00080
00085 virtual bool setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
00086 QString& currentColumnName) = 0;
00087
00093 virtual tristate find(const QVariant& valueToFind,
00094 const KexiSearchAndReplaceViewInterface::Options& options, bool next) = 0;
00095
00102 virtual tristate findNextAndReplace(const QVariant& valueToFind, const QVariant& replacement,
00103 const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll) = 0;
00104 };
00105
00106 #endif
|