diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.cpp deleted file mode 100644 index 76cc168a69..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "DHQSlider.hxx" -#include "PropertyQTConstants.h" -#include -AZ_PUSH_DISABLE_WARNING(4244 4251, "-Wunknown-warning-option") // 4244: conversion from 'int' to 'float', possible loss of data - // 4251: 'QInputEvent::modState': class 'QFlags' needs to have dll-interface to be used by clients of class 'QInputEvent' -#include -AZ_POP_DISABLE_WARNING - -namespace AzToolsFramework -{ - void DHQSlider::wheelEvent(QWheelEvent* e) - { - if (hasFocus()) - { - QSlider::wheelEvent(e); - } - else - { - e->ignore(); - } - } - - void InitializeSliderPropertyWidgets(QSlider* slider, QAbstractSpinBox* spinbox) - { - if (slider == nullptr || spinbox == nullptr) - { - return; - } - - // A 2:1 ratio between spinbox and slider gives the slider more room, - // but leaves some space for the spin box to expand. - const int spinBoxStretch = 1; - const int sliderStretch = 2; - - QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(spinBoxStretch); - spinbox->setSizePolicy(sizePolicy); - spinbox->setMinimumWidth(PropertyQTConstant_MinimumWidth); - spinbox->setFixedHeight(PropertyQTConstant_DefaultHeight); - spinbox->setFocusPolicy(Qt::StrongFocus); - - sizePolicy.setHorizontalStretch(sliderStretch); - slider->setSizePolicy(sizePolicy); - slider->setMinimumWidth(PropertyQTConstant_MinimumWidth); - slider->setFixedHeight(PropertyQTConstant_DefaultHeight); - slider->setFocusPolicy(Qt::StrongFocus); - slider->setFocusProxy(spinbox); - } -} diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.hxx deleted file mode 100644 index 01aeed0300..0000000000 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/DHQSlider.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#ifndef AZ_Q_SLIDER_HXX -#define AZ_Q_SLIDER_HXX - -#include -#include -#include - - -#pragma once - -class QAbstractSpinBox; - -namespace AzToolsFramework -{ - class DHQSlider - : public QSlider - { - public: - AZ_CLASS_ALLOCATOR(DHQSlider, AZ::SystemAllocator, 0); - - explicit DHQSlider(QWidget* parent = 0) - : QSlider(parent) {} - - DHQSlider(Qt::Orientation orientation, QWidget* parent = 0) - : QSlider(orientation, parent) {} - - void wheelEvent(QWheelEvent* e); - }; - - // Share widget initialization code between double and int based slider properties. - void InitializeSliderPropertyWidgets(QSlider*, QAbstractSpinBox*); -} - -#endif diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp index 64ba3b604b..cac6b6867b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyDoubleSliderCtrl.cpp @@ -7,7 +7,6 @@ */ #include #include "PropertyDoubleSliderCtrl.hxx" -#include "DHQSlider.hxx" #include "PropertyQTConstants.h" AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: 'QLayoutItem::align': class 'QFlags' needs to have dll-interface to be used by clients of class 'QLayoutItem' #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntSliderCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntSliderCtrl.cpp index 5fa767d060..7d544cd4f0 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntSliderCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntSliderCtrl.cpp @@ -6,7 +6,6 @@ * */ #include "PropertyIntSliderCtrl.hxx" -#include "DHQSlider.hxx" #include "PropertyQTConstants.h" #include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake index b28a62a27f..460c47aa81 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake @@ -368,8 +368,6 @@ set(FILES UI/PropertyEditor/QtWidgetLimits.h UI/PropertyEditor/DHQComboBox.hxx UI/PropertyEditor/DHQComboBox.cpp - UI/PropertyEditor/DHQSlider.hxx - UI/PropertyEditor/DHQSlider.cpp UI/PropertyEditor/EntityIdQLabel.hxx UI/PropertyEditor/EntityIdQLabel.cpp UI/PropertyEditor/EntityIdQLineEdit.h