mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Added option to fade previous steps.
This commit is contained in:
parent
587207b7cf
commit
cbf534fcdf
17 changed files with 116 additions and 78 deletions
|
@ -21,6 +21,7 @@ void lcPreferences::LoadDefaults()
|
|||
mDrawEdgeLines = lcGetProfileInt(LC_PROFILE_DRAW_EDGE_LINES);
|
||||
mLineWidth = lcGetProfileFloat(LC_PROFILE_LINE_WIDTH);
|
||||
mAllowLOD = lcGetProfileInt(LC_PROFILE_ALLOW_LOD);
|
||||
mFadeSteps = lcGetProfileInt(LC_PROFILE_FADE_STEPS);
|
||||
mDrawGridStuds = lcGetProfileInt(LC_PROFILE_GRID_STUDS);
|
||||
mGridStudColor = lcGetProfileInt(LC_PROFILE_GRID_STUD_COLOR);
|
||||
mDrawGridLines = lcGetProfileInt(LC_PROFILE_GRID_LINES);
|
||||
|
@ -32,6 +33,7 @@ void lcPreferences::LoadDefaults()
|
|||
mViewSphereTextColor = lcGetProfileInt(LC_PROFILE_VIEW_SPHERE_TEXT_COLOR);
|
||||
mViewSphereHighlightColor = lcGetProfileInt(LC_PROFILE_VIEW_SPHERE_HIGHLIGHT_COLOR);
|
||||
mAutoLoadMostRecent = lcGetProfileInt(LC_PROFILE_AUTOLOAD_MOSTRECENT);
|
||||
mRestoreTabLayout = lcGetProfileInt(LC_PROFILE_RESTORE_TAB_LAYOUT);
|
||||
}
|
||||
|
||||
void lcPreferences::SaveDefaults()
|
||||
|
@ -43,6 +45,7 @@ void lcPreferences::SaveDefaults()
|
|||
lcSetProfileInt(LC_PROFILE_DRAW_EDGE_LINES, mDrawEdgeLines);
|
||||
lcSetProfileFloat(LC_PROFILE_LINE_WIDTH, mLineWidth);
|
||||
lcSetProfileInt(LC_PROFILE_ALLOW_LOD, mAllowLOD);
|
||||
lcSetProfileInt(LC_PROFILE_FADE_STEPS, mFadeSteps);
|
||||
lcSetProfileInt(LC_PROFILE_GRID_STUDS, mDrawGridStuds);
|
||||
lcSetProfileInt(LC_PROFILE_GRID_STUD_COLOR, mGridStudColor);
|
||||
lcSetProfileInt(LC_PROFILE_GRID_LINES, mDrawGridLines);
|
||||
|
@ -54,6 +57,7 @@ void lcPreferences::SaveDefaults()
|
|||
lcSetProfileInt(LC_PROFILE_VIEW_SPHERE_TEXT_COLOR, mViewSphereTextColor);
|
||||
lcSetProfileInt(LC_PROFILE_VIEW_SPHERE_HIGHLIGHT_COLOR, mViewSphereHighlightColor);
|
||||
lcSetProfileInt(LC_PROFILE_AUTOLOAD_MOSTRECENT, mAutoLoadMostRecent);
|
||||
lcSetProfileInt(LC_PROFILE_RESTORE_TAB_LAYOUT, mRestoreTabLayout);
|
||||
}
|
||||
|
||||
lcApplication::lcApplication(int& Argc, char** Argv)
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
bool mDrawEdgeLines;
|
||||
float mLineWidth;
|
||||
bool mAllowLOD;
|
||||
bool mFadeSteps;
|
||||
bool mDrawGridStuds;
|
||||
quint32 mGridStudColor;
|
||||
bool mDrawGridLines;
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
quint32 mViewSphereTextColor;
|
||||
quint32 mViewSphereHighlightColor;
|
||||
bool mAutoLoadMostRecent;
|
||||
bool mRestoreTabLayout;
|
||||
};
|
||||
|
||||
class lcApplication : public QApplication
|
||||
|
|
|
@ -1252,13 +1252,18 @@ void lcModel::DuplicateSelectedPieces()
|
|||
SaveCheckpoint(tr("Duplicating Pieces"));
|
||||
}
|
||||
|
||||
void lcModel::GetScene(lcScene& Scene, lcCamera* ViewCamera, bool Highlight) const
|
||||
void lcModel::GetScene(lcScene& Scene, lcCamera* ViewCamera, bool AllowHighlight, bool AllowFade) const
|
||||
{
|
||||
mPieceInfo->AddRenderMesh(Scene);
|
||||
|
||||
for (lcPiece* Piece : mPieces)
|
||||
for (const lcPiece* Piece : mPieces)
|
||||
{
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->AddMainModelRenderMeshes(Scene, Highlight && Piece->GetStepShow() == mCurrentStep);
|
||||
{
|
||||
lcStep StepShow = Piece->GetStepShow();
|
||||
Piece->AddMainModelRenderMeshes(Scene, AllowHighlight && StepShow == mCurrentStep, AllowFade && StepShow < mCurrentStep);
|
||||
}
|
||||
}
|
||||
|
||||
if (Scene.GetDrawInterface() && !Scene.GetActiveSubmodelInstance())
|
||||
{
|
||||
|
|
|
@ -225,7 +225,7 @@ public:
|
|||
void Paste();
|
||||
void DuplicateSelectedPieces();
|
||||
|
||||
void GetScene(lcScene& Scene, lcCamera* ViewCamera, bool Highlight) const;
|
||||
void GetScene(lcScene& Scene, lcCamera* ViewCamera, bool AllowHighlight, bool AllowFade) const;
|
||||
void AddSubModelRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMatrix, int DefaultColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const;
|
||||
void DrawBackground(lcGLWidget* Widget);
|
||||
QImage GetStepImage(bool Zoom, bool Highlight, int Width, int Height, lcStep Step);
|
||||
|
|
|
@ -424,7 +424,7 @@ void lcPartSelectionListModel::DrawPreview(int InfoIndex)
|
|||
Scene.SetAllowLOD(false);
|
||||
Scene.Begin(ViewMatrix);
|
||||
|
||||
Info->AddRenderMeshes(Scene, lcMatrix44Identity(), mColorIndex, lcRenderMeshState::NORMAL, false);
|
||||
Info->AddRenderMeshes(Scene, lcMatrix44Identity(), mColorIndex, lcRenderMeshState::Default, false);
|
||||
|
||||
Scene.End();
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ static lcProfileEntry gProfileEntries[LC_NUM_PROFILE_KEYS] =
|
|||
lcProfileEntry("Settings", "FixedAxes", false), // LC_PROFILE_FIXED_AXES
|
||||
lcProfileEntry("Settings", "LineWidth", 1.0f), // LC_PROFILE_LINE_WIDTH
|
||||
lcProfileEntry("Settings", "AllowLOD", true), // LC_PROFILE_ALLOW_LOD
|
||||
lcProfileEntry("Settings", "FadeSteps", false), // LC_PROFILE_FADE_STEPS
|
||||
lcProfileEntry("Settings", "ShadingMode", LC_SHADING_DEFAULT_LIGHTS), // LC_PROFILE_SHADING_MODE
|
||||
lcProfileEntry("Settings", "DrawAxes", 0), // LC_PROFILE_DRAW_AXES
|
||||
lcProfileEntry("Settings", "DrawEdgeLines", 1), // LC_PROFILE_DRAW_EDGE_LINES
|
||||
|
@ -88,6 +89,7 @@ static lcProfileEntry gProfileEntries[LC_NUM_PROFILE_KEYS] =
|
|||
lcProfileEntry("Settings", "RecentFile3", ""), // LC_PROFILE_RECENT_FILE3
|
||||
lcProfileEntry("Settings", "RecentFile4", ""), // LC_PROFILE_RECENT_FILE4
|
||||
lcProfileEntry("Settings", "AutoLoadMostRecent", false), // LC_PROFILE_AUTOLOAD_MOSTRECENT
|
||||
lcProfileEntry("Settings", "RestoreTabLayout", true), // LC_PROFILE_RESTORE_TAB_LAYOUT
|
||||
lcProfileEntry("Settings", "AutosaveInterval", 10), // LC_PROFILE_AUTOSAVE_INTERVAL
|
||||
lcProfileEntry("Settings", "MouseSensitivity", 11), // LC_PROFILE_MOUSE_SENSITIVITY
|
||||
lcProfileEntry("Settings", "ImageWidth", 1280), // LC_PROFILE_IMAGE_WIDTH
|
||||
|
|
|
@ -6,6 +6,7 @@ enum LC_PROFILE_KEY
|
|||
LC_PROFILE_FIXED_AXES,
|
||||
LC_PROFILE_LINE_WIDTH,
|
||||
LC_PROFILE_ALLOW_LOD,
|
||||
LC_PROFILE_FADE_STEPS,
|
||||
LC_PROFILE_SHADING_MODE,
|
||||
LC_PROFILE_DRAW_AXES,
|
||||
LC_PROFILE_DRAW_EDGE_LINES,
|
||||
|
@ -36,6 +37,7 @@ enum LC_PROFILE_KEY
|
|||
LC_PROFILE_RECENT_FILE3,
|
||||
LC_PROFILE_RECENT_FILE4,
|
||||
LC_PROFILE_AUTOLOAD_MOSTRECENT,
|
||||
LC_PROFILE_RESTORE_TAB_LAYOUT,
|
||||
LC_PROFILE_AUTOSAVE_INTERVAL,
|
||||
LC_PROFILE_MOUSE_SENSITIVITY,
|
||||
LC_PROFILE_IMAGE_WIDTH,
|
||||
|
|
|
@ -166,20 +166,20 @@ void lcScene::DrawOpaqueMeshes(lcContext* Context, bool DrawLit, int PrimitiveTy
|
|||
|
||||
switch (RenderMesh.State)
|
||||
{
|
||||
case lcRenderMeshState::NORMAL:
|
||||
case lcRenderMeshState::HIGHLIGHT:
|
||||
case lcRenderMeshState::Default:
|
||||
case lcRenderMeshState::Highlighted:
|
||||
Context->SetColorIndex(ColorIndex);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::SELECTED:
|
||||
case lcRenderMeshState::Selected:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_SELECTED, 0.5f);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::FOCUSED:
|
||||
case lcRenderMeshState::Focused:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_FOCUSED, 0.5f);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::DISABLED:
|
||||
case lcRenderMeshState::Faded:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_DISABLED, 0.25f);
|
||||
break;
|
||||
}
|
||||
|
@ -188,26 +188,26 @@ void lcScene::DrawOpaqueMeshes(lcContext* Context, bool DrawLit, int PrimitiveTy
|
|||
{
|
||||
switch (RenderMesh.State)
|
||||
{
|
||||
case lcRenderMeshState::NORMAL:
|
||||
case lcRenderMeshState::Default:
|
||||
if (ColorIndex == gEdgeColor)
|
||||
Context->SetEdgeColorIndex(RenderMesh.ColorIndex);
|
||||
else
|
||||
Context->SetColorIndex(ColorIndex);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::SELECTED:
|
||||
case lcRenderMeshState::Selected:
|
||||
Context->SetInterfaceColor(LC_COLOR_SELECTED);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::FOCUSED:
|
||||
case lcRenderMeshState::Focused:
|
||||
Context->SetInterfaceColor(LC_COLOR_FOCUSED);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::HIGHLIGHT:
|
||||
case lcRenderMeshState::Highlighted:
|
||||
Context->SetInterfaceColor(LC_COLOR_HIGHLIGHT);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::DISABLED:
|
||||
case lcRenderMeshState::Faded:
|
||||
Context->SetInterfaceColor(LC_COLOR_DISABLED);
|
||||
break;
|
||||
}
|
||||
|
@ -324,20 +324,20 @@ void lcScene::DrawTranslucentMeshes(lcContext* Context, bool DrawLit) const
|
|||
|
||||
switch (RenderMesh.State)
|
||||
{
|
||||
case lcRenderMeshState::NORMAL:
|
||||
case lcRenderMeshState::HIGHLIGHT:
|
||||
case lcRenderMeshState::Default:
|
||||
case lcRenderMeshState::Highlighted:
|
||||
Context->SetColorIndex(ColorIndex);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::SELECTED:
|
||||
case lcRenderMeshState::Selected:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_SELECTED, 0.5f);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::FOCUSED:
|
||||
case lcRenderMeshState::Focused:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_FOCUSED, 0.5f);
|
||||
break;
|
||||
|
||||
case lcRenderMeshState::DISABLED:
|
||||
case lcRenderMeshState::Faded:
|
||||
Context->SetColorIndexTinted(ColorIndex, LC_COLOR_DISABLED, 0.25f);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
enum class lcRenderMeshState : int
|
||||
{
|
||||
NORMAL,
|
||||
SELECTED,
|
||||
FOCUSED,
|
||||
DISABLED,
|
||||
HIGHLIGHT
|
||||
Default,
|
||||
Selected,
|
||||
Focused,
|
||||
Faded,
|
||||
Highlighted
|
||||
};
|
||||
|
||||
struct lcRenderMesh
|
||||
|
|
|
@ -389,7 +389,7 @@ void MinifigWizard::OnDraw()
|
|||
|
||||
for (int PieceIdx = 0; PieceIdx < LC_MFW_NUMITEMS; PieceIdx++)
|
||||
if (mMinifig.Parts[PieceIdx])
|
||||
mMinifig.Parts[PieceIdx]->AddRenderMeshes(Scene, mMinifig.Matrices[PieceIdx], mMinifig.Colors[PieceIdx], lcRenderMeshState::NORMAL, true);
|
||||
mMinifig.Parts[PieceIdx]->AddRenderMeshes(Scene, mMinifig.Matrices[PieceIdx], mMinifig.Colors[PieceIdx], lcRenderMeshState::Default, true);
|
||||
|
||||
Scene.End();
|
||||
|
||||
|
|
|
@ -649,31 +649,34 @@ void lcPiece::RemoveKeyFrames()
|
|||
ChangeKey(mRotationKeys, lcMatrix33(mModelWorld), 1, true);
|
||||
}
|
||||
|
||||
void lcPiece::AddMainModelRenderMeshes(lcScene& Scene, bool Highlight) const
|
||||
void lcPiece::AddMainModelRenderMeshes(lcScene& Scene, bool Highlight, bool Fade) const
|
||||
{
|
||||
lcRenderMeshState RenderMeshState = lcRenderMeshState::NORMAL;
|
||||
lcRenderMeshState RenderMeshState = lcRenderMeshState::Default;
|
||||
bool ParentActive = false;
|
||||
|
||||
if (Fade)
|
||||
RenderMeshState = lcRenderMeshState::Faded;
|
||||
|
||||
if (Scene.GetDrawInterface())
|
||||
{
|
||||
lcPiece* ActiveSubmodelInstance = Scene.GetActiveSubmodelInstance();
|
||||
|
||||
if (!ActiveSubmodelInstance)
|
||||
RenderMeshState = IsFocused() ? lcRenderMeshState::FOCUSED : (IsSelected() ? lcRenderMeshState::SELECTED : lcRenderMeshState::NORMAL);
|
||||
RenderMeshState = IsFocused() ? lcRenderMeshState::Focused : (IsSelected() ? lcRenderMeshState::Selected : RenderMeshState);
|
||||
else if (ActiveSubmodelInstance == this)
|
||||
ParentActive = true;
|
||||
else
|
||||
RenderMeshState = lcRenderMeshState::DISABLED;
|
||||
RenderMeshState = lcRenderMeshState::Faded;
|
||||
}
|
||||
else if (Highlight)
|
||||
RenderMeshState = lcRenderMeshState::HIGHLIGHT;
|
||||
RenderMeshState = lcRenderMeshState::Highlighted;
|
||||
|
||||
if (!mMesh)
|
||||
mPieceInfo->AddRenderMeshes(Scene, mModelWorld, mColorIndex, RenderMeshState, ParentActive);
|
||||
else
|
||||
Scene.AddMesh(mMesh, mModelWorld, mColorIndex, RenderMeshState);
|
||||
|
||||
if (RenderMeshState == lcRenderMeshState::FOCUSED || RenderMeshState == lcRenderMeshState::SELECTED)
|
||||
if (RenderMeshState == lcRenderMeshState::Focused || RenderMeshState == lcRenderMeshState::Selected)
|
||||
Scene.AddInterfaceObject(this);
|
||||
}
|
||||
|
||||
|
@ -687,16 +690,16 @@ void lcPiece::AddSubModelRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMat
|
|||
lcPiece* ActiveSubmodelInstance = Scene.GetActiveSubmodelInstance();
|
||||
|
||||
if (ActiveSubmodelInstance == this)
|
||||
RenderMeshState = lcRenderMeshState::NORMAL;
|
||||
RenderMeshState = lcRenderMeshState::Default;
|
||||
else if (ParentActive)
|
||||
RenderMeshState = IsFocused() ? lcRenderMeshState::FOCUSED : (IsSelected() ? lcRenderMeshState::SELECTED : lcRenderMeshState::NORMAL);
|
||||
RenderMeshState = IsFocused() ? lcRenderMeshState::Focused : (IsSelected() ? lcRenderMeshState::Selected : lcRenderMeshState::Default);
|
||||
|
||||
if (!mMesh)
|
||||
mPieceInfo->AddRenderMeshes(Scene, lcMul(mModelWorld, WorldMatrix), ColorIndex, RenderMeshState, ActiveSubmodelInstance == this);
|
||||
else
|
||||
Scene.AddMesh(mMesh, lcMul(mModelWorld, WorldMatrix), ColorIndex, RenderMeshState);
|
||||
|
||||
if (ParentActive && (RenderMeshState == lcRenderMeshState::FOCUSED || RenderMeshState == lcRenderMeshState::SELECTED))
|
||||
if (ParentActive && (RenderMeshState == lcRenderMeshState::Focused || RenderMeshState == lcRenderMeshState::Selected))
|
||||
Scene.AddInterfaceObject(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ public:
|
|||
virtual void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
|
||||
virtual void RemoveKeyFrames() override;
|
||||
|
||||
void AddMainModelRenderMeshes(lcScene& Scene, bool Highlight) const;
|
||||
void AddMainModelRenderMeshes(lcScene& Scene, bool Highlight, bool Fade) const;
|
||||
void AddSubModelRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMatrix, int DefaultColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const;
|
||||
|
||||
void InsertTime(lcStep Start, lcStep Time);
|
||||
|
|
|
@ -302,7 +302,7 @@ void PieceInfo::ZoomExtents(float FoV, float AspectRatio, lcMatrix44& Projection
|
|||
void PieceInfo::AddRenderMesh(lcScene& Scene)
|
||||
{
|
||||
if (mMesh)
|
||||
Scene.AddMesh(mMesh, lcMatrix44Identity(), gDefaultColor, lcRenderMeshState::NORMAL);
|
||||
Scene.AddMesh(mMesh, lcMatrix44Identity(), gDefaultColor, lcRenderMeshState::Default);
|
||||
}
|
||||
|
||||
void PieceInfo::AddRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMatrix, int ColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const
|
||||
|
|
|
@ -1583,7 +1583,7 @@ QImage Project::CreatePartsListImage(lcModel* Model, lcStep Step)
|
|||
Scene.SetAllowLOD(false);
|
||||
Scene.Begin(ViewMatrix);
|
||||
|
||||
Image.Info->AddRenderMeshes(Scene, lcMatrix44Identity(), Image.ColorIndex, lcRenderMeshState::NORMAL, true);
|
||||
Image.Info->AddRenderMeshes(Scene, lcMatrix44Identity(), Image.ColorIndex, lcRenderMeshState::Default, true);
|
||||
|
||||
Scene.End();
|
||||
|
||||
|
@ -1973,7 +1973,7 @@ void Project::ExportHTML(const lcHTMLExportOptions& Options)
|
|||
Scene.SetAllowLOD(false);
|
||||
Scene.Begin(ViewMatrix);
|
||||
|
||||
Info->AddRenderMeshes(Scene, lcMatrix44Identity(), Options.PartImagesColor, lcRenderMeshState::NORMAL, true);
|
||||
Info->AddRenderMeshes(Scene, lcMatrix44Identity(), Options.PartImagesColor, lcRenderMeshState::Default, true);
|
||||
|
||||
Scene.End();
|
||||
|
||||
|
|
|
@ -814,7 +814,7 @@ void View::OnDraw()
|
|||
mScene.SetActiveSubmodelInstance(mActiveSubmodelInstance, mActiveSubmodelTransform);
|
||||
mScene.SetDrawInterface(DrawInterface);
|
||||
|
||||
mModel->GetScene(mScene, mCamera, mHighlight);
|
||||
mModel->GetScene(mScene, mCamera, mHighlight, Preferences.mFadeSteps);
|
||||
|
||||
if (DrawInterface && mTrackTool == LC_TRACKTOOL_INSERT)
|
||||
{
|
||||
|
@ -827,7 +827,7 @@ void View::OnDraw()
|
|||
if (GetActiveModel() != mModel)
|
||||
WorldMatrix = lcMul(WorldMatrix, mActiveSubmodelTransform);
|
||||
|
||||
Info->AddRenderMeshes(mScene, WorldMatrix, gMainWindow->mColorIndex, lcRenderMeshState::FOCUSED, true);
|
||||
Info->AddRenderMeshes(mScene, WorldMatrix, gMainWindow->mColorIndex, lcRenderMeshState::Focused, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO
|
|||
ui->checkForUpdates->setCurrentIndex(mOptions->CheckForUpdates);
|
||||
ui->fixedDirectionKeys->setChecked(mOptions->Preferences.mFixedAxes);
|
||||
ui->autoLoadMostRecent->setChecked(mOptions->Preferences.mAutoLoadMostRecent);
|
||||
ui->RestoreTabLayout->setChecked(mOptions->Preferences.mRestoreTabLayout);
|
||||
|
||||
ui->antiAliasing->setChecked(mOptions->AASamples != 1);
|
||||
if (mOptions->AASamples == 8)
|
||||
|
@ -68,6 +69,7 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO
|
|||
ui->edgeLines->setChecked(mOptions->Preferences.mDrawEdgeLines);
|
||||
ui->lineWidth->setText(lcFormatValueLocalized(mOptions->Preferences.mLineWidth));
|
||||
ui->MeshLOD->setChecked(mOptions->Preferences.mAllowLOD);
|
||||
ui->FadeSteps->setChecked(mOptions->Preferences.mFadeSteps);
|
||||
ui->gridStuds->setChecked(mOptions->Preferences.mDrawGridStuds);
|
||||
ui->gridLines->setChecked(mOptions->Preferences.mDrawGridLines);
|
||||
ui->gridLineSpacing->setText(QString::number(mOptions->Preferences.mGridLineSpacing));
|
||||
|
@ -175,6 +177,7 @@ void lcQPreferencesDialog::accept()
|
|||
mOptions->CheckForUpdates = ui->checkForUpdates->currentIndex();
|
||||
mOptions->Preferences.mFixedAxes = ui->fixedDirectionKeys->isChecked();
|
||||
mOptions->Preferences.mAutoLoadMostRecent = ui->autoLoadMostRecent->isChecked();
|
||||
mOptions->Preferences.mRestoreTabLayout = ui->RestoreTabLayout->isChecked();
|
||||
|
||||
if (!ui->antiAliasing->isChecked())
|
||||
mOptions->AASamples = 1;
|
||||
|
@ -188,6 +191,7 @@ void lcQPreferencesDialog::accept()
|
|||
mOptions->Preferences.mDrawEdgeLines = ui->edgeLines->isChecked();
|
||||
mOptions->Preferences.mLineWidth = lcParseValueLocalized(ui->lineWidth->text());
|
||||
mOptions->Preferences.mAllowLOD = ui->MeshLOD->isChecked();
|
||||
mOptions->Preferences.mFadeSteps = ui->FadeSteps->isChecked();
|
||||
|
||||
mOptions->Preferences.mDrawGridStuds = ui->gridStuds->isChecked();
|
||||
mOptions->Preferences.mDrawGridLines = ui->gridLines->isChecked();
|
||||
|
|
|
@ -282,6 +282,13 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="RestoreTabLayout">
|
||||
<property name="text">
|
||||
<string>Restore tab layout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabRendering">
|
||||
|
@ -292,17 +299,10 @@
|
|||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="axisIcon">
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Axis icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Shading Mode:</string>
|
||||
<string>width</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -335,13 +335,39 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>width</string>
|
||||
<string>Shading Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="axisIcon">
|
||||
<property name="text">
|
||||
<string>Axis icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="ShadingMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Wireframe</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Flat Shading</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Default Lights</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="antiAliasing">
|
||||
<property name="text">
|
||||
|
@ -385,13 +411,6 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="edgeLines">
|
||||
<property name="text">
|
||||
<string>Edge lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -405,23 +424,11 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="ShadingMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Wireframe</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Flat Shading</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Default Lights</string>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="edgeLines">
|
||||
<property name="text">
|
||||
<string>Edge lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
|
@ -431,6 +438,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="FadeSteps">
|
||||
<property name="text">
|
||||
<string>Fade Previous Steps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1169,6 +1183,7 @@
|
|||
<tabstop>authorName</tabstop>
|
||||
<tabstop>fixedDirectionKeys</tabstop>
|
||||
<tabstop>autoLoadMostRecent</tabstop>
|
||||
<tabstop>RestoreTabLayout</tabstop>
|
||||
<tabstop>antiAliasing</tabstop>
|
||||
<tabstop>antiAliasingSamples</tabstop>
|
||||
<tabstop>studLogo</tabstop>
|
||||
|
@ -1177,6 +1192,7 @@
|
|||
<tabstop>lineWidth</tabstop>
|
||||
<tabstop>MeshLOD</tabstop>
|
||||
<tabstop>axisIcon</tabstop>
|
||||
<tabstop>FadeSteps</tabstop>
|
||||
<tabstop>ShadingMode</tabstop>
|
||||
<tabstop>gridStuds</tabstop>
|
||||
<tabstop>gridStudColor</tabstop>
|
||||
|
|
Loading…
Reference in a new issue