VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxUtils.h@ 74431

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

Main,GUI,VBoxManage: Provide API for proxy settings that picks up the current GUI settings and converts it to SystemProperties XML attributes. Adjusted GUI to use it. Updated VBoxMangage system properties handling accordingly. bugref:9249

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/* $Id: VBoxUtils.h 74431 2018-09-24 09:16:17Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Declarations of utility classes and functions.
4 */
5
6/*
7 * Copyright (C) 2006-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 ___VBoxUtils_h___
19#define ___VBoxUtils_h___
20
21/* Qt includes: */
22#include <QMouseEvent>
23#include <QWidget>
24#include <QTextBrowser>
25
26/* GUI includes: */
27#include "UILibraryDefs.h"
28#ifdef VBOX_WS_MAC
29# include "VBoxUtils-darwin.h"
30#endif
31
32/* Other VBox includes: */
33#include <iprt/types.h>
34
35
36/** QObject subclass,
37 * allowing to apply string-property value for a certain QObject. */
38class SHARED_LIBRARY_STUFF QObjectPropertySetter : public QObject
39{
40 Q_OBJECT;
41
42public:
43
44 /** Constructs setter for a property with certain @a strName, passing @a pParent to the base-class. */
45 QObjectPropertySetter(QObject *pParent, const QString &strName)
46 : QObject(pParent), m_strName(strName)
47 {}
48
49public slots:
50
51 /** Assigns string property @a strValue. */
52 void sltAssignProperty(const QString &strValue)
53 {
54 parent()->setProperty(m_strName.toLatin1().constData(), strValue);
55 }
56
57private:
58
59 /** Holds the property name. */
60 const QString m_strName;
61};
62
63
64#endif /* !___VBoxUtils_h___ */
65
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