VirtualBox

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

Last change on this file since 25045 was 21804, checked in by vboxsync, 15 years ago

FE/Qt4-OSX: Manually delete the settings toolbar. Fix rare segfaults on the Cocoa port.

  • 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 ~VBoxSettingsDialog();
54
55 virtual void getFrom() = 0;
56 virtual void putBackTo() = 0;
57
58protected slots:
59
60 virtual void revalidate (QIWidgetValidator *aWval);
61 void categoryChanged (int aId);
62
63protected:
64
65 virtual void retranslateUi();
66
67 virtual QString dialogTitle() const = 0;
68 QString titleExtension() const;
69
70 void setError (const QString &aError);
71 void setWarning (const QString &aWarning);
72
73 void addItem (const QString &aBigIcon, const QString &aBigIconDisabled,
74 const QString &aSmallIcon, const QString &aSmallIconDisabled,
75 int aId, const QString &aLink,
76 VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1);
77
78 virtual bool correlate (QWidget *aPage, QString &aWarning);
79
80 VBoxSettingsSelector *mSelector;
81 QStackedWidget *mStack;
82
83private slots:
84
85 void enableOk (const QIWidgetValidator *aWval);
86 void updateWhatsThis (bool aGotFocus = false);
87 void whatsThisCandidateDestroyed (QObject *aObj = 0);
88
89private:
90
91 bool eventFilter (QObject *aObject, QEvent *aEvent);
92 void showEvent (QShowEvent *aEvent);
93
94 VBoxSettingsPage* attachValidator (VBoxSettingsPage *aPage);
95
96 /* Flags */
97 bool mPolished;
98
99 /* Error & Warning stuff */
100 bool mValid;
101 bool mSilent;
102 QString mErrorHint;
103 QString mWarnHint;
104 QString mErrorString;
105 QString mWarnString;
106 QPixmap mErrorIcon;
107 QPixmap mWarnIcon;
108 VBoxWarnIconLabel *mIconLabel;
109
110 /* WhatsThis Stuff */
111 QTimer *mWhatsThisTimer;
112 QWidget *mWhatsThisCandidate;
113
114#ifdef Q_WS_MAC
115 QList<QSize> mSizeList;
116#endif /* Q_WS_MAC */
117};
118
119#endif // __VBoxSettingsDialog_h__
120
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