~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 *
 
3
 * VBox frontends: Qt GUI ("VirtualBox"):
 
4
 * UIMachineWindowScale class declaration
 
5
 */
 
6
 
 
7
/*
 
8
 * Copyright (C) 2010 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 __UIMachineWindowScale_h__
 
20
#define __UIMachineWindowScale_h__
 
21
 
 
22
/* Global includes */
 
23
#include <QMainWindow>
 
24
 
 
25
/* Local includes */
 
26
#include "QIWithRetranslateUI.h"
 
27
#include "UIMachineWindow.h"
 
28
 
 
29
class UIMachineWindowScale : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
 
30
{
 
31
    Q_OBJECT;
 
32
 
 
33
protected:
 
34
 
 
35
    /* Scale machine window constructor/destructor: */
 
36
    UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId);
 
37
    virtual ~UIMachineWindowScale();
 
38
 
 
39
private slots:
 
40
 
 
41
    /* Console callback handlers: */
 
42
    void sltMachineStateChanged();
 
43
 
 
44
    /* Popup main menu: */
 
45
    void sltPopupMainMenu();
 
46
 
 
47
    /* Close window reimplementation: */
 
48
    void sltTryClose();
 
49
 
 
50
private:
 
51
 
 
52
    /* Translate routine: */
 
53
    void retranslateUi();
 
54
 
 
55
    /* Event handlers: */
 
56
    bool event(QEvent *pEvent);
 
57
#ifdef Q_WS_WIN
 
58
    bool winEvent(MSG *pMessage, long *pResult);
 
59
#endif
 
60
#ifdef Q_WS_X11
 
61
    bool x11Event(XEvent *pEvent);
 
62
#endif
 
63
    void closeEvent(QCloseEvent *pEvent);
 
64
 
 
65
    /* Prepare helpers: */
 
66
    void prepareMenu();
 
67
    void prepareMachineViewContainer();
 
68
    void prepareMachineView();
 
69
    void loadWindowSettings();
 
70
 
 
71
    /* Cleanup helpers: */
 
72
    void saveWindowSettings();
 
73
    void cleanupMachineView();
 
74
    //void cleanupMachineViewContainer() {}
 
75
    void cleanupMenu();
 
76
 
 
77
    /* Other members: */
 
78
    void showSimple();
 
79
    bool isMaximizedChecked();
 
80
 
 
81
    /* Other members: */
 
82
    QMenu *m_pMainMenu;
 
83
    QRect m_normalGeometry;
 
84
 
 
85
    /* Factory support: */
 
86
    friend class UIMachineWindow;
 
87
};
 
88
 
 
89
#endif // __UIMachineWindowScale_h__
 
90