Changeset 77006 in vbox
- Timestamp:
- Jan 26, 2019 6:27:09 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128428
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSearchWidget.cpp
r77005 r77006 53 53 return false; 54 54 55 UIMediumItem *pMediumItem = static_cast<UIMediumItem*>(pItem);55 UIMediumItem *pMediumItem = dynamic_cast<UIMediumItem*>(pItem); 56 56 if (!pMediumItem) 57 57 return false; … … 114 114 { 115 115 m_pShowPreviousMatchButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_backward_16px.png", ":/log_viewer_search_backward_disabled_16px.png")); 116 connect(m_pShowPreviousMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget::sigShowPreviousMatchingItem);117 116 connect(m_pShowPreviousMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget::sltShowPreviousMatchingItem); 118 119 117 pLayout->addWidget(m_pShowPreviousMatchButton); 120 118 } … … 123 121 { 124 122 m_pShowNextMatchButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_forward_16px.png", ":/log_viewer_search_forward_disabled_16px.png")); 125 connect(m_pShowNextMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget:: sigShowNextMatchingItem);126 123 connect(m_pShowNextMatchButton, &QIToolButton::clicked, this, &UIMediumSearchWidget:: sltShowNextMatchingItem); 127 128 124 pLayout->addWidget(m_pShowNextMatchButton); 129 125 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSearchWidget.h
r77005 r77006 45 45 46 46 void sigPerformSearch(); 47 void sigShowNextMatchingItem();48 void sigShowPreviousMatchingItem();49 47 50 48 public: -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp
r76979 r77006 243 243 connect(m_pSearchWidget, &UIMediumSearchWidget::sigPerformSearch, 244 244 this, &UIMediumSelector::sltHandlePerformSearch); 245 connect(m_pSearchWidget, &UIMediumSearchWidget::sigShowNextMatchingItem,246 this, &UIMediumSelector::sltHandleShowNextMatchingItem);247 connect(m_pSearchWidget, &UIMediumSearchWidget::sigShowPreviousMatchingItem,248 this, &UIMediumSelector::sltHandleShowPreviousMatchingItem);249 245 } 250 246 } … … 461 457 void UIMediumSelector::sltHandlePerformSearch() 462 458 { 463 performMediumSearch(); 464 } 465 466 void UIMediumSelector::sltHandleShowNextMatchingItem() 467 { 468 if (m_mathingItemList.isEmpty()) 469 return; 470 471 if (++m_iCurrentShownIndex >= m_mathingItemList.size()) 472 m_iCurrentShownIndex = 0; 473 scrollToItem(m_mathingItemList[m_iCurrentShownIndex]); 474 } 475 476 void UIMediumSelector::sltHandleShowPreviousMatchingItem() 477 { 478 if (m_mathingItemList.isEmpty()) 479 return; 480 if (--m_iCurrentShownIndex < 0) 481 m_iCurrentShownIndex = m_mathingItemList.size() -1; 482 scrollToItem(m_mathingItemList[m_iCurrentShownIndex]); 459 //performMediumSearch(); 460 if (!m_pSearchWidget) 461 return; 462 m_pSearchWidget->search(m_pTreeWidget); 483 463 } 484 464 … … 701 681 void UIMediumSelector::performMediumSearch() 702 682 { 683 return; 703 684 if (!m_pSearchWidget || !m_pTreeWidget) 704 685 return; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h
r76979 r77006 70 70 void sltHandleRefresh(); 71 71 void sltHandlePerformSearch(); 72 void sltHandleShowNextMatchingItem();73 void sltHandleShowPreviousMatchingItem();74 72 void sltHandleTreeContextMenuRequest(const QPoint &point); 75 73 void sltHandleTreeExpandAllSignal();
Note:
See TracChangeset
for help on using the changeset viewer.