VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSettingsDialog.h@ 14680

Last change on this file since 14680 was 14339, checked in by vboxsync, 16 years ago

FE/Qt4: 2405: Stricter RAM size checks. Feature implemented.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.6 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#include "VBoxSettingsDialog.gen.h"
27#include "QIMainDialog.h"
28#include "QIWithRetranslateUI.h"
29
30class VBoxWarnIconLabel;
31class QIWidgetValidator;
32class VBoxSettingsSelector;
33class QTimer;
34class QStackedWidget;
35
36/*
37 * Base dialog class for both Global & VM settings which
38 * encapsulates most of their similar functionalities.
39 */
40class VBoxSettingsDialog : public QIWithRetranslateUI<QIMainDialog>,
41 public Ui::VBoxSettingsDialog
42{
43 Q_OBJECT;
44
45public:
46
47 VBoxSettingsDialog (QWidget *aParent = NULL);
48
49 virtual void getFrom() = 0;
50 virtual void putBackTo() = 0;
51
52protected slots:
53
54 virtual void revalidate (QIWidgetValidator * /* aWval */) {}
55 void categoryChanged (int aId);
56
57protected:
58
59 virtual void retranslateUi();
60
61 virtual QString dialogTitle() const = 0;
62 QString titleExtension() const;
63
64 void setError (const QString &aError);
65 void setWarning (const QString &aWarning);
66
67 VBoxSettingsSelector *mSelector;
68 QStackedWidget *mStack;
69
70private slots:
71
72 void enableOk (const QIWidgetValidator *aWval);
73 void updateWhatsThis (bool aGotFocus = false);
74 void whatsThisCandidateDestroyed (QObject *aObj = 0);
75
76private:
77
78 bool eventFilter (QObject *aObject, QEvent *aEvent);
79 void showEvent (QShowEvent *aEvent);
80
81 /* Flags */
82 bool mPolished;
83
84 /* Error & Warning stuff */
85 bool mValid;
86 bool mSilent;
87 QString mErrorHint;
88 QString mWarnHint;
89 QString mErrorString;
90 QString mWarnString;
91 QPixmap mErrorIcon;
92 QPixmap mWarnIcon;
93 VBoxWarnIconLabel *mIconLabel;
94
95 /* WhatsThis Stuff */
96 QTimer *mWhatsThisTimer;
97 QWidget *mWhatsThisCandidate;
98
99#ifdef Q_WS_MAC
100 QList<QSize> mSizeList;
101#endif /* Q_WS_MAC */
102};
103
104#endif // __VBoxSettingsDialog_h__
105
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