mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Qt deprecated cleanup.
This commit is contained in:
parent
6ae6fbade7
commit
c758ef2910
3 changed files with 8 additions and 11 deletions
|
@ -29,7 +29,6 @@ lcMesh::lcMesh()
|
||||||
mIndexDataSize = 0;
|
mIndexDataSize = 0;
|
||||||
mVertexCacheOffset = -1;
|
mVertexCacheOffset = -1;
|
||||||
mIndexCacheOffset = -1;
|
mIndexCacheOffset = -1;
|
||||||
mFlags = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lcMesh::~lcMesh()
|
lcMesh::~lcMesh()
|
||||||
|
|
|
@ -274,7 +274,11 @@ void lcQGLWidget::mouseMoveEvent(QMouseEvent* MouseEvent)
|
||||||
|
|
||||||
void lcQGLWidget::wheelEvent(QWheelEvent* WheelEvent)
|
void lcQGLWidget::wheelEvent(QWheelEvent* WheelEvent)
|
||||||
{
|
{
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||||
|
if (WheelEvent->angleDelta().y() == 0)
|
||||||
|
#else
|
||||||
if ((WheelEvent->orientation() & Qt::Vertical) == 0)
|
if ((WheelEvent->orientation() & Qt::Vertical) == 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
WheelEvent->ignore();
|
WheelEvent->ignore();
|
||||||
return;
|
return;
|
||||||
|
@ -282,7 +286,11 @@ void lcQGLWidget::wheelEvent(QWheelEvent* WheelEvent)
|
||||||
|
|
||||||
float DeviceScale = GetDeviceScale();
|
float DeviceScale = GetDeviceScale();
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
mWidget->SetMousePosition(WheelEvent->position().x() * DeviceScale, mWidget->mHeight - WheelEvent->position().y() * DeviceScale - 1);
|
||||||
|
#else
|
||||||
mWidget->SetMousePosition(WheelEvent->x() * DeviceScale, mWidget->mHeight - WheelEvent->y() * DeviceScale - 1);
|
mWidget->SetMousePosition(WheelEvent->x() * DeviceScale, mWidget->mHeight - WheelEvent->y() * DeviceScale - 1);
|
||||||
|
#endif
|
||||||
mWidget->SetMouseModifiers(WheelEvent->modifiers());
|
mWidget->SetMouseModifiers(WheelEvent->modifiers());
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||||
|
|
|
@ -465,37 +465,31 @@ void lcQPreferencesDialog::ColorButtonClicked()
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mBackgroundSolidColor;
|
Color = &mOptions->Preferences.mBackgroundSolidColor;
|
||||||
Title = tr("Select Background Color");
|
Title = tr("Select Background Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->BackgroundGradient1ColorButton)
|
else if (Button == ui->BackgroundGradient1ColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mBackgroundGradientColorTop;
|
Color = &mOptions->Preferences.mBackgroundGradientColorTop;
|
||||||
Title = tr("Select Gradient Top Color");
|
Title = tr("Select Gradient Top Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->BackgroundGradient2ColorButton)
|
else if (Button == ui->BackgroundGradient2ColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mBackgroundGradientColorBottom;
|
Color = &mOptions->Preferences.mBackgroundGradientColorBottom;
|
||||||
Title = tr("Select Gradient Bottom Color");
|
Title = tr("Select Gradient Bottom Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->AxesColorButton)
|
else if (Button == ui->AxesColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mAxesColor;
|
Color = &mOptions->Preferences.mAxesColor;
|
||||||
Title = tr("Select Axes Color");
|
Title = tr("Select Axes Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->OverlayColorButton)
|
else if (Button == ui->OverlayColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mOverlayColor;
|
Color = &mOptions->Preferences.mOverlayColor;
|
||||||
Title = tr("Select Overlay Color");
|
Title = tr("Select Overlay Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->ActiveViewColorButton)
|
else if (Button == ui->ActiveViewColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mActiveViewColor;
|
Color = &mOptions->Preferences.mActiveViewColor;
|
||||||
Title = tr("Select Active View Color");
|
Title = tr("Select Active View Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->FadeStepsColor)
|
else if (Button == ui->FadeStepsColor)
|
||||||
{
|
{
|
||||||
|
@ -519,25 +513,21 @@ void lcQPreferencesDialog::ColorButtonClicked()
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mGridLineColor;
|
Color = &mOptions->Preferences.mGridLineColor;
|
||||||
Title = tr("Select Grid Line Color");
|
Title = tr("Select Grid Line Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->ViewSphereColorButton)
|
else if (Button == ui->ViewSphereColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mViewSphereColor;
|
Color = &mOptions->Preferences.mViewSphereColor;
|
||||||
Title = tr("Select View Sphere Color");
|
Title = tr("Select View Sphere Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->ViewSphereTextColorButton)
|
else if (Button == ui->ViewSphereTextColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mViewSphereTextColor;
|
Color = &mOptions->Preferences.mViewSphereTextColor;
|
||||||
Title = tr("Select View Sphere Text Color");
|
Title = tr("Select View Sphere Text Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else if (Button == ui->ViewSphereHighlightColorButton)
|
else if (Button == ui->ViewSphereHighlightColorButton)
|
||||||
{
|
{
|
||||||
Color = &mOptions->Preferences.mViewSphereHighlightColor;
|
Color = &mOptions->Preferences.mViewSphereHighlightColor;
|
||||||
Title = tr("Select View Sphere Highlight Color");
|
Title = tr("Select View Sphere Highlight Color");
|
||||||
DialogOptions = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue