Quark  0.1
FindPanel Class Reference

A widget that provides a UI for doing forward and backward searches in a document. More...

#include <FindPanel.h++>

Inheritance diagram for FindPanel:

Public Slots

void setEnabled (bool enabled)
 Toggles the enabled state of the panel. More...
 
void setFindStatus (bool found)
 Toggles the find status to indicate whether the search text was found or not. More...
 
void focusTextField ()
 Requests keyboard focus for the input field. More...
 
void selectText ()
 Selects the text in the input field. More...
 

Signals

void find (const QString &text, bool caseSensitive, bool forward)
 Emitted when the user has pressed Return/Enter in the input field or clicked one of the find buttons. More...
 
void findTextChanged (const QString &text)
 Emitted when the user has modified the text in the input field. More...
 

Public Member Functions

 FindPanel (QWidget *parent=NULL)
 Constructor. More...
 
virtual ~FindPanel ()
 Destructor. More...
 

Detailed Description

A widget that provides a UI for doing forward and backward searches in a document.

The layout consists of an input field, "find next" and "find previous" buttons, and a "case insensitive" checkbox.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ FindPanel()

FindPanel ( QWidget *  parent = NULL)

Constructor.

◆ ~FindPanel()

virtual ~FindPanel ( )
virtual

Destructor.

Member Function Documentation

◆ find

void find ( const QString &  text,
bool  caseSensitive,
bool  forward 
)
signal

Emitted when the user has pressed Return/Enter in the input field or clicked one of the find buttons.

Parameters
textThe text to search for.
caseSensitiveWhether the search should be case sensitive.
forwardA flag indicating whether the search should be forward or backward from the current position.

◆ findTextChanged

void findTextChanged ( const QString &  text)
signal

Emitted when the user has modified the text in the input field.

Parameters
textThe new text.

◆ focusTextField

void focusTextField ( )
slot

Requests keyboard focus for the input field.

◆ selectText

void selectText ( )
slot

Selects the text in the input field.

◆ setEnabled

void setEnabled ( bool  enabled)
slot

Toggles the enabled state of the panel.

◆ setFindStatus

void setFindStatus ( bool  found)
slot

Toggles the find status to indicate whether the search text was found or not.

Parameters
foundThe find status. If false, the background color of the input field changes to a shade of red.

The documentation for this class was generated from the following file: