1 | /* $Id: UIVMLogViewerOptionsPanel.h 76954 2019-01-23 12:56:07Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIVMLogViewer class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2019 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerOptionsPanel_h
|
---|
19 | #define FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerOptionsPanel_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /* GUI includes: */
|
---|
25 | #include "UIVMLogViewerPanel.h"
|
---|
26 |
|
---|
27 | /* Forward declarations: */
|
---|
28 | class QCheckBox;
|
---|
29 | class QSpinBox;
|
---|
30 | class QLabel;
|
---|
31 | class QIToolButton;
|
---|
32 | class UIVMLogViewerWidget;
|
---|
33 |
|
---|
34 | /** UIVMLogViewerPanel extension providing GUI to manage logviewer options. */
|
---|
35 | class UIVMLogViewerOptionsPanel : public UIVMLogViewerPanel
|
---|
36 | {
|
---|
37 | Q_OBJECT;
|
---|
38 |
|
---|
39 | signals:
|
---|
40 |
|
---|
41 | void sigShowLineNumbers(bool show);
|
---|
42 | void sigWrapLines(bool show);
|
---|
43 | void sigChangeFontSizeInPoints(int size);
|
---|
44 | void sigChangeFont(QFont font);
|
---|
45 | void sigResetToDefaults();
|
---|
46 |
|
---|
47 | public:
|
---|
48 |
|
---|
49 | UIVMLogViewerOptionsPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
|
---|
50 |
|
---|
51 | void setShowLineNumbers(bool bShowLineNumbers);
|
---|
52 | void setWrapLines(bool bWrapLines);
|
---|
53 | void setFontSizeInPoints(int fontSizeInPoints);
|
---|
54 | virtual QString panelName() const /* override */;
|
---|
55 |
|
---|
56 | public slots:
|
---|
57 |
|
---|
58 |
|
---|
59 | protected:
|
---|
60 |
|
---|
61 | virtual void prepareWidgets() /* override */;
|
---|
62 | virtual void prepareConnections() /* override */;
|
---|
63 |
|
---|
64 | /** Handles the translation event. */
|
---|
65 | void retranslateUi();
|
---|
66 |
|
---|
67 | private slots:
|
---|
68 |
|
---|
69 | void sltOpenFontDialog();
|
---|
70 |
|
---|
71 | private:
|
---|
72 |
|
---|
73 | QCheckBox *m_pLineNumberCheckBox;
|
---|
74 | QCheckBox *m_pWrapLinesCheckBox;
|
---|
75 | QSpinBox *m_pFontSizeSpinBox;
|
---|
76 | QLabel *m_pFontSizeLabel;
|
---|
77 | QIToolButton *m_pOpenFontDialogButton;
|
---|
78 | QIToolButton *m_pResetToDefaultsButton;
|
---|
79 |
|
---|
80 | /** Default font size in points. */
|
---|
81 | const int m_iDefaultFontSize;
|
---|
82 |
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif /* !FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerOptionsPanel_h */
|
---|