Changeset 70676 in vbox
- Timestamp:
- Jan 22, 2018 12:59:41 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120412
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
r70664 r70676 358 358 prepareRadioButtonGroup(); 359 359 360 m_pFilterComboBox = new QComboBox (this);360 m_pFilterComboBox = new QComboBox; 361 361 if (m_pFilterComboBox) 362 362 { … … 370 370 } 371 371 372 m_pAddFilterTermButton = new QIToolButton (this);372 m_pAddFilterTermButton = new QIToolButton; 373 373 if (m_pAddFilterTermButton) 374 374 { … … 377 377 } 378 378 379 m_pFilterTermsLineEdit = new UIVMFilterLineEdit (this);379 m_pFilterTermsLineEdit = new UIVMFilterLineEdit; 380 380 if (m_pFilterTermsLineEdit) 381 381 { … … 384 384 } 385 385 386 m_pResultLabel = new QLabel (this);386 m_pResultLabel = new QLabel; 387 387 if (m_pResultLabel) 388 388 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp
r70664 r70676 79 79 m_pMainLayout->setSpacing(2); 80 80 } 81 m_pCloseButton = new UIMiniCancelButton (this);81 m_pCloseButton = new UIMiniCancelButton; 82 82 if (m_pCloseButton) 83 83 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
r70664 r70676 184 184 185 185 /* Create search-editor: */ 186 m_pSearchEditor = new UISearchField( this);186 m_pSearchEditor = new UISearchField(0 /* parent */); 187 187 if (m_pSearchEditor) 188 188 { … … 194 194 195 195 /* Create search-label: */ 196 m_pSearchLabel = new QLabel (this);196 m_pSearchLabel = new QLabel; 197 197 if (m_pSearchLabel) 198 198 { … … 210 210 211 211 /* Create Next/Prev button-box: */ 212 m_pNextPrevButtons = new UIRoundRectSegmentedButton( this, 2);212 m_pNextPrevButtons = new UIRoundRectSegmentedButton(0 /* parent */, 2); 213 213 if (m_pNextPrevButtons) 214 214 { … … 239 239 } 240 240 241 m_pMatchWholeWordCheckBox = new QCheckBox (this);241 m_pMatchWholeWordCheckBox = new QCheckBox; 242 242 if (m_pMatchWholeWordCheckBox) 243 243 { … … 253 253 } 254 254 255 m_pHighlightAllCheckBox = new QCheckBox (this);255 m_pHighlightAllCheckBox = new QCheckBox; 256 256 if (m_pHighlightAllCheckBox) 257 257 { … … 267 267 268 268 /* Create warning-icon: */ 269 m_pWarningIcon = new QLabel (this);269 m_pWarningIcon = new QLabel; 270 270 if (m_pWarningIcon) 271 271 { … … 280 280 281 281 /* Create warning-label: */ 282 m_pInfoLabel = new QLabel (this);282 m_pInfoLabel = new QLabel; 283 283 if (m_pInfoLabel) 284 284 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r70664 r70676 71 71 , m_pActionSave(0) 72 72 , m_pActionBookmark(0) 73 , m_pActionSettings(0) 73 74 , m_pMenu(0) 74 75 , m_bShowLineNumbers(true) … … 169 170 void UIVMLogViewerWidget::sltRefresh() 170 171 { 172 if (!m_pTabWidget) 173 return; 171 174 /* Disconnect this connection to avoid initial signals during page creation/deletion: */ 172 175 disconnect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter); … … 196 199 197 200 /* Setup this connection after refresh to avoid initial signals during page creation: */ 198 connect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter); 201 if (m_pFilterPanel) 202 connect(m_pTabWidget, &QITabWidget::currentChanged, m_pFilterPanel, &UIVMLogViewerFilterPanel::applyFilter); 199 203 connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltTabIndexChange); 200 204 201 205 /* Enable/Disable toolbar actions (except Refresh) & tab widget according log presence: */ 202 m_pActionFind->setEnabled(!noLogsToShow); 203 m_pActionFilter->setEnabled(!noLogsToShow); 204 m_pActionSave->setEnabled(!noLogsToShow); 205 m_pActionBookmark->setEnabled(!noLogsToShow); 206 if (m_pActionFind) 207 m_pActionFind->setEnabled(!noLogsToShow); 208 if (m_pActionFilter) 209 m_pActionFilter->setEnabled(!noLogsToShow); 210 if (m_pActionSave) 211 m_pActionSave->setEnabled(!noLogsToShow); 212 if (m_pActionBookmark) 213 m_pActionBookmark->setEnabled(!noLogsToShow); 206 214 //m_pTabWidget->setEnabled(!noLogsToShow); 207 m_pActionSettings->setEnabled(!noLogsToShow); 215 if (m_pActionSettings) 216 m_pActionSettings->setEnabled(!noLogsToShow); 208 217 m_pTabWidget->show(); 209 218 if (m_pSearchPanel && m_pSearchPanel->isVisible()) … … 352 361 m_pMainLayout = new QVBoxLayout(this); 353 362 354 /* Prepare widgets: */ 363 prepareToolBar(); 364 prepareActions(); 365 366 prepareMenu(); 355 367 prepareWidgets(); 356 357 358 prepareActions(); 359 360 prepareToolBar(); 361 prepareMenu(); 362 368 363 369 /* Reading log files: */ 364 370 sltRefresh(); … … 384 390 385 391 /* Create VM Log-Viewer container: */ 386 m_pTabWidget = new QITabWidget (this);392 m_pTabWidget = new QITabWidget; 387 393 if (m_pTabWidget) 388 394 { 389 395 /* Add VM Log-Viewer container to main-layout: */ 390 m_pMainLayout-> insertWidget(1,m_pTabWidget);396 m_pMainLayout->addWidget(m_pTabWidget); 391 397 } 392 398 393 399 /* Create VM Log-Viewer search-panel: */ 394 m_pSearchPanel = new UIVMLogViewerSearchPanel( this, this);400 m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this); 395 401 if (m_pSearchPanel) 396 402 { … … 399 405 m_pSearchPanel->hide(); 400 406 /* Add VM Log-Viewer search-panel to main-layout: */ 401 m_pMainLayout-> insertWidget(2,m_pSearchPanel);407 m_pMainLayout->addWidget(m_pSearchPanel); 402 408 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated, 403 409 this, &UIVMLogViewerWidget::sltSearchResultHighLigting); … … 405 411 406 412 /* Create VM Log-Viewer filter-panel: */ 407 m_pFilterPanel = new UIVMLogViewerFilterPanel( this, this);413 m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this); 408 414 if (m_pFilterPanel) 409 415 { … … 412 418 m_pFilterPanel->hide(); 413 419 /* Add VM Log-Viewer filter-panel to main-layout: */ 414 m_pMainLayout-> insertWidget(3,m_pFilterPanel);420 m_pMainLayout->addWidget(m_pFilterPanel); 415 421 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, 416 422 this, &UIVMLogViewerWidget::sltFilterApplied); 417 423 } 418 424 419 m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel( this, this);425 m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this); 420 426 if (m_pBookmarksPanel) 421 427 { 422 428 installEventFilter(m_pBookmarksPanel); 423 429 m_pBookmarksPanel->hide(); 424 m_pMainLayout-> insertWidget(4,m_pBookmarksPanel);430 m_pMainLayout->addWidget(m_pBookmarksPanel); 425 431 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmark, 426 432 this, &UIVMLogViewerWidget::sltDeleteBookmark); … … 431 437 } 432 438 433 m_pSettingsPanel = new UIVMLogViewerSettingsPanel( this, this);439 m_pSettingsPanel = new UIVMLogViewerSettingsPanel(0, this); 434 440 if (m_pSettingsPanel) 435 441 { … … 441 447 m_pSettingsPanel->setFontSizeInPoints(m_iFontSizeInPoints); 442 448 443 m_pMainLayout-> insertWidget(5,m_pSettingsPanel);449 m_pMainLayout->addWidget(m_pSettingsPanel); 444 450 connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers); 445 451 connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines); … … 580 586 #else 581 587 /* Add into layout: */ 582 m_pMainLayout-> insertWidget(0,m_pToolBar);588 m_pMainLayout->addWidget(m_pToolBar); 583 589 #endif 584 590 } … … 838 844 839 845 /* Create page-container: */ 840 UIVMLogPage* pLogPage = new UIVMLogPage( this);846 UIVMLogPage* pLogPage = new UIVMLogPage(); 841 847 if (pLogPage) 842 848 {
Note:
See TracChangeset
for help on using the changeset viewer.