VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.h@ 74942

Last change on this file since 74942 was 73118, checked in by vboxsync, 6 years ago

FE/Qt: bugref:9206: Reworking VBoxOSTypeSelectorButton widget, renaming it to UIGuestOSTypeSelectionButton and doing proper makeup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: UIGuestOSTypeSelectionButton.h 73118 2018-07-13 12:07:42Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGuestOSTypeSelectionButton class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-2018 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIGuestOSTypeSelectionButton_h___
19#define ___UIGuestOSTypeSelectionButton_h___
20
21/* Qt includes: */
22#include <QPushButton>
23
24/* GUI includes: */
25#include "QIWithRetranslateUI.h"
26
27/* Forward declarations: */
28class QMenu;
29class QSignalMapper;
30
31/** QPushButton sub-class for choosing guest OS family/type inside appliance editor widget. */
32class UIGuestOSTypeSelectionButton : public QIWithRetranslateUI<QPushButton>
33{
34 Q_OBJECT;
35
36public:
37
38 /** Constructs a button passing @a pParent to the base-class. */
39 UIGuestOSTypeSelectionButton(QWidget *pParent);
40
41 /** Returns whether the menu is shown. */
42 bool isMenuShown() const;
43
44 /** Returns current guest OS type ID. */
45 QString osTypeId() const { return m_strOSTypeId; }
46
47public slots:
48
49 /** Defines current guest @a strOSTypeId. */
50 void setOSTypeId(const QString &strOSTypeId);
51
52protected:
53
54 /** Handles translation event. */
55 virtual void retranslateUi() /* override */;
56
57private:
58
59 /** Populates menu. */
60 void populateMenu();
61
62 /** Holds the current guest OS type ID. */
63 QString m_strOSTypeId;
64
65 /** Holds the menu instance. */
66 QMenu *m_pMainMenu;
67 /** Holds the signal mapper instance. */
68 QSignalMapper *m_pSignalMapper;
69};
70
71#endif /* !___UIGuestOSTypeSelectionButton_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use