Skip to content

Commit

Permalink
fix new file extensions
Browse files Browse the repository at this point in the history
Rename  old to new extensions for  collection and test shared files.
  • Loading branch information
DSCaskey committed Jan 28, 2024
1 parent aec2361 commit 1b5f945
Show file tree
Hide file tree
Showing 167 changed files with 6,334 additions and 2,649 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ EXCLUDE_PATTERNS = *.svg \
*.vit \
*.vst \
*.sm2d \
*.smin \
*.smis \
*.smms \
*.pdf \
*.png \
Expand Down
1 change: 1 addition & 0 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ defineTest(copyToDestdir) {
FILE ~= s,/,\\,g
DDIR ~= s,/,\\,g
}
message("copy:" $$quote($$FILE))
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}

Expand Down
4 changes: 2 additions & 2 deletions dist/macx/seamly2d/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<string>individual_size_file.icns</string>
<key>LSItemContentTypes</key>
<array>
<string>org.seamly2dproject.smin</string>
<string>org.seamly2dproject.smis</string>
</array>
<key>CFBundleTypeName</key>
<string>SeamlyMe individual measurements</string>
Expand Down Expand Up @@ -104,7 +104,7 @@
<key>UTTypeIconFile</key>
<string>individual_size_file.icns</string>
<key>UTTypeIdentifier</key>
<string>org.seamly2dproject.smin</string>
<string>org.seamly2dproject.smis</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
Expand Down
2 changes: 1 addition & 1 deletion dist/macx/seamlyme/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<key>UTTypeIconFile</key>
<string>individual_size_file.icns</string>
<key>UTTypeIdentifier</key>
<string>org.seamly2dproject.smin</string>
<string>org.seamly2dproject.smis</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
Expand Down
38 changes: 38 additions & 0 deletions src/app/samples.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Keep path to all files with individual measurements we support right now
INSTALL_INDIVIDUAL_MEASUREMENTS += \
$${PWD}/share/samples/measurements/individual/male_shirt.smis \
$${PWD}/share/samples/measurements/individual/trousers.smis

# Keep path to all files with multisize measurements we support right now
INSTALL_MULTISIZE_MEASUREMENTS += \
$${PWD}/share/samples/measurements/multisize/GOST_man_ru.smms

# Keep path to all template files we have right now
INSTALL_STANDARD_TEMPLATES += \
$${PWD}/share/samples/measurements/templates/all_measurements_template.smis \
$${PWD}/share/samples/measurements/templates/aldrich_women_template.smis

# Keep path to all patterns we provide right now
INSTALL_PATTERNS += \
$${PWD}/share/samples/patterns/jacket1_52-176.sm2d \
$${PWD}/share/samples/patterns/jacket2_40-146.sm2d \
$${PWD}/share/samples/patterns/jacket3_40-146.sm2d \
$${PWD}/share/samples/patterns/jacket4_40-146.sm2d \
$${PWD}/share/samples/patterns/jacket5_30-110.sm2d \
$${PWD}/share/samples/patterns/jacket6_30-110.sm2d \
$${PWD}/share/samples/patterns/male_shirt.sm2d \
$${PWD}/share/samples/patterns/trousers.sm2d

# Keep path to all label templates we provide right now
INSTALL_LABEL_TEMPLATES += \
$${PWD}/share/labels/default_pattern_label.xml \
$${PWD}/share/labels/default_piece_label.xml

win32
{
copyToDestdir($$INSTALL_INDIVIDUAL_MEASUREMENTS, $$shell_path($${OUT_PWD}/$${DESTDIR}/samples/measurements/individual))
copyToDestdir($$INSTALL_MULTISIZE_MEASUREMENTS, $$shell_path($${OUT_PWD}/$${DESTDIR}/samples/measurements/multisize))
copyToDestdir($$INSTALL_STANDARD_TEMPLATES, $$shell_path($${OUT_PWD}/$${DESTDIR}/samples/measurements/templates))
copyToDestdir($$INSTALL_PATTERNS, $$shell_path($${OUT_PWD}/$${DESTDIR}/samples/patterns))
copyToDestdir($$INSTALL_LABEL_TEMPLATES, $$shell_path($${OUT_PWD}/$${DESTDIR}/labels))
}
2 changes: 1 addition & 1 deletion src/app/seamly2d/dialogs/dialogpatternproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat
connect(ui->comboBoxSize, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, DefValueChanged);

