VirtualBox

Changeset 72030 in vbox


Ignore:
Timestamp:
Apr 26, 2018 8:34:29 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122326
Message:

FE/Qt: bugref:9072 Save/load logviewer settings to/from extra data

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r71523 r72030  
    208208/* Virtual Machine: Log-viewer: */
    209209const char *UIExtraDataDefs::GUI_LogWindowGeometry = "GUI/LogWindowGeometry";
     210const char *UIExtraDataDefs::GUI_LogViewerSettings = "GUI/LogViewerSettings";
     211const char *UIExtraDataDefs::GUI_LogViewerWrapLinesEnabled = "WrapLines";
     212const char *UIExtraDataDefs::GUI_LogViewerShowLineNumbersDisabled = "showLineNumbersDisabled";
     213const char *UIExtraDataDefs::GUI_LogViewerNoFontStyleName = "noFontStyleName";
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r71630 r72030  
    366366        SHARED_LIBRARY_STUFF extern const char *GUI_LogWindowGeometry;
    367367    /** @} */
     368    /** @name Virtual Machine: Log-viewer widget settings
     369      * @{ */
     370        SHARED_LIBRARY_STUFF extern const char *GUI_LogViewerSettings;
     371        /** Holds log-viewer wrap line flag. */
     372        SHARED_LIBRARY_STUFF extern const char *GUI_LogViewerWrapLinesEnabled;
     373        SHARED_LIBRARY_STUFF extern const char *GUI_LogViewerShowLineNumbersDisabled;
     374        SHARED_LIBRARY_STUFF extern const char *GUI_LogViewerNoFontStyleName;
     375    /** @} */
     376
    368377}
    369378
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r71580 r72030  
    2626# ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    2727#  include <QComboBox>
     28#  include <QFontDatabase>
    2829#  include <QHeaderView>
    2930#  include <QLabel>
     
    43784379}
    43794380
     4381void UIExtraDataManager::setLogViweverSettings(const QFont &font, bool wrapLines, bool showLineNumbers)
     4382{
     4383    /* Serialize passed values: */
     4384    QStringList data;
     4385    data << font.family();
     4386    /* Make sure that we have some non-empty string as font style name: */
     4387    QString strStyleName = font.styleName();
     4388    if (strStyleName.isEmpty())
     4389        data << GUI_LogViewerNoFontStyleName;
     4390    else
     4391        data << font.styleName();
     4392    data << QString::number(font.pointSize());
     4393
     4394    if (wrapLines)
     4395        data << GUI_LogViewerWrapLinesEnabled;
     4396    if (!showLineNumbers)
     4397        data << GUI_LogViewerShowLineNumbersDisabled;
     4398
     4399    /* Re-cache corresponding extra-data: */
     4400    setExtraDataStringList(GUI_LogViewerSettings, data);
     4401}
     4402
     4403bool UIExtraDataManager::logViewerWrapLines()
     4404{
     4405    const QStringList data = extraDataStringList(GUI_LogViewerSettings);
     4406    for (int i = 0; i < data.size(); ++i)
     4407    {
     4408        if (data[i] == GUI_LogViewerWrapLinesEnabled)
     4409            return true;
     4410    }
     4411    return false;
     4412}
     4413
     4414bool UIExtraDataManager::logViewerShowLineNumbers()
     4415{
     4416    const QStringList data = extraDataStringList(GUI_LogViewerSettings);
     4417    for (int i = 0; i < data.size(); ++i)
     4418    {
     4419        if (data[i] == GUI_LogViewerShowLineNumbersDisabled)
     4420            return false;
     4421    }
     4422    return true;
     4423}
     4424
     4425QFont UIExtraDataManager::logViewerFont()
     4426{
     4427    const QStringList data = extraDataStringList(GUI_LogViewerSettings);
     4428    if (data.size() < 3)
     4429        return QFont();
     4430    QString strFamily = data[0];
     4431    QString strStyleName = data[1];
     4432    if (strStyleName == GUI_LogViewerNoFontStyleName)
     4433        strStyleName.clear();
     4434    bool fOk = false;
     4435    int iFontSize = data[2].toInt(&fOk);
     4436    if (!fOk)
     4437        iFontSize = 9;
     4438    QFontDatabase dataBase;
     4439    return dataBase.font(strFamily, strStyleName, iFontSize);
     4440}
     4441
    43804442void UIExtraDataManager::sltExtraDataChange(QString strMachineID, QString strKey, QString strValue)
    43814443{
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r71630 r72030  
    660660#endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
    661661
    662     /** @name Virtual Machine: Log dialog
     662    /** @name Virtual Machine: Log Viewer dialog
    663663      * @{ */
    664664        /** Returns log-window geometry using @a pWidget and @a defaultGeometry as hints. */
     
    668668        /** Defines log-window @a geometry and @a fMaximized state. */
    669669        void setLogWindowGeometry(const QRect &geometry, bool fMaximized);
     670    /** @} */
     671
     672    /** @name Virtual Machine: Log Viewer widget settings
     673      * @{ */
     674        void setLogViweverSettings(const QFont &font, bool wrapLines, bool showLineNumbers);
     675        /** Returns log-viewer line wrapping flag. */
     676        bool logViewerWrapLines();
     677        /** Returns log-viewer show line numbers flag. */
     678        bool logViewerShowLineNumbers();
     679        /** Tries to find system font by searching by family and style strings within the font database. */
     680        QFont logViewerFont();
    670681    /** @} */
    671682
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.cpp

    r71683 r72030  
    4747    , m_iFilteredLineCount(-1)
    4848    , m_iUnfilteredLineCount(-1)
    49     , m_bShowLineNumbers(true)
    50     , m_bWrapLines(false)
    51     , m_iFontSizeInPoints(9)
    5249{
    5350    prepare();
     
    254251    if (m_pTextEdit)
    255252        m_pTextEdit->setFocus();
    256     applySettings();
    257253    QWidget::showEvent(pEvent);
    258254}
     
    304300void UIVMLogPage::setShowLineNumbers(bool bShowLineNumbers)
    305301{
    306     if (m_bShowLineNumbers == bShowLineNumbers)
    307         return;
    308     m_bShowLineNumbers = bShowLineNumbers;
    309     applySettings();
     302    if (!m_pTextEdit)
     303        return;
     304    m_pTextEdit->setShowLineNumbers(bShowLineNumbers);
    310305}
    311306
    312307void UIVMLogPage::setWrapLines(bool bWrapLines)
    313308{
    314     if (m_bWrapLines == bWrapLines)
    315         return;
    316     m_bWrapLines = bWrapLines;
    317     applySettings();
     309    if (!m_pTextEdit)
     310        return;
     311    m_pTextEdit->setWrapLines(bWrapLines);
    318312}
    319313
     
    327321}
    328322
    329 void UIVMLogPage::setFontSizeInPoints(int fontSize)
    330 {
    331     if (m_iFontSizeInPoints == fontSize)
    332         return;
    333     m_iFontSizeInPoints = fontSize;
    334     applySettings();
    335 }
    336 
    337 int UIVMLogPage::fontSizeInPoints() const
    338 {
    339     return m_iFontSizeInPoints;
    340 }
    341 
    342323int  UIVMLogPage::filteredLineCount() const
    343324{
     
    362343}
    363344
    364 void UIVMLogPage::applySettings()
    365 {
    366     if (!isVisible())
    367         return;
    368     if (!m_pTextEdit)
    369         return;
    370     if (m_bWrapLines != m_pTextEdit->wrapLines())
    371         m_pTextEdit->setWrapLines(m_bWrapLines);
    372 
    373     if (m_bShowLineNumbers != m_pTextEdit->showLineNumbers())
    374         m_pTextEdit->setShowLineNumbers(m_bShowLineNumbers);
    375 
    376     if (m_iFontSizeInPoints != m_pTextEdit->fontSizeInPoints())
    377         m_pTextEdit->setFontSizeInPoints(m_iFontSizeInPoints);
    378 
    379     update();
    380 
    381 }
    382 
     345QFont UIVMLogPage::currentFont() const
     346{
     347    if (!m_pTextEdit)
     348        return QFont();
     349    return m_pTextEdit->font();
     350}
     351
     352void UIVMLogPage::setCurrentFont(QFont font)
     353{
     354    if (!m_pTextEdit)
     355        return;
     356    m_pTextEdit->setCurrentFont(font);
     357}
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogPage.h

    r71683 r72030  
    111111    bool shouldFilterBeApplied(const QSet<QString> &filterTermSet, int filterOperationType) const;
    112112
    113     void setFontSizeInPoints(int fontSize);
    114     int  fontSizeInPoints() const;
     113    QFont currentFont() const;
     114    void setCurrentFont(QFont font);
    115115
    116116protected:
     
    131131    void updateTextEditBookmarkLineSet();
    132132    void deleteBookmark(LogBookmark bookmark);
    133     /** When settings for this UILogPage instance changed, they are applied immediately
    134         only if this is visible, if not they are applied when this becomes visible. */
    135     void applySettings();
    136133
    137134    QHBoxLayout    *m_pMainLayout;
     
    167164    /** @} */
    168165
    169     bool m_bShowLineNumbers;
    170     bool m_bWrapLines;
    171     int  m_iFontSizeInPoints;
    172166};
    173167
    174168#endif /* !___UIVMLogPage_h___ */
    175 
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.cpp

    r71638 r72030  
    112112        return;
    113113
    114     m_pBookmarksComboBox = new QComboBox(this);
     114    m_pBookmarksComboBox = new QComboBox;
    115115    QFontMetrics fontMetrics = m_pBookmarksComboBox->fontMetrics();
    116116    if (m_pBookmarksComboBox)
     
    123123    }
    124124
    125     m_pGotoSelectedBookmark = new QIToolButton(this);
     125    m_pGotoSelectedBookmark = new QIToolButton;
    126126    if (m_pGotoSelectedBookmark)
    127127    {
     
    159159    }
    160160
    161     m_pDeleteCurrentButton = new QIToolButton(this);
     161    m_pDeleteCurrentButton = new QIToolButton;
    162162    if (m_pDeleteCurrentButton)
    163163    {
     
    166166    }
    167167
    168     m_pDeleteAllButton = new QIToolButton(this);
     168    m_pDeleteAllButton = new QIToolButton;
    169169    if (m_pDeleteAllButton)
    170170    {
     
    257257    emit sigBookmarkSelected(m_pBookmarksComboBox->currentIndex() - 1);
    258258}
    259 
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h

    r71683 r72030  
    8787
    8888#endif /* !___UIVMLogViewerBookmarksPanel_h___ */
    89 
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSettingsPanel.cpp

    r71638 r72030  
    2323# include <QComboBox>
    2424# include <QHBoxLayout>
    25 # if defined(RT_OS_SOLARIS)
    26 #  include <QFontDatabase>
    27 # endif
     25# include <QFontDatabase>
     26# include <QFontDialog>
    2827# include <QCheckBox>
    2928# include <QLabel>
     
    3231/* GUI includes: */
    3332# include "QIToolButton.h"
     33# include "UIIconPool.h"
    3434# include "UIVMLogViewerSettingsPanel.h"
    3535# include "UIVMLogViewerWidget.h"
     
    4444    , m_pFontSizeSpinBox(0)
    4545    , m_pFontSizeLabel(0)
     46    , m_pOpenFontDialog(0)
    4647    , m_iDefaultFontSize(9)
    4748{
     
    109110        mainLayout()->addWidget(m_pFontSizeLabel, 0, Qt::AlignLeft);
    110111    }
     112
     113    m_pOpenFontDialog = new QIToolButton;
     114    if (m_pOpenFontDialog)
     115    {
     116        mainLayout()->addWidget(m_pOpenFontDialog, 0);
     117        m_pOpenFontDialog->setIcon(UIIconPool::iconSet(":/log_viewer_goto_selected_bookmark_16px.png"));
     118    }
     119
     120
    111121    mainLayout()->addStretch(2);
    112122}
     
    121131        connect(m_pFontSizeSpinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    122132                this, &UIVMLogViewerSettingsPanel::sigFontSizeInPoints);
     133    if (m_pOpenFontDialog)
     134        connect(m_pOpenFontDialog, &QIToolButton::clicked, this, &UIVMLogViewerSettingsPanel::sltOpenFontDialog);
     135
    123136}
    124137
     
    126139{
    127140    UIVMLogViewerPanel::retranslateUi();
    128     m_pLineNumberCheckBox->setText(UIVMLogViewerWidget::tr("Show Line Numbers"));
    129     m_pLineNumberCheckBox->setToolTip(UIVMLogViewerWidget::tr("Show Line Numbers"));
     141    if (m_pLineNumberCheckBox)
     142    {
     143        m_pLineNumberCheckBox->setText(UIVMLogViewerWidget::tr("Show Line Numbers"));
     144        m_pLineNumberCheckBox->setToolTip(UIVMLogViewerWidget::tr("Show Line Numbers"));
     145    }
    130146
    131     m_pWrapLinesCheckBox->setText(UIVMLogViewerWidget::tr("Wrap Lines"));
    132     m_pWrapLinesCheckBox->setToolTip(UIVMLogViewerWidget::tr("Wrap Lines"));
     147    if (m_pWrapLinesCheckBox)
     148    {
     149        m_pWrapLinesCheckBox->setText(UIVMLogViewerWidget::tr("Wrap Lines"));
     150        m_pWrapLinesCheckBox->setToolTip(UIVMLogViewerWidget::tr("Wrap Lines"));
     151    }
    133152
    134     m_pFontSizeLabel->setText(UIVMLogViewerWidget::tr("Font Size"));
    135     m_pFontSizeSpinBox->setToolTip(UIVMLogViewerWidget::tr("Log Viewer Font Size"));
     153    if (m_pFontSizeLabel)
     154    {
     155        m_pFontSizeLabel->setText(UIVMLogViewerWidget::tr("Font Size"));
     156        m_pFontSizeSpinBox->setToolTip(UIVMLogViewerWidget::tr("Log Viewer Font Size"));
     157    }
     158
     159    if (m_pOpenFontDialog)
     160    {
     161        m_pOpenFontDialog->setToolTip(UIVMLogViewerWidget::tr("Open a font dialog to select font face for the logviewer"));
     162    }
     163
    136164}
    137165
     166void UIVMLogViewerSettingsPanel::sltOpenFontDialog()
     167{
     168    //  QFont   getFont(bool * ok, const QFont & initial, QWidget * parent = 0, const QString & title = QString(), FontDialogOptions options = 0)
     169    QFont currentFont;
     170    UIVMLogViewerWidget* parentWidget = qobject_cast<UIVMLogViewerWidget*>(parent());
     171    if (!parentWidget)
     172        return;
     173
     174    currentFont = parentWidget->currentFont();
     175    bool ok;
     176    QFont font =
     177        QFontDialog::getFont(&ok, currentFont, this, "Logviewer font");
     178
     179    if (ok)
     180        emit sigFontFace(font);
     181}
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSettingsPanel.h

    r71638 r72030  
    2525class QCheckBox;
    2626class QSpinBox;
     27class QLabel;
     28class QIToolButton;
    2729class UIVMLogViewerWidget;
    28 class QLabel;
    2930
    3031/** UIVMLogViewerPanel extension providing GUI to manage logviewer settings. */
     
    3839    void sigWrapLines(bool show);
    3940    void sigFontSizeInPoints(int size);
     41    void sigFontFace(QFont font);
    4042
    4143public:
     
    6062private slots:
    6163
     64    void sltOpenFontDialog();
     65
    6266private:
    6367
    64     QCheckBox   *m_pLineNumberCheckBox;
    65     QCheckBox   *m_pWrapLinesCheckBox;
    66     QSpinBox    *m_pFontSizeSpinBox;
    67     QLabel      *m_pFontSizeLabel;
     68    QCheckBox    *m_pLineNumberCheckBox;
     69    QCheckBox    *m_pWrapLinesCheckBox;
     70    QSpinBox     *m_pFontSizeSpinBox;
     71    QLabel       *m_pFontSizeLabel;
     72    QIToolButton *m_pOpenFontDialog;
    6873
    6974    /** Default font size in points. */
     
    7378
    7479#endif /* !___UIVMLogViewerSettingsPanel_h___ */
    75 
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp

    r71875 r72030  
    160160    , m_bShownTextIsFiltered(false)
    161161    , m_bShowLineNumbers(true)
    162     , m_bWrapLines(false)
     162    , m_bWrapLines(true)
    163163    , m_bHasContextMenu(false)
    164164{
     
    191191
    192192    /* Configure this' wrap mode: */
    193     setWordWrapMode(QTextOption::NoWrap);
    194 
     193    setWrapLines(false);
    195194    setReadOnly(true);
    196 
    197     QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
     195}
     196
     197void UIVMLogViewerTextEdit::setCurrentFont(QFont font)
     198{
    198199    setFont(font);
    199 
    200200    if (m_pLineNumberArea)
    201201        m_pLineNumberArea->setFont(font);
     
    505505}
    506506
    507 void UIVMLogViewerTextEdit::setFontSizeInPoints(int fontSize)
    508 {
    509     if (fontSizeInPoints() == fontSize)
    510         return;
    511     QFont newFont(font());
    512     newFont.setPointSize(fontSize);
    513     setFont(newFont);
    514 }
    515 
    516 int  UIVMLogViewerTextEdit::fontSizeInPoints() const
    517 {
    518     return font().pointSize();
    519 }
    520 
    521507bool UIVMLogViewerTextEdit::wrapLines() const
    522508{
     
    544530}
    545531
    546 
    547532#include "UIVMLogViewerTextEdit.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.h

    r71638 r72030  
    6565    void setCurrentVerticalScrollBarValue(int value);
    6666
    67     void setFontSizeInPoints(int fontSize);
    68     int  fontSizeInPoints() const;
     67    void setCurrentFont(QFont font);
    6968
    7069protected:
     
    9392    void toggleBookmark(const QPair<int, QString>& bookmark);
    9493    void setBackground();
     94
    9595    /** Line number and text at the context menu position */
    9696    QPair<int, QString>  m_iContextMenuBookmark;
     
    116116
    117117#endif /* !___UIVMLogPage_h___ */
    118 
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r71684 r72030  
    2323# include <QDateTime>
    2424# include <QDir>
     25# include <QFont>
    2526# include <QMenu>
    2627# include <QPainter>
     
    7778    , m_bShowLineNumbers(true)
    7879    , m_bWrapLines(false)
    79     , m_iFontSizeInPoints(9)
     80    , m_font(QFontDatabase::systemFont(QFontDatabase::FixedFont))
    8081{
    8182    /* Prepare VM Log-Viewer: */
     
    8586UIVMLogViewerWidget::~UIVMLogViewerWidget()
    8687{
     88    saveSettings();
    8789    /* Cleanup VM Log-Viewer: */
    8890    cleanup();
     91}
     92
     93void UIVMLogViewerWidget::loadSettings()
     94{
     95    m_bWrapLines = gEDataManager->logViewerWrapLines();
     96    m_bShowLineNumbers = gEDataManager->logViewerShowLineNumbers();
     97    QFont loadedFont = gEDataManager->logViewerFont();
     98    if (loadedFont != QFont())
     99        m_font = loadedFont;
     100}
     101
     102void UIVMLogViewerWidget::saveSettings()
     103{
     104    gEDataManager->setLogViweverSettings(m_font, m_bWrapLines, m_bShowLineNumbers);
    89105}
    90106
     
    241257    if (noLogsToShow)
    242258    {
    243         for(QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.begin();
     259        for (QMap<UIVMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.begin();
    244260            iterator != m_panelActionMap.end(); ++iterator)
    245261        {
     
    360376void UIVMLogViewerWidget::sltFontSizeChanged(int fontSize)
    361377{
    362     if (m_iFontSizeInPoints == fontSize)
    363         return;
    364     m_iFontSizeInPoints = fontSize;
     378    if (m_font.pointSize() == fontSize)
     379        return;
     380    m_font.setPointSize(fontSize);
    365381    for (int i = 0; i < m_logPageList.size(); ++i)
    366382    {
    367383        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
    368384        if (pLogPage)
    369             pLogPage->setFontSizeInPoints(m_iFontSizeInPoints);
     385            pLogPage->setCurrentFont(m_font);
     386    }
     387}
     388
     389void UIVMLogViewerWidget::sltFontFace(QFont font)
     390{
     391    if (m_font == font)
     392        return;
     393    m_font = font;
     394    for (int i = 0; i < m_logPageList.size(); ++i)
     395    {
     396        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
     397        if (pLogPage)
     398            pLogPage->setCurrentFont(m_font);
    370399    }
    371400}
     
    381410void UIVMLogViewerWidget::prepare()
    382411{
     412    loadSettings();
    383413    m_pMainLayout = new QVBoxLayout(this);
    384414
     
    467497        m_pSettingsPanel->setShowLineNumbers(m_bShowLineNumbers);
    468498        m_pSettingsPanel->setWrapLines(m_bWrapLines);
    469         m_pSettingsPanel->setFontSizeInPoints(m_iFontSizeInPoints);
     499        m_pSettingsPanel->setFontSizeInPoints(m_font.pointSize());
    470500
    471501        m_pMainLayout->addWidget(m_pSettingsPanel);
     
    473503        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines);
    474504        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged);
     505        connect(m_pSettingsPanel, &UIVMLogViewerSettingsPanel::sigFontFace, this, &UIVMLogViewerWidget::sltFontFace);
    475506    }
    476507}
     
    908939        pLogPage->setShowLineNumbers(m_bShowLineNumbers);
    909940        pLogPage->setWrapLines(m_bWrapLines);
    910         pLogPage->setFontSizeInPoints(m_iFontSizeInPoints);
     941        pLogPage->setCurrentFont(m_font);
    911942
    912943        /* Set the file name only if we really have log file to read. */
     
    947978}
    948979
     980QFont UIVMLogViewerWidget::currentFont() const
     981{
     982    const UIVMLogPage* logPage = currentLogPage();
     983    if (!logPage)
     984        return QFont();
     985    return logPage->currentFont();
     986}
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r71638 r72030  
    7777    void setMachine(const CMachine &machine);
    7878
     79    QFont currentFont() const;
     80
    7981protected:
    8082
     
    118120        void sltWrapLines(bool bWrapLine);
    119121        void sltFontSizeChanged(int fontSize);
     122        void sltFontFace(QFont font);
    120123    /** @} */
    121124
     
    174177    void manageEscapeShortCut();
    175178
     179    /** @name Load/save some settings from/to extra data
     180      * @{ */
     181        void loadSettings();
     182        void saveSettings();
     183    /** @} */
     184
    176185    /** Holds whether the dialog is polished. */
    177186    bool m_fIsPolished;
     
    212221    /** @} */
    213222
    214     /** @name Toolbar and menu variables.
     223    /** @name Toolbar and menu variables. Cache these to restore them after refresh.
    215224     * @{ */
    216225        /** Showing/hiding line numbers and line wraping settings are set per
    217226            UIVMLogViewerWidget and applies to all log pages (all tabs) */
    218         bool m_bShowLineNumbers;
    219         bool m_bWrapLines;
    220         int  m_iFontSizeInPoints;
     227        bool  m_bShowLineNumbers;
     228        bool  m_bWrapLines;
     229        QFont m_font;
    221230    /** @} */
    222231
     
    229238
    230239#endif /* !___UIVMLogViewerWidget_h___ */
    231 
Note: See TracChangeset for help on using the changeset viewer.

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