1 | /* $Id: UIVMLogViewerPreferencesWidget.h 103923 2024-03-19 17:01:11Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIVMLogViewer class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerPreferencesWidget_h
|
---|
29 | #define FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerPreferencesWidget_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* GUI includes: */
|
---|
35 | #include "UIVMLogViewerPanel.h"
|
---|
36 |
|
---|
37 | /* Forward declarations: */
|
---|
38 | class QCheckBox;
|
---|
39 | class QSpinBox;
|
---|
40 | class QLabel;
|
---|
41 | class QIToolButton;
|
---|
42 | class UIVMLogViewerWidget;
|
---|
43 |
|
---|
44 | /** UIVMLogViewerPanel extension providing GUI to manage logviewer options. */
|
---|
45 | class UIVMLogViewerPreferencesWidget : public UIVMLogViewerPane
|
---|
46 | {
|
---|
47 | Q_OBJECT;
|
---|
48 |
|
---|
49 | signals:
|
---|
50 |
|
---|
51 | void sigShowLineNumbers(bool show);
|
---|
52 | void sigWrapLines(bool show);
|
---|
53 | void sigChangeFontSizeInPoints(int size);
|
---|
54 | void sigChangeFont(QFont font);
|
---|
55 | void sigResetToDefaults();
|
---|
56 |
|
---|
57 | public:
|
---|
58 |
|
---|
59 | UIVMLogViewerPreferencesWidget(QWidget *pParent, UIVMLogViewerWidget *pViewer);
|
---|
60 |
|
---|
61 | void setShowLineNumbers(bool bShowLineNumbers);
|
---|
62 | void setWrapLines(bool bWrapLines);
|
---|
63 | void setFontSizeInPoints(int fontSizeInPoints);
|
---|
64 |
|
---|
65 | public slots:
|
---|
66 |
|
---|
67 |
|
---|
68 | protected:
|
---|
69 |
|
---|
70 | virtual void prepareWidgets();
|
---|
71 | virtual void prepareConnections();
|
---|
72 |
|
---|
73 | private slots:
|
---|
74 |
|
---|
75 | void sltOpenFontDialog();
|
---|
76 | /** Handles the translation event. */
|
---|
77 | void sltRetranslateUI();
|
---|
78 |
|
---|
79 | private:
|
---|
80 |
|
---|
81 | QCheckBox *m_pLineNumberCheckBox;
|
---|
82 | QCheckBox *m_pWrapLinesCheckBox;
|
---|
83 | QSpinBox *m_pFontSizeSpinBox;
|
---|
84 | QLabel *m_pFontSizeLabel;
|
---|
85 | QIToolButton *m_pOpenFontDialogButton;
|
---|
86 | QIToolButton *m_pResetToDefaultsButton;
|
---|
87 |
|
---|
88 | /** Default font size in points. */
|
---|
89 | const int m_iDefaultFontSize;
|
---|
90 |
|
---|
91 | };
|
---|
92 |
|
---|
93 | #endif /* !FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerPreferencesWidget_h */
|
---|