VirtualBox

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

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

FE/Qt4: Added an interface class for the settings selector. Implemented the
classical tree view approach.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.3 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
56protected:
57
58 virtual void retranslateUi();
59
60 void setWarning (const QString &aWarning);
61
62 VBoxSettingsSelector *mSelector;
63 QStackedWidget *mStack;
64
65private slots:
66
67 void enableOk (const QIWidgetValidator *aWval);
68 void updateWhatsThis (bool aGotFocus = false);
69 void whatsThisCandidateDestroyed (QObject *aObj = 0);
70
71 void categoryChanged (int aId);
72
73private:
74
75 bool eventFilter (QObject *aObject, QEvent *aEvent);
76 void showEvent (QShowEvent *aEvent);
77
78 /* Flags */
79 bool mPolished;
80 bool mValid;
81
82 /* Warning Stuff */
83 VBoxWarnIconLabel *mWarnIconLabel;
84 QString mWarnString;
85
86 /* WhatsThis Stuff */
87 QTimer *mWhatsThisTimer;
88 QWidget *mWhatsThisCandidate;
89};
90
91#endif // __VBoxSettingsDialog_h__
92
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