25 #ifndef KLFSEARCHBAR_H
26 #define KLFSEARCHBAR_H
81 virtual bool searchFind(
const QString& queryString,
bool forward) = 0;
102 virtual bool searchFindNext(
bool forward) = 0;
109 virtual void searchAbort() = 0;
176 Q_PROPERTY(
QString currentSearchText READ currentSearchText WRITE setSearchText) ;
177 Q_PROPERTY(
bool showOverlayMode READ showOverlayMode WRITE setShowOverlayMode) ;
178 Q_PROPERTY(
QRect showOverlayRelativeGeometry READ showOverlayRelativeGeometry
179 WRITE setShowOverlayRelativeGeometry ) ;
180 Q_PROPERTY(
QString focusOutText READ focusOutText WRITE setFocusOutText) ;
181 Q_PROPERTY(
QColor colorFound READ colorFound WRITE setColorFound) ;
182 Q_PROPERTY(
QColor colorNotFound READ colorNotFound WRITE setColorNotFound) ;
183 Q_PROPERTY(
bool showHideButton READ hideButtonShown WRITE setShowHideButton) ;
187 virtual void registerShortcuts(
QWidget *parent);
193 QString currentSearchText()
const;
198 QColor colorFound()
const;
200 QColor colorNotFound()
const;
201 bool hideButtonShown()
const;
203 void setShowOverlayMode(
bool showOverlayMode);
204 void setShowOverlayRelativeGeometry(
const QRect& relativeGeometryPercent);
205 void setShowOverlayRelativeGeometry(
int widthPercent,
int heightPercent,
206 int positionXPercent,
int positionYPercent);
207 void setColorFound(
const QColor& color);
208 void setColorNotFound(
const QColor& color);
209 void setShowHideButton(
bool showHideButton);
216 void searchPerformed(
bool found);
218 void found(
const QString& queryString,
bool forward);
220 void didNotFind(
const QString& queryString,
bool forward);
221 void searchAborted();
222 void escapePressed();
230 void focusOrNext(
bool forward =
true);
235 void find(
const QString&
string,
bool forward);
236 void findNext(
bool forward =
true);
242 virtual void setSearchText(
const QString& text);
243 void setFocusOutText(
const QString& focusOutText);
248 virtual void slotSearchFocusIn();
249 virtual void slotSearchFocusOut();
250 virtual void updateSearchFound(
bool found);
254 virtual void displayState(SearchState state);
256 void emitFoundSignals(
bool found,
const QString& searchstring,
bool forward);
260 void showSearchBarText(
const QString& text);
263 bool searchBarHasFocus();
265 virtual bool event(
QEvent *event);
280 bool pShowOverlayMode;
281 QRect pShowOverlayRelativeGeometry;
285 QString palettePropName(SearchState state)
const;
286 QString statePropValue(SearchState state)
const;