LibrePCB Developers Documentation
SearchToolBar Class Referencefinal

The SearchToolBar class. More...

#include <searchtoolbar.h>

Inherits QToolBar.

+ Collaboration diagram for SearchToolBar:

Public Types

typedef std::function< QStringList()> CompleterListFunction
 

Signals

void textChanged (const QString &text)
 
void goToTriggered (const QString &name, int index=0)
 

Public Member Functions

 SearchToolBar (const SearchToolBar &other)=delete
 
 SearchToolBar (QWidget *parent=nullptr) noexcept
 
 ~SearchToolBar () noexcept
 
QString getText () const noexcept
 
void setPlaceholderText (const QString &text) noexcept
 
void setCompleterListFunction (CompleterListFunction fun) noexcept
 
void clear () noexcept
 
void selectAllAndSetFocus () noexcept
 
void findNext () noexcept
 
void findPrevious () noexcept
 
SearchToolBaroperator= (const SearchToolBar &rhs)=delete
 

Private Member Functions

void updateCompleter () noexcept
 
void textChangedHandler (const QString &text) noexcept
 

Private Attributes

CompleterListFunction mCompleterListFunction
 
QScopedPointer< QLineEdit > mLineEdit
 
bool mForward
 Current search direction (forward or backward) More...
 
int mIndex
 Number of searches with the current search term. More...
 

Detailed Description

The SearchToolBar class.

Member Typedef Documentation

◆ CompleterListFunction

typedef std::function<QStringList()> CompleterListFunction

Constructor & Destructor Documentation

◆ SearchToolBar() [1/2]

SearchToolBar ( const SearchToolBar other)
delete

◆ SearchToolBar() [2/2]

SearchToolBar ( QWidget *  parent = nullptr)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~SearchToolBar()

~SearchToolBar ( )
noexcept

Member Function Documentation

◆ getText()

QString getText ( ) const
inlinenoexcept

◆ setPlaceholderText()

void setPlaceholderText ( const QString &  text)
inlinenoexcept

◆ setCompleterListFunction()

void setCompleterListFunction ( CompleterListFunction  fun)
inlinenoexcept

◆ clear()

void clear ( )
noexcept

◆ selectAllAndSetFocus()

void selectAllAndSetFocus ( )
noexcept

◆ findNext()

void findNext ( )
noexcept
+ Here is the caller graph for this function:

◆ findPrevious()

void findPrevious ( )
noexcept

◆ operator=()

SearchToolBar & operator= ( const SearchToolBar rhs)
delete

◆ textChanged

void textChanged ( const QString &  text)
signal

◆ goToTriggered

void goToTriggered ( const QString &  name,
int  index = 0 
)
signal
+ Here is the caller graph for this function:

◆ updateCompleter()

void updateCompleter ( )
privatenoexcept
+ Here is the call graph for this function:

◆ textChangedHandler()

void textChangedHandler ( const QString &  text)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mCompleterListFunction

CompleterListFunction mCompleterListFunction
private

◆ mLineEdit

QScopedPointer<QLineEdit> mLineEdit
private

◆ mForward

bool mForward
private

Current search direction (forward or backward)

◆ mIndex

int mIndex
private

Number of searches with the current search term.


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