Changeset View
Changeset View
Standalone View
Standalone View
ui/findbar.cpp
Show All 31 Lines | 30 | { | |||
---|---|---|---|---|---|
32 | lay->setMargin( 2 ); | 32 | lay->setMargin( 2 ); | ||
33 | 33 | | |||
34 | QToolButton * closeBtn = new QToolButton( this ); | 34 | QToolButton * closeBtn = new QToolButton( this ); | ||
35 | closeBtn->setIcon( QIcon::fromTheme( QStringLiteral("dialog-close") ) ); | 35 | closeBtn->setIcon( QIcon::fromTheme( QStringLiteral("dialog-close") ) ); | ||
36 | closeBtn->setToolTip( i18n( "Close" ) ); | 36 | closeBtn->setToolTip( i18n( "Close" ) ); | ||
37 | closeBtn->setAutoRaise( true ); | 37 | closeBtn->setAutoRaise( true ); | ||
38 | lay->addWidget( closeBtn ); | 38 | lay->addWidget( closeBtn ); | ||
39 | 39 | | |||
40 | QLabel * label = new QLabel( i18nc( "Find text", "F&ind:" ), this ); | | |||
41 | lay->addWidget( label ); | | |||
42 | | ||||
43 | m_search = new SearchLineWidget( this, document ); | 40 | m_search = new SearchLineWidget( this, document ); | ||
41 | m_search->lineEdit()->setPlaceholderText( i18nc( "Find text", "Find..." ) ); | ||||
44 | m_search->lineEdit()->setSearchCaseSensitivity( Qt::CaseInsensitive ); | 42 | m_search->lineEdit()->setSearchCaseSensitivity( Qt::CaseInsensitive ); | ||
45 | m_search->lineEdit()->setSearchMinimumLength( 0 ); | 43 | m_search->lineEdit()->setSearchMinimumLength( 0 ); | ||
46 | m_search->lineEdit()->setSearchType( Okular::Document::NextMatch ); | 44 | m_search->lineEdit()->setSearchType( Okular::Document::NextMatch ); | ||
47 | m_search->lineEdit()->setSearchId( PART_SEARCH_ID ); | 45 | m_search->lineEdit()->setSearchId( PART_SEARCH_ID ); | ||
48 | m_search->lineEdit()->setSearchColor( qRgb( 255, 255, 64 ) ); | 46 | m_search->lineEdit()->setSearchColor( qRgb( 255, 255, 64 ) ); | ||
49 | m_search->lineEdit()->setSearchMoveViewport( true ); | 47 | m_search->lineEdit()->setSearchMoveViewport( true ); | ||
50 | m_search->lineEdit()->setFindAsYouType( false ); | 48 | m_search->lineEdit()->setFindAsYouType( false ); | ||
51 | m_search->lineEdit()->setToolTip( i18n( "Text to search for" ) ); | 49 | m_search->lineEdit()->setToolTip( i18n( "Text to search for" ) ); | ||
52 | m_search->installEventFilter( this ); | 50 | m_search->installEventFilter( this ); | ||
53 | label->setBuddy( m_search->lineEdit() ); | | |||
54 | lay->addWidget( m_search ); | 51 | lay->addWidget( m_search ); | ||
55 | 52 | | |||
56 | QPushButton * findNextBtn = new QPushButton( QIcon::fromTheme( QStringLiteral("go-down-search") ), i18nc( "Find and go to the next search match", "Next" ), this ); | 53 | QPushButton * findNextBtn = new QPushButton( QIcon::fromTheme( QStringLiteral("go-down-search") ), i18nc( "Find and go to the next search match", "Next" ), this ); | ||
57 | findNextBtn->setToolTip( i18n( "Jump to next match" ) ); | 54 | findNextBtn->setToolTip( i18n( "Jump to next match" ) ); | ||
58 | lay->addWidget( findNextBtn ); | 55 | lay->addWidget( findNextBtn ); | ||
59 | 56 | | |||
60 | QPushButton * findPrevBtn = new QPushButton( QIcon::fromTheme( QStringLiteral("go-up-search") ), i18nc( "Find and go to the previous search match", "Previous" ), this ); | 57 | QPushButton * findPrevBtn = new QPushButton( QIcon::fromTheme( QStringLiteral("go-up-search") ), i18nc( "Find and go to the previous search match", "Previous" ), this ); | ||
61 | findPrevBtn->setToolTip( i18n( "Jump to previous match" ) ); | 58 | findPrevBtn->setToolTip( i18n( "Jump to previous match" ) ); | ||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |