Changeset 70474 in vbox
- Timestamp:
- Jan 7, 2018 9:10:41 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 9 edited
-
extensions/QIManagerDialog.cpp (modified) (2 diffs)
-
extensions/QISplitter.cpp (modified) (2 diffs)
-
globals/UIMessageCenter.h (modified) (1 diff)
-
logviewer/UIVMLogViewerFilterPanel.cpp (modified) (8 diffs)
-
logviewer/UIVMLogViewerFilterPanel.h (modified) (1 diff)
-
selector/UIToolsPaneMachine.cpp (modified) (3 diffs)
-
widgets/UIPopupPane.cpp (modified) (2 diffs)
-
widgets/UIPopupPaneDetails.cpp (modified) (2 diffs)
-
widgets/UIPopupStack.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r70147 r70474 195 195 void QIManagerDialog::prepareToolBar() 196 196 { 197 if (!m_pWidgetToolbar)197 if (!m_pWidgetToolbar) 198 198 return; 199 199 /* Enable unified toolbar on macOS: */ … … 247 247 showMaximized(); 248 248 } 249 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
r69500 r70474 221 221 } 222 222 } 223 else if (pEvent->type() == QEvent::MouseMove)223 else if (pEvent->type() == QEvent::MouseMove) 224 224 { 225 225 /* If we are in the near of the handle or currently … … 291 291 292 292 #include "QISplitter.moc" 293 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r69553 r70474 427 427 428 428 #endif // __UIMessageCenter_h__ 429 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
r70473 r70474 91 91 protected: 92 92 93 /* Overload the mouseXXXEvent to control how selection is made: */93 /* Overload the mouseXXXEvent to control how selection is done: */ 94 94 virtual void mouseDoubleClickEvent(QMouseEvent *){} 95 95 virtual void mouseMoveEvent(QMouseEvent *){} 96 96 virtual void mousePressEvent(QMouseEvent * event) 97 97 { 98 /* Simulate double mouse click to select a word with a single click .*/98 /* Simulate double mouse click to select a word with a single click: */ 99 99 QLineEdit::mouseDoubleClickEvent(event); 100 100 } 101 101 102 virtual void mouseReleaseEvent(QMouseEvent *){} 102 103 virtual void paintEvent(QPaintEvent *event) … … 105 106 int clearButtonSize = height(); 106 107 m_pClearAllButton->setGeometry(width() - clearButtonSize, 0, clearButtonSize, clearButtonSize); 108 /* If we have a selected term move the m_pRemoveTermButton to the end of the 109 or start of the word (depending on the location of the word within line edit itself: */ 107 110 if (hasSelectedText()) 108 111 { … … 111 114 int buttonSize = 16; 112 115 int charWidth = fontMetrics().width('x'); 113 114 116 int buttonLeft = cursorRect().right() - 0.5 * charWidth; 115 117 /* If buttonLeft is in far left of the line edit, move the 118 button to left side of the selected word: */ 116 119 if (buttonLeft + buttonSize >= width() - clearButtonSize) 117 120 { … … 119 122 buttonLeft -= (selectionWidth + buttonSize); 120 123 } 121 122 124 m_pRemoveTermButton->setGeometry(buttonLeft, buttonY, buttonSize, buttonSize); 123 125 } … … 128 130 private slots: 129 131 130 /* Nofifies the listeners that selected word (filter term) has been removed .*/132 /* Nofifies the listeners that selected word (filter term) has been removed: */ 131 133 void sltRemoveFilterTerm() 132 134 { 133 if (!hasSelectedText())135 if (!hasSelectedText()) 134 136 return; 135 137 emit sigFilterTermRemoved(selectedText()); … … 138 140 } 139 141 140 /* The whole content is removed. Listeners are notified .*/142 /* The whole content is removed. Listeners are notified: */ 141 143 void sltClearAll() 142 144 { 143 if(text().isEmpty()) 145 /* Check if we have some text to avoid recursive calls: */ 146 if (text().isEmpty()) 144 147 return; 145 148 … … 278 281 void UIVMLogViewerFilterPanel::sltAddFilterTerm() 279 282 { 280 if (!m_pFilterComboBox)281 return; 282 if (m_pFilterComboBox->currentText().isEmpty())283 if (!m_pFilterComboBox) 284 return; 285 if (m_pFilterComboBox->currentText().isEmpty()) 283 286 return; 284 287 … … 299 302 void UIVMLogViewerFilterPanel::sltClearFilterTerms() 300 303 { 301 if (m_filterTermList.empty())304 if (m_filterTermList.empty()) 302 305 return; 303 306 m_filterTermList.clear(); -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h
r70473 r70474 68 68 /** Clear all the filter terms and reset the filtering. */ 69 69 void sltClearFilterTerms(); 70 /** Executes the necessary code to handle filter's boolean operator change ('And', 'Or'). */ 70 71 void sltOperatorButtonChanged(int buttonId); 71 72 void sltRemoveFilterTerm(const QString &termString); 72 73 73 74 private: 75 74 76 enum FilterOperatorButton{ 75 77 AndButton = 0, -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneMachine.cpp
r70185 r70474 222 222 { 223 223 /* Update snapshots pane is it is open: */ 224 if (isToolOpened(ToolTypeMachine_Snapshots))224 if (isToolOpened(ToolTypeMachine_Snapshots)) 225 225 { 226 226 AssertPtrReturnVoid(m_pPaneSnapshots); … … 228 228 } 229 229 /* Update logviewer pane is it is open: */ 230 if (isToolOpened(ToolTypeMachine_LogViewer))230 if (isToolOpened(ToolTypeMachine_LogViewer)) 231 231 { 232 232 AssertPtrReturnVoid(m_pPaneLogViewer); … … 320 320 } 321 321 } 322 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
r69500 r70474 128 128 129 129 /* Details-pane: */ 130 if (m_pDetailsPane->isVisible())130 if (m_pDetailsPane->isVisible()) 131 131 { 132 132 m_pDetailsPane->move(m_iLayoutMargin, … … 537 537 } 538 538 } 539 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneDetails.cpp
r69500 r70474 219 219 int iNewHeight = m_iMaximumPaneHeight; 220 220 QTextDocument *pTextDocument = m_pTextEdit->document(); 221 if (pTextDocument)221 if (pTextDocument) 222 222 { 223 223 /* Adjust text-edit size: */ … … 255 255 return font; 256 256 } 257 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupStack.cpp
r69500 r70474 342 342 /* Search for existing status-bar child: */ 343 343 if (QStatusBar *pStatusBar = pMainWindow->findChild<QStatusBar*>()) 344 if (pStatusBar->isVisible())344 if (pStatusBar->isVisible()) 345 345 return pStatusBar->height(); 346 346 … … 350 350 return 0; 351 351 } 352
Note:
See TracChangeset
for help on using the changeset viewer.