const bool readOnly = doc->IsReadOnly();
const bool readOnly = doc->isReadOnly();
ui->checkBoxPatternReadOnly->setChecked(readOnly);
if (not readOnly)
{
Expand Down
10 changes: 5 additions & 5 deletions src/app/seamly2d/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6245,7 +6245,7 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu

if (guiEnabled)
{ // No errors occurred
patternReadOnly = doc->IsReadOnly();
patternReadOnly = doc->isReadOnly();
setWidgetsEnabled(true);
setCurrentFile(fileName);
helpLabel->setText(tr("File loaded"));
Expand Down Expand Up @@ -6836,9 +6836,9 @@ QString MainWindow::checkPathToMeasurements(const QString &patternPath, const QS
{
MultiSizeConverter converter(filename);
QString filename = converter.Convert();
if (filename.contains(".vst"))
if (filename.contains(QLatin1String(".") + vstExt))
{
filename.replace(QString(".vst"), QString(".smms"));
filename.replace(QLatin1String(".") + vstExt, QLatin1String(".") + smmsExt);
QString error;
const bool result = measurements->SaveDocument(filename, error);
if (result)
Expand All @@ -6852,9 +6852,9 @@ QString MainWindow::checkPathToMeasurements(const QString &patternPath, const QS
{
IndividualSizeConverter converter(filename);
QString filename = converter.Convert();
if (filename.contains(".vit"))
if (filename.contains(QLatin1String(".") + vitExt))
{
filename.replace(QString(".vit"), QString(".smis"));
filename.replace(QLatin1String(".") + vitExt, QLatin1String(".") + smisExt);
QString error;
const bool result = measurements->SaveDocument(filename, error);
if (result)
Expand Down
4 changes: 2 additions & 2 deletions src/app/seamly2d/mainwindowsnogui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary
generator.setFileName(name);
generator.setSize(paper->rect().size().toSize());
generator.setResolution(PrintDPI);
generator.SetVersion(static_cast<DRW::Version>(version));
generator.setVersion(static_cast<DRW::Version>(version));
generator.SetBinaryFormat(binary);
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745

Expand All @@ -1190,7 +1190,7 @@ void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary
generator.setFileName(name);
generator.setSize(size);
generator.setResolution(PrintDPI);
generator.SetVersion(static_cast<DRW::Version>(version));
generator.setVersion(static_cast<DRW::Version>(version));
generator.SetBinaryFormat(binary);
generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745
generator.ExportToAAMA(pieces);
Expand Down
4 changes: 2 additions & 2 deletions src/app/seamly2d/seamly2d.pro
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ message(seamly2d.pro: Examples: $$[QT_INSTALL_EXAMPLES])
# Path to resource file.
win32:RC_FILE = share/resources/seamly2d.rc

# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES and INSTALL_LABEL_TEMPLATES inside tables.pri
include(../tables.pri)
# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES and INSTALL_LABEL_TEMPLATES inside samples.pri
include(../samples.pri)

win32 {
INSTALL_PDFTOPS += ../../../dist/win/pdftops.exe
Expand Down
2 changes: 1 addition & 1 deletion src/app/seamly2d/xml/vpattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3879,7 +3879,7 @@ void VPattern::SetDefCustomSize(int value)
}

//---------------------------------------------------------------------------------------------------------------------
bool VPattern::IsReadOnly() const
bool VPattern::isReadOnly() const
{
const QDomElement pattern = documentElement();

Expand Down
2 changes: 1 addition & 1 deletion src/app/seamly2d/xml/vpattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class VPattern : public VAbstractPattern
int GetDefCustomSize() const;
void SetDefCustomSize(int value);

bool IsReadOnly() const;
bool isReadOnly() const;
void SetReadOnly(bool rOnly);

void LiteParseIncrements();
Expand Down
4 changes: 2 additions & 2 deletions src/app/seamlyme/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ int main(int argc, char *argv[])
QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
splash.show();

QTimer::singleShot(10000, &splash, &QWidget::close); // display splash screenfor 10 secs.
QTimer::singleShot(0, &splash, &QWidget::close); // display splash screenfor 10 secs.

QTimer::singleShot(10000, &app, &MApplication::processCommandLine); // delay main screen from opening until
QTimer::singleShot(0, &app, &MApplication::processCommandLine); // delay main screen from opening until
// splash screen closes.
return app.exec();
}
8 changes: 2 additions & 6 deletions src/app/seamlyme/seamlyme.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ RESOURCES += \
share/resources/diagrams.qrc \
share/resources/splash.qrc

# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES and INSTALL_LABEL_TEMPLATES inside tables.pri
include(../tables.pri)

win32 {
copyToDestdir($$INSTALL_STANDARD_TEMPLATES, $$shell_path($${OUT_PWD}/$${DESTDIR}/tables/templates))
}
# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES and INSTALL_LABEL_TEMPLATES inside samples.pri
include(../samples.pri)

include(../translations.pri)

Expand Down
Loading

0 comments on commit 1b5f945

Please sign in to comment.