diff options
Diffstat (limited to 'src/Authoring/Studio/_Win/UI/StudioAppPrefsPage.h')
-rw-r--r-- | src/Authoring/Studio/_Win/UI/StudioAppPrefsPage.h | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/src/Authoring/Studio/_Win/UI/StudioAppPrefsPage.h b/src/Authoring/Studio/_Win/UI/StudioAppPrefsPage.h new file mode 100644 index 00000000..a3be36c2 --- /dev/null +++ b/src/Authoring/Studio/_Win/UI/StudioAppPrefsPage.h @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2002 NVIDIA Corporation. +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#if !defined(AFX_STUDIOAPPPREFSPAGE_H__FA329789_EEDD_4439_B6F6_AAD0FED5285F__INCLUDED_) +#define AFX_STUDIOAPPPREFSPAGE_H__FA329789_EEDD_4439_B6F6_AAD0FED5285F__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +//============================================================================== +// Includes +//============================================================================== +#include "BuildConfigParser.h" + +#include "StudioPreferencesPropSheet.h" + +class QComboBox; +class QLabel; + +class CStudioApp; +///////////////////////////////////////////////////////////////////////////// +// CStudioAppPrefsPage dialog + +namespace Ui +{ + class StudioAppPrefsPage; +} + +class CStudioAppPrefsPage : public CStudioPreferencesPropPage +{ + Q_OBJECT +protected: + typedef std::pair<QLabel *, QComboBox *> TBuildLabelDropdownPair; + typedef std::pair<Q3DStudio::CBuildConfiguration::SConfigProperty *, TBuildLabelDropdownPair> + TBuildNameControlPair; + + // Construction +public: + explicit CStudioAppPrefsPage(QWidget *parent = nullptr); + ~CStudioAppPrefsPage(); + + // Dialog Data + QColor m_bgColor; + + double m_nudgeValue; + +public: + bool OnApply() override; + void OnOK() override; + void OnCancel() override; + + // Implementation +protected: + BOOL m_TimebarShowTime; ///< TRUE if timebars are to display their time value + BOOL m_InterpolationIsSmooth; ///< TRUE if default interpolation is smooth + QFont m_Font; ///< Font for text + QFont m_BoldFont; ///< Bold font for drawing the group boxes + void EnableOptions(); + void LoadSettings(); + void SaveSettings(); + + // Generated message map functions + virtual void OnInitDialog(); + void OnButtonRestoreDefaults(); + void OnSelChangeInterpolationDefault(); + void OnSelChangeSnapRange(); + void OnCheckTimelineAbsoluteSnapping(); + void OnChangeEditNudgeAmount(); + void OnSelChangeStartupView(); + void OnChangePreviewConfiguration(); + void OnBgColorButtonClicked(); + +protected: // helper functions + void InitEditStartViewCombo(); + +protected: + std::list<TBuildNameControlPair> + m_BuildProperties; ///< List of build properties, either ComboBox or Static + + void LoadPreviewSelections(); + void LoadBuildProperties(); + void SavePreviewSettings(); + void RemovePreviewPropertyControls(); + + QScopedPointer<Ui::StudioAppPrefsPage> m_ui; + +private: + void updateColorButton(); +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STUDIOAPPPREFSPAGE_H__FA329789_EEDD_4439_B6F6_AAD0FED5285F__INCLUDED_) |