VirtualBox

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

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

FE/Qt4-OSX: Fix the animation if the widget is zooming.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.4 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 setWarning (const QString &aWarning);
65
66 VBoxSettingsSelector *mSelector;
67 QStackedWidget *mStack;
68
69private slots:
70
71 void enableOk (const QIWidgetValidator *aWval);
72 void updateWhatsThis (bool aGotFocus = false);
73 void whatsThisCandidateDestroyed (QObject *aObj = 0);
74
75private:
76
77 bool eventFilter (QObject *aObject, QEvent *aEvent);
78 void showEvent (QShowEvent *aEvent);
79
80 /* Flags */
81 bool mPolished;
82 bool mValid;
83
84 /* Warning Stuff */
85 VBoxWarnIconLabel *mWarnIconLabel;
86 QString mWarnString;
87
88 /* WhatsThis Stuff */
89 QTimer *mWhatsThisTimer;
90 QWidget *mWhatsThisCandidate;
91
92#ifdef Q_WS_MAC
93 QList<QSize> mSizeList;
94#endif /* Q_WS_MAC */
95};
96
97#endif // __VBoxSettingsDialog_h__
98
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