Changeset 70699 in vbox
- Timestamp:
- Jan 23, 2018 10:05:42 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
r70676 r70699 182 182 if (!mainLayout()) 183 183 return; 184 184 185 185 /* Create search-editor: */ 186 186 m_pSearchEditor = new UISearchField(0 /* parent */); … … 192 192 mainLayout()->addWidget(m_pSearchEditor); 193 193 } 194 194 195 195 /* Create search-label: */ 196 196 m_pSearchLabel = new QLabel; … … 311 311 void UIVMLogViewerSearchPanel::retranslateUi() 312 312 { 313 m_pSearchLabel->setText(QString("%1 ").arg(UIVMLogViewerWidget::tr("&Find"))); 314 m_pSearchEditor->setToolTip(UIVMLogViewerWidget::tr("Enter a search string here")); 315 316 m_pNextPrevButtons->setToolTip(0, UIVMLogViewerWidget::tr("Search for the previous occurrence of the string")); 317 m_pNextPrevButtons->setToolTip(1, UIVMLogViewerWidget::tr("Search for the next occurrence of the string")); 318 319 m_pCaseSensitiveCheckBox->setText(UIVMLogViewerWidget::tr("C&ase Sensitive")); 320 m_pCaseSensitiveCheckBox->setToolTip(UIVMLogViewerWidget::tr("Perform case sensitive search (when checked)")); 321 322 m_pMatchWholeWordCheckBox->setText(UIVMLogViewerWidget::tr("Ma&tch Whole Word")); 323 m_pMatchWholeWordCheckBox->setToolTip(UIVMLogViewerWidget::tr("Search matches only complete words when checked")); 324 325 m_pHighlightAllCheckBox->setText(UIVMLogViewerWidget::tr("&Highlight All")); 326 m_pHighlightAllCheckBox->setToolTip(UIVMLogViewerWidget::tr("All occurence of the search text are highlighted")); 327 313 if (m_pSearchLabel) 314 m_pSearchLabel->setText(QString("%1 ").arg(UIVMLogViewerWidget::tr("&Find"))); 315 316 if (m_pSearchEditor) 317 m_pSearchEditor->setToolTip(UIVMLogViewerWidget::tr("Enter a search string here")); 318 319 if (m_pNextPrevButtons) 320 { 321 m_pNextPrevButtons->setToolTip(0, UIVMLogViewerWidget::tr("Search for the previous occurrence of the string")); 322 m_pNextPrevButtons->setToolTip(1, UIVMLogViewerWidget::tr("Search for the next occurrence of the string")); 323 } 324 325 if (m_pCaseSensitiveCheckBox) 326 { 327 m_pCaseSensitiveCheckBox->setText(UIVMLogViewerWidget::tr("C&ase Sensitive")); 328 m_pCaseSensitiveCheckBox->setToolTip(UIVMLogViewerWidget::tr("Perform case sensitive search (when checked)")); 329 } 330 331 if (m_pMatchWholeWordCheckBox) 332 { 333 m_pMatchWholeWordCheckBox->setText(UIVMLogViewerWidget::tr("Ma&tch Whole Word")); 334 m_pMatchWholeWordCheckBox->setToolTip(UIVMLogViewerWidget::tr("Search matches only complete words when checked")); 335 } 336 337 if (m_pHighlightAllCheckBox) 338 { 339 m_pHighlightAllCheckBox->setText(UIVMLogViewerWidget::tr("&Highlight All")); 340 m_pHighlightAllCheckBox->setToolTip(UIVMLogViewerWidget::tr("All occurence of the search text are highlighted")); 341 } 342 328 343 if (m_iMatchCount == 0) 329 344 m_pInfoLabel->setText(UIVMLogViewerWidget::tr("String not found")); … … 424 439 /* Call to base-class: */ 425 440 UIVMLogViewerPanel::showEvent(pEvent); 426 /* Set focus on search-editor: */ 427 m_pSearchEditor->setFocus(); 428 /* Select all the text: */ 429 m_pSearchEditor->selectAll(); 441 if(m_pSearchEditor) 442 { 443 /* Set focus on search-editor: */ 444 m_pSearchEditor->setFocus(); 445 /* Select all the text: */ 446 m_pSearchEditor->selectAll(); 447 } 430 448 } 431 449 … … 438 456 if (!pDocument) 439 457 return; 440 458 if(!m_pSearchEditor) 459 return; 460 441 461 const QString &searchString = m_pSearchEditor->text(); 442 462 if (searchString.isEmpty()) … … 558 578 void UIVMLogViewerSearchPanel::configureInfoLabels() 559 579 { 580 if (!m_pSearchEditor || !m_pWarningIcon || !m_pInfoLabel) 581 return; 582 560 583 /* If no match has been found, mark the search editor: */ 561 584 if (m_iMatchCount == 0) -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h
r70664 r70699 29 29 class QHBoxLayout; 30 30 class QLabel; 31 class UIMiniCancelButton;32 31 class UIRoundRectSegmentedButton; 33 32 class UISearchField;
Note:
See TracChangeset
for help on using the changeset viewer.