VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h

Last change on this file was 106061, checked in by vboxsync, 4 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: UIMachineLogicScale.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachineLogicScale class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_runtime_scale_UIMachineLogicScale_h
29#define FEQT_INCLUDED_SRC_runtime_scale_UIMachineLogicScale_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIMachineLogic.h"
36
37/** UIMachineLogic subclass used as scaled machine logic implementation. */
38class UIMachineLogicScale : public UIMachineLogic
39{
40 Q_OBJECT;
41
42public:
43
44 /** Constructs a logic passing @a pMachine and @a pSession to the base-class.
45 * @param pMachine Brings the machine this logic belongs to. */
46 UIMachineLogicScale(UIMachine *pMachine);
47
48 /** Returns visual state type. */
49 virtual UIVisualStateType visualStateType() const RT_OVERRIDE { return UIVisualStateType_Scale; }
50
51protected:
52
53 /* Check if this logic is available: */
54 bool checkAvailability() RT_OVERRIDE;
55
56 /** Returns machine-window flags for 'Scale' machine-logic and passed @a uScreenId. */
57 virtual Qt::WindowFlags windowFlags(ulong uScreenId) const RT_OVERRIDE { Q_UNUSED(uScreenId); return Qt::Window; }
58
59private slots:
60
61#ifndef RT_OS_DARWIN
62 /** Invokes popup-menu. */
63 void sltInvokePopupMenu();
64#endif /* !RT_OS_DARWIN */
65
66 /** Handles host-screen available-area change. */
67 virtual void sltHostScreenAvailableAreaChange() RT_OVERRIDE;
68
69private:
70
71 /* Prepare helpers: */
72 void prepareActionGroups() RT_OVERRIDE;
73 void prepareActionConnections() RT_OVERRIDE;
74 void prepareMachineWindows() RT_OVERRIDE;
75#ifndef RT_OS_DARWIN
76 void prepareMenu() RT_OVERRIDE RT_FINAL;
77#endif /* !RT_OS_DARWIN */
78
79 /* Cleanup helpers: */
80#ifndef RT_OS_DARWIN
81 void cleanupMenu() RT_OVERRIDE RT_FINAL;
82#endif /* !RT_OS_DARWIN */
83 void cleanupMachineWindows() RT_OVERRIDE;
84 void cleanupActionConnections() RT_OVERRIDE;
85 void cleanupActionGroups() RT_OVERRIDE;
86
87#ifndef RT_OS_DARWIN
88 /** Holds the popup-menu instance. */
89 QMenu *m_pPopupMenu;
90#endif /* !RT_OS_DARWIN */
91};
92
93#endif /* !FEQT_INCLUDED_SRC_runtime_scale_UIMachineLogicScale_h */
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