VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialog.h@ 19149

Last change on this file since 19149 was 18235, checked in by vboxsync, 16 years ago

FE/Qt4: 2869: Rework network adapter UI - Host-only Interface settings moved to Global Settings.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 3.0 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * VBoxSettingsDialog class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBoxSettingsDialog_h__
24#define __VBoxSettingsDialog_h__
25
26/* VBox includes */
27#include "QIMainDialog.h"
28#include "QIWithRetranslateUI.h"
29#include "VBoxSettingsDialog.gen.h"
30
31/* Qt forwards */
32class QIWidgetValidator;
33class QStackedWidget;
34class QTimer;
35
36/* VBox forwards*/
37class VBoxWarnIconLabel;
38class VBoxSettingsSelector;
39class VBoxSettingsPage;
40
41/*
42 * Base dialog class for both Global & VM settings which
43 * encapsulates most of their similar functionalities.
44 */
45class VBoxSettingsDialog : public QIWithRetranslateUI<QIMainDialog>,
46 public Ui::VBoxSettingsDialog
47{
48 Q_OBJECT;
49
50public:
51
52 VBoxSettingsDialog (QWidget *aParent = NULL);
53
54 virtual void getFrom() = 0;
55 virtual void putBackTo() = 0;
56
57protected slots:
58
59 virtual void revalidate (QIWidgetValidator *aWval);
60 void categoryChanged (int aId);
61
62protected:
63
64 virtual void retranslateUi();
65
66 virtual QString dialogTitle() const = 0;
67 QString titleExtension() const;
68
69 void setError (const QString &aError);
70 void setWarning (const QString &aWarning);
71
72 void addItem (const QString &aBigIcon, const QString &aBigIconDisabled,
73 const QString &aSmallIcon, const QString &aSmallIconDisabled,
74 int aId, const QString &aLink,
75 VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1);
76
77 VBoxSettingsSelector *mSelector;
78 QStackedWidget *mStack;
79
80private slots:
81
82 void enableOk (const QIWidgetValidator *aWval);
83 void updateWhatsThis (bool aGotFocus = false);
84 void whatsThisCandidateDestroyed (QObject *aObj = 0);
85
86private:
87
88 bool eventFilter (QObject *aObject, QEvent *aEvent);
89 void showEvent (QShowEvent *aEvent);
90
91 VBoxSettingsPage* attachValidator (VBoxSettingsPage *aPage);
92
93 /* Flags */
94 bool mPolished;
95
96 /* Error & Warning stuff */
97 bool mValid;
98 bool mSilent;
99 QString mErrorHint;
100 QString mWarnHint;
101 QString mErrorString;
102 QString mWarnString;
103 QPixmap mErrorIcon;
104 QPixmap mWarnIcon;
105 VBoxWarnIconLabel *mIconLabel;
106
107 /* WhatsThis Stuff */
108 QTimer *mWhatsThisTimer;
109 QWidget *mWhatsThisCandidate;
110
111#ifdef Q_WS_MAC
112 QList<QSize> mSizeList;
113#endif /* Q_WS_MAC */
114};
115
116#endif // __VBoxSettingsDialog_h__
117
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