From f21d7ad63aabfa7a63436320a17a3cc2a2499a65 Mon Sep 17 00:00:00 2001 From: Trevor SANDY Date: Wed, 20 Jan 2021 13:19:29 +0100 Subject: [PATCH] Stud style - Rename stud logo --- common/lc_application.cpp | 26 +++++++-------- common/lc_application.h | 2 +- common/lc_colors.cpp | 2 +- common/lc_colors.h | 2 +- common/lc_library.cpp | 64 ++++++++++++++++++------------------ common/lc_library.h | 16 ++++----- common/lc_mesh.cpp | 2 +- common/lc_mesh.h | 2 +- common/lc_meshloader.cpp | 6 ++-- common/lc_meshloader.h | 4 +-- common/lc_profile.cpp | 2 +- common/lc_profile.h | 2 +- docs/leocad.1 | 6 ++-- qt/lc_qpreferencesdialog.cpp | 28 ++++++++-------- qt/lc_qpreferencesdialog.h | 4 +-- qt/lc_qpreferencesdialog.ui | 10 +++--- 16 files changed, 89 insertions(+), 89 deletions(-) diff --git a/common/lc_application.cpp b/common/lc_application.cpp index e6365724..6fbdc9d7 100644 --- a/common/lc_application.cpp +++ b/common/lc_application.cpp @@ -340,7 +340,7 @@ lcCommandLineOptions lcApplication::ParseCommandLineOptions() Options.ImageWidth = lcGetProfileInt(LC_PROFILE_IMAGE_WIDTH); Options.ImageHeight = lcGetProfileInt(LC_PROFILE_IMAGE_HEIGHT); Options.AASamples = lcGetProfileInt(LC_PROFILE_ANTIALIASING_SAMPLES); - Options.StudLogo = lcGetProfileInt(LC_PROFILE_STUD_LOGO); + Options.StudStyle = lcGetProfileInt(LC_PROFILE_STUD_STYLE); Options.ImageStart = 0; Options.ImageEnd = 0; Options.CameraPosition[0] = lcVector3(0.0f, 0.0f, 0.0f); @@ -654,12 +654,12 @@ lcCommandLineOptions lcApplication::ParseCommandLineOptions() Options.ParseOK = false; } } - else if (Option == QLatin1String("-sl") || Option == QLatin1String("--stud-logo")) + else if (Option == QLatin1String("-ss") || Option == QLatin1String("--stud-style")) { - ParseInteger(Options.StudLogo, 0, 7); + ParseInteger(Options.StudStyle, 0, 7); - if (Options.StudLogo != lcGetProfileInt(LC_PROFILE_STUD_LOGO)) - lcGetPiecesLibrary()->SetStudLogo(Options.StudLogo, false); + if (Options.StudStyle != lcGetProfileInt(LC_PROFILE_STUD_STYLE)) + lcGetPiecesLibrary()->SetStudStyle(Options.StudStyle, false); } else if (Option == QLatin1String("-obj") || Option == QLatin1String("--export-wavefront")) { @@ -703,7 +703,7 @@ lcCommandLineOptions lcApplication::ParseCommandLineOptions() Options.StdOut += tr(" -t, --to : Set the last step to save pictures.\n"); Options.StdOut += tr(" -s, --submodel : Set the active submodel.\n"); Options.StdOut += tr(" -c, --camera : Set the active camera.\n"); - Options.StdOut += tr(" -sl, --stud-logo : Set the stud logo type 0 - 5, 0 is no logo.\n"); + Options.StdOut += tr(" -ss, --stud-style : Set the stud style 0=No style, 1=LDraw single wire, 2=LDraw double wire, 3=LDraw raised floating, 4=LDraw raised rounded, 5=LDraw subtle rounded, 6=LEGO no logo, 7=LEGO single wire.\n"); Options.StdOut += tr(" --viewpoint : Set the viewpoint.\n"); Options.StdOut += tr(" --camera-angles : Set the camera angles in degrees around the model.\n"); Options.StdOut += tr(" --camera-position : Set the camera position, target and up vector.\n"); @@ -1108,7 +1108,7 @@ void lcApplication::ShowPreferencesDialog() { lcPreferencesDialogOptions Options; int CurrentAASamples = lcGetProfileInt(LC_PROFILE_ANTIALIASING_SAMPLES); - int CurrentStudLogo = lcGetProfileInt(LC_PROFILE_STUD_LOGO); + int CurrentStudStyle = lcGetProfileInt(LC_PROFILE_STUD_STYLE); Options.Preferences = mPreferences; @@ -1122,7 +1122,7 @@ void lcApplication::ShowPreferencesDialog() Options.CheckForUpdates = lcGetProfileInt(LC_PROFILE_CHECK_UPDATES); Options.AASamples = CurrentAASamples; - Options.StudLogo = CurrentStudLogo; + Options.StudStyle = CurrentStudStyle; Options.Categories = gCategories; Options.CategoriesModified = false; @@ -1143,7 +1143,7 @@ void lcApplication::ShowPreferencesDialog() bool LibraryChanged = Options.LibraryPath != lcGetProfileString(LC_PROFILE_PARTS_LIBRARY); bool ColorsChanged = Options.ColorConfigPath != lcGetProfileString(LC_PROFILE_COLOR_CONFIG); bool AAChanged = CurrentAASamples != Options.AASamples; - bool StudLogoChanged = CurrentStudLogo != Options.StudLogo; + bool StudStyleChanged = CurrentStudStyle != Options.StudStyle; mPreferences = Options.Preferences; @@ -1159,7 +1159,7 @@ void lcApplication::ShowPreferencesDialog() lcSetProfileString(LC_PROFILE_LANGUAGE, Options.Language); lcSetProfileInt(LC_PROFILE_CHECK_UPDATES, Options.CheckForUpdates); lcSetProfileInt(LC_PROFILE_ANTIALIASING_SAMPLES, Options.AASamples); - lcSetProfileInt(LC_PROFILE_STUD_LOGO, Options.StudLogo); + lcSetProfileInt(LC_PROFILE_STUD_STYLE, Options.StudStyle); if (LanguageChanged || LibraryChanged || ColorsChanged || AAChanged) QMessageBox::information(gMainWindow, tr("LeoCAD"), tr("Some changes will only take effect the next time you start LeoCAD.")); @@ -1201,10 +1201,10 @@ void lcApplication::ShowPreferencesDialog() } } - if (StudLogoChanged) + if (StudStyleChanged) { - lcSetProfileInt(LC_PROFILE_STUD_LOGO, Options.StudLogo); - lcGetPiecesLibrary()->SetStudLogo(Options.StudLogo, true); + lcSetProfileInt(LC_PROFILE_STUD_STYLE, Options.StudStyle); + lcGetPiecesLibrary()->SetStudStyle(Options.StudStyle, true); } // TODO: printing preferences diff --git a/common/lc_application.h b/common/lc_application.h index 3f5b9695..a7152975 100644 --- a/common/lc_application.h +++ b/common/lc_application.h @@ -95,7 +95,7 @@ struct lcCommandLineOptions int ImageWidth; int ImageHeight; int AASamples; - int StudLogo; + int StudStyle; lcStep ImageStart; lcStep ImageEnd; lcVector3 CameraPosition[3]; diff --git a/common/lc_colors.cpp b/common/lc_colors.cpp index 16e81bb5..c71accb0 100644 --- a/common/lc_colors.cpp +++ b/common/lc_colors.cpp @@ -487,7 +487,7 @@ int lcGetColorIndex(quint32 ColorCode) return (int)gColorList.size() - 1; } -void lcLoadLegoStyleDisplayColors() +void lcLoadLegoStudStyleColors() { QByteArray ColorData; const char *ColorEntry = "0 !COLOUR Stud_Style_Black CODE 4242 VALUE #1B2A34 EDGE #000000\r\n"; diff --git a/common/lc_colors.h b/common/lc_colors.h index bb102d96..71050a4b 100644 --- a/common/lc_colors.h +++ b/common/lc_colors.h @@ -49,7 +49,7 @@ extern int gEdgeColor; extern int gDefaultColor; void lcLoadDefaultColors(); -void lcLoadLegoStyleDisplayColors(); +void lcLoadLegoStudStyleColors(); bool lcLoadColorFile(lcFile& File, bool Update); int lcGetColorIndex(quint32 ColorCode); int lcGetColorIndexByName(const char * ColorName); diff --git a/common/lc_library.cpp b/common/lc_library.cpp index 3491fda5..ab9da187 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -41,7 +41,7 @@ lcPiecesLibrary::lcPiecesLibrary() mBuffersDirty = false; mHasUnofficial = false; mCancelLoading = false; - mStudLogo = lcGetProfileInt(LC_PROFILE_STUD_LOGO); + mStudStyle = lcGetProfileInt(LC_PROFILE_STUD_STYLE); } lcPiecesLibrary::~lcPiecesLibrary() @@ -260,7 +260,7 @@ bool lcPiecesLibrary::Load(const QString& LibraryPath, bool ShowProgress) return false; } - UpdateStudLogoSource(); + UpdateStudStyleSource(); lcLoadDefaultCategories(); lcSynthInit(); @@ -305,29 +305,29 @@ void lcPiecesLibrary::LoadColors(bool Update) } } -void lcPiecesLibrary::UpdateStudLogoSource() +void lcPiecesLibrary::UpdateStudStyleSource() { - if (!mSources.empty() && mSources.front()->Type == lcLibrarySourceType::StudLogo) + if (!mSources.empty() && mSources.front()->Type == lcLibrarySourceType::StudStyle) mSources.erase(mSources.begin()); - mZipFiles[static_cast(lcZipFileType::StudLogo)].reset(); + mZipFiles[static_cast(lcZipFileType::StudStyle)].reset(); - if (!mStudLogo) + if (!mStudStyle) return; - if (mStudLogo > 5) - lcLoadLegoStyleDisplayColors(); + if (mStudStyle > 5) + lcLoadLegoStudStyleColors(); - std::unique_ptr StudLogoFile; - if (mStudLogo < 6) - StudLogoFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studlogo%1.zip").arg(QString::number(mStudLogo)))); - else if (mStudLogo == 6) - StudLogoFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studslegostyle1.zip"))); + std::unique_ptr StudStyleFile; + if (mStudStyle < 6) + StudStyleFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studlogo%1.zip").arg(QString::number(mStudStyle)))); + else if (mStudStyle == 6) + StudStyleFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studslegostyle1.zip"))); else - StudLogoFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studslegostyle2.zip"))); + StudStyleFile = std::unique_ptr(new lcDiskFile(QString(":/resources/studslegostyle2.zip"))); - if (StudLogoFile->Open(QIODevice::ReadOnly)) - OpenArchive(std::move(StudLogoFile), lcZipFileType::StudLogo); + if (StudStyleFile->Open(QIODevice::ReadOnly)) + OpenArchive(std::move(StudStyleFile), lcZipFileType::StudStyle); } bool lcPiecesLibrary::OpenArchive(const QString& FileName, lcZipFileType ZipFileType) @@ -348,7 +348,7 @@ bool lcPiecesLibrary::OpenArchive(std::unique_ptr File, lcZipFileType Zi return false; std::unique_ptr Source(new lcLibrarySource); - Source->Type = ZipFileType != lcZipFileType::StudLogo ? lcLibrarySourceType::Library : lcLibrarySourceType::StudLogo; + Source->Type = ZipFileType != lcZipFileType::StudStyle ? lcLibrarySourceType::Library : lcLibrarySourceType::StudStyle; for (int FileIdx = 0; FileIdx < ZipFile->mFiles.GetSize(); FileIdx++) { @@ -1085,7 +1085,7 @@ bool lcPiecesLibrary::LoadCachePiece(PieceInfo* Info) if (MeshData.ReadBuffer((char*)&Flags, sizeof(Flags)) == 0) return false; - if (Flags != mStudLogo) + if (Flags != mStudStyle) return false; lcMesh* Mesh = new lcMesh; @@ -1105,7 +1105,7 @@ bool lcPiecesLibrary::SaveCachePiece(PieceInfo* Info) { lcMemFile MeshData; - const qint32 Flags = mStudLogo; + const qint32 Flags = mStudStyle; if (MeshData.WriteBuffer((char*)&Flags, sizeof(Flags)) == 0) return false; @@ -1532,19 +1532,19 @@ void lcPiecesLibrary::UploadTextures(lcContext* Context) mTextureUploads.clear(); } -bool lcPiecesLibrary::SupportsStudLogo() const +bool lcPiecesLibrary::SupportsStudStyle() const { return true; } -void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload) +void lcPiecesLibrary::SetStudStyle(int StudStyle, bool Reload) { - if (mStudLogo > 5 && StudLogo < 6 && Reload) + if (mStudStyle > 5 && StudStyle < 6 && Reload) LoadColors(Reload); - mStudLogo = StudLogo; + mStudStyle = StudStyle; - UpdateStudLogoSource(); + UpdateStudStyleSource(); mLoadMutex.lock(); @@ -1553,7 +1553,7 @@ void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload) for (const auto& PrimitiveIt : Source->Primitives) { lcLibraryPrimitive* Primitive = PrimitiveIt.second; - if (Primitive->mMeshData.mHasLogoStud) + if (Primitive->mMeshData.mHasStyleStud) Primitive->Unload(); } } @@ -1568,7 +1568,7 @@ void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload) { PieceInfo* Info = PieceIt.second; - if (Info->mState == LC_PIECEINFO_LOADED && Info->GetMesh() && Info->GetMesh()->mFlags & lcMeshFlag::HasLogoStud) + if (Info->mState == LC_PIECEINFO_LOADED && Info->GetMesh() && Info->GetMesh()->mFlags & lcMeshFlag::HasStyleStud) { Info->Unload(); mLoadQueue.append(Info); @@ -1624,9 +1624,9 @@ bool lcPiecesLibrary::LoadPrimitive(lcLibraryPrimitive* Primitive) lcMeshLoader MeshLoader(Primitive->mMeshData, true, nullptr, false); - auto StudLogoPrimitive = [this, &Primitive] () + auto StudStylePrimitive = [this, &Primitive] () { - if (!mSources.empty() && mSources.front()->Type == lcLibrarySourceType::StudLogo) + if (!mSources.empty() && mSources.front()->Type == lcLibrarySourceType::StudStyle) { char Name[LC_PIECE_NAME_LEN]; strcpy(Name, Primitive->mName); @@ -1647,8 +1647,8 @@ bool lcPiecesLibrary::LoadPrimitive(lcLibraryPrimitive* Primitive) if (Primitive->mStud) { - if (StudLogoPrimitive()) - Primitive->mMeshData.mHasLogoStud = true; + if (StudStylePrimitive()) + Primitive->mMeshData.mHasStyleStud = true; else if (strncmp(Primitive->mName, "8/", 2)) // todo: this is currently the only place that uses mName so use mFileName instead. this should also be done for the loose file libraries. { char Name[LC_PIECE_NAME_LEN]; @@ -1684,8 +1684,8 @@ bool lcPiecesLibrary::LoadPrimitive(lcLibraryPrimitive* Primitive) { if (Primitive->mStud) { - if (StudLogoPrimitive()) - Primitive->mMeshData.mHasLogoStud = true; + if (StudStylePrimitive()) + Primitive->mMeshData.mHasStyleStud = true; } if (Primitive->mZipFileType == lcZipFileType::Count) diff --git a/common/lc_library.h b/common/lc_library.h index 1592f859..9cb57a10 100644 --- a/common/lc_library.h +++ b/common/lc_library.h @@ -14,7 +14,7 @@ enum class lcZipFileType { Official, Unofficial, - StudLogo, + StudStyle, Count }; @@ -73,7 +73,7 @@ public: enum class lcLibrarySourceType { Library, - StudLogo + StudStyle }; struct lcLibrarySource @@ -138,12 +138,12 @@ public: lcLibraryPrimitive* FindPrimitive(const char* Name) const; bool LoadPrimitive(lcLibraryPrimitive* Primitive); - bool SupportsStudLogo() const; - void SetStudLogo(int StudLogo, bool Reload); + bool SupportsStudStyle() const; + void SetStudStyle(int StudStyle, bool Reload); - int GetStudLogo() const + int GetStudStyle() const { - return mStudLogo; + return mStudStyle; } void SetOfficialPieces() @@ -191,7 +191,7 @@ protected: bool ReadDirectoryCacheFile(const QString& FileName, lcMemFile& CacheFile); bool WriteDirectoryCacheFile(const QString& FileName, lcMemFile& CacheFile); - void UpdateStudLogoSource(); + void UpdateStudStyleSource(); std::vector> mSources; @@ -202,7 +202,7 @@ protected: QMutex mTextureMutex; std::vector mTextureUploads; - int mStudLogo; + int mStudStyle; QString mCachePath; qint64 mArchiveCheckSum[4]; diff --git a/common/lc_mesh.cpp b/common/lc_mesh.cpp index 24aeecce..f2f8165e 100644 --- a/common/lc_mesh.cpp +++ b/common/lc_mesh.cpp @@ -492,7 +492,7 @@ bool lcMesh::FileSave(lcMemFile& File) int lcMesh::GetLodIndex(float Distance) const { - if (lcGetPiecesLibrary()->GetStudLogo()) + if (lcGetPiecesLibrary()->GetStudStyle()) return LC_MESH_LOD_HIGH; if (mLods[LC_MESH_LOD_LOW].NumSections && (Distance > mRadius)) diff --git a/common/lc_mesh.h b/common/lc_mesh.h index 22e25499..594a66ba 100644 --- a/common/lc_mesh.h +++ b/common/lc_mesh.h @@ -55,7 +55,7 @@ enum class lcMeshFlag HasTranslucent = 0x04, // Mesh has triangles using a translucent color HasLines = 0x08, // Mesh has lines HasTexture = 0x10, // Mesh has sections using textures - HasLogoStud = 0x20 // Mesh has a stud that can have a logo applied + HasStyleStud = 0x20 // Mesh has a stud that can have a logo applied }; Q_DECLARE_FLAGS(lcMeshFlags, lcMeshFlag) diff --git a/common/lc_meshloader.cpp b/common/lc_meshloader.cpp index 34bd73a1..58d44d45 100644 --- a/common/lc_meshloader.cpp +++ b/common/lc_meshloader.cpp @@ -1187,8 +1187,8 @@ lcMesh* lcLibraryMeshData::CreateMesh() } } - if (mHasLogoStud) - Mesh->mFlags |= lcMeshFlag::HasLogoStud; + if (mHasStyleStud) + Mesh->mFlags |= lcMeshFlag::HasStyleStud; lcVector3 MeshMin(FLT_MAX, FLT_MAX, FLT_MAX), MeshMax(-FLT_MAX, -FLT_MAX, -FLT_MAX); bool UpdatedBoundingBox = false; @@ -1625,7 +1625,7 @@ bool lcMeshLoader::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform else Library->GetPrimitiveFile(Primitive, FileCallback); - mMeshData.mHasLogoStud |= Primitive->mMeshData.mHasLogoStud; + mMeshData.mHasStyleStud |= Primitive->mMeshData.mHasStyleStud; } else Library->GetPieceFile(FileName, FileCallback); diff --git a/common/lc_meshloader.h b/common/lc_meshloader.h index 78dfe245..4a556fda 100644 --- a/common/lc_meshloader.h +++ b/common/lc_meshloader.h @@ -93,7 +93,7 @@ public: lcLibraryMeshData() { mHasTextures = false; - mHasLogoStud = false; + mHasStyleStud = false; for (int MeshDataIdx = 0; MeshDataIdx < LC_NUM_MESHDATA_TYPES; MeshDataIdx++) mVertices[MeshDataIdx].SetGrow(1024); @@ -148,7 +148,7 @@ public: lcArray mSections[LC_NUM_MESHDATA_TYPES]; lcArray mVertices[LC_NUM_MESHDATA_TYPES]; bool mHasTextures; - bool mHasLogoStud; + bool mHasStyleStud; }; class lcMeshLoader diff --git a/common/lc_profile.cpp b/common/lc_profile.cpp index fa72f175..7374da68 100644 --- a/common/lc_profile.cpp +++ b/common/lc_profile.cpp @@ -120,7 +120,7 @@ static lcProfileEntry gProfileEntries[LC_NUM_PROFILE_KEYS] = lcProfileEntry("Settings", "PartsListDecorated", 1), // LC_PROFILE_PARTS_LIST_DECORATED lcProfileEntry("Settings", "PartsListAliases", 1), // LC_PROFILE_PARTS_LIST_ALIASES lcProfileEntry("Settings", "PartsListListMode", 0), // LC_PROFILE_PARTS_LIST_LISTMODE - lcProfileEntry("Settings", "StudLogo", 0), // LC_PROFILE_STUD_LOGO + lcProfileEntry("Settings", "StudStyle", 0), // LC_PROFILE_STUD_STYLE lcProfileEntry("Defaults", "Author", ""), // LC_PROFILE_DEFAULT_AUTHOR_NAME lcProfileEntry("Defaults", "AmbientColor", LC_RGB(75, 75, 75)), // LC_PROFILE_DEFAULT_AMBIENT_COLOR diff --git a/common/lc_profile.h b/common/lc_profile.h index 1273d5c5..16649a6b 100644 --- a/common/lc_profile.h +++ b/common/lc_profile.h @@ -67,7 +67,7 @@ enum LC_PROFILE_KEY LC_PROFILE_PARTS_LIST_DECORATED, LC_PROFILE_PARTS_LIST_ALIASES, LC_PROFILE_PARTS_LIST_LISTMODE, - LC_PROFILE_STUD_LOGO, + LC_PROFILE_STUD_STYLE, // Defaults for new projects. LC_PROFILE_DEFAULT_AUTHOR_NAME, diff --git a/docs/leocad.1 b/docs/leocad.1 index 1e05edab..216df884 100644 --- a/docs/leocad.1 +++ b/docs/leocad.1 @@ -1,4 +1,4 @@ -.TH LEOCAD 1 "12 January 2021" +.TH LEOCAD 1 "20 January 2021" .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" other params are allowed: see man(7), man(1) .SH NAME @@ -66,9 +66,9 @@ Sets the active submodel to \fIsubmodel\fR. Sets the active camera to \fIcamera\fR. .TP -\fB\-sl \fItype\fR,\ \fB\-\-stud\-logo\ \fItype +\fB\-ss \fIid\fR,\ \fB\-\-stud\-style\ \fIid .br -Set the stud logo type. Valid values or 0 - 5, inclusive, with 0 meaning no stud logo. Stud logos may be found as part of the unofficial parts library from \fILDraw.org\fR. +Set the stud style. Valid values 0=No style, 1=LDraw single wire, 2=LDraw double wire, 3=LDraw raised floating, 4=LDraw raised rounded, 5=LDraw subtle rounded, 6=LEGO no logo, 7=LEGO single wire. Stud style 1 - 5 require stud logo primitives which are in the unofficial parts library from \fILDraw.org\fR. .TP \fB\-\-viewpoint \fRfront\ |\ back\ |\ left\ |\ right\ |\ top\ |\ bottom\ |\ home diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index ffe8ca73..2fb7789d 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -161,17 +161,17 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO else ui->PreviewViewSphereSizeCombo->setCurrentIndex(0); - if (!lcGetPiecesLibrary()->SupportsStudLogo()) + if (!lcGetPiecesLibrary()->SupportsStudStyle()) { - ui->studLogo->setEnabled(false); - ui->studLogoCombo->setEnabled(false); + ui->studStyle->setEnabled(false); + ui->studStyleCombo->setEnabled(false); } - ui->studLogo->setChecked(mOptions->StudLogo); - if (ui->studLogo->isChecked()) - ui->studLogoCombo->setCurrentIndex(mOptions->StudLogo - 1); + ui->studStyle->setChecked(mOptions->StudStyle); + if (ui->studStyle->isChecked()) + ui->studStyleCombo->setCurrentIndex(mOptions->StudStyle - 1); else - ui->studLogoCombo->setCurrentIndex(mOptions->StudLogo); + ui->studStyleCombo->setCurrentIndex(mOptions->StudStyle); if (!gSupportsShaderObjects) ui->ShadingMode->removeItem(static_cast(lcShadingMode::DefaultLights)); @@ -203,7 +203,7 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO SetButtonPixmap(mOptions->Preferences.mViewSphereTextColor, ui->ViewSphereTextColorButton); SetButtonPixmap(mOptions->Preferences.mViewSphereHighlightColor, ui->ViewSphereHighlightColorButton); - on_studLogo_toggled(); + on_studStyle_toggled(); on_antiAliasing_toggled(); on_edgeLines_toggled(); on_LineWidthSlider_valueChanged(); @@ -303,10 +303,10 @@ void lcQPreferencesDialog::accept() mOptions->Preferences.mShadingMode = (lcShadingMode)ui->ShadingMode->currentIndex(); - if (ui->studLogoCombo->isEnabled()) - mOptions->StudLogo = ui->studLogoCombo->currentIndex() + 1; + if (ui->studStyleCombo->isEnabled()) + mOptions->StudStyle = ui->studStyleCombo->currentIndex() + 1; else - mOptions->StudLogo = 0; + mOptions->StudStyle = 0; mOptions->Preferences.mDrawPreviewAxis = ui->PreviewAxisIconCheckBox->isChecked(); mOptions->Preferences.mPreviewViewSphereEnabled = ui->PreviewViewSphereSizeCombo->currentIndex() > 0; @@ -504,10 +504,10 @@ void lcQPreferencesDialog::ColorButtonClicked() ((QToolButton*)Button)->setIcon(pix); } -void lcQPreferencesDialog::on_studLogo_toggled() +void lcQPreferencesDialog::on_studStyle_toggled() { - if (lcGetPiecesLibrary()->SupportsStudLogo()) - ui->studLogoCombo->setEnabled(ui->studLogo->isChecked()); + if (lcGetPiecesLibrary()->SupportsStudStyle()) + ui->studStyleCombo->setEnabled(ui->studStyle->isChecked()); } void lcQPreferencesDialog::on_antiAliasing_toggled() diff --git a/qt/lc_qpreferencesdialog.h b/qt/lc_qpreferencesdialog.h index c2ca24b4..4bea7b1f 100644 --- a/qt/lc_qpreferencesdialog.h +++ b/qt/lc_qpreferencesdialog.h @@ -18,7 +18,7 @@ struct lcPreferencesDialogOptions int CheckForUpdates; int AASamples; - int StudLogo; + int StudStyle; std::vector Categories; bool CategoriesModified; @@ -94,7 +94,7 @@ public slots: void on_MouseImportButton_clicked(); void on_MouseExportButton_clicked(); void on_mouseReset_clicked(); - void on_studLogo_toggled(); + void on_studStyle_toggled(); void MouseTreeItemChanged(QTreeWidgetItem* Current); private: diff --git a/qt/lc_qpreferencesdialog.ui b/qt/lc_qpreferencesdialog.ui index 3aed1786..36ae0204 100644 --- a/qt/lc_qpreferencesdialog.ui +++ b/qt/lc_qpreferencesdialog.ui @@ -387,7 +387,7 @@ - + 1 LDraw Single Wire @@ -426,9 +426,9 @@ - + - Stud Logo + Stud Style @@ -1703,8 +1703,8 @@ RestoreTabLayout antiAliasing antiAliasingSamples - studLogo - studLogoCombo + studStyle + studStyleCombo edgeLines LineWidthSlider MeshLOD