VirtualBox

Changeset 70745 in vbox


Ignore:
Timestamp:
Jan 25, 2018 3:52:00 PM (7 years ago)
Author:
vboxsync
Message:

FE\Qt: bugref:9072 Polishing:Working on shortcuts and tooltips

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp

    r70664 r70745  
    6464{
    6565    button(ButtonType_Close)->setText(UIVMLogViewerWidget::tr("Close"));
    66     button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
    6766    /* Setup a dialog caption: */
    6867    if (!m_comMachine.isNull())
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp

    r70706 r70745  
    484484    UIVMLogViewerPanel::retranslateUi();
    485485    m_pFilterComboBox->setToolTip(UIVMLogViewerWidget::tr("Enter filtering string here."));
    486     m_pAddFilterTermButton->setToolTip(UIVMLogViewerWidget::tr("Add filter term."));
     486    m_pAddFilterTermButton->setToolTip(UIVMLogViewerWidget::tr("Add filter term. (Enter"));
    487487    m_pResultLabel->setText(UIVMLogViewerWidget::tr("Showing %1/%2").arg(m_iFilteredLineCount).arg(m_iUnfilteredLineCount));
    488488    m_pFilterTermsLineEdit->setToolTip(UIVMLogViewerWidget::tr("The filter terms list. Select one to remove or click the button on the right side to remove them all."));
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp

    r70715 r70745  
    107107bool UIVMLogViewerPanel::eventFilter(QObject *pObject, QEvent *pEvent)
    108108{
    109     return QWidget::eventFilter(pObject, pEvent);
     109    /* Dont consume this event. Pass it back to Qt's event system: */
     110    return false;
    110111}
    111112
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp

    r70711 r70745  
    360360
    361361    if (m_pNextButton)
    362         m_pNextButton->setToolTip(UIVMLogViewerWidget::tr("Search for the previous occurrence of the string"));
     362        m_pNextButton->setToolTip(UIVMLogViewerWidget::tr("Search for the previous occurrence of the string (F3)"));
    363363
    364364    if (m_pPreviousButton)
    365         m_pPreviousButton->setToolTip(UIVMLogViewerWidget::tr("Search for the previous occurrence of the string"));
     365        m_pPreviousButton->setToolTip(UIVMLogViewerWidget::tr("Search for the previous occurrence of the string (Shift+F3)"));
    366366
    367367
     
    420420    switch (pEvent->type())
    421421    {
    422 
    423422        /* Process key press only: */
    424423        case QEvent::KeyPress:
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r70678 r70745  
    427427    if (m_pBookmarksPanel)
    428428    {
    429         installEventFilter(m_pBookmarksPanel);
    430429        m_pBookmarksPanel->hide();
    431430        m_pMainLayout->addWidget(m_pBookmarksPanel);
     
    441440    if (m_pSettingsPanel)
    442441    {
    443         installEventFilter(m_pSettingsPanel);
    444442        m_pSettingsPanel->hide();
    445443        /* Initialize settings' panel checkboxes and input fields: */
     
    490488    if (m_pActionSettings)
    491489    {
     490        m_pActionSettings->setShortcut(QKeySequence("Ctrl+P"));
    492491        m_pActionSettings->setCheckable(true);
    493492        connect(m_pActionSettings, &QAction::triggered, this, &UIVMLogViewerWidget::sltPanelActionTriggered);
    494493    }
    495 
    496494
    497495    /* Create and configure 'Refresh' action: */
     
    627625    {
    628626        m_pActionFind->setText(tr("&Find"));
    629         m_pActionFind->setToolTip(tr("Find a string within the log"));
    630         m_pActionFind->setStatusTip(tr("Find a string within the log"));
     627        m_pActionFind->setToolTip(tr("Show/Hide 'Find' Panel (Ctrl+F)"));
     628        m_pActionFind->setStatusTip(tr("Show/Hide 'Find' Panel (Ctrl+F)"));
    631629    }
    632630
     
    634632    {
    635633        m_pActionFilter->setText(tr("&Filter"));
    636         m_pActionFilter->setToolTip(tr("Filter the log wrt. the given string"));
    637         m_pActionFilter->setStatusTip(tr("Filter the log wrt. the given string"));
     634        m_pActionFilter->setToolTip(tr("Show/Hide 'Filter' Panel (Ctrl+T)"));
     635        m_pActionFilter->setStatusTip(tr("Show/Hide 'Filter' Panel (Ctrl+T)"));
    638636    }
    639637
     
    641639    {
    642640        m_pActionRefresh->setText(tr("&Refresh"));
    643         m_pActionRefresh->setToolTip(tr("Reload the log"));
    644         m_pActionRefresh->setStatusTip(tr("Reload the log"));
     641        m_pActionRefresh->setToolTip(tr("Reload the log (F5)"));
     642        m_pActionRefresh->setStatusTip(tr("Reload the log (F5)"));
    645643    }
    646644
     
    648646    {
    649647        m_pActionSave->setText(tr("&Save..."));
    650         m_pActionSave->setToolTip(tr("Save the log"));
    651         m_pActionSave->setStatusTip(tr("Save the log"));
     648        if (m_enmEmbedding == EmbedTo_Dialog)
     649        {
     650            m_pActionSave->setToolTip(tr("Save the log (Ctrl+S)"));
     651            m_pActionSave->setStatusTip(tr("Save the log (Ctrl+S)"));
     652        }
     653        else
     654        {
     655            m_pActionSave->setToolTip(tr("Save the log"));
     656            m_pActionSave->setStatusTip(tr("Save the log"));
     657        }
    652658    }
    653659
     
    655661    {
    656662        m_pActionBookmark->setText(tr("&Bookmarks"));
    657         m_pActionBookmark->setToolTip(tr("Bookmark the line"));
    658         m_pActionBookmark->setStatusTip(tr("Bookmark the line"));
     663        if (m_enmEmbedding == EmbedTo_Dialog)
     664        {
     665            m_pActionBookmark->setToolTip(tr("Show/Hide 'Bookmarks' Panel (Ctrl+D)"));
     666            m_pActionBookmark->setStatusTip(tr("Show/Hide 'Bookmarks' Panel (Ctrl+D)"));
     667        }
     668        else
     669        {
     670            m_pActionBookmark->setToolTip(tr("Show/Hide 'Bookmarks' Panel"));
     671            m_pActionBookmark->setStatusTip(tr("Show/Hide 'Bookmarks' Panel"));
     672        }
    659673    }
    660674
     
    662676    {
    663677        m_pActionSettings->setText(tr("&Settings"));
    664         m_pActionSettings->setToolTip(tr("LogViewer Settings"));
    665         m_pActionSettings->setStatusTip(tr("LogViewer Settings"));
     678        m_pActionSettings->setToolTip(tr("Show/Hide 'Settings' Panel (Ctrl+P)"));
     679        m_pActionSettings->setStatusTip(tr("Show/Hide 'Settings' Panel (Ctrl+P)"));
    666680    }
    667681
     
    699713    switch (pEvent->key())
    700714    {
    701         /* Process key escape as VM Log Viewer close: */
    702         case Qt::Key_Escape:
    703         {
    704             return;
    705         }
    706715        /* Process Back key as switch to previous tab: */
    707716        case Qt::Key_Back:
     
    727736            break;
    728737    }
    729     QWidget::keyReleaseEvent(pEvent);
     738    QWidget::keyPressEvent(pEvent);
    730739}
    731740
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette