VirtualBox

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

Last change on this file since 52722 was 52722, checked in by vboxsync, 10 years ago

FE/Qt: Precompiled header hacking (work in progress).

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

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