~ubuntu-branches/ubuntu/oneiric/virtualbox-ose/oneiric

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.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: Qt4 GUI ("VirtualBox"):
 
4
 * UIGlobalSettingsGeneral class declaration
 
5
 */
 
6
 
 
7
/*
 
8
 * Copyright (C) 2006-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 __UIGlobalSettingsGeneral_h__
 
20
#define __UIGlobalSettingsGeneral_h__
 
21
 
 
22
/* Local includes */
 
23
#include "UISettingsPage.h"
 
24
#include "UIGlobalSettingsGeneral.gen.h"
 
25
 
 
26
/* Global settings / General page / Cache: */
 
27
struct UISettingsCacheGlobalGeneral
 
28
{
 
29
    QString m_strDefaultMachineFolder;
 
30
    QString m_strVRDEAuthLibrary;
 
31
    bool m_fTrayIconEnabled;
 
32
#ifdef Q_WS_MAC
 
33
    bool m_fPresentationModeEnabled;
 
34
#endif /* Q_WS_MAC */
 
35
    bool m_fHostScreenSaverDisables;
 
36
};
 
37
 
 
38
/* Global settings / General page: */
 
39
class UIGlobalSettingsGeneral : public UISettingsPageGlobal, public Ui::UIGlobalSettingsGeneral
 
40
{
 
41
    Q_OBJECT;
 
42
 
 
43
public:
 
44
 
 
45
    /* Constructor: */
 
46
    UIGlobalSettingsGeneral();
 
47
 
 
48
protected:
 
49
 
 
50
    /* Load data to cashe from corresponding external object(s),
 
51
     * this task COULD be performed in other than GUI thread: */
 
52
    void loadToCacheFrom(QVariant &data);
 
53
    /* Load data to corresponding widgets from cache,
 
54
     * this task SHOULD be performed in GUI thread only: */
 
55
    void getFromCache();
 
56
 
 
57
    /* Save data from corresponding widgets to cache,
 
58
     * this task SHOULD be performed in GUI thread only: */
 
59
    void putToCache();
 
60
    /* Save data from cache to corresponding external object(s),
 
61
     * this task COULD be performed in other than GUI thread: */
 
62
    void saveFromCacheTo(QVariant &data);
 
63
 
 
64
    /* Navigation stuff: */
 
65
    void setOrderAfter(QWidget *pWidget);
 
66
 
 
67
    /* Translation stuff: */
 
68
    void retranslateUi();
 
69
 
 
70
private:
 
71
 
 
72
    /* Cache: */
 
73
    UISettingsCacheGlobalGeneral m_cache;
 
74
};
 
75
 
 
76
#endif // __UIGlobalSettingsGeneral_h__
 
77