mirror of
https://github.com/leozide/leocad
synced 2024-12-26 21:58:44 +01:00
Updated deprecated functions.
This commit is contained in:
parent
3eec496047
commit
71ea45f085
3 changed files with 28 additions and 28 deletions
|
@ -1581,28 +1581,28 @@ void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload)
|
|||
|
||||
bool lcPiecesLibrary::GetStudLogoFile(lcMemFile& PrimFile, int StudLogo, bool OpenStud)
|
||||
{
|
||||
// validate logo choice and unofficial lib available
|
||||
if (!StudLogo || (!mZipFiles[LC_ZIPFILE_UNOFFICIAL] && !mHasUnofficial))
|
||||
return false;
|
||||
|
||||
// construct logo reference line
|
||||
QString Logo = QString("%1").arg(StudLogo);
|
||||
QString LogoRefLine = QString("1 16 0 0 0 1 0 0 0 1 0 0 0 1 ");
|
||||
LogoRefLine += (OpenStud ? QString("stud2-logo%1.dat").arg(StudLogo > 1 ? Logo : ""):
|
||||
QString("stud-logo%1.dat").arg(StudLogo > 1 ? Logo : ""));
|
||||
|
||||
// construct primitive file
|
||||
const QLatin1String LineEnding("\r\n");
|
||||
QByteArray FileData;
|
||||
QTextStream out(&FileData);
|
||||
out << (OpenStud ? "0 Stud Open" : "0 Stud") << endl;
|
||||
out << (OpenStud ? "0 Name: stud2.dat" : "0 Name: stud.dat") << endl;
|
||||
out << "0 Author: James Jessiman" << endl;
|
||||
out << "0 !LDRAW_ORG Primitive" << endl;
|
||||
out << "0 BFC CERTIFY CCW" << endl;
|
||||
out << LogoRefLine << endl;
|
||||
QTextStream TextStream(&FileData);
|
||||
|
||||
TextStream << (OpenStud ? "0 Stud Open" : "0 Stud") << LineEnding;
|
||||
TextStream << (OpenStud ? "0 Name: stud2.dat" : "0 Name: stud.dat") << LineEnding;
|
||||
TextStream << "0 Author: James Jessiman" << LineEnding;
|
||||
TextStream << "0 !LDRAW_ORG Primitive" << LineEnding;
|
||||
TextStream << "0 BFC CERTIFY CCW" << LineEnding;
|
||||
TextStream << LogoRefLine << LineEnding;
|
||||
|
||||
PrimFile.WriteBuffer(FileData.constData(), size_t(FileData.size()));
|
||||
PrimFile.Seek(0, SEEK_SET);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -790,7 +790,7 @@ void lcMainWindow::CreatePreviewWidget()
|
|||
mPreviewWidget = new lcPreviewDockWidget();
|
||||
|
||||
mPreviewToolBar = new QDockWidget(tr("Preview"), this);
|
||||
mPreviewToolBar->setWindowTitle(trUtf8("Preview"));
|
||||
mPreviewToolBar->setWindowTitle(tr("Preview"));
|
||||
mPreviewToolBar->setObjectName("PreviewToolBarw");
|
||||
mPreviewToolBar->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||
mPreviewToolBar->setWidget(mPreviewWidget);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -110,7 +110,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -126,7 +126,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -168,7 +168,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -198,7 +198,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -214,7 +214,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -282,7 +282,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -298,7 +298,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -366,7 +366,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -382,7 +382,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -450,7 +450,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -466,7 +466,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -496,7 +496,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -512,7 +512,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -580,7 +580,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -596,7 +596,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
@ -664,7 +664,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>24</number>
|
||||
|
|
Loading…
Reference in a new issue