VirtualBox

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

Last change on this file since 43138 was 41587, checked in by vboxsync, 12 years ago

FE/Qt: 6227: Decrease GUI build time: Rework COM wrappers generator to create one header per each COM interface. Update all GUI files to use newly generated headers.

  • 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/* Qt includes: */
23#include <QMainWindow>
24#include <QMap>
25#include <QPair>
26
27/* GUI includes: */
28#include "UIVMLogViewer.gen.h"
29#include "QIWithRetranslateUI.h"
30
31/* COM includes: */
32#include "COMEnums.h"
33#include "CMachine.h"
34
35/* Forward declarations: */
36class QPushButton;
37class QTextEdit;
38class QITabWidget;
39class UIVMLogViewer;
40class UIVMLogViewerSearchPanel;
41
42/* Typedefs: */
43typedef QMap<QString, UIVMLogViewer*> VMLogViewerMap;
44typedef QPair<QString, QTextEdit*> LogPage;
45typedef QList<LogPage> LogBook;
46
47/* VM Log Viewer window: */
48class UIVMLogViewer : public QIWithRetranslateUI2<QMainWindow>,
49 public Ui::UIVMLogViewer
50{
51 Q_OBJECT;
52
53public:
54
55 /* Static method to create/show VM Log Viewer: */
56 static void showLogViewerFor(QWidget *pParent, const CMachine &machine);
57
58protected:
59
60 /* Constructor/destructor: */
61 UIVMLogViewer(QWidget *pParent, Qt::WindowFlags flags, const CMachine &machine);
62 ~UIVMLogViewer();
63
64private slots:
65
66 /* Button slots: */
67 void search();
68 void refresh();
69 bool close();
70 void save();
71
72private:
73
74 /* Translation stuff: */
75 void retranslateUi();
76
77 /* Event handlers: */
78 void showEvent(QShowEvent *aEvent);
79 void keyPressEvent(QKeyEvent *pEvent);
80
81 /* Various helpers: */
82 QTextEdit* currentLogPage();
83 QTextEdit* createLogPage(const QString &strPage);
84
85 /* Array containing all VM Log Viewers: */
86 static VMLogViewerMap m_viewers;
87
88 /* VM Log Viewer variables: */
89 bool m_fIsPolished;
90 CMachine m_machine;
91 QITabWidget *m_pViewerContainer;
92 UIVMLogViewerSearchPanel *m_pSearchPanel;
93 LogBook m_book;
94
95 /* Buttons: */
96 QPushButton *mBtnHelp;
97 QPushButton *mBtnFind;
98 QPushButton *mBtnRefresh;
99 QPushButton *mBtnClose;
100 QPushButton *mBtnSave;
101
102 /* Friends: */
103 friend class UIVMLogViewerSearchPanel;
104};
105
106#endif // __UIVMLogViewer_h__
107
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use