VirtualBox

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

Last change on this file since 76553 was 76553, checked in by vboxsync, 5 years ago

scm --update-copyright-year

  • 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 76553 2019-01-01 01:45:53Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGuestOSTypeSelectionButton class declaration.
4 */
5
6/*
7 * Copyright (C) 2009-2019 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#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QPushButton>
26
27/* GUI includes: */
28#include "QIWithRetranslateUI.h"
29
30/* Forward declarations: */
31class QMenu;
32class QSignalMapper;
33
34/** QPushButton sub-class for choosing guest OS family/type inside appliance editor widget. */
35class UIGuestOSTypeSelectionButton : public QIWithRetranslateUI<QPushButton>
36{
37 Q_OBJECT;
38
39public:
40
41 /** Constructs a button passing @a pParent to the base-class. */
42 UIGuestOSTypeSelectionButton(QWidget *pParent);
43
44 /** Returns whether the menu is shown. */
45 bool isMenuShown() const;
46
47 /** Returns current guest OS type ID. */
48 QString osTypeId() const { return m_strOSTypeId; }
49
50public slots:
51
52 /** Defines current guest @a strOSTypeId. */
53 void setOSTypeId(const QString &strOSTypeId);
54
55protected:
56
57 /** Handles translation event. */
58 virtual void retranslateUi() /* override */;
59
60private:
61
62 /** Populates menu. */
63 void populateMenu();
64
65 /** Holds the current guest OS type ID. */
66 QString m_strOSTypeId;
67
68 /** Holds the menu instance. */
69 QMenu *m_pMainMenu;
70 /** Holds the signal mapper instance. */
71 QSignalMapper *m_pSignalMapper;
72};
73
74#endif /* !___UIGuestOSTypeSelectionButton_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use