VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h@ 38973

Last change on this file since 38973 was 38973, checked in by vboxsync, 13 years ago

FE/Qt: GUI Maintenance: VM Log Viewer overall update & coding-style rework.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * UIVMLogViewer class declaration
5 */
6
7/*
8 * Copyright (C) 2008-2011 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef __UIVMLogViewer_h__
20#define __UIVMLogViewer_h__
21
22/* Global includes: */
23#include <QMainWindow>
24#include <QMap>
25#include <QPair>
26
27/* Local includes: */
28#include "UIVMLogViewer.gen.h"
29#include "QIWithRetranslateUI.h"
30#include "COMDefs.h"
31
32/* Forward declarations: */
33class QPushButton;
34class QTextEdit;
35class QITabWidget;
36class UIVMLogViewer;
37class UIVMLogViewerSearchPanel;
38
39/* Typedefs: */
40typedef QMap<QString, UIVMLogViewer*> VMLogViewerMap;
41typedef QPair<QString, QTextEdit*> LogPage;
42typedef QList<LogPage> LogBook;
43
44/* VM Log Viewer window: */
45class UIVMLogViewer : public QIWithRetranslateUI2<QMainWindow>,
46 public Ui::UIVMLogViewer
47{
48 Q_OBJECT;
49
50public:
51
52 /* Static method to create/show VM Log Viewer: */
53 static void showLogViewerFor(QWidget *pParent, const CMachine &machine);
54
55protected:
56
57 /* Constructor/destructor: */
58 UIVMLogViewer(QWidget *pParent, Qt::WindowFlags flags, const CMachine &machine);
59 ~UIVMLogViewer();
60
61private slots:
62
63 /* Button slots: */
64 void search();
65 void refresh();
66 bool close();
67 void save();
68
69private:
70
71 /* Translation stuff: */
72 void retranslateUi();
73
74 /* Event handlers: */
75 void showEvent(QShowEvent *aEvent);
76 void keyPressEvent(QKeyEvent *pEvent);
77
78 /* Various helpers: */
79 QTextEdit* currentLogPage();
80 QTextEdit* createLogPage(const QString &strPage);
81
82 /* Array containing all VM Log Viewers: */
83 static VMLogViewerMap m_viewers;
84
85 /* VM Log Viewer variables: */
86 bool m_fIsPolished;
87 CMachine m_machine;
88 QITabWidget *m_pViewerContainer;
89 UIVMLogViewerSearchPanel *m_pSearchPanel;
90 LogBook m_book;
91
92 /* Buttons: */
93 QPushButton *mBtnHelp;
94 QPushButton *mBtnFind;
95 QPushButton *mBtnRefresh;
96 QPushButton *mBtnClose;
97 QPushButton *mBtnSave;
98
99 /* Friends: */
100 friend class UIVMLogViewerSearchPanel;
101};
102
103#endif // __UIVMLogViewer_h__
104
Note: See TracBrowser for help on using the repository browser.

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