VirtualBox

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

Last change on this file since 21194 was 19837, checked in by vboxsync, 16 years ago

FE/Qt4: 3875: Guest SMP settings - Initial Commit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 3.1 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 virtual bool correlate (QWidget *aPage, QString &aWarning);
78
79 VBoxSettingsSelector *mSelector;
80 QStackedWidget *mStack;
81
82private slots:
83
84 void enableOk (const QIWidgetValidator *aWval);
85 void updateWhatsThis (bool aGotFocus = false);
86 void whatsThisCandidateDestroyed (QObject *aObj = 0);
87
88private:
89
90 bool eventFilter (QObject *aObject, QEvent *aEvent);
91 void showEvent (QShowEvent *aEvent);
92
93 VBoxSettingsPage* attachValidator (VBoxSettingsPage *aPage);
94
95 /* Flags */
96 bool mPolished;
97
98 /* Error & Warning stuff */
99 bool mValid;
100 bool mSilent;
101 QString mErrorHint;
102 QString mWarnHint;
103 QString mErrorString;
104 QString mWarnString;
105 QPixmap mErrorIcon;
106 QPixmap mWarnIcon;
107 VBoxWarnIconLabel *mIconLabel;
108
109 /* WhatsThis Stuff */
110 QTimer *mWhatsThisTimer;
111 QWidget *mWhatsThisCandidate;
112
113#ifdef Q_WS_MAC
114 QList<QSize> mSizeList;
115#endif /* Q_WS_MAC */
116};
117
118#endif // __VBoxSettingsDialog_h__
119
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