kexi

kexisearchandreplaceiface.h
1/* This file is part of the KDE project
2 Copyright (C) 2007 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KexiSearchAndReplaceViewInterface_H
21#define KexiSearchAndReplaceViewInterface_H
22
23#include <kexiutils/tristate.h>
24#include <tqstring.h>
25class TQVariant;
26class TQStringList;
27
29class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
30{
31 public:
32 KexiSearchAndReplaceViewInterface();
33 virtual ~KexiSearchAndReplaceViewInterface();
34
36
37 class KEXICORE_EXPORT Options {
38 public:
39 Options();
40
46
49
56
59
65 DefaultSearchDirection = SearchDown
66 };
67
70
72 bool caseSensitive : 1;
73
76
79 };
80
85 virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
86 TQString& currentColumnName) = 0;
87
93 virtual tristate find(const TQVariant& valueToFind,
94 const KexiSearchAndReplaceViewInterface::Options& options, bool next) = 0;
95
102 virtual tristate findNextAndReplace(const TQVariant& valueToFind, const TQVariant& replacement,
103 const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll) = 0;
104};
105
106#endif
Specifies options for find and replace operations.
bool promptOnReplace
True if question should be displayed before every replacement made (true by default).
TextMatching
Specifies possible options for text matching.
@ MatchAnyPartOfField
Matched text can be any part of field (the default).
@ MatchWholeField
Matched text must be the whole field.
@ MatchStartOfField
Matched text must be at the start of field.
bool caseSensitive
True for searching is case-sensitive (false by default).
TextMatching textMatching
Specifies possible options for text matching.
bool wholeWordsOnly
True for searching for whole words only (false by default).
@ SearchAllRows
Search from the first to the last row.
@ SearchDown
Search down (next) from the current position (the default).
@ SearchUp
Search up (previous) from the current position.
SearchDirection searchDirection
Specifies search direction.
virtual bool setupFindAndReplace(TQStringList &columnNames, TQStringList &columnCaptions, TQString &currentColumnName)=0
virtual tristate findNextAndReplace(const TQVariant &valueToFind, const TQVariant &replacement, const KexiSearchAndReplaceViewInterface::Options &options, bool replaceAll)=0
virtual tristate find(const TQVariant &valueToFind, const KexiSearchAndReplaceViewInterface::Options &options, bool next)=0
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100