VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h@ 76532

Last change on this file since 76532 was 76532, checked in by vboxsync, 5 years ago

Frontends: scm --fix-header-guards. bugref:9344

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: UIVMLogViewerPanel.h 76532 2018-12-30 06:08:06Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMLogViewer class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2017 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 ___UIVMLogViewerPanel_h___
19#define ___UIVMLogViewerPanel_h___
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QWidget>
26#include <QKeySequence>
27/* GUI includes: */
28#include "QIWithRetranslateUI.h"
29
30/* Forward declarations: */
31class QHBoxLayout;
32class QPlainTextEdit;
33class QTextDocument;
34class QIToolButton;
35class UIVMLogViewerWidget;
36
37
38/** QWidget extension acting as the base class for UIVMLogViewerXXXPanel widgets. */
39class UIVMLogViewerPanel : public QIWithRetranslateUI<QWidget>
40{
41 Q_OBJECT;
42
43public:
44
45 UIVMLogViewerPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
46 void setCloseButtonShortCut(QKeySequence shortCut);
47
48protected:
49
50 virtual void prepare();
51 virtual void prepareWidgets();
52 virtual void prepareConnections();
53
54 /* Access functions for children classes. */
55 UIVMLogViewerWidget* viewer();
56 const UIVMLogViewerWidget* viewer() const;
57 QHBoxLayout* mainLayout();
58
59 /** Handles the translation event. */
60 void retranslateUi();
61
62 /** Handles Qt @a pEvent, used for keyboard processing. */
63 bool eventFilter(QObject *pObject, QEvent *pEvent);
64 /** Handles the Qt show @a pEvent. */
65 void showEvent(QShowEvent *pEvent);
66 /** Handles the Qt hide @a pEvent. */
67 void hideEvent(QHideEvent *pEvent);
68
69 QTextDocument *textDocument();
70 QPlainTextEdit *textEdit();
71 /* Return the unmodified log. */
72 const QString* logString() const;
73
74private:
75
76 /** Holds the reference to VM Log-Viewer this panel belongs to. */
77 UIVMLogViewerWidget *m_pViewer;
78 QHBoxLayout *m_pMainLayout;
79 QIToolButton *m_pCloseButton;
80};
81
82#endif /* !___UIVMLogViewerPanel!_h___ */
83
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use