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;
|
||||
mVertexCacheOffset = -1;
|
||||
mIndexCacheOffset = -1;
|
||||
mFlags = 0;
|
||||
}
|
||||
|
||||
lcMesh::~lcMesh()
|
||||
|
|
|
@ -274,7 +274,11 @@ void lcQGLWidget::mouseMoveEvent(QMouseEvent* MouseEvent)
|
|||
|
||||
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)
|
||||
#endif
|
||||
{
|
||||
WheelEvent->ignore();
|
||||
return;
|
||||
|
@ -282,7 +286,11 @@ void lcQGLWidget::wheelEvent(QWheelEvent* WheelEvent)
|
|||
|
||||
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);
|
||||
#endif
|
||||
mWidget->SetMouseModifiers(WheelEvent->modifiers());
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
|
|
|
@ -465,37 +465,31 @@ void lcQPreferencesDialog::ColorButtonClicked()
|
|||
{
|
||||
Color = &mOptions->Preferences.mBackgroundSolidColor;
|
||||
Title = tr("Select Background Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->BackgroundGradient1ColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mBackgroundGradientColorTop;
|
||||
Title = tr("Select Gradient Top Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->BackgroundGradient2ColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mBackgroundGradientColorBottom;
|
||||
Title = tr("Select Gradient Bottom Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->AxesColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mAxesColor;
|
||||
Title = tr("Select Axes Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->OverlayColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mOverlayColor;
|
||||
Title = tr("Select Overlay Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->ActiveViewColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mActiveViewColor;
|
||||
Title = tr("Select Active View Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->FadeStepsColor)
|
||||
{
|
||||
|
@ -519,25 +513,21 @@ void lcQPreferencesDialog::ColorButtonClicked()
|
|||
{
|
||||
Color = &mOptions->Preferences.mGridLineColor;
|
||||
Title = tr("Select Grid Line Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->ViewSphereColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mViewSphereColor;
|
||||
Title = tr("Select View Sphere Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->ViewSphereTextColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mViewSphereTextColor;
|
||||
Title = tr("Select View Sphere Text Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else if (Button == ui->ViewSphereHighlightColorButton)
|
||||
{
|
||||
Color = &mOptions->Preferences.mViewSphereHighlightColor;
|
||||
Title = tr("Select View Sphere Highlight Color");
|
||||
DialogOptions = 0;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue