Merge with feature

--HG--
branch : develop
This commit is contained in:
dismine 2014-05-26 16:47:16 +03:00
commit d487d06384
111 changed files with 44209 additions and 8505 deletions

27
TODO
View File

@ -1,27 +0,0 @@
Valentina TODO file.
For more information see https://bitbucket.org/dismine/valentina/issues
(c) Valentina Team 2013
* Rotate details.
* Reflection details.
* Label on detail.
* Checking integrity of file.
* Description of pattern.
* Type of lines.
* Tuck transfer.
* Сonditions.
* Standard table of measurements.
* Window "Option".
* Undo/redo functionality in applications.
* Checking file integrity.
* Sketch drawing.
* Graduation card.
* Individual mode of construction pattern.
* Description about pattern in SVG file.
* Visualization.

View File

@ -20,3 +20,22 @@ defineTest(minQtVersion) {
}
return(false)
}
# Copies the given files to the destination directory
defineTest(copyToDestdir) {
files = $$1
DDIR = $$2
mkpath($$DDIR)
for(FILE, files) {
# Replace slashes in paths with backslashes for Windows
win32{
FILE ~= s,/,\\,g
DDIR ~= s,/,\\,g
}
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}

98
scripts/alphabets.py Executable file
View File

@ -0,0 +1,98 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import sys
#Alphabets was taken from website http://www.alphabet-letters.com/
#Use this script if you want get all unique symbols from all alphabets.
#This unique symbols need for math parser.
#Example:
# ցЀĆЈVӧĎАғΕĖӅИқΝĞơРңњΥĦШҫ̆جگĮаҳѕεشԶиһνԾрυلՆӝшËՎҔPÓՖXӛӟŞӣզhëծpóӞնxßվāŁЃֆĉЋCŬđҐГΒęҘЛΚŘġҠУGاհЫدԱҰгβطԹõлκKՁÀуςهՉÈыvیՑÐSOřӘћաőcӐթèkàѓżűðsķչøӥӔĀփїІĈЎґĐΗЖҙĘȚ
# ΟОҡĠآΧЦتЮұİزηжԸغοоÁՀقχцÉՈيюÑՐђӋіәťӆўáŠĺѐfөըnñŰӤӨӹոľЁրăЉŭċБӸēłΔҖЙŤěΜӜDСձģΤӰЩīņحҮбưԳصδHйԻŇμӲӴсՃمτƠщՋєLQŹՓŕÖYśÞaգĽæiŽիӓîqճöyջþĂօЄӦĊЌΑĒДҗјΙȘĚМΡéĵĢФūӚΩبĪЬүќ
# αذԲдҷιظԺмρՂфÇωوՊьÏՒTŚĻJբdçժlïӪղtպӫAւąЇčŃЏĕӯЗΖEțŮĝПΞأĥĹЧΦثÆӳЯIسŲԵзζԽпξكՅÄчφNMՍӌяӢՕÔWÎŝÜџёźեägխoӒյôwĶBžսüЂĄև̈ЊČƏљΓВҕĔӮΛКĜΣТҥĤکЪƯخγвŅԴŪضλкԼĴσтÅՄنъÍՌRӕ
# ՔZÝŜbåդjíլļrӵմzýռپêЅքćچЍďӱҒЕůėژșΘØҚНğńءΠFҢХħΨҪЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒUəÚѝŻşҤӑâeէŐımկòuշÕúտŔ
RUSSIAN_ALPHABET = set(u'абвгдеёжзийклмнопрстуфхцчшщьыъэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ') #RUSSIAN ALPHABET
ENGLISH_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #ENGLISH ALPHABET
AZERBAIJANI_ALPHABET = set(u'abcçdeəfgğhxıijkqlmnoöprsştuüvyzABCÇDEƏFGĞHXIİJKQLMNOÖPRSŞTUÜVYZ') #AZERBAIJANI ALPHABET
ALBANIAN_ALPHABET = set(u'abcçddheëfggjhijklllmnnjopqrrrsshtthuvxxhyzzhABCÇDDhEËFGGjHIJKLLlMNNjOPQRRrSShTThUVXXhYZZh') #ALBANIAN ALPHABET
ARABIC_ALPHABET = set(u'أبجدوﻩزحطيكلمنسعفصقرشتثخذضظغ') #ARABIC ALPHABET
ARMENIAN_ALPHABET = set(u'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքեւօֆԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔԵվևՕՖ') #ARMENIAN ALPHABET
AFRIKAANS_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #AFRIKAANS ALPHABET
BASQUE_ALPHABET = set(u'аbdefghijklmnñoprstuxzАBDEFGHIJKLMNÑOPRSTUXZ') #BASQUE ALPHABET
BASHKIR_ALPHABET = set(u'абвгғдҙеёжзийкҡлмнңоөпрсҫтуүфхһцчшщъыьэәюяАБВГҒДҘЕЁЖЗИЙКҠЛМНҢОӨПРСҪТУҮФХҺЦЧШЩЪЫЬЭӘЮЯ') #BASHKIR ALPHABET
BELORUSSIAN_ALPHABET = set(u'абвгддждзеёжзійклмнопрстуўфхцчшыьэюяАБВГДДжДзЕЁЖЗІЙКЛМНОПРСТУЎФХЦЧШЫЬЭЮЯ') #BELORUSSIAN ALPHABET
BULGARIAN_ALPHABET = set(u'абвгдежзийклмнопрстуфхцчшщъьюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯ') #BULGARIAN ALPHABET
BURYATIAN_ALPHABET = set(u'абвгдеёжзийклмноөпрстуүфхһцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОӨПРСТУҮФХҺЦЧШЩЪЫЬЭЮЯ') #BURYATIAN ALPHABET
WELSH_ALPHABET = set(u'abcchdddefffgnghilllmnopphrrhstthuwyABCCHDDDEFFFGNGHILLLMNOPPHRRHSTTHUWY') #WELSH ALPHABET
HUNGARIAN_ALPHABET = set(u'aábccsddzdzseéfggyhiíjkllymnnyoóöőprsszttyuúüűvzzsqwxyAÁBCCsDDzDzsEÉFGGyHIÍJKLLyMNNyOÓÖŐPRSSzTTyUÚÜŰVZZsQWXY') #HUNGARIAN ALPHABET
VIETNAMESE_ALPHABET = set(u'aăâbcdđeêghiklmnoôơpqrstuưvxyAĂÂBCDĐEÊGHIKLMNOÔƠPQRSTUƯVXY') #VIETNAMESE ALPHABET
HAITIAN_ALPHABET = set(u'aanbchdeèenfghijklmnngoòonouounprstuivwyzAAnBChDEèEnFGHIJKLMNNgOòOnOuOunPRSTUiVWYZ') #HAITIAN ALPHABET
GALICIAN_ALPHABET = set(u'abcdefghilmnñopqrstuvxzABCDEFGHILMNÑOPQRSTUVXZ') #GALICIAN ALPHABET
DUTCH_ALPHABET = set(u'abcdefghijklmnopqrstuvwxijyzABCDEFGHIJKLMNOPQRSTUVWXIJYZ') #DUTCH ALPHABET
GREEK_ALPHABET = set(u'αβγδεζηθικλμνξοπρσςτυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ') #GREEK ALPHABET
DANISH_ALPHABET = set(u'аbcdefghijklmnopqrstuvwxyzæøåАBCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ') #DANISH ALPHABET
INDONESIAN_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #INDONESIAN ALPHABET
IRISH_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #IRISH ALPHABET
ICELANDIC_ALPHABET = set(u'aábdðeéfghiíjklmnoóprstuúvxyýþæöAÁBDÐEÉFGHIÍJKLMNOÓPRSTUÚVXYÝÞÆÖ') #ICELANDIC ALPHABET
SPANISH_ALPHABET = set(u'abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ') #SPANISH ALPHABET
ITALIAN_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #ITALIAN ALPHABET
KAZAKH_ALPHABET = set(u'аәбвгғдеёжзийкқлмнңоөпрстуұүфхһцчшщъыіьэюяАӘБВГҒДЕЁЖЗИЙКҚЛМНҢОӨПРСТУҰҮФХҺЦЧШЩЪЫІЬЭЮЯ') #KAZAKH ALPHABET
KALMYK_ALPHABET = set(u'аəбвгһдеёжҗзийклмнңоөпрстуүфхцчшщыьэюяАƏБВГҺДЕЁЖҖЗИЙКЛМНҢОӨПРСТУҮФХЦЧШЩЫЬЭЮЯ') #KALMYK ALPHABET
KARAKALPAK_ALPHABET = set(u'аәбвгғдеёжзийкқлмнңоөпрстуүўфхҳцчшщъыьэюяАӘБВГҒДЕЁЖЗИЙКҚЛМНҢОӨПРСТУҮЎФХҲЦЧШЩЪЫЬЭЮЯ') #KARAKALPAK ALPHABET
KARELIAN_ALPHABET = set(u'abčdefghijklmnoprsšzžtuvyäöABČDEFGHIJKLMNOPRSŠZŽTUVYÄÖ') #KARELIAN ALPHABET
CATALAN_ALPHABET = set(u'aàbcçdeéèfghiíïjklmnoóòpqrstuúüvwxyzAÀBCÇDEÉÈFGHIÍÏJKLMNOÓÒPQRSTUÚÜVWXYZ') #CATALAN ALPHABET
KYRGYZ_ALPHABET = set(u'абвгдеёжзийклмнңоөпрстуүфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНҢОӨПРСТУҮФХЦЧШЩЪЫЬЭЮЯ') #KYRGYZ ALPHABET
LATIN_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #LATIN ALPHABET
LATVIAN_ALPHABET = set(u'aābcčdeēfgģhiījkķlļmnņoprsštuūvzžAĀBCČDEĒFGĢHIĪJKĶLĻMNŅOPRSŠTUŪVZŽ') #LATVIAN ALPHABET
LITHUANIAN_ALPHABET = set(u'aąbcčdeęėfghiįyjklmnoprsštuųūvzžAĄBCČDEĘĖFGHIĮYJKLMNOPRSŠTUŲŪVZŽ') #LITHUANIAN ALPHABET
MACEDONIAN_ALPHABET = set(u'абвгдѓеѐжзѕиѝјклљмнњопрстќуфхцчџшАБВГДЃЕЀЖЗЅИЍЈКЛЉМНЊОПРСТЌУФХЦЧЏШ') #MACEDONIAN ALPHABET
MALTESE_ALPHABET = set(u'abċdefġggħhħiiejklmnopqrstuvwxzżABĊDEFĠGGĦHĦIIEJKLMNOPQRSTUVWXZŻ') #MALTESE ALPHABET
MARI_ALPHABET = set(u'аӓбвгдеёжзийклмноӧпрстуӱфхцчшщъыӹьэюяАӒБВГДЕЁЖЗИЙКЛМНОӦПРСТУӰФХЦЧШЩЪЫӸЬЭЮЯ') #MARI ALPHABET
MOLDAVIAN_ALPHABET = set(u'aăâbcdefghiîjklmnopqrsștțuvwxyzAĂÂBCDEFGHIÎJKLMNOPQRSȘTȚUVWXYZ') #MOLDAVIAN ALPHABET
MONGOLIAN_ALPHABET = set(u'абвгдеёжзийклмноөпрстуүфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОӨПРСТУҮФХЦЧШЩЪЫЬЭЮЯ') #MONGOLIAN ALPHABET
GERMAN_ALPHABET = set(u'aäbcdefghijklmnoöpqrstuüvwxyzAÄBCDEFGHIJKLMNOÖPQRSßTUÜVWXYZ') #GERMAN ALPHABET
NORWEGIAN_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzæøåABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ') #NORWEGIAN ALPHABET
OSETIAN_ALPHABET = set(u'аӕбвггъддзджеёжзийккълмноппърсттъуфххъццъччъшщъыьэюяАӔБВГГъДДзДжЕЁЖЗИЙККъЛМНОППъРСТТъУФХХъЦЦъЧЧъШЩъЫьЭЮЯ') #OSETIAN ALPHABET
POLISH_ALPHABET = set(u'aąbcćdeęfghijklłmnńoóprsśtuwyzźżAĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻ') #POLISH ALPHABET
PORTUGUESE_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #PORTUGUESE ALPHABET
ROMANIAN_ALPHABET = set(u'aăâbcdefghiîjklmnopqrsștțuvwxyzAĂÂBCDEFGHIÎJKLMNOPQRSȘTȚUVWXYZ') #ROMANIAN ALPHABET
SERBIAN_ALPHABET = set(u'абвгдђежзијклљмнњопрстћуфхцчџшАБВГДЂЕЖЗИЈКЛЉМНЊОПРСТЋУФХЦЧЏШ') #SERBIAN ALPHABET
SLOVAK_ALPHABET = set(u'aáäbcčdďdzdžeéfghchiíjklĺľmnňoóôpqrŕsštťuúvwxyýzžAÁÄBCČDĎDzDžEÉFGHChIÍJKLĹĽMNŇOÓÔPQRŔSŠTŤUÚVWXYÝZŽ') #SLOVAK ALPHABET
SLOVENIAN_ALPHABET = set(u'abcčddžefghijklljmnnjoprsštuvzžABCČDDžEFGHIJKLLjMNNjOPRSŠTUVZŽ') #SLOVENIAN ALPHABET
TAJIK_ALPHABET = set(u'абвгғдеёжзийӣкқлмнопрстуӯфхҳчҷшъэюяАБВГҒДЕЁЖЗИЙӢКҚЛМНОПРСТУӮФХҲЧҶШЪЭЮЯ') #TAJIK ALPHABET
TATAR_ALPHABET = set(u'аәбвгдеёжҗзийклмнңоөпрстуүфхһцчшщъыьэюяАӘБВГДЕЁЖҖЗИЙКЛМНҢОӨПРСТУҮФХҺЦЧШЩЪЫЬЭЮ') #TATAR ALPHABET
TUVIN_ALPHABET = set(u'абвгдёжӝзийклмнңоӧпрстуӱхчшыАБВГДЁЖӜЗИЙКЛМНҢОӦПРСТУӰХЧШЫ') #TUVIN ALPHABET
TURKISH_ALPHABET = set(u'abcçdefgğhiıjklmnoöpqrsştuüvwxyzABCÇDEFGĞHIIJKLMNOÖPQRSŞTUÜVWXYZ') #TURKISH ALPHABET
UDMURT_ALPHABET = set(u'абвгдеёжӝзӟиӥйклмноӧпрстуфхцчӵшщъыьэюяАБВГДЕЁЖӜЗӞИӤЙКЛМНОӦПРСТУФХЦЧӴШЩЪЫЬЭЮЯ') #UDMURT ALPHABET
UZBEK_ALPHABET = set(u'абвгғдеёжзийкқлмнопрстуўфхҳцчшъьэюяАБВГҒДЕЁЖЗИЙКҚЛМНОПРСТУЎФХҲЦЧШЪЬЭЮЯ') #UZBEK ALPHABET
UKRAINIAN_ALPHABET = set(u'абвгґдежзіїийклмнопрстуфхцчшщьєюяАБВГҐДЕЖЗІЇИЙКЛМНОПРСТУФХЦЧШЩЬЄЮЯ') #UKRAINIAN ALPHABET
FARSI_ALPHABET = set(u'ءاآبپتثجچحخدذرزژسشصضطظعغفقكکگلمنوهيی') #FARSI ALPHABET
PHILIPPINES_ALPHABET = set(u'abcdefghijklmnñngoprstuvwxyzABCDEFGHIJKLMNÑNgOPRSTUVWXYZ') #PHILIPPINES ALPHABET
FINNISH_ALPHABET = set(u'abcdefghijklmnopqrsštuvwxyzžåäöABCDEFGHIJKLMNOPQRSŠTUVWXYZŽÅÄÖ') #FINNISH ALPHABET
FRENCH_ALPHABET = set(u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') #FRENCH ALPHABET
HAKASS_ALPHABET = set(u'абвгғдеёжзиiйклмнңoӧпрстуӱфхцчӌшщъыьэюяАБВГҒДЕЁЖЗИIЙКЛМНҢOӦПРСТУӰФХЦЧӋШЩЪЫЬЭЮЯ') #HAKASS ALPHABET
HANTY_ALPHABET = set(u'аӓӑбвгдеёәӛжзийкқлӆмнңн̆оӧөӫпрстуӱўфхҳцчҷшщъыьэєє̈юю̆яя̆АӒӐБВГДЕЁӘӚЖЗИЙКҚЛӅМНҢН̆ОӦӨӪПРСТУӰЎФХҲЦЧҶШЩЪЫЬЭЄЄ̈ЮЮ̆ЯЯ̆') #HANTY ALPHABET
CROATIAN_ALPHABET = set(u'abcčćddžðefghijklljmnnjoprsštuvzžABCČĆDDžÐEFGHIJKLLjMNNjOPRSŠTUVZŽ') #CROATIAN ALPHABET
CZECH_ALPHABET = set(u'aábcčdďeéěfghchiíjklmnňoópqrřsštťuúůvwxyýzžAÁBCČDĎEÉĚFGHChIÍJKLMNŇOÓPQRŘSŠTŤUÚŮVWXYÝZŽ') #CZECH ALPHABET
CHUVASH_ALPHABET = set(u'аăбвгдеёĕжзийклмнопрсçтуӳфхцчшщьыъэюяАĂБВГДЕЁĔЖЗИЙКЛМНОПРСÇТУӲФХЦЧШЩЬЫЪЭЮЯ') #CHUVASH ALPHABET
SWEDISH_ALPHABET = set(u'aåäbcdefghijklmnoöpqrstuvwxyzAÅÄBCDEFGHIJKLMNOÖPQRSTUVWXYZ') #SWEDISH ALPHABET
ESPERANTO_ALPHABET = set(u'abcĉdefgĝhĥijĵklmnoprsŝtuŭvzABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZ') #ESPERANTO ALPHABET
ESTONIAN_ALPHABET = set(u'abcdefghijklmnopqrsšzžtuvwõäöüxyABCDEFGHIJKLMNOPQRSŠZŽTUVWÕÄÖÜXY') #ESTONIAN ALPHABET
YAKUTIAN_ALPHABET = set(u'абвгҕддьеёжзийклмнҥньоөпрсһтуүфхцчшщъыьэАБВГҔДДьЕЁЖЗИЙКЛМНҤНьОӨПРСҺТУҮФХЦЧШЩЪЫЬЭ') #YAKUTIAN ALPHABET
UTF8Writer = codecs.getwriter('utf8')
sys.stdout = UTF8Writer(sys.stdout)
SYMBOLS = set(RUSSIAN_ALPHABET)
SYMBOLS.update(RUSSIAN_ALPHABET, ENGLISH_ALPHABET, AZERBAIJANI_ALPHABET, ALBANIAN_ALPHABET, ARABIC_ALPHABET, ARMENIAN_ALPHABET, AFRIKAANS_ALPHABET, BASQUE_ALPHABET, BASHKIR_ALPHABET,
BELORUSSIAN_ALPHABET, BULGARIAN_ALPHABET, BURYATIAN_ALPHABET, WELSH_ALPHABET, HUNGARIAN_ALPHABET, VIETNAMESE_ALPHABET, HAITIAN_ALPHABET, GALICIAN_ALPHABET, DUTCH_ALPHABET, GREEK_ALPHABET,
DANISH_ALPHABET, INDONESIAN_ALPHABET, IRISH_ALPHABET, ICELANDIC_ALPHABET, SPANISH_ALPHABET, ITALIAN_ALPHABET, KAZAKH_ALPHABET, KALMYK_ALPHABET, KARAKALPAK_ALPHABET, KARELIAN_ALPHABET,
CATALAN_ALPHABET, KYRGYZ_ALPHABET, LATIN_ALPHABET, LATVIAN_ALPHABET, LITHUANIAN_ALPHABET, MACEDONIAN_ALPHABET, MALTESE_ALPHABET, MARI_ALPHABET, MOLDAVIAN_ALPHABET, MONGOLIAN_ALPHABET,
GERMAN_ALPHABET, NORWEGIAN_ALPHABET, OSETIAN_ALPHABET, POLISH_ALPHABET, PORTUGUESE_ALPHABET, ROMANIAN_ALPHABET, SERBIAN_ALPHABET, SLOVAK_ALPHABET, SLOVENIAN_ALPHABET, TAJIK_ALPHABET, TATAR_ALPHABET,
TUVIN_ALPHABET, TURKISH_ALPHABET, UDMURT_ALPHABET, UZBEK_ALPHABET, UKRAINIAN_ALPHABET, FARSI_ALPHABET, PHILIPPINES_ALPHABET, FINNISH_ALPHABET, FRENCH_ALPHABET, HAKASS_ALPHABET,HANTY_ALPHABET,
CROATIAN_ALPHABET, CZECH_ALPHABET, CHUVASH_ALPHABET, SWEDISH_ALPHABET, ESPERANTO_ALPHABET, ESTONIAN_ALPHABET, YAKUTIAN_ALPHABET)
L = list(SYMBOLS)
print ''.join(L)

View File

@ -6,6 +6,8 @@
# Use out-of-source builds (shadow builds)
include(../../Valentina.pri)
QT += core gui widgets xml svg printsupport xmlpatterns
TEMPLATE = app
@ -45,7 +47,8 @@ SOURCES += \
mainwindow.cpp \
tablewindow.cpp \
stable.cpp \
version.cpp
version.cpp \
options.cpp
HEADERS += \
mainwindow.h \
@ -62,7 +65,8 @@ RESOURCES += \
share/resources/icon.qrc \
share/resources/cursor.qrc \
share/resources/theme.qrc \
share/resources/schema.qrc
share/resources/schema.qrc \
share/resources/measurements.qrc
OTHER_FILES += \
share/resources/valentina.rc \
@ -75,7 +79,9 @@ TRANSLATIONS += share/translations/valentina.ts \
share/translations/valentina_de.ts \
share/translations/valentina_cs.ts \
share/translations/valentina_he_IL.ts \
share/translations/valentina_fr.ts
share/translations/valentina_fr.ts \
share/translations/valentina_it.ts \
share/translations/valentina_nl.ts
unix {
QMAKE_CXX = ccache g++
@ -94,8 +100,8 @@ CONFIG(debug, debug|release){
*-g++{
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \
-isystem "$${RCC_DIR}" \
-isystem "/usr/include/qt5/QtCore" -isystem "/usr/include/qt5/QtXmlPatterns" \
-isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" -isystem "$${RCC_DIR}" \
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
@ -153,16 +159,15 @@ QMAKE_DISTCLEAN += $${DESTDIR}/* \
$${RCC_DIR}/* \
$$PWD/share/translations/valentina_*.qm
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \
share/translations/valentina_uk.qm \
share/translations/valentina_de.qm \
share/translations/valentina_cs.qm \
share/translations/valentina_he_IL.qm \
share/translations/valentina_fr.qm
INSTALL_TRANSLATIONS += \
share/translations/valentina_ru.qm \
share/translations/valentina_uk.qm \
share/translations/valentina_de.qm \
share/translations/valentina_cs.qm \
share/translations/valentina_he_IL.qm \
share/translations/valentina_fr.qm
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst
unix {
#VARIABLES
@ -182,14 +187,12 @@ translations.path = $$DATADIR/$${TARGET}/translations/
translations.files = $$INSTALL_TRANSLATIONS
standard.path = $$DATADIR/$${TARGET}/tables/standard/
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
individual.path = $$DATADIR/$${TARGET}/tables/individual/
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS
INSTALLS += target \
INSTALLS += \
target \
desktop \
pixmaps \
translations \
standard \
individual
standard
}
!isEmpty(TRANSLATIONS): {
@ -200,25 +203,6 @@ INSTALLS += target \
}
}
# Copies the given files to the destination directory
defineTest(copyToDestdir) {
files = $$1
DDIR = $$2
mkpath($$DDIR)
for(FILE, files) {
# Replace slashes in paths with backslashes for Windows
win32{
FILE ~= s,/,\\,g
DDIR ~= s,/,\\,g
}
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}
for(DIR, INSTALL_TRANSLATIONS) {
#add these absolute paths to a variable which
#ends up as 'mkcommands = path1 path2 path3 ...'
@ -235,14 +219,6 @@ for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
for(DIR, INSTALL_INDIVIDUAL_MEASHUREMENTS) {
#add these absolute paths to a variable which
#ends up as 'mkcommands = path1 path2 path3 ...'
ind_path += $$PWD/$$DIR
}
copyToDestdir($$ind_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/individual))
win32:CONFIG(release, debug|release): LIBS += -L../libs/qmuparser/bin -lqmuparser2
else:win32:CONFIG(debug, debug|release): LIBS += -L../libs/qmuparser/bin -lqmuparser2
else:unix: LIBS += -L../libs/qmuparser/bin -lqmuparser

View File

@ -28,15 +28,9 @@
#include "calculator.h"
#include <QDebug>
#include "../widgets/vapplication.h"
#define DELIMITER 1
#define VARIABLE 2
#define NUMBER 3
#define COMMAND 4
#define STRING 5
#define QUOTE 6
#define FINISHED 10
#define EOL 9
int Calculator::iVal = -1;
//---------------------------------------------------------------------------------------------------------------------
/**
@ -44,433 +38,309 @@
* @param data pointer to a variable container.
*/
Calculator::Calculator(const VContainer *data)
:errorMsg(nullptr), token(QString()), tok(0), token_type(0), prog(QString()), index(0), data(data),
debugFormula(QString())
{}
:QmuParser(), vVarVal(nullptr)
{
InitCharacterSets();
// Add variables
InitVariables(data);
// Add unary operators
DefinePostfixOprt(cm_Oprt, CmUnit);
DefinePostfixOprt(mm_Oprt, MmUnit);
DefinePostfixOprt(in_Oprt, InchUnit);
}
//---------------------------------------------------------------------------------------------------------------------
Calculator::Calculator(const QString &formula, bool fromUser)
:QmuParser(), vVarVal(nullptr)
{
InitCharacterSets();
SetVarFactory(AddVariable, this);
// Add unary operators
if(fromUser)
{
DefinePostfixOprt(qApp->PostfixOperator(cm_Oprt), CmUnit);
DefinePostfixOprt(qApp->PostfixOperator(mm_Oprt), MmUnit);
DefinePostfixOprt(qApp->PostfixOperator(in_Oprt), InchUnit);
QLocale loc = QLocale();
SetDecSep(loc.decimalPoint().toLatin1());
SetThousandsSep(loc.groupSeparator().toLatin1());
SetArgSep(';');
}
else
{
DefinePostfixOprt(cm_Oprt, CmUnit);
DefinePostfixOprt(mm_Oprt, MmUnit);
DefinePostfixOprt(in_Oprt, InchUnit);
}
SetExpr(formula);
try
{
Eval();//Need run for making tokens
}
catch(qmu::QmuParserError &e)
{
return;//Ignore all warnings
}
}
Calculator::~Calculator()
{
delete [] vVarVal;
Calculator::iVal = -1;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief eval calculate formula.
* @param prog string of formula.
* @param errorMsg keep error message.
* @param formula string of formula.
* @return value of formula.
*/
qreal Calculator::eval(QString prog, QString *errorMsg)
qreal Calculator::EvalFormula(const QString &formula)
{
this->errorMsg = errorMsg;
this->errorMsg->clear();
debugFormula.clear();
this->prog = prog;
//qDebug()<<"Formula: "<<prog;
index = 0;
qreal result = get_exp();
QString str = QString(" = %1").arg(result, 0, 'f', 3);
debugFormula.append(str);
//qDebug()<<"Result:"<<debugFormula;
return result;
SetExpr(formula);
return Eval();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief get_exp calculate formula.
* @return value of formula.
*/
qreal Calculator::get_exp()
void Calculator::InitVariables(const VContainer *data)
{
qreal result = 0;
get_token();
if (token.isEmpty())
int num = 0;
if (qApp->patternType() == Pattern::Standard)
{
serror(2);
return 0;
num +=2;
}
level2(&result);
putback();
return result;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief level2 method of addition and subtraction of two terms.
* @param result result of operation.
*/
void Calculator::level2(qreal *result)
{
QChar op;
qreal hold;
const QHash<QString, qreal> *lengthLines = data->DataLengthLines();
num += lengthLines->size();
level3(result);
while ((op=token[0]) == '+' || op == '-')
const QHash<QString, qreal> *lengthSplines = data->DataLengthSplines();
num += lengthSplines->size();
const QHash<QString, qreal> *lengthArcs = data->DataLengthArcs();
num += lengthArcs->size();
const QHash<QString, qreal> *lineAngles = data->DataLineAngles();
num += lineAngles->size();
const QHash<QString, VMeasurement> *measurements = data->DataMeasurements();
num += measurements->size();
const QHash<QString, VIncrement> *increments = data->DataIncrements();
num += increments->size();
vVarVal = new qreal[num];
int j = 0;
if (qApp->patternType() == Pattern::Standard)
{
get_token();
level3(&hold);
arith(op, result, &hold);
vVarVal[j] = data->size();
DefineVar(data->SizeName(), &vVarVal[j]);
++j;
vVarVal[j] = data->height();
DefineVar(data->HeightName(), &vVarVal[j]);
++j;
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief level3 method of multiplication, division, finding percent.
* @param result result of operation.
*/
void Calculator::level3(qreal *result)
{
QChar op;
qreal hold;
level4(result);
while ((op = token[0]) == '*' || op == '/' || op == '%')
{
get_token();
level4(&hold);
arith(op, result, &hold);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief level4 method of degree two numbers.
* @param result result of operation.
*/
void Calculator::level4(qreal *result)
{
qreal hold;
level5(result);
if (token[0] == '^')
{
get_token();
level4(&hold);
arith('^', result, &hold);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief level5 method for finding unary plus or minus.
* @param result result of operation.
*/
void Calculator::level5(qreal *result)
{
QChar op;
op = '\0';
if ((token_type==DELIMITER) && (token[0]=='+' || token[0]=='-'))
{
op = token[0];
get_token();
}
level6(result);
if (op != '\0')
{
unary(op, result);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief level6 processing method of the expression in brackets.
* @param result result of operation.
*/
void Calculator::level6(qreal *result)
{
if ((token[0] == '(') && (token_type == DELIMITER))
{
get_token();
level2(result);
if (token[0] != ')')
QHash<QString, qreal>::const_iterator i = lengthLines->constBegin();
while (i != lengthLines->constEnd())
{
serror(1);
vVarVal[j] = i.value();
DefineVar(i.key(), &vVarVal[j]);
++j;
++i;
}
get_token();
} else
primitive(result);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief primitive method of determining the value of a variable by its name.
* @param result result of operation.
*/
void Calculator::primitive(qreal *result)
{
QString str;
switch (token_type)
{
case VARIABLE:
*result = find_var(token);
str = QString("%1").arg(*result, 0, 'f', 3);
debugFormula.append(str);
get_token();
return;
case NUMBER:
*result = token.toDouble();
str = QString("%1").arg(*result, 0, 'f', 3);
debugFormula.append(str);
get_token();
return;
default:
serror(0);
QHash<QString, qreal>::const_iterator i = lengthSplines->constBegin();
while (i != lengthSplines->constEnd())
{
vVarVal[j] = i.value();
DefineVar(i.key(), &vVarVal[j]);
++j;
++i;
}
}
{
QHash<QString, qreal>::const_iterator i = lengthArcs->constBegin();
while (i != lengthArcs->constEnd())
{
vVarVal[j] = i.value();
DefineVar(i.key(), &vVarVal[j]);
++j;
++i;
}
}
{
QHash<QString, qreal>::const_iterator i = lineAngles->constBegin();
while (i != lineAngles->constEnd())
{
vVarVal[j] = i.value();
DefineVar(i.key(), &vVarVal[j]);
++j;
++i;
}
}
{
QHash<QString, VMeasurement>::const_iterator i = measurements->constBegin();
while (i != measurements->constEnd())
{
if (qApp->patternType() == Pattern::Standard)
{
vVarVal[j] = i.value().GetValue(data->size(), data->height());
DefineVar(i.key(), &vVarVal[j]);
++j;
}
else
{
vVarVal[j] = i.value().GetValue();
DefineVar(i.key(), &vVarVal[j]);
++j;
}
++i;
}
}
{
QHash<QString, VIncrement>::const_iterator i = increments->constBegin();
while (i != increments->constEnd())
{
if (qApp->patternType() == Pattern::Standard)
{
vVarVal[j] = i.value().GetValue(data->size(), data->height());
DefineVar(i.key(), &vVarVal[j]);
++j;
}
else
{
vVarVal[j] = i.value().GetValue();
DefineVar(i.key(), &vVarVal[j]);
++j;
}
++i;
}
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief arith perform the specified arithmetic. The result is written to the first element.
* @param o sign of operation.
* @param r first element.
* @param h second element.
*/
void Calculator::arith(QChar o, qreal *r, qreal *h)
void Calculator::InitCharacterSets()
{
qreal t;//, ex;
//String with all unique symbols for supported alpabets.
// See script alphabets.py for generation and more information.
const QString symbols = QStringLiteral("ցЀĆЈVӧĎАғΕĖӅИқΝĞơРңњΥĦШҫ̆جگĮаҳѕεشԶиһνԾрυلՆӝшËՎҔPÓՖXӛӟŞӣզhëծpóӞնxßվāŁЃֆĉЋCŬđ"
"ҐГΒęҘЛΚŘġҠУGاհЫدԱҰгβطԹõлκKՁÀуςهՉÈыvیՑÐSOřӘћաőcӐթèkàѓżűðsķչøӥӔĀփїІĈЎґĐΗЖҙĘȚ"
"ΟОҡĠآΧЦتЮұİزηжԸغοоÁՀقχцÉՈيюÑՐђӋіәťӆўáŠĺѐfөըnñŰӤӨӹոľЁրăЉŭċБӸēłΔҖЙŤěΜӜDСձģΤӰ"
"ЩīņحҮбưԳصδHйԻŇμӲӴсՃمτƠщՋєLQŹՓŕÖYśÞaգĽæiŽիӓîqճöyջþĂօЄӦĊЌΑĒДҗјΙȘĚМΡéĵĢФūӚΩبĪ"
"ЬүќαذԲдҷιظԺмρՂфÇωوՊьÏՒTŚĻJբdçժlïӪղtպӫAւąЇčŃЏĕӯЗΖEțŮĝПΞأĥĹЧΦثÆӳЯIسŲԵзζԽпξكՅ"
"ÄчφNMՍӌяӢՕÔWÎŝÜџёźեägխoӒյôwĶBžսüЂĄև̈ЊČƏљΓВҕĔӮΛКĜΣТҥĤکЪƯخγвŅԴŪضλкԼĴσтÅՄنъÍՌR"
"ӕՔZÝŜbåդjíլļrӵմzýռپêЅքćچЍďӱҒЕůėژșΘØҚНğńءΠFҢХħΨҪЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒU"
"əÚѝŻşҤӑâeէŐımկòuշÕúտŔ");
switch (o.toLatin1())
// Defining identifier character sets
DefineNameChars(QStringLiteral("0123456789_") + symbols);
DefineOprtChars(symbols + QStringLiteral("+-*^/?<>=#!$%&|~'_"));
}
//---------------------------------------------------------------------------------------------------------------------
qreal Calculator::CmUnit(qreal val)
{
qreal unit = val;
switch(qApp->patternUnit())
{
case '-':
*r = *r-*h;
case Valentina::Mm:
unit = val * 10.0;
break;
case '+':
*r = *r+*h;
case Valentina::Cm:
break;
case '*':
*r = *r * *h;
break;
case '/':
*r = (*r)/(*h);
break;
case '%':
t = (*r)/(*h);
*r = *r-(t*(*h));
break;
case '^':
*r = pow(*r, *h);
case Valentina::Inch:
unit = val / 2.54;
break;
default:
break;
}
return unit;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief unary method changes the sign.
* @param o sign of symbol.
* @param r element.
*/
void Calculator::unary(QChar o, qreal *r)
qreal Calculator::MmUnit(qreal val)
{
if (o=='-')
qreal unit = val;
switch(qApp->patternUnit())
{
*r = -(*r);
case Valentina::Mm:
break;
case Valentina::Cm:
unit = val / 10.0;
break;
case Valentina::Inch:
unit = val / 25.4;
break;
default:
break;
}
return unit;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief find_var method is finding variable by name.
* @param s name of variable.
* @return value of variable.
*/
qreal Calculator::find_var(QString s)
qreal Calculator::InchUnit(qreal val)
{
bool ok = false;
qreal value = data->FindVar(s, &ok);
if (ok == false)
qreal unit = val;
switch(qApp->patternUnit())
{
qDebug()<<s;
serror(4); /* don't variable */
return 0;
case Valentina::Mm:
unit = val * 25.4;
break;
case Valentina::Cm:
unit = val * 2.54;
break;
case Valentina::Inch:
break;
default:
break;
}
return value;
return unit;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief serror report an error
* @param error error code
*/
void Calculator::serror(qint32 error)
//---------------------------------------------------------------------------
// Factory function for creating new parser variables
// This could as well be a function performing database queries.
qreal* Calculator::AddVariable(const QString &a_szName, void *a_pUserData)
{
QString e[]=
// I don't want dynamic allocation here, so i used this static buffer
// If you want dynamic allocation you must allocate all variables dynamically
// in order to delete them later on. Or you find other ways to keep track of
// variables that have been created implicitely.
static qreal afValBuf[100];
++iVal;
Q_UNUSED(a_szName)
Q_UNUSED(a_pUserData)
// qDebug() << "Generating new variable \""
// << a_szName << "\" (slots left: "
// << 99-iVal << ")"
// << " User data pointer is:"
// << QString::number(a_pUserData, 16);
afValBuf[iVal] = 0;
if (iVal>=99)
{
"Syntax error",
"Parentheses do not match",
"This is not the expression",
"Assumed the equality symbol",
"Do not a variable"
};
errorMsg->clear();
*errorMsg = e[error];
qDebug()<<e[error];
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief look_up finding the internal format for the current token in the token table.
* @param s name of token.
* @return internal number of token.
*/
char Calculator::look_up(QString s)
{
QString p;
p = s;
p = p.toLower();
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief isdelim return true if c delimiter.
* @param c character.
* @return true - delimiter, false - do not delimiter.
*/
bool Calculator::isdelim(QChar c)
{
if (StrChr(" ;,+-<>/*%^=()", c) || c=='\n' || c=='\r' || c=='\0')
{
return true;
}
return false;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief iswhite checks whether c space or tab.
* @param c character.
* @return true - space or tab, false - don't space and don't tab.
*/
bool Calculator::iswhite(QChar c)
{
if (c==' ' || c=='\t')
{
return true;
throw qmu::QmuParserError( "Variable buffer overflow." );
}
else
{
return false;
return &afValBuf[iVal];
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief get_token return next token.
*/
void Calculator::get_token()
{
QString *temp;
token_type=0; tok=0;
token.clear();
temp=&token;
if (prog[index]=='\0')
{ /* end of file */
token="\0";
tok=FINISHED;
token_type=DELIMITER;
return;
}
while (iswhite(prog[index]))
{
++index; /* skip spaces */
}
if (prog[index]=='\r')
{ /* crtl */
++index; ++index;
tok= EOL; token='\r';
token.append('\n');token.append("\0");
token_type = DELIMITER;
return;
}
if (StrChr("+-*^/%=;(),><", prog[index]))
{ /* delimiter */
*temp=prog[index];
index++; /* jump to the next position */
temp->append("\0");
token_type=DELIMITER;
debugFormula.append(token);
return;
}
if (prog[index]=='"')
{ /* quoted string */
index++;
while (prog[index] != '"' && prog[index] != '\r')
{
temp->append(prog[index]);
index++;
}
if (prog[index]=='\r')
{
serror(1);
}
index++;temp->append("\0");
token_type=QUOTE;
return;
}
if (prog[index].isDigit())
{ /* number */
while (isdelim(prog[index]) == false)
{
temp->append(prog[index]);
index++;
}
temp->append('\0');
token_type = NUMBER;
return;
}
if (prog[index].isPrint())
{ /* variable or command */
while (isdelim(prog[index]) == false)
{
temp->append(prog[index]);
index++;
}
token_type=STRING;
}
temp->append("\0");
/* Seen if there is a command line or a variable */
if (token_type==STRING)
{
tok=look_up(token);
if (tok == false)
{
token_type = VARIABLE;
}
else
{
token_type = COMMAND; /* It is command */
}
}
return;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief StrChr checks whether the character belongs to the line.
* @param string string with formula
* @param c character.
* @return true - belongs to the line, false - don't belongs to the line.
*/
bool Calculator::StrChr(QString string, QChar c)
{
return string.contains(c, Qt::CaseInsensitive);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief putback returns the readout token back into the flow.
*/
void Calculator::putback()
{
QString t;
t = token;
index = index - t.size();
}

View File

@ -31,67 +31,26 @@
#include "vcontainer.h"
/**
* @brief The Calculator class calculate formulas of pattern. Support operation +,-,/,* and braces.
* Can replace name of variables her value.
*/
class Calculator
#include "../../libs/qmuparser/qmuparser.h"
using namespace qmu;
class Calculator:public QmuParser
{
public:
explicit Calculator(const VContainer *data);
qreal eval(QString prog, QString *errorMsg);
Calculator(const VContainer *data);
Calculator(const QString &formula, bool fromUser = true);
~Calculator();
qreal EvalFormula(const QString &formula);
private:
Q_DISABLE_COPY(Calculator)
/**
* @brief errorMsg keeps error message of calculation.
*/
QString *errorMsg;
/**
* @brief token теперішня лексема.
*/
QString token;
/**
* @brief tok internal representation of token.
*/
qint32 tok;
/**
* @brief token_type type of token.
*/
qint32 token_type;
/**
* @brief prog string where keeps formula.
*/
QString prog;
/**
* @brief index number character in string of formula.
*/
qint32 index;
/**
* @brief data container with data container of all variables.
*/
const VContainer *data;
/**
* @brief debugFormula decoded string of formula.
*/
QString debugFormula;
qreal get_exp();
void get_token();
static bool StrChr(QString string, QChar c);
void putback();
void level2(qreal *result);
void level3(qreal *result);
void level4(qreal *result);
void level5(qreal *result);
void level6(qreal *result);
void primitive(qreal *result);
static void arith(QChar o, qreal *r, qreal *h);
static void unary(QChar o, qreal *r);
qreal find_var(QString s);
// cppcheck-suppress functionStatic
void serror(qint32 error);
static char look_up(QString s);
static bool isdelim(QChar c);
static bool iswhite(QChar c);
qreal *vVarVal;
static int iVal;
void InitVariables(const VContainer *data);
void InitCharacterSets();
static qreal CmUnit(qreal val);
static qreal MmUnit(qreal val);
static qreal InchUnit(qreal val);
static qreal* AddVariable(const QString &a_szName, void *a_pUserData);
};
#endif // CALCULATOR_H

View File

@ -35,14 +35,22 @@
quint32 VContainer::_id = 0;
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VContainer create empty container
*/
VContainer::VContainer()
:_size(50), sizeName("Сг"), _height(176), heightName("P"), gObjects(QHash<quint32, VGObject *>()),
:_size(50), sizeName(size_M), _height(176), heightName(height_M), gObjects(QHash<quint32, VGObject *>()),
measurements(QHash<QString, VMeasurement>()), increments(QHash<QString, VIncrement>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>())
{}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief operator = copy constructor
* @param data container
* @return copy container
*/
VContainer &VContainer::operator =(const VContainer &data)
{
setData(data);
@ -50,8 +58,12 @@ VContainer &VContainer::operator =(const VContainer &data)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VContainer create container from another container
* @param data container
*/
VContainer::VContainer(const VContainer &data)
:_size(50), sizeName("Сг"), _height(176), heightName("P"), gObjects(QHash<quint32, VGObject *>()),
:_size(50), sizeName(size_M), _height(176), heightName(height_M), gObjects(QHash<quint32, VGObject *>()),
measurements(QHash<QString, VMeasurement>()), increments(QHash<QString, VIncrement>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>())
@ -67,6 +79,10 @@ VContainer::~VContainer()
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief setData copy data from container
* @param data container
*/
void VContainer::setData(const VContainer &data)
{
_size = data.size();
@ -111,6 +127,11 @@ void VContainer::setData(const VContainer &data)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetGObject returns a point by id
* @param id id of point
* @return point
*/
// cppcheck-suppress unusedFunction
const VGObject *VContainer::GetGObject(quint32 id)const
{
@ -118,6 +139,12 @@ const VGObject *VContainer::GetGObject(quint32 id)const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
template <typename key, typename val>
const val VContainer::GetObject(const QHash<key, val> &obj, key id) const
{
@ -132,6 +159,12 @@ const val VContainer::GetObject(const QHash<key, val> &obj, key id) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
template <typename key, typename val>
val VContainer::GetVariable(const QHash<key, val> &obj, key id) const
{
@ -146,6 +179,11 @@ val VContainer::GetVariable(const QHash<key, val> &obj, key id) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetMeasurement return measurement by name
* @param name short measurement name
* @return measurement
*/
const VMeasurement VContainer::GetMeasurement(const QString &name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -153,6 +191,11 @@ const VMeasurement VContainer::GetMeasurement(const QString &name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetIncrement return increment table row by name
* @param name name of increment table row
* @return increment
*/
const VIncrement VContainer::GetIncrement(const QString& name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -160,6 +203,11 @@ const VIncrement VContainer::GetIncrement(const QString& name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetLine return length of line by name
* @param name name of line
* @return length of line in mm
*/
qreal VContainer::GetLine(const QString &name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -167,6 +215,11 @@ qreal VContainer::GetLine(const QString &name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetLengthArc return length of arc by name
* @param name name of arc
* @return length of arc in mm
*/
qreal VContainer::GetLengthArc(const QString &name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -174,6 +227,11 @@ qreal VContainer::GetLengthArc(const QString &name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetLengthSpline return length of spline by name
* @param name name of spline
* @return length of spline in mm
*/
qreal VContainer::GetLengthSpline(const QString &name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -181,6 +239,11 @@ qreal VContainer::GetLengthSpline(const QString &name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetLineAngle return angle of line
* @param name name of line angle
* @return angle in degree
*/
qreal VContainer::GetLineAngle(const QString &name) const
{
Q_ASSERT(name.isEmpty()==false);
@ -188,18 +251,33 @@ qreal VContainer::GetLineAngle(const QString &name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetDetail return detail by id
* @param id id of detail
* @return detail
*/
const VDetail VContainer::GetDetail(quint32 id) const
{
return GetVariable(details, id);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddPoint add new point to container
* @param point new point
* @return return id of new point in container
*/
quint32 VContainer::AddGObject(VGObject *obj)
{
return AddObject(gObjects, obj);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddDetail add new detail to container
* @param detail new detail
* @return return id of new detail in container
*/
quint32 VContainer::AddDetail(VDetail detail)
{
quint32 id = getNextId();
@ -208,12 +286,21 @@ quint32 VContainer::AddDetail(VDetail detail)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddIncrement add new row of increment table
* @param name name of new row of increment table
* @param row new row of increment table
*/
void VContainer::AddIncrement(const QString &name, VIncrement incr)
{
increments[name] = incr;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief getNextId generate next unique id
* @return next unique id
*/
quint32 VContainer::getNextId()
{
_id++;
@ -221,6 +308,10 @@ quint32 VContainer::getNextId()
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdateId update id. If new id bigger when current save new like current.
* @param newId id
*/
void VContainer::UpdateId(quint32 newId)
{
if (newId > _id)
@ -230,6 +321,12 @@ void VContainer::UpdateId(quint32 newId)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdateObject update object in container
* @param obj container
* @param id id of existing object
* @param point object
*/
template <typename val>
void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val point)
{
@ -246,6 +343,11 @@ void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val p
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddLengthSpline add length of spline to container
* @param name name of spline
* @param value length of spline
*/
void VContainer::AddLengthSpline(const QString &name, const qreal &value)
{
Q_ASSERT(name.isEmpty() == false);
@ -253,6 +355,10 @@ void VContainer::AddLengthSpline(const QString &name, const qreal &value)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddLengthArc add length of arc to container
* @param id id of arc
*/
void VContainer::AddLengthArc(const quint32 &id)
{
const VArc * arc = GeometricObject<const VArc *>(id);
@ -260,6 +366,11 @@ void VContainer::AddLengthArc(const quint32 &id)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddLineAngle add angle of line to container
* @param name name of line angle
* @param value angle in degree
*/
void VContainer::AddLineAngle(const QString &name, const qreal &value)
{
Q_ASSERT(name.isEmpty() == false);
@ -267,6 +378,11 @@ void VContainer::AddLineAngle(const QString &name, const qreal &value)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetValueStandardTableRow return value of measurement by name
* @param name name of measurement
* @return value in measurement units
*/
qreal VContainer::GetValueStandardTableRow(const QString& name) const
{
const VMeasurement m = GetMeasurement(name);
@ -281,6 +397,11 @@ qreal VContainer::GetValueStandardTableRow(const QString& name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetValueIncrementTableRow return value of increment table row by name
* @param name name of row
* @return value of row in mm
*/
qreal VContainer::GetValueIncrementTableRow(const QString& name) const
{
const VIncrement icr = GetIncrement(name);
@ -295,6 +416,9 @@ qreal VContainer::GetValueIncrementTableRow(const QString& name) const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Clear clear data in container. Id will be 0.
*/
void VContainer::Clear()
{
_id = 0;
@ -309,6 +433,9 @@ void VContainer::Clear()
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
*/
void VContainer::ClearGObjects()
{
if (gObjects.size()>0)
@ -337,6 +464,12 @@ void VContainer::ClearCalculationGObjects()
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief FindVar return value of variable by name
* @param name name of variable
* @param ok false if can't find variable
* @return value of variable
*/
qreal VContainer::FindVar(const QString &name, bool *ok)const
{
if (sizeName == name)
@ -384,6 +517,12 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddLine add line to container
* @param firstPointId id of first point of line
* @param secondPointId id of second point of line
* @param mode mode of line
*/
void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
{
QString nameLine = GetNameLine(firstPointId, secondPointId);
@ -395,6 +534,12 @@ void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPoint
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddObject add object to container
* @param obj container
* @param value object
* @return id of object in container
*/
template <typename key, typename val>
quint32 VContainer::AddObject(QHash<key, val> &obj, val value)
{
@ -406,30 +551,52 @@ quint32 VContainer::AddObject(QHash<key, val> &obj, val value)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetNameLine return name of line
* @param firstPoint id of first point of line
* @param secondPoint id of second point of line
* @return name of line
*/
QString VContainer::GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const
{
const VPointF *first = GeometricObject<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(secondPoint);
return QString("Line_%1_%2").arg(first->name(), second->name());
return QString(line_+"%1_%2").arg(first->name(), second->name());
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetNameLineAngle return name of line angle
* @param firstPoint id of first point of line
* @param secondPoint id of second point of line
* @return name of angle of line
*/
QString VContainer::GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const
{
const VPointF *first = GeometricObject<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(secondPoint);
return QString("AngleLine_%1_%2").arg(first->name(), second->name());
return QString(angleLine_+"%1_%2").arg(first->name(), second->name());
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdatePoint update point by id
* @param id id of existing point
* @param point point
*/
void VContainer::UpdateGObject(quint32 id, VGObject* obj)
{
UpdateObject(gObjects, id, obj);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdateDetail update detail by id
* @param id id of existing detail
* @param detail detail
*/
void VContainer::UpdateDetail(quint32 id, const VDetail &detail)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
@ -438,6 +605,11 @@ void VContainer::UpdateDetail(quint32 id, const VDetail &detail)
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddLengthLine add length of line to container
* @param name name of line
* @param value length of line
*/
void VContainer::AddLengthLine(const QString &name, const qreal &value)
{
Q_ASSERT(name.isEmpty() == false);

View File

@ -45,20 +45,8 @@ class VContainer
{
Q_DECLARE_TR_FUNCTIONS(VContainer)
public:
/**
* @brief VContainer create empty container
*/
VContainer();
/**
* @brief operator = copy constructor
* @param data container
* @return copy container
*/
VContainer &operator=(const VContainer &data);
/**
* @brief VContainer create container from another container
* @param data container
*/
VContainer(const VContainer &data);
~VContainer();
template <typename T>
@ -67,11 +55,7 @@ public:
T *obj = new T(*data.GeometricObject<const T *>(id));
UpdateGObject(id, obj);
}
/**
* @brief setData copy data from container
* @param data container
*/
void setData(const VContainer &data);
void setData(const VContainer &data);
template <typename T>
const T GeometricObject(const quint32 &id) const
{
@ -100,288 +84,65 @@ public:
return nullptr;
}
/**
* @brief GetGObject returns a point by id
* @param id id of point
* @return point
*/
const VGObject *GetGObject(quint32 id) const;
/**
* @brief GetMeasurement return measurement by name
* @param name short measurement name
* @return measurement
*/
const VMeasurement GetMeasurement(const QString& name) const;
/**
* @brief GetIncrement return increment table row by name
* @param name name of increment table row
* @return increment
*/
const VIncrement GetIncrement(const QString& name) const;
/**
* @brief GetLine return length of line by name
* @param name name of line
* @return length of line in mm
*/
qreal GetLine(const QString &name) const;
/**
* @brief GetLengthArc return length of arc by name
* @param name name of arc
* @return length of arc in mm
*/
qreal GetLengthArc(const QString &name) const;
/**
* @brief GetLengthSpline return length of spline by name
* @param name name of spline
* @return length of spline in mm
*/
qreal GetLengthSpline(const QString &name) const;
/**
* @brief GetLineAngle return angle of line
* @param name name of line angle
* @return angle in degree
*/
qreal GetLineAngle(const QString &name) const;
/**
* @brief GetDetail return detail by id
* @param id id of detail
* @return detail
*/
const VDetail GetDetail(quint32 id) const;
/**
* @brief getId return current id
* @return current id
*/
static quint32 getId() {return _id;}
/**
* @brief AddPoint add new point to container
* @param point new point
* @return return id of new point in container
*/
quint32 AddGObject(VGObject *obj);
/**
* @brief AddDetail add new detail to container
* @param detail new detail
* @return return id of new detail in container
*/
quint32 AddDetail(VDetail detail);
/**
* @brief AddMeasurement add new measurement
* @param name short measurement name
* @param row measurement
*/
void AddMeasurement(const QString& name, const VMeasurement &m);
/**
* @brief AddIncrement add new row of increment table
* @param name name of new row of increment table
* @param row new row of increment table
*/
void AddIncrement(const QString& name, VIncrement incr);
/**
* @brief AddLengthLine add length of line to container
* @param name name of line
* @param value length of line
*/
void AddLengthLine(const QString &name, const qreal &value);
/**
* @brief AddLengthSpline add length of spline to container
* @param name name of spline
* @param value length of spline
*/
void AddLengthSpline(const QString &name, const qreal &value);
/**
* @brief AddLengthArc add length of arc to container
* @param id id of arc
*/
void AddLengthArc(const quint32 &id);
/**
* @brief AddLineAngle add angle of line to container
* @param name name of line angle
* @param value angle in degree
*/
void AddLineAngle(const QString &name, const qreal &value);
/**
* @brief AddLine add line to container
* @param firstPointId id of first point of line
* @param secondPointId id of second point of line
* @param mode mode of line
*/
void AddLine(const quint32 &firstPointId, const quint32 &secondPointId);
/**
* @brief GetNameLine return name of line
* @param firstPoint id of first point of line
* @param secondPoint id of second point of line
* @return name of line
*/
const VGObject *GetGObject(quint32 id) const;
const VMeasurement GetMeasurement(const QString& name) const;
const VIncrement GetIncrement(const QString& name) const;
qreal GetLine(const QString &name) const;
qreal GetLengthArc(const QString &name) const;
qreal GetLengthSpline(const QString &name) const;
qreal GetLineAngle(const QString &name) const;
const VDetail GetDetail(quint32 id) const;
static quint32 getId(){return _id;}
quint32 AddGObject(VGObject *obj);
quint32 AddDetail(VDetail detail);
void AddMeasurement(const QString& name, const VMeasurement &m);
void AddIncrement(const QString& name, VIncrement incr);
void AddLengthLine(const QString &name, const qreal &value);
void AddLengthSpline(const QString &name, const qreal &value);
void AddLengthArc(const quint32 &id);
void AddLineAngle(const QString &name, const qreal &value);
void AddLine(const quint32 &firstPointId, const quint32 &secondPointId);
// cppcheck-suppress functionStatic
QString GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const;
/**
* @brief GetNameLineAngle return name of line angle
* @param firstPoint id of first point of line
* @param secondPoint id of second point of line
* @return name of angle of line
*/
QString GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const;
// cppcheck-suppress functionStatic
QString GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const;
/**
* @brief UpdatePoint update point by id
* @param id id of existing point
* @param point point
*/
void UpdateGObject(quint32 id, VGObject* obj);
/**
* @brief UpdateDetail update detail by id
* @param id id of existing detail
* @param detail detail
*/
void UpdateDetail(quint32 id, const VDetail &detail);
/**
* @brief UpdateMeasurement update measurement by name
* @param name short measurement name
* @param m measurement
*/
void UpdateMeasurement(const QString& name, VMeasurement m);
/**
* @brief UpdateIncrement update increment table row by name
* @param name name of row
* @param row row
*/
void UpdateIncrement(const QString& name, VIncrement incr);
/**
* @brief GetValueStandardTableRow return value of measurement by name
* @param name name of measurement
* @return value in measurement units
*/
qreal GetValueStandardTableRow(const QString& name) const;
/**
* @brief GetValueIncrementTableRow return value of increment table row by name
* @param name name of row
* @return value of row in mm
*/
qreal GetValueIncrementTableRow(const QString& name) const;
/**
* @brief Clear clear data in container. Id will be 0.
*/
void Clear();
/**
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
*/
void ClearGObjects();
void ClearCalculationGObjects();
/**
* @brief ClearIncrementTable clear increment table
*/
void ClearIncrementTable();
void ClearMeasurements();
/**
* @brief ClearLengthLines clear length lines
*/
void ClearLengthLines();
/**
* @brief ClearLengthSplines clear length splines
*/
void ClearLengthSplines();
/**
* @brief ClearLengthArcs clear length arcs
*/
void ClearLengthArcs();
/**
* @brief ClearLineAngles clear angles of lines
*/
void ClearLineAngles();
void ClearDetails();
/**
* @brief SetSize set value of size
* @param size value of size
*/
void SetSize(qreal size);
void SetSizeName(const QString &name);
/**
* @brief SetGrowth set value of growth
* @param growth value of growth
*/
void SetHeight(qreal height);
void SetHeightName(const QString &name);
/**
* @brief size return size
* @return size in mm
*/
qreal size() const;
QString SizeName()const;
/**
* @brief height return height
* @return height in pattern units
*/
qreal height() const;
QString HeightName()const;
/**
* @brief FindVar return value of variable by name
* @param name name of variable
* @param ok false if can't find variable
* @return value of variable
*/
qreal FindVar(const QString& name, bool *ok)const;
/**
* @brief IncrementTableContains check if increment table contains name
* @param name name of row
* @return true if contains
*/
bool IncrementTableContains(const QString& name);
/**
* @brief getNextId generate next unique id
* @return next unique id
*/
static quint32 getNextId();
/**
* @brief RemoveIncrementTableRow remove row by name from increment table
* @param name name of existing row
*/
void RemoveIncrementTableRow(const QString& name);
/**
* @brief data container with datagObjects return container of gObjects
* @return pointer on container of gObjects
*/
const QHash<quint32, VGObject*> *DataGObjects() const;
/**
* @brief DataMeasurements container with measurements.
* @return pointer to measurements.
*/
QString GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const;
void UpdateGObject(quint32 id, VGObject* obj);
void UpdateDetail(quint32 id, const VDetail &detail);
void UpdateMeasurement(const QString& name, VMeasurement m);
void UpdateIncrement(const QString& name, VIncrement incr);
qreal GetValueStandardTableRow(const QString& name) const;
qreal GetValueIncrementTableRow(const QString& name) const;
void Clear();
void ClearGObjects();
void ClearCalculationGObjects();
void ClearIncrementTable();
void ClearMeasurements();
void ClearLengthLines();
void ClearLengthSplines();
void ClearLengthArcs();
void ClearLineAngles();
void ClearDetails();
void SetSize(qreal size);
void SetSizeName(const QString &name);
void SetHeight(qreal height);
void SetHeightName(const QString &name);
qreal size() const;
QString SizeName()const;
qreal height() const;
QString HeightName()const;
qreal FindVar(const QString& name, bool *ok)const;
bool IncrementTableContains(const QString& name);
static quint32 getNextId();
void RemoveIncrementTableRow(const QString& name);
static void UpdateId(quint32 newId);
const QHash<quint32, VGObject*> *DataGObjects() const;
const QHash<QString, VMeasurement> *DataMeasurements() const;
/**
* @brief data container with dataIncrements return container of increment table
* @return pointer on container of increment table
*/
const QHash<QString, VIncrement> *DataIncrements() const;
/**
* @brief data container with dataLengthLines return container of lines lengths
* @return pointer on container of lines lengths
*/
const QHash<QString, qreal> *DataLengthLines() const;
/**
* @brief data container with dataLengthSplines return container of splines lengths
* @return pointer on container of splines lengths
*/
const QHash<QString, qreal> *DataLengthSplines() const;
/**
* @brief data container with dataLengthArcs return container of arcs length
* @return pointer on container of arcs length
*/
const QHash<QString, qreal> *DataLengthArcs() const;
/**
* @brief data container with dataLineAngles return container of angles of line
* @return pointer on container of angles of line
*/
const QHash<QString, qreal> *DataLineAngles() const;
/**
* @brief data container with dataDetails return container of details
* @return pointer on container of details
*/
const QHash<quint32, VDetail> *DataDetails() const;
/**
* @brief UpdateId update id. If new id bigger when current save new like current.
* @param newId id
*/
static void UpdateId(quint32 newId);
const QHash<QString, VIncrement> *DataIncrements() const;
const QHash<QString, qreal> *DataLengthLines() const;
const QHash<QString, qreal> *DataLengthSplines() const;
const QHash<QString, qreal> *DataLengthArcs() const;
const QHash<QString, qreal> *DataLineAngles() const;
const QHash<quint32, VDetail> *DataDetails() const;
private:
/**
* @brief _id current id. New object will have value +1. For empty class equal 0.
@ -423,177 +184,272 @@ private:
* @brief details container of details
*/
QHash<quint32, VDetail> details;
template <typename key, typename val>
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
// cppcheck-suppress functionStatic
const val GetObject(const QHash<key, val> &obj, key id) const;
template <typename key, typename val>
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
// cppcheck-suppress functionStatic
val GetVariable(const QHash<key, val> &obj, key id) const;
template <typename val>
/**
* @brief UpdateObject update object in container
* @param obj container
* @param id id of existing object
* @param point object
*/
void UpdateObject(QHash<quint32, val > &obj, const quint32 &id, val point);
template <typename key, typename val>
/**
* @brief AddObject add object to container
* @param obj container
* @param value object
* @return id of object in container
*/
static quint32 AddObject(QHash<key, val> &obj, val value);
};
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief AddMeasurement add new measurement
* @param name short measurement name
* @param row measurement
*/
inline void VContainer::AddMeasurement(const QString &name, const VMeasurement &m)
{
measurements[name] = m;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdateMeasurement update measurement by name
* @param name short measurement name
* @param m measurement
*/
inline void VContainer::UpdateMeasurement(const QString &name, VMeasurement m)
{
measurements[name] = m;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief UpdateIncrement update increment table row by name
* @param name name of row
* @param row row
*/
inline void VContainer::UpdateIncrement(const QString &name, VIncrement incr)
{
increments[name] = incr;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearIncrementTable clear increment table
*/
inline void VContainer::ClearIncrementTable()
{
increments.clear();
}
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::ClearMeasurements()
{
measurements.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthLines clear length lines
*/
inline void VContainer::ClearLengthLines()
{
lengthLines.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthSplines clear length splines
*/
inline void VContainer::ClearLengthSplines()
{
lengthSplines.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthArcs clear length arcs
*/
inline void VContainer::ClearLengthArcs()
{
lengthArcs.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLineAngles clear angles of lines
*/
inline void VContainer::ClearLineAngles()
{
lineAngles.clear();
}
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::ClearDetails()
{
details.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetSize set value of size
* @param size value of size
*/
inline void VContainer::SetSize(qreal size)
{
_size = size;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::SetSizeName(const QString &name)
{
sizeName = name;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetGrowth set value of growth
* @param growth value of growth
*/
inline void VContainer::SetHeight(qreal height)
{
_height = height;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::SetHeightName(const QString &name)
{
heightName = name;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief size return size
* @return size in mm
*/
inline qreal VContainer::size() const
{
return _size;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VContainer::SizeName() const
{
return sizeName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief height return height
* @return height in pattern units
*/
inline qreal VContainer::height() const
{
return _height;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VContainer::HeightName() const
{
return heightName;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief IncrementTableContains check if increment table contains name
* @param name name of row
* @return true if contains
*/
inline bool VContainer::IncrementTableContains(const QString &name)
{
return increments.contains(name);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief RemoveIncrementTableRow remove row by name from increment table
* @param name name of existing row
*/
inline void VContainer::RemoveIncrementTableRow(const QString &name)
{
increments.remove(name);
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with datagObjects return container of gObjects
* @return pointer on container of gObjects
*/
inline const QHash<quint32, VGObject *> *VContainer::DataGObjects() const
{
return &gObjects;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief DataMeasurements container with measurements.
* @return pointer to measurements.
*/
inline const QHash<QString, VMeasurement> *VContainer::DataMeasurements() const
{
return &measurements;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataIncrements return container of increment table
* @return pointer on container of increment table
*/
inline const QHash<QString, VIncrement> *VContainer::DataIncrements() const
{
return &increments;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataLengthLines return container of lines lengths
* @return pointer on container of lines lengths
*/
inline const QHash<QString, qreal> *VContainer::DataLengthLines() const
{
return &lengthLines;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataLengthSplines return container of splines lengths
* @return pointer on container of splines lengths
*/
inline const QHash<QString, qreal> *VContainer::DataLengthSplines() const
{
return &lengthSplines;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataLengthArcs return container of arcs length
* @return pointer on container of arcs length
*/
inline const QHash<QString, qreal> *VContainer::DataLengthArcs() const
{
return &lengthArcs;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataLineAngles return container of angles of line
* @return pointer on container of angles of line
*/
inline const QHash<QString, qreal> *VContainer::DataLineAngles() const
{
return &lineAngles;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief data container with dataDetails return container of details
* @return pointer on container of details
*/
inline const QHash<quint32, VDetail> *VContainer::DataDetails() const
{
return &details;

View File

@ -37,19 +37,19 @@
class VIncrement
{
public:
/**
* @brief VIncrementTableRow create enpty row
*/
VIncrement();
/**
* @brief VIncrementTableRow create row
* @param id id
* @param base value in base size and growth
* @param ksize increment in sizes
* @param kgrowth increment in growths
* @param description description of increment
*/
VIncrement(quint32 id, qreal base, qreal ksize, qreal kheight, QString description = QString());
/**
* @brief VIncrementTableRow create enpty row
*/
VIncrement();
/**
* @brief VIncrementTableRow create row
* @param id id
* @param base value in base size and growth
* @param ksize increment in sizes
* @param kgrowth increment in growths
* @param description description of increment
*/
VIncrement(quint32 id, qreal base, qreal ksize, qreal kheight, QString description = QString());
/**
* @brief getId return id of row
* @return id

View File

@ -30,21 +30,18 @@
//---------------------------------------------------------------------------------------------------------------------
VMeasurement::VMeasurement()
:base(0), ksize(50.0), kheight(176.0), gui_text(QString()), number(QString()), virtualM(false),
_tagName(QString())
:base(0), ksize(50.0), kheight(176.0), gui_text(QString()), number(QString()), _tagName(QString())
{}
//---------------------------------------------------------------------------------------------------------------------
VMeasurement::VMeasurement(const qreal &base, const qreal &ksize, const qreal &kgrowth,
const QString &gui_text, const QString &number, const QString &tagName)
:base(base), ksize(ksize), kheight(kgrowth), gui_text(gui_text), number(number), virtualM(false),
_tagName(tagName)
:base(base), ksize(ksize), kheight(kgrowth), gui_text(gui_text), number(number), _tagName(tagName)
{}
//---------------------------------------------------------------------------------------------------------------------
VMeasurement::VMeasurement(const qreal &base, const QString &gui_text, const QString &number, const QString &tagName)
:base(base), ksize(50.0), kheight(176.0), gui_text(gui_text), number(number), virtualM(false),
_tagName(tagName)
:base(base), ksize(50.0), kheight(176.0), gui_text(gui_text), number(number), _tagName(tagName)
{}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -80,8 +80,6 @@ public:
qreal GetValue(const qreal &size, const qreal &height) const;
QString TagName() const;
void setTagName(const QString &TagName);
bool Virtual() const;
void setVirtual(bool value);
private:
/**
* @brief base value in base size and growth
@ -100,7 +98,6 @@ private:
*/
QString gui_text;
QString number;
bool virtualM;
QString _tagName;
};
@ -144,14 +141,4 @@ inline void VMeasurement::setTagName(const QString &tagName)
_tagName = tagName;
}
inline bool VMeasurement::Virtual() const
{
return virtualM;
}
inline void VMeasurement::setVirtual(bool value)
{
virtualM = value;
}
#endif // VSTANDARDTABLEROW_H

View File

@ -162,7 +162,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>pushButton_Web_Site</string>
<string notr="true">pushButton_Web_Site</string>
</property>
<property name="autoDefault">
<bool>false</bool>
@ -246,7 +246,7 @@ p, li { white-space: pre-wrap; }
</sizepolicy>
</property>
<property name="text">
<string>label_QT_Version</string>
<string notr="true">label_QT_Version</string>
</property>
</widget>
</item>

View File

@ -146,7 +146,7 @@ void DialogIncrements::FillMeasurements()
while (i.hasNext())
{
i.next();
map.insert(i.key(), i.value());
map.insert(qApp->VarToUser(i.key()), i.value());
}
qint32 currentRow = -1;
QMapIterator<QString, VMeasurement> iMap(map);
@ -165,6 +165,7 @@ void DialogIncrements::FillMeasurements()
Qt::ItemFlags flags = item->flags();
flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag
item->setFlags(flags);
item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetMeasurements->setItem(currentRow, 0, item);
if (qApp->patternType() == Pattern::Standard)
@ -207,6 +208,7 @@ void DialogIncrements::FillMeasurements()
flags = item->flags();
flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag
item->setFlags(flags);
item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetMeasurements->setItem(currentRow, 5, item);
}
ui->tableWidgetMeasurements->verticalHeader()->setDefaultSectionSize(20);
@ -292,7 +294,7 @@ void DialogIncrements::FillLengthLines()
while (iHash.hasNext())
{
iHash.next();
map.insert(iHash.key(), iHash.value());
map.insert(qApp->VarToUser(iHash.key()), iHash.value());
}
qint32 currentRow = -1;
@ -305,7 +307,7 @@ void DialogIncrements::FillLengthLines()
ui->tableWidgetLines->setRowCount ( linesTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key()));
item->setTextAlignment(Qt::AlignHCenter);
item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetLines->setItem(currentRow, 0, item);
@ -328,7 +330,7 @@ void DialogIncrements::FillLengthSplines()
while (iHash.hasNext())
{
iHash.next();
map.insert(iHash.key(), iHash.value());
map.insert(qApp->VarToUser(iHash.key()), iHash.value());
}
qint32 currentRow = -1;
@ -340,7 +342,7 @@ void DialogIncrements::FillLengthSplines()
currentRow++;
ui->tableWidgetSplines->setRowCount ( splinesTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key()));
QTableWidgetItem *item = new QTableWidgetItem(i.key());
item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetSplines->setItem(currentRow, 0, item);
@ -364,7 +366,7 @@ void DialogIncrements::FillLengthArcs()
while (iHash.hasNext())
{
iHash.next();
map.insert(iHash.key(), iHash.value());
map.insert(qApp->VarToUser(iHash.key()), iHash.value());
}
qint32 currentRow = -1;
@ -376,8 +378,8 @@ void DialogIncrements::FillLengthArcs()
currentRow++;
ui->tableWidgetArcs->setRowCount ( arcsTable->size() );
QTableWidgetItem *item = new QTableWidgetItem(QString(i.key()));
item->setTextAlignment(Qt::AlignHCenter);
QTableWidgetItem *item = new QTableWidgetItem(i.key());
item->setTextAlignment(Qt::AlignLeft);
item->setFont(QFont("Times", 12, QFont::Bold));
ui->tableWidgetArcs->setItem(currentRow, 0, item);
@ -721,7 +723,7 @@ void DialogIncrements::MeasurementChanged(qint32 row, qint32 column)
const QTableWidgetItem *itemName = ui->tableWidgetMeasurements->item(row, 0);
QTableWidgetItem *item = ui->tableWidgetMeasurements->item(row, 2);
VMeasurement measur = data->GetMeasurement(itemName->text());
VMeasurement measur = data->GetMeasurement(qApp->VarFromUser(itemName->text()));
const QString tag = measur.TagName();
QDomNodeList list = m->elementsByTagName(tag);
QDomElement domElement = list.at(0).toElement();

View File

@ -39,7 +39,7 @@
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabStandard">
<property name="sizePolicy">
@ -115,8 +115,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>559</width>
<height>82</height>
<width>939</width>
<height>411</height>
</rect>
</property>
<attribute name="label">
@ -199,7 +199,7 @@
<item>
<widget class="QDateEdit" name="dateEditBirthDate">
<property name="displayFormat">
<string>yyyy-MM-dd</string>
<string notr="true">yyyy-MM-dd</string>
</property>
</widget>
</item>
@ -255,7 +255,7 @@
</size>
</property>
<property name="text">
<string>Mail</string>
<string>Email</string>
</property>
</widget>
</item>
@ -284,6 +284,9 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
</property>

View File

@ -57,9 +57,7 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
ui->lineEditName->setText(_name);
LoadIndividualTables();
InitUnits();
CheckState();
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogIndividualMeasurements::CheckState);
connect(ui->buttonGroupPath, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this,
@ -91,9 +89,10 @@ void DialogIndividualMeasurements::DialogAccepted()
table.remove();
}
const qint32 index = ui->comboBoxLang->currentIndex();
QString path = ui->comboBoxLang->itemData(index).toString();
QFile iMeasur(path);
//just in case
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", qApp->pathToTables());
QFile iMeasur(qApp->pathToTables());
//TODO maybe make copy save?
if ( iMeasur.copy(_tablePath) == false )
{
QMessageBox::warning(this, tr("Could not create measurements file"), tr("Please try again or change file"));
@ -153,7 +152,6 @@ void DialogIndividualMeasurements::CheckState()
ui->lineEditPathNewM->setEnabled(false);
ui->toolButtonOpenNew->setEnabled(false);
ui->comboBoxLang->setEnabled(false);
ui->comboBoxUnits->setEnabled(false);
if (ui->lineEditPathExistM->text().isEmpty() == false)
@ -165,7 +163,6 @@ void DialogIndividualMeasurements::CheckState()
{
ui->lineEditPathNewM->setEnabled(true);
ui->toolButtonOpenNew->setEnabled(true);
ui->comboBoxLang->setEnabled(true);
ui->comboBoxUnits->setEnabled(true);
ui->toolButtonOpenExist->setEnabled(false);
@ -177,69 +174,10 @@ void DialogIndividualMeasurements::CheckState()
}
}
bool flagLang = false;
{
const QComboBox *box = ui->comboBoxLang;
Q_CHECK_PTR(box);
if (box->count() > 0 && box->currentIndex() != -1)
{
flagLang = true;
}
}
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
Q_CHECK_PTR(bOk);
bOk->setEnabled(flagName && flagPath && flagLang);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogIndividualMeasurements::LoadIndividualTables()
{
QStringList filters;
filters << "*.vit";
QDir tablesDir(qApp->pathToTables());
tablesDir.setNameFilters(filters);
tablesDir.setCurrent(qApp->pathToTables());
const QStringList allFiles = tablesDir.entryList(QDir::NoDotAndDotDot | QDir::Files);
if (allFiles.isEmpty() == true)
{
ui->comboBoxLang->clear();
CheckState();
return;
}
for (int i = 0; i < allFiles.size(); ++i)
{
QFileInfo fi(allFiles.at(i));
try
{
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", fi.absoluteFilePath());
VIndividualMeasurements m(data);
m.setContent(fi.absoluteFilePath());
const QString lang = QLocale(m.Language()).nativeLanguageName();
ui->comboBoxLang->addItem(lang, QVariant(fi.absoluteFilePath()));
}
catch (VException &e)
{
qDebug()<<"File error."<<e.ErrorMessage()<<e.DetailedInformation()<<Q_FUNC_INFO;
continue;
}
}
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
QApplication::applicationName());
QString defaultLocale = QLocale::system().name(); // e.g. "de_DE"
defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
QString checkedLocale = settings.value("configuration/locale", defaultLocale).toString();
//TODO make sure this part work.
// set default translators and language checked
qint32 index = ui->comboBoxLang->findData(checkedLocale);
if (index != -1)
{
ui->comboBoxLang->setCurrentIndex(index);
}
bOk->setEnabled(flagName && flagPath);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,6 @@ private:
QString _name;
QString _tablePath;
VContainer *data;
void LoadIndividualTables();
void InitUnits();
};

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Individual measurements</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@ -90,33 +90,6 @@
</attribute>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Language:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxLang">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>

View File

@ -119,7 +119,7 @@ void DialogAlongLine::setFirstPointId(const quint32 &value, const quint32 &id)
//---------------------------------------------------------------------------------------------------------------------
void DialogAlongLine::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -157,7 +157,7 @@ inline QString DialogAlongLine::getTypeLine() const
inline QString DialogAlongLine::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline quint32 DialogAlongLine::getFirstPointId() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>470</width>
<height>454</height>
<height>573</height>
</rect>
</property>
<property name="windowTitle">
@ -337,6 +337,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>501</width>
<height>448</height>
<height>538</height>
</rect>
</property>
<property name="windowTitle">
@ -527,6 +527,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -128,7 +128,7 @@ void DialogBisector::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -167,7 +167,7 @@ inline QString DialogBisector::getTypeLine() const
inline QString DialogBisector::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline quint32 DialogBisector::getFirstPointId() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>480</width>
<height>485</height>
<height>587</height>
</rect>
</property>
<property name="windowTitle">
@ -379,6 +379,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -91,7 +91,7 @@ void DialogCutArc::setArcId(const quint32 &value, const quint32 &id)
//---------------------------------------------------------------------------------------------------------------------
void DialogCutArc::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -64,7 +64,7 @@ public:
* @brief getFormula return string with formula length
* @return formula
*/
QString getFormula() const {return formula;}
QString getFormula() const {return qApp->FormulaFromUser(formula);}
/**
* @brief setFormula set string with formula length
* @param value string with formula

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>507</width>
<height>375</height>
<height>493</height>
</rect>
</property>
<property name="windowTitle">
@ -306,6 +306,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -70,7 +70,7 @@ void DialogCutSpline::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
void DialogCutSpline::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -119,7 +119,7 @@ inline QString DialogCutSpline::getPointName() const
inline QString DialogCutSpline::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline quint32 DialogCutSpline::getSplineId() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>520</width>
<height>461</height>
<height>546</height>
</rect>
</property>
<property name="windowTitle">
@ -306,6 +306,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -71,7 +71,7 @@ void DialogCutSplinePath::setPointName(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
void DialogCutSplinePath::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -119,7 +119,7 @@ inline QString DialogCutSplinePath::getPointName() const
inline QString DialogCutSplinePath::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline quint32 DialogCutSplinePath::getSplinePathId() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>605</width>
<height>397</height>
<height>499</height>
</rect>
</property>
<property name="windowTitle">
@ -306,6 +306,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -89,7 +89,7 @@ void DialogEndLine::setTypeLine(const QString &value)
//---------------------------------------------------------------------------------------------------------------------
void DialogEndLine::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -152,7 +152,7 @@ inline QString DialogEndLine::getTypeLine() const
inline QString DialogEndLine::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline qreal DialogEndLine::getAngle() const

View File

@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>539</width>
<height>559</height>
<width>584</width>
<height>718</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Point in the end of a line</string>
</property>
@ -465,6 +471,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonSizeGrowth">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Size and height</string>
</property>
@ -475,6 +487,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonStandardTable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Standard table</string>
</property>
@ -482,6 +500,12 @@
</item>
<item>
<widget class="QRadioButton" name="radioButtonIncrements">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Increments</string>
</property>
@ -492,6 +516,12 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Length of lines</string>
</property>
@ -502,6 +532,12 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Length of arcs</string>
</property>
@ -512,6 +548,12 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Length of curves</string>
</property>
@ -532,8 +574,17 @@
</item>
<item>
<widget class="QLabel" name="labelDescription">
<property name="text">
<string/>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>

View File

@ -128,7 +128,7 @@ void DialogNormal::setAngle(const qreal &value)
//---------------------------------------------------------------------------------------------------------------------
void DialogNormal::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -171,7 +171,7 @@ inline QString DialogNormal::getTypeLine() const
inline QString DialogNormal::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline qreal DialogNormal::getAngle() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>488</width>
<height>594</height>
<height>732</height>
</rect>
</property>
<property name="windowTitle">
@ -554,6 +554,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>476</width>
<height>450</height>
<height>653</height>
</rect>
</property>
<property name="windowTitle">
@ -394,6 +394,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -145,7 +145,7 @@ void DialogShoulderPoint::setP1Line(const quint32 &value, const quint32 &id)
//---------------------------------------------------------------------------------------------------------------------
void DialogShoulderPoint::setFormula(const QString &value)
{
formula = value;
formula = qApp->FormulaToUser(value);
ui->lineEditFormula->setText(formula);
}

View File

@ -172,7 +172,7 @@ inline QString DialogShoulderPoint::getTypeLine() const
inline QString DialogShoulderPoint::getFormula() const
{
return formula;
return qApp->FormulaFromUser(formula);
}
inline quint32 DialogShoulderPoint::getP1Line() const

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>473</width>
<height>485</height>
<height>686</height>
</rect>
</property>
<property name="windowTitle">
@ -415,6 +415,9 @@
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -32,6 +32,7 @@
#include "../../tools/vabstracttool.h"
#include <QtWidgets>
#include "../../../libs/qmuparser/qmuparsererror.h"
//---------------------------------------------------------------------------------------------------------------------
DialogTool::DialogTool(const VContainer *data, QWidget *parent)
@ -329,20 +330,28 @@ void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label)
}
else
{
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(edit->text(), &errorMsg);
if (errorMsg.isEmpty() == false)
try
{
const QString formula = qApp->FormulaFromUser(edit->text());
Calculator cal(data);
const qreal result = cal.EvalFormula(formula);
label->setText(QString().setNum(result));
flag = true;
palette.setColor(labelEditFormula->foregroundRole(), QColor(76, 76, 76));
emit ToolTip("");
}
catch(qmu::QmuParserError &e)
{
label->setText(tr("Error"));
flag = false;
palette.setColor(labelEditFormula->foregroundRole(), Qt::red);
}
else
{
label->setText(QString().setNum(result));
flag = true;
palette.setColor(labelEditFormula->foregroundRole(), QColor(76, 76, 76));
emit ToolTip("Parser error: "+e.GetMsg());
qDebug() << "\nMath parser error:\n"
<< "--------------------------------------\n"
<< "Message: " << e.GetMsg() << "\n"
<< "Expression: " << e.GetExpr() << "\n"
<< "--------------------------------------";
}
}
CheckState();
@ -662,8 +671,9 @@ void DialogTool::ValChenged(int row)
}
if (radioButtonStandardTable->isChecked())
{
VMeasurement stable = data->GetMeasurement(item->text());
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueStandardTableRow(item->text()))
QString name = qApp->VarFromUser(item->text());
VMeasurement stable = data->GetMeasurement(name);
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueStandardTableRow(name))
.arg(stable.GetDescription());
labelDescription->setText(desc);
return;
@ -678,22 +688,22 @@ void DialogTool::ValChenged(int row)
}
if (radioButtonLengthLine->isChecked())
{
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLine(item->text()))
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLine(qApp->VarFromUser(item->text())))
.arg(tr("Line length"));
labelDescription->setText(desc);
return;
}
if (radioButtonLengthArc->isChecked())
{
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLengthArc(item->text()))
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLengthArc(qApp->VarFromUser(item->text())))
.arg(tr("Arc length"));
labelDescription->setText(desc);
return;
}
if (radioButtonLengthCurve->isChecked())
{
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLengthSpline(item->text()))
.arg(tr("Curve length"));
QString desc = QString("%1(%2) - %3").arg(item->text())
.arg(data->GetLengthSpline(qApp->VarFromUser(item->text()))).arg(tr("Curve length"));
labelDescription->setText(desc);
return;
}
@ -748,7 +758,7 @@ void DialogTool::ShowVariable(const QHash<key, val> *var)
while (i.hasNext())
{
i.next();
map.insert(i.key(), i.value());
map.insert(qApp->VarToUser(i.key()), i.value());
}
QMapIterator<key, val> iMap(map);

View File

@ -437,7 +437,8 @@ protected:
}
else
{
radioButtonSizeGrowth->setVisible(false);
radioButtonSizeGrowth->setEnabled(false);
radioButtonStandardTable->setChecked(true);
Measurements();
}
connect(radioButtonStandardTable, &QRadioButton::clicked, this, &DialogTool::Measurements);

View File

@ -45,7 +45,7 @@ VArc::VArc (VPointF center, qreal radius, QString formulaRadius, qreal f1, QStri
: VGObject(GObject::Arc, idObject, mode), f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2),
radius(radius), formulaRadius(formulaRadius), center(center)
{
_name = QString ("Arc_%1").arg(this->GetCenter().name());
_name = QString (arc_+"%1").arg(this->GetCenter().name());
}
//---------------------------------------------------------------------------------------------------------------------
@ -188,5 +188,5 @@ QPointF VArc::CutArc(const qreal &length, VArc &arc1, VArc &arc2) const
void VArc::setId(const quint32 &id)
{
_id = id;
_name = QString ("Arc_%1_%2").arg(center.name()).arg(id);
_name = QString (arc_+"%1_%2").arg(center.name()).arg(id);
}

View File

@ -565,7 +565,7 @@ qreal VSpline::CalcSqDistance (qreal x1, qreal y1, qreal x2, qreal y2)
//---------------------------------------------------------------------------------------------------------------------
void VSpline::CreateName()
{
_name = QString("Spl_%1_%2").arg(this->GetP1().name(), this->GetP4().name());
_name = QString(spl_+"%1_%2").arg(this->GetP1().name(), this->GetP4().name());
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -44,7 +44,7 @@ VSplinePath::VSplinePath(const VSplinePath &splPath)
void VSplinePath::append(const VSplinePoint &point)
{
path.append(point);
_name = QString("SplPath");
_name = splPath;
_name.append(QString("_%1").arg(path.first().P().name()));
if (path.size() > 1)
{

203
src/app/options.cpp Normal file
View File

@ -0,0 +1,203 @@
/************************************************************************
**
** @file options.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 12 5, 2014
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2014 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#include "options.h"
// Keep synchronize all names with initialization in VApllication class.
//measurements
const QString headGirth_M = QStringLiteral("head_girth");
const QString midNeckGirth_M = QStringLiteral("mid_neck_girth");
const QString neckBaseGirth_M = QStringLiteral("neck_base_girth");
const QString headAndNeckLength_M = QStringLiteral("head_and_neck_length");
const QString centerFrontWaistLength_M = QStringLiteral("center_front_waist_length");
const QString centerBackWaistLength_M = QStringLiteral("center_back_waist_length");
const QString shoulderLength_M = QStringLiteral("shoulder_length");
const QString sideWaistLength_M = QStringLiteral("side_waist_length");
const QString trunkLength_M = QStringLiteral("trunk_length");
const QString shoulderGirth_M = QStringLiteral("shoulder_girth");
const QString upperChestGirth_M = QStringLiteral("upper_chest_girth");
const QString bustGirth_M = QStringLiteral("bust_girth");
const QString underBustGirth_M = QStringLiteral("under_bust_girth");
const QString waistGirth_M = QStringLiteral("waist_girth");
const QString highHipGirth_M = QStringLiteral("high_hip_girth");
const QString hipGirth_M = QStringLiteral("hip_girth");
const QString upperFrontChestWidth_M = QStringLiteral("upper_front_chest_width");
const QString frontChestWidth_M = QStringLiteral("front_chest_width");
const QString acrossFrontShoulderWidth_M = QStringLiteral("across_front_shoulder_width");
const QString acrossBackShoulderWidth_M = QStringLiteral("across_back_shoulder_width");
const QString upperBackWidth_M = QStringLiteral("upper_back_width");
const QString backWidth_M = QStringLiteral("back_width");
const QString bustpointToBustpoint_M = QStringLiteral("bustpoint_to_bustpoint");
const QString halterBustpointToBustpoint_M = QStringLiteral("halter_bustpoint_to_bustpoint");
const QString neckToBustpoint_M = QStringLiteral("neck_to_bustpoint");
const QString crotchLength_M = QStringLiteral("crotch_length");
const QString riseHeight_M = QStringLiteral("rise_height");
const QString shoulderDrop_M = QStringLiteral("shoulder_drop");
const QString shoulderSlopeDegrees_M = QStringLiteral("shoulder_slope_degrees");
const QString frontShoulderSlopeLength_M = QStringLiteral("front_shoulder_slope_length");
const QString backShoulderSlopeLength_M = QStringLiteral("back_shoulder_slope_length");
const QString frontShoulderToWaistLength_M = QStringLiteral("front_shoulder_to_waist_length");
const QString backShoulderToWaistLength_M = QStringLiteral("back_shoulder_to_waist_length");
const QString frontNeckArc_M = QStringLiteral("front_neck_arc");
const QString backNeckArc_M = QStringLiteral("back_neck_arc");
const QString frontUpperChestArc_M = QStringLiteral("front_upper_chest_arc");
const QString backUpperChestArc_M = QStringLiteral("back_upper_chest_arc");
const QString frontWaistArc_M = QStringLiteral("front_waist_arc");
const QString backWaistArc_M = QStringLiteral("back_waist_arc");
const QString frontUpperHipArc_M = QStringLiteral("front_upper_hip_arc");
const QString backUpperHipArc_M = QStringLiteral("back_upper_hip_arc");
const QString frontHipArc_M = QStringLiteral("front_hip_arc");
const QString backHipArc_M = QStringLiteral("back_hip_arc");
const QString chestSlope_M = QStringLiteral("chest_slope");
const QString backSlope_M = QStringLiteral("back_slope");
const QString frontWaistSlope_M = QStringLiteral("front_waist_slope");
const QString backWaistSlope_M = QStringLiteral("back_waist_slope");
const QString frontNeckToUpperChestHeight_M = QStringLiteral("front_neck_to_upper_chest_height");
const QString frontNeckToBustHeight_M = QStringLiteral("front_neck_to_bust_height");
const QString armscyeGirth_M = QStringLiteral("armscye_girth");
const QString elbowGirth_M = QStringLiteral("elbow_girth");
const QString upperArmGirth_M = QStringLiteral("upper_arm_girth");
const QString wristGirth_M = QStringLiteral("wrist_girth");
const QString scyeDepth_M = QStringLiteral("scye_depth");
const QString shoulderAndArmLength_M = QStringLiteral("shoulder_and_arm_length");
const QString underarmLength_M = QStringLiteral("underarm_length");
const QString cervicaleToWristLength_M = QStringLiteral("cervicale_to_wrist_length");
const QString shoulderToElbowLength_M = QStringLiteral("shoulder_to_elbow_length");
const QString armLength_M = QStringLiteral("arm_length");
const QString handWidth_M = QStringLiteral("hand_width");
const QString handLength_M = QStringLiteral("hand_length");
const QString handGirth_M = QStringLiteral("hand_girth");
const QString thighGirth_M = QStringLiteral("thigh_girth");
const QString midThighGirth_M = QStringLiteral("mid_thigh_girth");
const QString kneeGirth_M = QStringLiteral("knee_girth");
const QString calfGirth_M = QStringLiteral("calf_girth");
const QString ankleGirth_M = QStringLiteral("ankle_girth");
const QString kneeHeight_M = QStringLiteral("knee_height");
const QString ankleHeight_M = QStringLiteral("ankle_height");
const QString footWidth_M = QStringLiteral("foot_width");
const QString footLength_M = QStringLiteral("foot_length");
const QString height_M = QStringLiteral("height");
const QString cervicaleHeight_M = QStringLiteral("cervicale_height");
const QString cervicaleToKneeHeight_M = QStringLiteral("cervicale_to_knee_height");
const QString waistHeight_M = QStringLiteral("waist_height");
const QString highHipHeight_M = QStringLiteral("high_hip_height");
const QString hipHeight_M = QStringLiteral("hip_height");
const QString waistToHipHeight_M = QStringLiteral("waist_to_hip_height");
const QString waistToKneeHeight_M = QStringLiteral("waist_to_knee_height");
const QString crotchHeight_M = QStringLiteral("crotch_height");
//extended measurements
const QString size_M = QStringLiteral("size");
const QString heightFrontNeckBasePoint_M = QStringLiteral("height_front_neck_base_point");
const QString heightBaseNeckSidePoint_M = QStringLiteral("height_base_neck_side_point");
const QString heightShoulderPoint_M = QStringLiteral("height_shoulder_point");
const QString heightNipplePoint_M = QStringLiteral("height_nipple_point");
const QString heightBackAngleAxilla_M = QStringLiteral("height_back_angle_axilla");
const QString heightScapularPoint_M = QStringLiteral("height_scapular_point");
const QString heightUnderButtockFolds_M = QStringLiteral("height_under_buttock_folds");
const QString hipsExcludingProtrudingAbdomen_M = QStringLiteral("hips_excluding_protruding_abdomen");
const QString girthFootInstep_M = QStringLiteral("girth_foot_instep");
const QString sideWaistToFloor_M = QStringLiteral("side_waist_to_floor");
const QString frontWaistToFloor_M = QStringLiteral("front_waist_to_floor");
const QString arcThroughGroinArea_M = QStringLiteral("arc_through_groin_area");
const QString waistToPlaneSeat_M = QStringLiteral("waist_to_plane_seat");
const QString neckToRadialPoint_M = QStringLiteral("neck_to_radial_point");
const QString neckToThirdFinger_M = QStringLiteral("neck_to_third_finger");
const QString neckToFirstLineChestCircumference_M = QStringLiteral("neck_to_first_line_chest_circumference");
const QString frontWaistLength_M = QStringLiteral("front_waist_length");
const QString arcThroughShoulderJoint_M = QStringLiteral("arc_through_shoulder_joint");
const QString neckToBackLineChestCircumference_M = QStringLiteral("neck_to_back_line_chest_circumference");
const QString waistToNeckSide_M = QStringLiteral("waist_to_neck_side");
const QString arcLengthUpperBody_M = QStringLiteral("arc_length_upper_body");
const QString chestWidth_M = QStringLiteral("chest_width");
const QString anteroposteriorDiameterHands_M = QStringLiteral("anteroposterior_diameter_hands");
const QString heightClavicularPoint_M = QStringLiteral("height_clavicular_point");
const QString heightArmholeSlash_M = QStringLiteral("height_armhole_slash");
const QString slashShoulderHeight_M = QStringLiteral("slash_shoulder_height");
const QString halfGirthNeck_M = QStringLiteral("half_girth_neck");
const QString halfGirthNeckForShirts_M = QStringLiteral("half_girth_neck_for_shirts");
const QString halfGirthChestFirst_M = QStringLiteral("half_girth_chest_first");
const QString halfGirthChestSecond_M = QStringLiteral("half_girth_chest_second");
const QString halfGirthChestThird_M = QStringLiteral("half_girth_chest_third");
const QString halfGirthWaist_M = QStringLiteral("half_girth_waist");
const QString halfGirthHipsConsideringProtrudingAbdomen_M
= QStringLiteral("half_girth_hips_considering_protruding_abdomen");
const QString halfGirthHipsExcludingProtrudingAbdomen_M
= QStringLiteral("half_girth_hips_excluding_protruding_abdomen");
const QString girthKneeFlexedFeet_M = QStringLiteral("girth_knee_flexed_feet");
const QString neckTransverseDiameter_M = QStringLiteral("neck_transverse_diameter");
const QString frontSlashShoulderHeight_M = QStringLiteral("front_slash_shoulder_height");
const QString neckToFrontWaistLine_M = QStringLiteral("neck_to_front_waist_line");
const QString handVerticalDiameter_M = QStringLiteral("hand_vertical_diameter");
const QString neckToKneePoint_M = QStringLiteral("neck_to_knee_point");
const QString waistToKnee_M = QStringLiteral("waist_to_knee");
const QString shoulderHeight_M = QStringLiteral("shoulder_height");
const QString headHeight_M = QStringLiteral("head_height");
const QString bodyPosition_M = QStringLiteral("body_position");
const QString arcBehindShoulderGirdle_M = QStringLiteral("arc_behind_shoulder_girdle");
const QString neckToNeckBase_M = QStringLiteral("neck_to_neck_base");
const QString depthWaistFirst_M = QStringLiteral("depth_waist_first");
const QString depthWaistSecond_M = QStringLiteral("depth_waist_second");
//variables
const QString line_ = QStringLiteral("Line_");
const QString angleLine_ = QStringLiteral("AngleLine_");
const QString arc_ = QStringLiteral("Arc_");
const QString spl_ = QStringLiteral("Spl_");
const QString splPath = QStringLiteral("splPath");
//functions
const QString sin_F = QStringLiteral("sin");
const QString cos_F = QStringLiteral("cos");
const QString tan_F = QStringLiteral("tan");
const QString asin_F = QStringLiteral("asin");
const QString acos_F = QStringLiteral("acos");
const QString atan_F = QStringLiteral("atan");
const QString sinh_F = QStringLiteral("sinh");
const QString cosh_F = QStringLiteral("cosh");
const QString tanh_F = QStringLiteral("tanh");
const QString asinh_F = QStringLiteral("asinh");
const QString acosh_F = QStringLiteral("acosh");
const QString atanh_F = QStringLiteral("atanh");
const QString log2_F = QStringLiteral("log2");
const QString log10_F = QStringLiteral("log10");
const QString log_F = QStringLiteral("log");
const QString ln_F = QStringLiteral("ln");
const QString exp_F = QStringLiteral("exp");
const QString sqrt_F = QStringLiteral("sqrt");
const QString sign_F = QStringLiteral("sign");
const QString rint_F = QStringLiteral("rint");
const QString abs_F = QStringLiteral("abs");
const QString min_F = QStringLiteral("min");
const QString max_F = QStringLiteral("max");
const QString sum_F = QStringLiteral("sum");
const QString avg_F = QStringLiteral("avg");
// Postfix operators
const QString cm_Oprt = QStringLiteral("cm");
const QString mm_Oprt = QStringLiteral("mm");
const QString in_Oprt = QStringLiteral("in");

View File

@ -22,7 +22,7 @@
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
** along with Valentina. If not, see <http://www.gnu.org/licenses.
**
*************************************************************************/
@ -32,11 +32,10 @@
#include <QFlags>
#include <QString>
#include <QMetaType>
#include <QtGlobal>
#define SceneSize 50000
extern const QString translationsPath;
namespace Valentina
{
/**
@ -113,4 +112,175 @@ namespace Pattern
}
Q_DECLARE_OPERATORS_FOR_FLAGS( Pattern::Measurements )
// measurements
extern const QString headGirth_M;
extern const QString midNeckGirth_M;
extern const QString neckBaseGirth_M;
extern const QString headAndNeckLength_M;
extern const QString centerFrontWaistLength_M;
extern const QString centerBackWaistLength_M;
extern const QString shoulderLength_M;
extern const QString sideWaistLength_M;
extern const QString trunkLength_M;
extern const QString shoulderGirth_M;
extern const QString upperChestGirth_M;
extern const QString bustGirth_M;
extern const QString underBustGirth_M;
extern const QString waistGirth_M;
extern const QString highHipGirth_M;
extern const QString hipGirth_M;
extern const QString upperFrontChestWidth_M;
extern const QString frontChestWidth_M;
extern const QString acrossFrontShoulderWidth_M;
extern const QString acrossBackShoulderWidth_M;
extern const QString upperBackWidth_M;
extern const QString backWidth_M;
extern const QString bustpointToBustpoint_M;
extern const QString halterBustpointToBustpoint_M;
extern const QString neckToBustpoint_M;
extern const QString crotchLength_M;
extern const QString riseHeight_M;
extern const QString shoulderDrop_M;
extern const QString shoulderSlopeDegrees_M;
extern const QString frontShoulderSlopeLength_M;
extern const QString backShoulderSlopeLength_M;
extern const QString frontShoulderToWaistLength_M;
extern const QString backShoulderToWaistLength_M;
extern const QString frontNeckArc_M;
extern const QString backNeckArc_M;
extern const QString frontUpperChestArc_M;
extern const QString backUpperChestArc_M;
extern const QString frontWaistArc_M;
extern const QString backWaistArc_M;
extern const QString frontUpperHipArc_M;
extern const QString backUpperHipArc_M;
extern const QString frontHipArc_M;
extern const QString backHipArc_M;
extern const QString chestSlope_M;
extern const QString backSlope_M;
extern const QString frontWaistSlope_M;
extern const QString backWaistSlope_M;
extern const QString frontNeckToUpperChestHeight_M;
extern const QString frontNeckToBustHeight_M;
extern const QString armscyeGirth_M;
extern const QString elbowGirth_M;
extern const QString upperArmGirth_M;
extern const QString wristGirth_M;
extern const QString scyeDepth_M;
extern const QString shoulderAndArmLength_M;
extern const QString underarmLength_M;
extern const QString cervicaleToWristLength_M;
extern const QString shoulderToElbowLength_M;
extern const QString armLength_M;
extern const QString handWidth_M;
extern const QString handLength_M;
extern const QString handGirth_M;
extern const QString thighGirth_M;
extern const QString midThighGirth_M;
extern const QString kneeGirth_M;
extern const QString calfGirth_M;
extern const QString ankleGirth_M;
extern const QString kneeHeight_M;
extern const QString ankleHeight_M;
extern const QString footWidth_M;
extern const QString footLength_M;
extern const QString height_M;
extern const QString cervicaleHeight_M;
extern const QString cervicaleToKneeHeight_M;
extern const QString waistHeight_M;
extern const QString highHipHeight_M;
extern const QString hipHeight_M;
extern const QString waistToHipHeight_M;
extern const QString waistToKneeHeight_M;
extern const QString crotchHeight_M;
//extended measurements
extern const QString size_M;
extern const QString heightFrontNeckBasePoint_M;
extern const QString heightBaseNeckSidePoint_M;
extern const QString heightShoulderPoint_M;
extern const QString heightNipplePoint_M;
extern const QString heightBackAngleAxilla_M;
extern const QString heightScapularPoint_M;
extern const QString heightUnderButtockFolds_M;
extern const QString hipsExcludingProtrudingAbdomen_M;
extern const QString girthFootInstep_M;
extern const QString sideWaistToFloor_M;
extern const QString frontWaistToFloor_M;
extern const QString arcThroughGroinArea_M;
extern const QString waistToPlaneSeat_M;
extern const QString neckToRadialPoint_M;
extern const QString neckToThirdFinger_M;
extern const QString neckToFirstLineChestCircumference_M;
extern const QString frontWaistLength_M;
extern const QString arcThroughShoulderJoint_M;
extern const QString neckToBackLineChestCircumference_M;
extern const QString waistToNeckSide_M;
extern const QString arcLengthUpperBody_M;
extern const QString chestWidth_M;
extern const QString anteroposteriorDiameterHands_M;
extern const QString heightClavicularPoint_M;
extern const QString heightArmholeSlash_M;
extern const QString slashShoulderHeight_M;
extern const QString halfGirthNeck_M;
extern const QString halfGirthNeckForShirts_M;
extern const QString halfGirthChestFirst_M;
extern const QString halfGirthChestSecond_M;
extern const QString halfGirthChestThird_M;
extern const QString halfGirthWaist_M;
extern const QString halfGirthHipsConsideringProtrudingAbdomen_M;
extern const QString halfGirthHipsExcludingProtrudingAbdomen_M;
extern const QString girthKneeFlexedFeet_M;
extern const QString neckTransverseDiameter_M;
extern const QString frontSlashShoulderHeight_M;
extern const QString neckToFrontWaistLine_M;
extern const QString handVerticalDiameter_M;
extern const QString neckToKneePoint_M;
extern const QString waistToKnee_M;
extern const QString shoulderHeight_M;
extern const QString headHeight_M;
extern const QString bodyPosition_M;
extern const QString arcBehindShoulderGirdle_M;
extern const QString neckToNeckBase_M;
extern const QString depthWaistFirst_M;
extern const QString depthWaistSecond_M;
// variables name
extern const QString line_;
extern const QString angleLine_;
extern const QString arc_;
extern const QString spl_;
extern const QString splPath;
// functions
extern const QString sin_F;
extern const QString cos_F;
extern const QString tan_F;
extern const QString asin_F;
extern const QString acos_F;
extern const QString atan_F;
extern const QString sinh_F;
extern const QString cosh_F;
extern const QString tanh_F;
extern const QString asinh_F;
extern const QString acosh_F;
extern const QString atanh_F;
extern const QString log2_F;
extern const QString log10_F;
extern const QString log_F;
extern const QString ln_F;
extern const QString exp_F;
extern const QString sqrt_F;
extern const QString sign_F;
extern const QString rint_F;
extern const QString abs_F;
extern const QString min_F;
extern const QString max_F;
extern const QString sum_F;
extern const QString avg_F;
// Postfix operators
extern const QString cm_Oprt;
extern const QString mm_Oprt;
extern const QString in_Oprt;
#endif // OPTIONS_H

View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>tables/individual/individual.vit</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
<xs:element name="pattern">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="author" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
@ -229,4 +230,9 @@
<xs:enumeration value="individual"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="formatVersion">
<xs:restriction base="xs:string">
<xs:pattern value="^(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))$"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@ -3,6 +3,7 @@
<xs:element name="vst">
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="description" type="xs:string"></xs:element>
<xs:element name="unit" type="units"></xs:element>
<xs:element name="size">
@ -17,30 +18,967 @@
<xs:attribute name="name" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="measurements">
<xs:element name="body-measurements">
<xs:complexType>
<xs:sequence>
<xs:element name="measurement" maxOccurs="unbounded">
<xs:element name="unit" type="units"></xs:element>
<xs:element name="head_and_neck">
<xs:complexType>
<xs:attribute name="name" type="shortMeasurementName" use="required"></xs:attribute>
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="number" type="xs:string" use="required"></xs:attribute>
<xs:sequence>
<xs:element name="head_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="mid_neck_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_base_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="head_and_neck_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="torso">
<xs:complexType>
<xs:sequence>
<xs:element name="center_front_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="center_back_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="side_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="trunk_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="upper_chest_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="bust_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="under_bust_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="high_hip_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hip_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="upper_front_chest_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_chest_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="across_front_shoulder_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="across_back_shoulder_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="upper_back_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="bustpoint_to_bustpoint">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="halter_bustpoint_to_bustpoint">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_bustpoint">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="crotch_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="rise_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_drop">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_slope_degrees">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_shoulder_slope_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_shoulder_slope_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_shoulder_to_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_shoulder_to_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_neck_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_neck_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_upper_chest_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_upper_chest_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_waist_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_waist_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_upper_hip_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_upper_hip_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_hip_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_hip_arc">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="chest_slope">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_slope">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_waist_slope">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="back_waist_slope">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_neck_to_upper_chest_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_neck_to_bust_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="arm">
<xs:complexType>
<xs:sequence>
<xs:element name="armscye_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="elbow_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="upper_arm_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="wrist_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="scye_depth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_and_arm_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="underarm_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="cervicale_to_wrist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_to_elbow_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arm_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="hand">
<xs:complexType>
<xs:sequence>
<xs:element name="hand_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hand_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hand_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="leg">
<xs:complexType>
<xs:sequence>
<xs:element name="thigh_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="mid_thigh_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="knee_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="calf_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="ankle_girth">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="knee_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="ankle_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="foot">
<xs:complexType>
<xs:sequence>
<xs:element name="foot_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="foot_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="heights">
<xs:complexType>
<xs:sequence>
<xs:element name="height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="cervicale_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="cervicale_to_knee_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="high_hip_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hip_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_to_hip_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_to_knee_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="crotch_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="extended">
<xs:complexType>
<xs:sequence>
<xs:element name="size">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_front_neck_base_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_base_neck_side_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_shoulder_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_nipple_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_back_angle_axilla">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_scapular_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_under_buttock_folds">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hips_excluding_protruding_abdomen">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="girth_foot_instep">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="side_waist_to_floor">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_waist_to_floor">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc_through_groin_area">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_to_plane_seat">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_radial_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_third_finger">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_first_line_chest_circumference">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_waist_length">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc_through_shoulder_joint">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_back_line_chest_circumference">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_to_neck_side">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc_length_upper_body">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="chest_width">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="anteroposterior_diameter_hands">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_clavicular_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="height_armhole_slash">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="slash_shoulder_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_neck">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_neck_for_shirts">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_chest_first">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_chest_second">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_chest_third">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_waist">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_hips_considering_protruding_abdomen">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="half_girth_hips_excluding_protruding_abdomen">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="girth_knee_flexed_feet">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_transverse_diameter">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="front_slash_shoulder_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_front_waist_line">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="hand_vertical_diameter">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_knee_point">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="waist_to_knee">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="shoulder_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="head_height">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="body_position">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc_behind_shoulder_girdle">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="neck_to_neck_base">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="depth_waist_first">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="depth_waist_second">
<xs:complexType>
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="shortMeasurementName">
<xs:restriction base="xs:string">
<xs:pattern value="^([^0-9-*/^+=\s\(\)%:;!]){1,1}([^-*/^+=\s\(\)%:;!]){0,}$"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="units">
<xs:restriction base="xs:string">
<xs:enumeration value="mm"/>
@ -48,4 +986,9 @@
<xs:enumeration value="inch"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="formatVersion">
<xs:restriction base="xs:string">
<xs:pattern value="^(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))$"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@ -0,0 +1,159 @@
<?xml version='1.0' encoding='UTF-8'?>
<vit>
<version>0.1.0</version>
<personal>
<family-name/>
<given-name/>
<birth-date>1900-01-01</birth-date>
<sex>male</sex>
<email>username@example.com</email>
</personal>
<body-measurements>
<unit>cm</unit>
<head_and_neck>
<head_girth value="0.0"/>
<mid_neck_girth value="0.0"/>
<neck_base_girth value="0.0"/>
<head_and_neck_length value="0.0"/>
</head_and_neck>
<torso>
<center_front_waist_length value="0.0"/>
<center_back_waist_length value="0.0"/>
<shoulder_length value="0.0"/>
<side_waist_length value="0.0"/>
<trunk_length value="0.0"/>
<shoulder_girth value="0.0"/>
<upper_chest_girth value="0.0"/>
<bust_girth value="0.0"/>
<under_bust_girth value="0.0"/>
<waist_girth value="0.0"/>
<high_hip_girth value="0.0"/>
<hip_girth value="0.0"/>
<upper_front_chest_width value="0.0"/>
<front_chest_width value="0.0"/>
<across_front_shoulder_width value="0.0"/>
<across_back_shoulder_width value="0.0"/>
<upper_back_width value="0.0"/>
<back_width value="0.0"/>
<bustpoint_to_bustpoint value="0.0"/>
<halter_bustpoint_to_bustpoint value="0.0"/>
<neck_to_bustpoint value="0.0"/>
<crotch_length value="0.0"/>
<rise_height value="0.0"/>
<shoulder_drop value="0.0"/>
<shoulder_slope_degrees value="0.0"/>
<front_shoulder_slope_length value="0.0"/>
<back_shoulder_slope_length value="0.0"/>
<front_shoulder_to_waist_length value="0.0"/>
<back_shoulder_to_waist_length value="0.0"/>
<front_neck_arc value="0.0"/>
<back_neck_arc value="0.0"/>
<front_upper_chest_arc value="0.0"/>
<back_upper_chest_arc value="0.0"/>
<front_waist_arc value="0.0"/>
<back_waist_arc value="0.0"/>
<front_upper_hip_arc value="0.0"/>
<back_upper_hip_arc value="0.0"/>
<front_hip_arc value="0.0"/>
<back_hip_arc value="0.0"/>
<chest_slope value="0.0"/>
<back_slope value="0.0"/>
<front_waist_slope value="0.0"/>
<back_waist_slope value="0.0"/>
<front_neck_to_upper_chest_height value="0.0"/>
<front_neck_to_bust_height value="0.0"/>
</torso>
<arm>
<armscye_girth value="0.0"/>
<elbow_girth value="0.0"/>
<upper_arm_girth value="0.0"/>
<wrist_girth value="0.0"/>
<scye_depth value="0.0"/>
<shoulder_and_arm_length value="0.0"/>
<underarm_length value="0.0"/>
<cervicale_to_wrist_length value="0.0"/>
<shoulder_to_elbow_length value="0.0"/>
<arm_length value="0.0"/>
</arm>
<hand>
<hand_width value="0.0"/>
<hand_length value="0.0"/>
<hand_girth value="0.0"/>
</hand>
<leg>
<thigh_girth value="0.0"/>
<mid_thigh_girth value="0.0"/>
<knee_girth value="0.0"/>
<calf_girth value="0.0"/>
<ankle_girth value="0.0"/>
<knee_height value="0.0"/>
<ankle_height value="0.0"/>
</leg>
<foot>
<foot_width value="0.0"/>
<foot_length value="0.0"/>
</foot>
<heights>
<height value="0.0"/>
<cervicale_height value="0.0"/>
<cervicale_to_knee_height value="0.0"/>
<waist_height value="0.0"/>
<high_hip_height value="0.0"/>
<hip_height value="0.0"/>
<waist_to_hip_height value="0.0"/>
<waist_to_knee_height value="0.0"/>
<crotch_height value="0.0"/>
</heights>
<extended>
<size value="0.0"/>
<height_front_neck_base_point value="0.0"/>
<height_base_neck_side_point value="0.0"/>
<height_shoulder_point value="0.0"/>
<height_nipple_point value="0.0"/>
<height_back_angle_axilla value="0.0"/>
<height_scapular_point value="0.0"/>
<height_under_buttock_folds value="0.0"/>
<hips_excluding_protruding_abdomen value="0.0"/>
<girth_foot_instep value="0.0"/>
<side_waist_to_floor value="0.0"/>
<front_waist_to_floor value="0.0"/>
<arc_through_groin_area value="0.0"/>
<waist_to_plane_seat value="0.0"/>
<neck_to_radial_point value="0.0"/>
<neck_to_third_finger value="0.0"/>
<neck_to_first_line_chest_circumference value="0.0"/>
<front_waist_length value="0.0"/>
<arc_through_shoulder_joint value="0.0"/>
<neck_to_back_line_chest_circumference value="0.0"/>
<waist_to_neck_side value="0.0"/>
<arc_length_upper_body value="0.0"/>
<chest_width value="0.0"/>
<anteroposterior_diameter_hands value="0.0"/>
<height_clavicular_point value="0.0"/>
<height_armhole_slash value="0.0"/>
<slash_shoulder_height value="0.0"/>
<half_girth_neck value="0.0"/>
<half_girth_neck_for_shirts value="0.0"/>
<half_girth_chest_first value="0.0"/>
<half_girth_chest_second value="0.0"/>
<half_girth_chest_third value="0.0"/>
<half_girth_waist value="0.0"/>
<half_girth_hips_considering_protruding_abdomen value="0.0"/>
<half_girth_hips_excluding_protruding_abdomen value="0.0"/>
<girth_knee_flexed_feet value="0.0"/>
<neck_transverse_diameter value="0.0"/>
<front_slash_shoulder_height value="0.0"/>
<neck_to_front_waist_line value="0.0"/>
<hand_vertical_diameter value="0.0"/>
<neck_to_knee_point value="0.0"/>
<waist_to_knee value="0.0"/>
<shoulder_height value="0.0"/>
<head_height value="0.0"/>
<body_position value="0.0"/>
<arc_behind_shoulder_girdle value="0.0"/>
<neck_to_neck_base value="0.0"/>
<depth_waist_first value="0.0"/>
<depth_waist_second value="0.0"/>
</extended>
</body-measurements>
</vit>

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<vst>
<version>0.1.0</version>
<description>Типовые фигуры мужчин 1-й полнотной группы, обхват груди 100 см</description>
<unit>mm</unit>
<size base="500">
<height base="1760"/>
<body-measurements>
<head_and_neck>
<head_girth value="576" size_increace="4" height_increase ="4"/><!--Огол(Обхват головы)-->
<mid_neck_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<neck_base_girth value="404" size_increace="8" height_increase ="2"/><!--Ош(Обхват шеи)-->
<head_and_neck_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
</head_and_neck>
<torso>
<center_front_waist_length value="0.0" size_increace="" height_increase=""/><!--Нету перевода-->
<center_back_waist_length value="438" size_increace="2" height_increase ="10"/><!--Дтс(Длина спины до талии с учетом выступа лопаток)-->
<shoulder_length value="160" size_increace="1" height_increase ="4"/><!--Шп(Длина плечевого ската)-->
<side_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Дб(Длина боковой части)-->
<trunk_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<shoulder_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<upper_chest_girth value="1034" size_increace="36" height_increase ="4"/><!--ОгI(Обхват груди первый)-->
<bust_girth value="1044" size_increace="38" height_increase ="2"/><!--ОгII(Обхват груди второй)-->
<under_bust_girth value="1000" size_increace="40" height_increase ="0"/><!--ОгIII(Обхват груди третий)-->
<waist_girth value="780" size_increace="40" height_increase ="0"/><!--От(Обхват талии)-->
<high_hip_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<hip_girth value="984" size_increace="30" height_increase ="10"/><!--Об(Обхват бедер с учетом выступания живота)-->
<upper_front_chest_width value="0.0" size_increace="0" height_increase="0"/><!--Шг1(Ширина груди первая)-->
<front_chest_width value="0.0" size_increace="0" height_increase="0"/><!--Шг2(Ширина груди вторая)-->
<across_front_shoulder_width value="412" size_increace="5" height_increase ="8"/><!--dпл(Плечевой диаметр)-->
<across_back_shoulder_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<upper_back_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_width value="416" size_increace="10" height_increase ="2"/><!--Шс(Ширина спины)-->
<bustpoint_to_bustpoint value="224" size_increace="6" height_increase ="0"/><!--Цг(Расстояние между сосковыми точками)-->
<halter_bustpoint_to_bustpoint value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<neck_to_bustpoint value="262" size_increace="8" height_increase ="3"/><!--Вг(Расстояние от точки основания шеи сбоку до сосковой точки (высота груди))-->
<crotch_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<rise_height value="316" size_increace="4" height_increase ="7"/><!--Дпс(Расстояние от линии талии до подъягодичной складки)-->
<shoulder_drop value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<shoulder_slope_degrees value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_shoulder_slope_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_shoulder_slope_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_shoulder_to_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_shoulder_to_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<chest_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<back_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<front_neck_to_upper_chest_height value="0.0" size_increace="0" height_increase=""/><!--Нету перевода-->
<front_neck_to_bust_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
</torso>
<arm>
<armscye_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<elbow_girth value="0.0" size_increace="0" height_increase="0"/><!--Олк(Обхват локтя)-->
<upper_arm_girth value="316" size_increace="12" height_increase ="0"/><!--Оп(Обхват плеча)-->
<wrist_girth value="180" size_increace="4" height_increase ="0"/><!--Озап(Обхват запястья)-->
<scye_depth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<shoulder_and_arm_length value="768" size_increace="2" height_increase ="24"/><!--Дзап(Расстояние от точки основания шеи сбоку до линии обхвата запястья)-->
<underarm_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<cervicale_to_wrist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<shoulder_to_elbow_length value="338" size_increace="2" height_increase ="12"/><!--Дрлок(Длина руки до локтя)-->
<arm_length value="594" size_increace="3" height_increase ="19"/><!--Дрзап(Длина рукава до линии обхвата запястья)-->
</arm>
<hand>
<hand_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<hand_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<hand_girth value="263" size_increace="3" height_increase ="3"/><!--Окис(Обхват кисти)-->
</hand>
<leg>
<thigh_girth value="566" size_increace="18" height_increase ="6"/><!--Обед(Обхват бедра)-->
<mid_thigh_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<knee_girth value="386" size_increace="8" height_increase ="8"/><!--Ок(Обхват колена)-->
<calf_girth value="380" size_increace="8" height_increase ="6"/><!--Ои(Обхват икры)-->
<ankle_girth value="234" size_increace="4" height_increase ="4"/><!--Ощ(Обхват щиколотки)-->
<knee_height value="503" size_increace="0" height_increase ="22"/><!--Вк(Высота коленной точки)-->
<ankle_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
</leg>
<foot>
<foot_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<foot_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
</foot>
<heights>
<cervicale_height value="1522" size_increace="2" height_increase ="54"/><!--Вшт(Высота точки основания шеи сзади)-->
<cervicale_to_knee_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<waist_height value="1102" size_increace="0" height_increase ="43"/><!--Влт(Высота линии талии)-->
<high_hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<waist_to_hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<waist_to_knee_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
<crotch_height value="826" size_increace="-3" height_increase ="37"/><!--Дн(Длина ноги по внутренней поверхности)-->
</heights>
<extended>
<height_front_neck_base_point value="1450" size_increace="2" height_increase ="51"/><!--Втос(Высота точки основания шеи спереди)-->
<height_base_neck_side_point value="1506" size_increace="2" height_increase ="54"/><!--Втош(Высота точки основания шеи сбоку)-->
<height_shoulder_point value="1438" size_increace="3" height_increase ="52"/><!--Впт(Высота плечевой точки)-->
<height_nipple_point value="1257" size_increace="-1" height_increase ="49"/><!--Вст(Высота сосковой точки)-->
<height_back_angle_axilla value="1328" size_increace="0" height_increase ="49"/><!--Взу(Высота заднего угла подмышечной впадины)-->
<height_scapular_point value="1320" size_increace="0" height_increase ="49"/><!--Влоп(Высота лопаточной точки)-->
<height_under_buttock_folds value="811" size_increace="-1" height_increase ="36"/><!--Впс(Высота подъягодичной складки)-->
<hips_excluding_protruding_abdomen value="964" size_increace="24" height_increase ="12"/><!--ОбI(Обхват бедер без учета выступания живота)-->
<girth_foot_instep value="350" size_increace="2" height_increase ="8"/><!--Ос(Обхват подъема стопы)-->
<side_waist_to_floor value="1120" size_increace="0" height_increase ="44"/><!--Дсб(Расстояние от линии талии до пола сбоку)-->
<front_waist_to_floor value="1110" size_increace="0" height_increase ="43"/><!--Дсп(Расстояние от линии талии до пола спереди)-->
<arc_through_groin_area value="783" size_increace="14" height_increase ="15"/><!--Дпоб(Дуга через паховую область)-->
<waist_to_plane_seat value="260" size_increace="1" height_increase ="6"/><!--Дс(Расстояние от линии талии до плоскости сидения)-->
<neck_to_radial_point value="500" size_increace="2" height_increase ="15"/><!--Длуч(Расстояние от точки основания шеи сбоку до лучевой точки)-->
<neck_to_third_finger value="970" size_increace="2" height_increase ="29"/><!--ДIIIп(Расстояние от точки основания шеи сбоку до конца третьего пальца)-->
<neck_to_first_line_chest_circumference value="214" size_increace="3" height_increase ="3"/><!--Впрп(Расстояние от точки основания шеи сбоку до линии обхвата груди первого спереди)-->
<front_waist_length value="460" size_increace="7" height_increase ="9"/><!--Дтп(Расстояние от точки основания шеи сбоку до линии талии спереди (длани талии спереди))-->
<arc_through_shoulder_joint value="355" size_increace="5" height_increase ="5"/><!--Дп(Дуга через высшую точку плечевого сустава)-->
<neck_to_back_line_chest_circumference value="208" size_increace="3" height_increase ="5"/><!--Впрз(Расстояние от точки основания шеи сзади до линии обхватов груди первого и второго с учетом выступа лопаток)-->
<waist_to_neck_side value="469" size_increace="2" height_increase ="10"/><!--ДтсI(Расстояние от линии талии сзади до точки основания шеи сбоку)-->
<arc_length_upper_body value="929" size_increace="9" height_increase ="19"/><!--Двчт(Длина дуги верхней части туловища через точку основания шеи сбоку)-->
<chest_width value="370" size_increace="14" height_increase ="4"/><!--Шг(Ширина груди)-->
<anteroposterior_diameter_hands value="121" size_increace="6" height_increase ="0"/><!--dпзр(Передне-задний диаметр руки)-->
<height_clavicular_point value="1454" size_increace="2" height_increase ="52"/><!--Вкт(Высота ключичной точки)-->
<height_armhole_slash value="324" size_increace="7" height_increase ="2"/><!--Впрк(Расстояние от шейной точки до уровня заднего угла подмышечной впадины спереди (высота проймы косая))-->
<slash_shoulder_height value="495" size_increace="5" height_increase ="7"/><!--Впк(Высота плеча косая)-->
<half_girth_neck value="202" size_increace="4" height_increase ="2"/><!--Сш(Полуобхват шеи)-->
<half_girth_neck_for_shirts value="205" size_increace="5" height_increase ="0"/><!--Сш1(Полуобхват шеи для сорочек)-->
<half_girth_chest_first value="517" size_increace="18" height_increase ="2"/><!--СгI(Полуобхват груди первый)-->
<half_girth_chest_second value="522" size_increace="19" height_increase ="1"/><!--СгII(Полуобхват груди второй)-->
<half_girth_chest_third value="500" size_increace="20" height_increase ="0"/><!--СгIII(Полуобхват груди третий)-->
<half_girth_waist value="390" size_increace="20" height_increase ="0"/><!--Ст(Полуобхват талии)-->
<half_girth_hips_considering_protruding_abdomen value="492" size_increace="15" height_increase ="5"/><!--Сб(Полуобхват бедер с учетом выступания живота)-->
<half_girth_hips_excluding_protruding_abdomen value="482" size_increace="12" height_increase ="6"/><!--СбI(Полуобхват бедер без учета выступания живота)-->
<girth_knee_flexed_feet value="399" size_increace="9" height_increase ="8"/><!--Окс(Обхват колена в согнутом положении ноги)-->
<neck_transverse_diameter value="130" size_increace="2" height_increase ="2"/><!--dш(Поперечный диаметр шеи)-->
<front_slash_shoulder_height value="453" size_increace="7" height_increase ="8"/><!--Впкп(Высота плеча косая спереди)-->
<neck_to_front_waist_line value="449" size_increace="6" height_increase ="8"/><!--Дтн1(Расстояние от точки основания шеи до линии талии спереди)-->
<hand_vertical_diameter value="128" size_increace="2" height_increase ="2"/><!--dвр(Вертикальный диаметр руки)-->
<neck_to_knee_point value="1019" size_increace="0" height_increase ="34"/><!--Дшк(Расстояние от шейной точки до колена)-->
<waist_to_knee value="603" size_increace="-2" height_increase ="24"/><!--Дтк(Расстояние от линии талии до колена)-->
<shoulder_height value="67" size_increace="0" height_increase ="2"/><!--Вп(Высота плеча)-->
<head_height value="246" size_increace="-2" height_increase ="6"/><!--Вгол(Высота головы)-->
<body_position value="84" size_increace="0" height_increase ="3"/><!--Пкор(Положение корпуса)-->
<arc_behind_shoulder_girdle value="535" size_increace="7" height_increase ="7"/><!--Дпз(Дуга плечевого пояса сзади)-->
<neck_to_neck_base value="109" size_increace="1" height_increase ="0"/><!--Дшош(Расстояние от шейной точки до точки основания шеи сбоку по линии измерения обхвата шеи)-->
<depth_waist_first value="64" size_increace="-1" height_increase ="0"/><!--Гт1(Глубина талии первая)-->
<depth_waist_second value="37" size_increace="0" height_increase ="0"/><!--ГтII(Глубина талии вторая)-->
</extended>
</body-measurements>
</vst>

View File

@ -1,108 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<vit>
<lang>en-us</lang>
<personal>
<family-name/>
<given-name/>
<birth-date>1900-01-01</birth-date>
<sex>male</sex>
<email>username@example.com</email>
</personal>
<body-measurements>
<unit>cm</unit>
<head_and_neck>
<head_girth gui_text="Head girth" description="Around fullest part of Head" value="0.0" m_number="M1" name="head_girth"/>
<mid_neck_girth gui_text="Mid-neck girth" description="Around middle part of Neck" value="0.0" m_number="M2" name="mid_neck_girth"/>
<neck_base_girth gui_text="Neck Base girth" description="Around Neck at base" value="0.0" m_number="M3" name="neck_base_girth"/>
<head_and_neck_length gui_text="Head and Neck length" description="Vertical Distance from Crown to Nape" value="0.0" m_number="M4" name="head_and_neck_length"/>
</head_and_neck>
<torso>
<center_front_waist_length gui_text="Front Center length" description="Front Neck Center over tape at Bustline to Front Waist Center" value="0.0" m_number="M5" name="center_front_waist_length"/>
<center_back_waist_length gui_text="Back Center length" description="Back Neck Center to Back Waist Center" value="0.0" m_number="M6" name="center_back_waist_length"/>
<shoulder_length gui_text="Shoulder length" description="NeckPoint to ShoulderTip" value="0.0" m_number="M7" name="shoulder_length"/>
<side_waist_length gui_text="Side Waist length" description="Armpit to Waist side" value="0.0" m_number="M8" name="side_waist_length"/>
<trunk_length gui_text="Trunk length" description="Around Body from middle of Shoulder length to BustPoint to Crotch up back to beginning point" value="0.0" m_number="M9" name="trunk_length"/>
<shoulder_girth gui_text="Shoulder girth" description="Around Arms and Torso, at bicep level parallel to floor, with arms hanging at the sides" value="0.0" m_number="M10" name="shoulder_girth"/>
<upper_chest_girth gui_text="Upper Chest girth" description="Around Chest at Armfold level, will be parallel to floor across back, will not be parallel to floor across front chest" value="0.0" m_number="M11" name="upper_chest_girth"/>
<bust__girth gui_text="Bust girth" description="Around fullest part of Bust, parallel to floor" value="0.0" m_number="M12" name="bust__girth"/>
<under_bust_girth gui_text="Under Bust girth" description="Around Chest below the Bust, parallel to floor" value="0.0" m_number="M13" name="under_bust_girth"/>
<waist_girth gui_text="Waist girth" description="Tie a string around smallest part of waist, keep string tied while taking meaasurements. Not usually parallel to floor for front waist or back waist." value="0.0" m_number="M14" name="waist_girth"/>
<high_hip_girth gui_text="HighHip girth" description="Around HighHip, parallel to floor" value="0.0" m_number="M15" name="high_hip_girth"/>
<hip_girth gui_text="Hip girth" description="Around Hip, parallel to floor" value="0.0" m_number="M16" name="hip_girth"/>
<upper_front_chest_width gui_text="Front Upper Chest width" description="Across Front UpperChest, smallest width from armscye to armscye" value="0.0" m_number="M17" name="upper_front_chest_width"/>
<front_chest_width gui_text="Front Chest width" description="Across Front Chest, from armfold to armfold" value="0.0" m_number="M18" name="front_chest_width"/>
<across_front_shoulder_width gui_text="Front Across Shoulder width" description="From ShoulderTip to ShoulderTip, across Front" value="0.0" m_number="M19" name="across_front_shoulder_width"/>
<across_back_shoulder_width gui_text="Back Across Shoulder width" description="From ShoulderTip to ShoulderTip, across Back" value="0.0" m_number="M20" name="across_back_shoulder_width"/>
<upper_back_width gui_text="Back Upper Chest width" description="Across Back UpperChest, smallest width from armscye to armscye" value="0.0" m_number="M21" name="upper_back_width"/>
<back_width gui_text="Back Chest width" description="Across Back Chest, from armfold to armfold" value="0.0" m_number="M22" name="back_width"/>
<bustpoint_to_bustpoint gui_text="BustPoint to BustPoint" description="Distance between BustPoints, across Chest" value="0.0" m_number="M23" name="bustpoint_to_bustpoint"/>
<halter_bustpoint_to_bustpoint gui_text="Halter Bustpoint to Bustpoint" description="Distance from Bustpoint, behind neck, down to Bustpoint" value="0.0" m_number="M24" name="halter_bustpoint_to_bustpoint"/>
<neck_to_bustpoint gui_text="NeckPoint to BustPoint" description="From NeckPoint to BustPoint" value="0.0" m_number="M25" name="neck_to_bustpoint"/>
<crotch_length gui_text="Crotch length" description="From Front Waist Center, down to crotch, up to Back Waist Center" value="0.0" m_number="M26" name="crotch_length"/>
<rise_height gui_text="Rise height" description="Sit on hard chair, measure from side waist straight down to chair bottom" value="0.0" m_number="M27" name="rise_height"/>
<shoulder_drop gui_text="Shoulder Drop" description="Vertical Distance from NeckPoint level to ShoulderTip level" value="0.0" m_number="M28" name="shoulder_drop"/>
<shoulder_slope_degrees gui_text="Shoulder Slope degrees" description="Degrees of angle from NeckPoint to ShoulderTip requires goniometer" value="0.0" m_number="M29" name="shoulder_slope_degrees"/>
<front_shoulder_slope_length gui_text="Front Shoulder Balance" description="ShoulderTip to Front Waist Center" value="0.0" m_number="M30" name="front_shoulder_slope_length"/>
<back_shoulder_slope_length gui_text="Back Shoulder Balance" description="ShoulderTip to Back Waist Center" value="0.0" m_number="M31" name="back_shoulder_slope_length"/>
<front_shoulder_to_waist_length gui_text="Front Full Length" description="NeckPoint straight down front chest to Waistline" value="0.0" m_number="M32" name="front_shoulder_to_waist_length"/>
<back_shoulder_to_waist_length gui_text="Back Full Length" description="Back NeckPoint straight down back chest to Waistline" value="0.0" m_number="M33" name="back_shoulder_to_waist_length"/>
<front_neck_arc gui_text="Front Neck arc" description="NeckPoint to NeckPoint through Front Neck Center" value="0.0" m_number="M34" name="front_neck_arc"/>
<back_neck_arc gui_text="Back Neck arc" description="NeckPoint to NeckPoint across Nape" value="0.0" m_number="M35" name="back_neck_arc"/>
<front_upper-bust_arc gui_text="front_upper-bust_arc" description="front_upper-bust_arc" value="0.0" m_number="M36" name="front_upper_bust_arc"/>
<back_upper-bust_arc gui_text="Back UpperBust arc" description="Back UpperBust side to side" value="0.0" m_number="M37" name="back_upper_bust_arc"/>
<front_waist_arc gui_text="Front Waist arc" description="Front Waist side to side" value="0.0" m_number="M38" name="front_waist_arc"/>
<back_waist_arc gui_text="Back Waist arc" description="Back Waist side to side" value="0.0" m_number="M39" name="back_waist_arc"/>
<front_upper-hip_arc gui_text="Front UpperHip arc" description="Front UpperHip side to side" value="0.0" m_number="M40" name="front_upper_hip_arc"/>
<back_upper-hip_arc gui_text="Back UpperHip arc" description="Back UpperHip side to side" value="0.0" m_number="M41" name="back_upper_hip_arc"/>
<front_hip_arc gui_text="Front Hip arc" description="Front Hip side to side" value="0.0" m_number="M42" name="front_hip_arc"/>
<back_hip_arc gui_text="Back Hip arc" description="Back Hip side to side" value="0.0" m_number="M43" name="back_hip_arc"/>
<chest_slope gui_text="Chest Balance" description="NeckPoint to Front ArmfoldPoint" value="0.0" m_number="M44" name="chest_slope"/>
<back_slope gui_text="Back Balance" description="NeckPoint to Back ArmfoldPoint" value="0.0" m_number="M45" name="back_slope"/>
<front_waist_slope gui_text="Front Waist Balance" description="NeckPoint across Front Chest to Waist side" value="0.0" m_number="M46" name="front_waist_slope"/>
<back_waist_slope gui_text="Back Waist Balance" description="NeckPoint across Back Chest to Waist side" value="0.0" m_number="M47" name="back_waist_slope"/>
<front-neck_to_upper-chest_height gui_text="Front UpperChest height" description="Front Neck Center straight down to UpperChest line" value="0.0" m_number="M48" name="front_neck_to_upper_chest_height"/>
<front-neck_to_bust_height gui_text="Bust height" description="Front Neck Center straight down to Bust line" value="0.0" m_number="M49" name="front_neck_to_bust_height"/>
</torso>
<arm>
<armscye_girth gui_text="Armscye Girth" description="Around Armscye" value="0.0" m_number="M50" name="armscye_girth"/>
<elbow_girth gui_text="Elbow Girth" description="Around Elbow with elbow bent" value="0.0" m_number="M51" name="elbow_girth"/>
<upper-arm_girth gui_text="Upperarm Girth" description="Around UpperArm" value="0.0" m_number="M52" name="upper_arm_girth"/>
<wrist_girth gui_text="Wrist girth" description="Around Wrist" value="0.0" m_number="M53" name="wrist_girth"/>
<scye_depth gui_text="Armscye depth" description="Nape straight down to UnderBust line (same as Back UpperBust height)" value="0.0" m_number="M54" name="scye_depth"/>
<shoulder_and_arm_length gui_text="Shoulder and Arm length" description="NeckPoint to ShoulderTip to Wrist, with elbow bent and hand on hip" value="0.0" m_number="M55" name="shoulder_and_arm_length"/>
<underarm_length gui_text="Underarm length" description="Armpit to Wrist, with arm straight and hanging at side" value="0.0" m_number="M56" name="underarm_length"/>
<cervicale_to_wrist_length gui_text="Nape to wrist length" description="Nape to Wrist, with elbow bent and hand on hip" value="0.0" m_number="M57" name="cervicale_to_wrist_length"/>
<shoulder_to_elbow_length gui_text="Elbow length" description="ShoulderTip to Elbow, with elbow bent and hand on hip" value="0.0" m_number="M58" name="shoulder_to_elbow_length"/>
<arm_length gui_text="Arm length" description="ShoulderTip to Wrist, with elbow bent and hand on hip" value="0.0" m_number="M59" name="arm_length"/>
</arm>
<hand>
<hand_width gui_text="Hand width" description="Hand side to side" value="0.0" m_number="M60" name="hand_width"/>
<hand_length gui_text="Hand length" description="Hand Middle Finger tip to wrist" value="0.0" m_number="M61" name="hand_length"/>
<hand_girth gui_text="Hand girth" description="Around Hand" value="0.0" m_number="M62" name="hand_girth"/>
</hand>
<leg>
<thigh_girth gui_text="Thigh girth" description="Around Thigh" value="0.0" m_number="M63" name="thigh_girth"/>
<mid_thigh_girth gui_text="Midthigh girth" description="Around MidThigh" value="0.0" m_number="M64" name="mid_thigh_girth"/>
<knee_girth gui_text="Knee girth" description="Around Knee" value="0.0" m_number="M65" name="knee_girth"/>
<calf_girth gui_text="Calf girth" description="Around Calf" value="0.0" m_number="M66" name="calf_girth"/>
<ankle_girth gui_text="Ankle girth" description="Around Ankle " value="0.0" m_number="M67" name="ankle_girth"/>
<knee_height gui_text="Knee height" description="Knee to Floor" value="0.0" m_number="M68" name="knee_height"/>
<ankle_height gui_text="Ankle height" description="Ankle to Floor" value="0.0" m_number="M69" name="ankle_height"/>
</leg>
<foot>
<foot_width gui_text="Foot width" description="Widest part of Foot side to side" value="0.0" m_number="M70" name="foot_width"/>
<foot_length gui_text="Foot length" description="Tip of Longest Toe straight to back of heel" value="0.0" m_number="M71" name="foot_length"/>
</foot>
<heights>
<height gui_text="Total Height" description="Top of head to floor" value="0.0" m_number="M72" name="height"/>
<cervicale_height gui_text="Nape height" description="Nape to Floor" value="0.0" m_number="M73" name="cervicale_height"/>
<cervicale_to_knee_height gui_text="Nape to knee height" description="Nape to Knee" value="0.0" m_number="M74" name="cervicale_to_knee_height"/>
<waist_height gui_text="Waist height" description="Waist side to floor" value="0.0" m_number="M75" name="waist_height"/>
<high_hip_height gui_text="HighHip height" description="HighHip side to Floor" value="0.0" m_number="M76" name="high_hip_height"/>
<hip_height gui_text="Hip height" description="Hip side to Floor" value="0.0" m_number="M77" name="hip_height"/>
<waist_to_hip_height gui_text="Waist to Hip height" description="Waist side to Hip" value="0.0" m_number="M78" name="waist_to_hip_height"/>
<waist_to_knee_height gui_text="Waist to Knee height" description="Waist side to Knee" value="0.0" m_number="M79" name="waist_to_knee_height"/>
<crotch_height gui_text="Crotch height/Inseam" description="Crotch to Floor along inside leg" value="0.0" m_number="M80" name="crotch_height"/>
</heights>
</body-measurements>
</vit>

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<vit>
<lang>ru</lang>
<personal>
<family-name/>
<given-name/>
<birth-date>1900-01-01</birth-date>
<sex>male</sex>
<email>username@example.com</email>
</personal>
<body-measurements>
<unit>mm</unit>
<head_and_neck>
<head_girth name="Огол" m_number="M1" value="0.0" gui_text="Обхват головы" description="Номер размерного признака 48"/>
<mid_neck_girth name="name" m_number="M2" value="0.0" gui_text="" description="" ignore="true"/>
<neck_base_girth name="Ош" m_number="M3" value="0.0" gui_text="Обхват шеи" description="Номер размерного признака 13"/>
<head_and_neck_length name="name" m_number="M4" value="0.0" gui_text="" description="" ignore="true"/>
</head_and_neck>
<torso>
<center_front_waist_length name="name" m_number="M5" value="0.0" gui_text="" description="" ignore="true"/>
<center_back_waist_length name="Дтс" m_number="M6" value="0.0" gui_text="Длина спины до талии с учетом выступа лопаток" description="Номер размерного признака 40"/>
<shoulder_length name="Шп" m_number="M7" value="0.0" gui_text="Длина плечевого ската" description="Номер размерного признака 31"/>
<side_waist_length name="Дб" m_number="M8" value="0.0" gui_text="Длина боковой части" description="Разница между меркой 11 и 7"/>
<trunk_length name="name" m_number="M9" value="0.0" gui_text="" description="" ignore="true"/>
<shoulder_girth name="name" m_number="M10" value="0.0" gui_text="" description="" ignore="true"/>
<upper_chest_girth name="ОгI" m_number="M11" value="0.0" gui_text="Обхват груди первый" description="Номер размерного признака 14"/>
<bust__girth name="ОгII" m_number="M12" value="0.0" gui_text="Обхват груди второй" description="Номер размерного признака 15"/>
<under_bust_girth name="ОгIII" m_number="M13" value="0.0" gui_text="Обхват груди третий" description="Номер размерного признака 16"/>
<waist_girth name="От" m_number="M14" value="0.0" gui_text="Обхват талии" description="Номер размерного признака 18"/>
<high_hip_girth name="name" m_number="M15" value="0.0" gui_text="" description="" ignore="true"/>
<hip_girth name="Об" m_number="M16" value="0.0" gui_text="Обхват бедер с учетом выступания живота" description="Номер размерного признака 19"/>
<upper_front_chest_width name="Шг1" m_number="M17" value="0.0" gui_text="Ширина груди первая" description="Номер размерного признака 45"/>
<front_chest_width name="Шг2" m_number="M18" value="0.0" gui_text="Ширина груди вторая" description="Номер размерного признака 45"/>
<across_front_shoulder_width name="dпл" m_number="M19" value="0.0" gui_text="Плечевой диаметр" description="Номер размерного признака 53"/>
<across_back_shoulder_width name="name" m_number="M20" value="0.0" gui_text="" description="" ignore="true"/>
<upper_back_width name="name" m_number="M21" value="0.0" gui_text="" description="" ignore="true"/>
<back_width name="Шс" m_number="M22" value="0.0" gui_text="Ширина спины" description="Номер размерного признака 47"/>
<bustpoint_to_bustpoint name="Цг" m_number="M23" value="0.0" gui_text="Расстояние между сосковыми точками" description="Номер размерного признака 46"/>
<halter_bustpoint_to_bustpoint name="name" m_number="M24" value="0.0" gui_text="" description="" ignore="true"/>
<neck_to_bustpoint name="Вг" m_number="M25" value="0.0" gui_text="Расстояние от точки основания шеи сбоку до сосковой точки (высота груди)" description="Номер размерного признака 35а"/>
<crotch_length name="name" m_number="M26" value="0.0" gui_text="" description="" ignore="true"/>
<rise_height name="Дпс" m_number="M27" value="0.0" gui_text="Расстояние от линии талии до подъягодичной складки" description="Номер размерного признака 104"/>
<shoulder_drop name="name" m_number="M28" value="0.0" gui_text="" description="" ignore="true"/>
<shoulder_slope_degrees name="name" m_number="M29" value="0.0" gui_text="" description="" ignore="true"/>
<front_shoulder_slope_length name="name" m_number="M30" value="0.0" gui_text="" description="" ignore="true"/>
<back_shoulder_slope_length name="name" m_number="M31" value="0.0" gui_text="" description="" ignore="true"/>
<front_shoulder_to_waist_length name="name" m_number="M32" value="0.0" gui_text="" description="" ignore="true"/>
<back_shoulder_to_waist_length name="name" m_number="M33" value="0.0" gui_text="" description="" ignore="true"/>
<front_neck_arc name="name" m_number="M34" value="0.0" gui_text="" description="" ignore="true"/>
<back_neck_arc name="name" m_number="M35" value="0.0" gui_text="" description="" ignore="true"/>
<front_upper-bust_arc name="name" m_number="M36" value="0.0" gui_text="" description="" ignore="true"/>
<back_upper-bust_arc name="name" m_number="M37" value="0.0" gui_text="" description="" ignore="true"/>
<front_waist_arc name="name" m_number="M38" value="0.0" gui_text="" description="" ignore="true"/>
<back_waist_arc name="name" m_number="M39" value="0.0" gui_text="" description="" ignore="true"/>
<front_upper-hip_arc name="name" m_number="M40" value="0.0" gui_text="" description="" ignore="true"/>
<back_upper-hip_arc name="name" m_number="M41" value="0.0" gui_text="" description="" ignore="true"/>
<front_hip_arc name="name" m_number="M42" value="0.0" gui_text="" description="" ignore="true"/>
<back_hip_arc name="name" m_number="M43" value="0.0" gui_text="" description="" ignore="true"/>
<chest_slope name="name" m_number="M44" value="0.0" gui_text="" description="" ignore="true"/>
<back_slope name="name" m_number="M45" value="0.0" gui_text="" description="" ignore="true"/>
<front_waist_slope name="name" m_number="M46" value="0.0" gui_text="" description="" ignore="true"/>
<back_waist_slope name="name" m_number="M47" value="0.0" gui_text="" description="" ignore="true"/>
<front-neck_to_upper-chest_height name="name" m_number="M48" value="0.0" gui_text="" description="" ignore="true"/>
<front-neck_to_bust_height name="name" m_number="M49" value="0.0" gui_text="" description="" ignore="true"/>
</torso>
<arm>
<armscye_girth name="name" m_number="M50" value="0.0" gui_text="" description="" ignore="true"/>
<elbow_girth name="Олк" m_number="M51" value="0.0" gui_text="Обхват локтя" description="Номер размерного признака "/>
<upper-arm_girth name="Оп" m_number="M52" value="0.0" gui_text="Обхват плеча" description="Номер размерного признака 28"/>
<wrist_girth name="Озап" m_number="M53" value="0.0" gui_text="Обхват запястья" description="Номер размерного признака 105"/>
<scye_depth name="name" m_number="M54" value="0.0" gui_text="" description="" ignore="true"/>
<shoulder_and_arm_length name="Дзап" m_number="M55" value="0.0" gui_text="Расстояние от точки основания шеи сбоку до линии обхвата запястья" description="Номер размерного признака 33"/>
<underarm_length name="name" m_number="M56" value="0.0" gui_text="" description="" ignore="true"/>
<cervicale_to_wrist_length name="name" m_number="M57" value="0.0" gui_text="" description="" ignore="true"/>
<shoulder_to_elbow_length name="Дрлок" m_number="M58" value="0.0" gui_text="Длина руки до локтя" description="Номер размерного признака 62"/>
<arm_length name="Дрзап" m_number="M59" value="0.0" gui_text="Длина руки до запястья" description="Номер размерного признака 68"/>
</arm>
<hand>
<hand_width name="name" m_number="M60" value="0.0" gui_text="" description="" ignore="true"/>
<hand_length name="name" m_number="M61" value="0.0" gui_text="" description="" ignore="true"/>
<hand_girth name="name" m_number="M62" value="0.0" gui_text="" description="" ignore="true"/>
</hand>
<leg>
<thigh_girth name="Обед" m_number="M63" value="0.0" gui_text="Обхват бедра" description="Номер размерного признака 21"/>
<mid_thigh_girth name="name" m_number="M64" value="0.0" gui_text="" description="" ignore="true"/>
<knee_girth name="Ок" m_number="M65" value="0.0" gui_text="Обхват колена" description="Номер размерного признака 22"/>
<calf_girth name="Ои" m_number="M66" value="0.0" gui_text="Обхват икры" description="Номер размерного признака 23"/>
<ankle_girth name="Ощ" m_number="M67" value="0.0" gui_text="Обхват щиколотки" description="Номер размерного признака 24"/>
<knee_height name="Вк" m_number="M68" value="0.0" gui_text="Высота коленной точки" description="Номер размерного признака 9"/>
<ankle_height name="name" m_number="M69" value="0.0" gui_text="" description="" ignore="true"/>
</leg>
<foot>
<foot_width name="name" m_number="M70" value="0.0" gui_text="" description="" ignore="true"/>
<foot_length name="name" m_number="M71" value="0.0" gui_text="" description="" ignore="true"/>
</foot>
<heights>
<height name="Р" m_number="M72" value="0.0" gui_text="Рост" description="Номер размерного признака 1"/>
<cervicale_height name="Вшт" m_number="M73" value="0.0" gui_text="Высота точки основания шеи сзади" description="Номер размерного признака 10"/>
<cervicale_to_knee_height name="name" m_number="M74" value="0.0" gui_text="" description="" ignore="true"/>
<waist_height name="Влт" m_number="M75" value="0.0" gui_text="Высота линии талии" description="Номер размерного признака 7"/>
<high_hip_height name="name" m_number="M76" value="0.0" gui_text="" description="" ignore="true"/>
<hip_height name="name" m_number="M77" value="0.0" gui_text="" description="" ignore="true"/>
<waist_to_hip_height name="name" m_number="M78" value="0.0" gui_text="" description="" ignore="true"/>
<waist_to_knee_height name="name" m_number="M79" value="0.0" gui_text="" description="" ignore="true"/>
<crotch_height name="Дн" m_number="M80" value="0.0" gui_text="Длина ноги по внутренней поверхности" description="Номер размерного признака 27"/>
</heights>
</body-measurements>
</vit>

View File

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<vst>
<description>Типовые фигуры мужчин 1-й полнотной группы, обхват груди 100 см</description>
<unit>mm</unit>
<size base="500" name="Сг"/>
<height base="1760" name="Р"/>
<measurements>
<measurement name="Втос" gui_text="Высота точки основания шеи спереди" base="1450" size_increace="2" height_increase ="51" number="98"/>
<measurement name="Втош" gui_text="Высота точки основания шеи сбоку" base="1506" size_increace="2" height_increase ="54" number="4"/>
<measurement name="Впт" gui_text="Высота плечевой точки" base="1438" size_increace="3" height_increase ="52" number="5"/>
<measurement name="Вст" gui_text="Высота сосковой точки" base="1257" size_increace="-1" height_increase ="49" number="6"/>
<measurement name="Влт" gui_text="Высота линии талии" base="1102" size_increace="0" height_increase ="43" number="7"/>
<measurement name="Вк" gui_text="Высота коленной точки" base="503" size_increace="0" height_increase ="22" number="9"/>
<measurement name="Вшт" gui_text="Высота точки основания шеи сзади" base="1522" size_increace="2" height_increase ="54" number="10"/>
<measurement name="Взу" gui_text="Высота заднего угла подмышечной впадины" base="1328" size_increace="0" height_increase ="49" number="11"/>
<measurement name="Влоп" gui_text="Высота лопаточной точки" base="1320" size_increace="0" height_increase ="49" number="87"/>
<measurement name="Впс" gui_text="Высота подъягодичной складки" base="811" size_increace="-1" height_increase ="36" number="12"/>
<measurement name="Ош" gui_text="Обхват шеи" base="404" size_increace="8" height_increase ="2" number="13"/>
<measurement name="ОгI" gui_text="Обхват груди первый" base="1034" size_increace="36" height_increase ="4" number="14"/>
<measurement name="ОгII" gui_text="Обхват груди второй" base="1044" size_increace="38" height_increase ="2" number="15"/>
<measurement name="ОгIII" gui_text="Обхват груди третий" base="1000" size_increace="40" height_increase ="0" number="16"/>
<measurement name="От" gui_text="Обхват талии" base="780" size_increace="40" height_increase ="0" number="18"/>
<measurement name="Об" gui_text="Обхват бедер с учетом выступания живота" base="984" size_increace="30" height_increase ="10" number="19"/>
<measurement name="ОбI" gui_text="Обхват бедер без учета выступания живота" base="964" size_increace="24" height_increase ="12" number="20"/>
<measurement name="Обед" gui_text="Обхват бедра" base="566" size_increace="18" height_increase ="6" number="21"/>
<measurement name="Ок" gui_text="Обхват колена" base="386" size_increace="8" height_increase ="8" number="22"/>
<measurement name="Ои" gui_text="Обхват икры" base="380" size_increace="8" height_increase ="6" number="23"/>
<measurement name="Ощ" gui_text="Обхват щиколотки" base="234" size_increace="4" height_increase ="4" number="24"/>
<measurement name="Ос" gui_text="Обхват подъема стопы" base="350" size_increace="2" height_increase ="8" number="51"/>
<measurement name="Дсб" gui_text="Расстояние от линии талии до пола сбоку" base="1120" size_increace="0" height_increase ="44" number="25"/>
<measurement name="Дсп" gui_text="Расстояние от линии талии до пола спереди" base="1110" size_increace="0" height_increase ="43" number="26"/>
<measurement name="Дн" gui_text="Длина ноги по внутренней поверхности" base="826" size_increace="-3" height_increase ="37" number="27"/>
<measurement name="Дпс" gui_text="Расстояние от линии талии до подъягодичной складки" base="316" size_increace="4" height_increase ="7" number="104"/>
<measurement name="Дпоб" gui_text="Дуга через паховую область" base="783" size_increace="14" height_increase ="15" number="77"/>
<measurement name="Дс" gui_text="Расстояние от линии талии до плоскости сидения" base="260" size_increace="1" height_increase ="6" number="49"/>
<measurement name="Оп" gui_text="Обхват плеча" base="316" size_increace="12" height_increase ="0" number="28"/>
<measurement name="Озап" gui_text="Обхват запястья" base="180" size_increace="4" height_increase ="0" number="29"/>
<measurement name="Пкис" gui_text="Обхват кисти" base="250" size_increace="4" height_increase ="0" number="30"/>
<measurement name="Шп" gui_text="Длина плечевого ската" base="160" size_increace="1" height_increase ="4" number="31"/>
<measurement name="Длуч" gui_text="Расстояние от точки основания шеи сбоку до лучевой точки" base="500" size_increace="2" height_increase ="15" number="32"/>
<measurement name="Дзап" gui_text="Расстояние от точки основания шеи сбоку до линии обхвата запястья" base="768" size_increace="2" height_increase ="24" number="33"/>
<measurement name="ДIIIп" gui_text="Расстояние от точки основания шеи сбоку до конца третьего пальца" base="970" size_increace="2" height_increase ="29" number="90"/>
<measurement name="Впрп" gui_text="Расстояние от точки основания шеи сбоку до линии обхвата груди первого спереди" base="214" size_increace="3" height_increase ="3" number="34а"/>
<measurement name="Вг" gui_text="Расстояние от точки основания шеи сбоку до сосковой точки (высота груди)" base="262" size_increace="8" height_increase ="3" number="35а"/>
<measurement name="Дтп" gui_text="Расстояние от точки основания шеи сбоку до линии талии спереди (длани талии спереди)" base="460" size_increace="7" height_increase ="9" number="36а"/>
<measurement name="Дп" gui_text="Дуга через высшую точку плечевого сустава" base="355" size_increace="5" height_increase ="5" number="38"/>
<measurement name="Впрз" gui_text="Расстояние от точки основания шеи сзади до линии обхватов груди первого и второго с учетом выступа лопаток" base="208" size_increace="3" height_increase ="5" number="39"/>
<measurement name="Дтс" gui_text="Длина спины до талии с учетом выступа лопаток" base="438" size_increace="2" height_increase ="10" number="40"/>
<measurement name="ДтсI" gui_text="Расстояние от линии талии сзади до точки основания шеи сбоку" base="469" size_increace="2" height_increase ="10" number="43"/>
<measurement name="Двчт" gui_text="Длина дуги верхней части туловища через точку основания шеи сбоку" base="929" size_increace="9" height_increase ="19" number="44"/>
<measurement name="Шг" gui_text="Ширина груди" base="370" size_increace="14" height_increase ="4" number="45"/>
<measurement name="Цг" gui_text="Расстояние между сосковыми точками" base="224" size_increace="6" height_increase ="0" number="46"/>
<measurement name="Шс" gui_text="Ширина спины" base="416" size_increace="10" height_increase ="2" number="47"/>
<measurement name="dпзр" gui_text="Передне-задний диаметр руки" base="121" size_increace="6" height_increase ="0" number="57"/>
<measurement name="Огол" gui_text="Обхват головы" base="576" size_increace="4" height_increase ="4" number="48"/>
<!--Конец основной таблицы. Дальше идет другая таблица. Параметры взятые с нее дополняют предедущую.-->
<measurement name="Вкт" gui_text="Высота ключичной точки" base="1454" size_increace="2" height_increase ="52" number="3"/>
<measurement name="Окис" gui_text="Обхват кисти" base="263" size_increace="3" height_increase ="3" number="30"/>
<measurement name="Впрк" gui_text="Расстояние от шейной точки до уровня заднего угла подмышечной впадины спереди (высота проймы косая)" base="324" size_increace="7" height_increase ="2" number="37"/>
<measurement name="Впк" gui_text="Высота плеча косая" base="495" size_increace="5" height_increase ="7" number="41"/>
<measurement name="Сш" gui_text="Полуобхват шеи" base="202" size_increace="4" height_increase ="2" number="13"/>
<measurement name="Сш1" gui_text="Полуобхват шеи для сорочек" base="205" size_increace="5" height_increase ="0" number="13а"/>
<measurement name="СгI" gui_text="Полуобхват груди первый" base="517" size_increace="18" height_increase ="2" number="14"/>
<measurement name="СгII" gui_text="Полуобхват груди второй" base="522" size_increace="19" height_increase ="1" number="15"/>
<measurement name="СгIII" gui_text="Полуобхват груди третий" base="500" size_increace="20" height_increase ="0" number="16"/>
<measurement name="Ст" gui_text="Полуобхват талии" base="390" size_increace="20" height_increase ="0" number="18"/>
<measurement name="Сб" gui_text="Полуобхват бедер с учетом выступания живота" base="492" size_increace="15" height_increase ="5" number="19"/>
<measurement name="СбI" gui_text="Полуобхват бедер без учета выступания живота" base="482" size_increace="12" height_increase ="6" number="20"/>
<measurement name="Окс" gui_text="Обхват колена в согнутом положении ноги" base="399" size_increace="9" height_increase ="8" number="50"/>
<measurement name="dпл" gui_text="Плечевой диаметр" base="412" size_increace="5" height_increase ="8" number="53"/>
<measurement name="dш" gui_text="Поперечный диаметр шеи" base="130" size_increace="2" height_increase ="2" number="54"/>
<measurement name="Впкп" gui_text="Высота плеча косая спереди" base="453" size_increace="7" height_increase ="8" number="42"/>
<measurement name="Дтн1" gui_text="Расстояние от точки основания шеи до линии талии спереди" base="449" size_increace="6" height_increase ="8" number="61"/>
<measurement name="Дрлок" gui_text="Длина руки до локтя" base="338" size_increace="2" height_increase ="12" number="62"/>
<measurement name="Дрзап" gui_text="Длина рукава до линии обхвата запястья" base="594" size_increace="3" height_increase ="19" number="68"/>
<measurement name="dвр" gui_text="Вертикальный диаметр руки" base="128" size_increace="2" height_increase ="2" number="69"/>
<measurement name="Дшк" gui_text="Расстояние от шейной точки до колена" base="1019" size_increace="0" height_increase ="34" number="70"/>
<measurement name="Дтк" gui_text="Расстояние от линии талии до колена" base="603" size_increace="-2" height_increase ="24" number="71"/>
<measurement name="Вп" gui_text="Высота плеча" base="67" size_increace="0" height_increase ="2" number="72"/>
<measurement name="Вгол" gui_text="Высота головы" base="246" size_increace="-2" height_increase ="6" number="73"/>
<measurement name="Пкор" gui_text="Положение корпуса" base="84" size_increace="0" height_increase ="3" number="74"/>
<measurement name="Дпз" gui_text="Дуга плечевого пояса сзади" base="535" size_increace="7" height_increase ="7" number="75"/>
<measurement name="Дшош" gui_text="Расстояние от шейной точки до точки основания шеи сбоку по линии измерения обхвата шеи" base="109" size_increace="1" height_increase ="0" number="76"/>
<measurement name="Гт1" gui_text="Глубина талии первая" base="64" size_increace="-1" height_increase ="0" number="78"/>
<measurement name="ГтII" gui_text="Глубина талии вторая" base="37" size_increace="0" height_increase ="0" number="79"/>
</measurements>
</vst>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -39,12 +39,39 @@
#ifdef Q_CC_MSVC
#define _USE_MATH_DEFINES
#endif
#ifdef QT_CORE_LIB
#include <QtCore>
#include <QApplication>
#include <QtGlobal>
#include <QtXml>
#endif
#ifdef QT_GUI_LIB
#include <QtGui>
#endif
#ifdef QT_WIDGETS_LIB
#include <QtWidgets>
#endif
#ifdef QT_XML_LIB
#include <QtXml>
#endif
#ifdef QT_SVG_LIB
#include <QtSvg/QtSvg>
#endif
#ifdef QT_PRINTSUPPORT_LIB
#include <QtPrintSupport>
#endif
#ifdef QT_XMLPATTERNS_LIB
#include <QtXmlPatterns>
#endif
#ifdef QT_NETWORK_LIB
#include <QtNetwork>
#endif
#endif
#endif // STABLE_H

View File

@ -30,6 +30,8 @@
#include "../../container/calculator.h"
#include "../../dialogs/tools/dialogalongline.h"
#include "exception/vexceptionobjecterror.h"
const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
//---------------------------------------------------------------------------------------------------------------------
@ -179,40 +181,38 @@ void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const Q
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
QLineF line = QLineF(firstPoint->toQPointF(), secondPoint->toQPointF());
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
line.setLength(qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
line.setLength(qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject( new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(id, secondPointId);
}
else
{
data->UpdateGObject(id, new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(id, secondPointId);
if (parse != Document::FullParse)
{
id = data->AddGObject( new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(id, secondPointId);
}
else
{
data->UpdateGObject(id, new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(id, secondPointId);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::AlongLineTool, doc);
if (parse == Document::FullParse)
{
VToolAlongLine *point = new VToolAlongLine(doc, data, id, formula, firstPointId,
secondPointId, typeLine, typeCreation);
scene->addItem(point);
connect(point, &VToolAlongLine::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolAlongLine::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::AlongLineTool, doc);
if (parse == Document::FullParse)
{
VToolAlongLine *point = new VToolAlongLine(doc, data, id, formula, firstPointId,
secondPointId, typeLine, typeCreation);
scene->addItem(point);
connect(point, &VToolAlongLine::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolAlongLine::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
}
}

View File

@ -94,26 +94,12 @@ void VToolArc::Create(const quint32 _id, const quint32 &center, const QString &r
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(radius, &errorMsg);
if (errorMsg.isEmpty())
{
calcRadius = qApp->toPixel(result);
}
errorMsg.clear();
result = cal.eval(f1, &errorMsg);
if (errorMsg.isEmpty())
{
calcF1 = result;
}
qreal result = cal.EvalFormula(radius);
calcRadius = qApp->toPixel(result);
errorMsg.clear();
result = cal.eval(f2, &errorMsg);
if (errorMsg.isEmpty())
{
calcF2 = result;
}
calcF1 = cal.EvalFormula(f1);
calcF2 = cal.EvalFormula(f2);
VPointF c = *data->GeometricObject<const VPointF *>(center);
VArc *arc = new VArc(c, calcRadius, radius, calcF1, f1, calcF2, f2 );

View File

@ -115,41 +115,38 @@ void VToolBisector::Create(const quint32 _id, const QString &formula, const quin
const VPointF *thirdPoint = data->GeometricObject<const VPointF *>(thirdPointId);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
thirdPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
thirdPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
if (parse != Document::FullParse)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::BisectorTool, doc);
if (parse == Document::FullParse)
{
VToolBisector *point = new VToolBisector(doc, data, id, typeLine, formula, firstPointId, secondPointId,
thirdPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolBisector::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolBisector::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
doc->IncrementReferens(thirdPointId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::BisectorTool, doc);
if (parse == Document::FullParse)
{
VToolBisector *point = new VToolBisector(doc, data, id, typeLine, formula, firstPointId, secondPointId,
thirdPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolBisector::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolBisector::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
doc->IncrementReferens(thirdPointId);
}
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -95,63 +95,61 @@ void VToolCutArc::Create(const quint32 _id, const QString &pointName, const QStr
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
{
const VArc *arc = data->GeometricObject<const VArc *>(arcId);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
VArc arc1;
VArc arc2;
QPointF point = arc->CutArc(qApp->toPixel(result), arc1, arc2);
quint32 id = _id;
quint32 arc1id = 0;
quint32 arc2id = 0;
if (typeCreation == Valentina::FromGui)
{
VArc arc1;
VArc arc2;
QPointF point = arc->CutArc(qApp->toPixel(result), arc1, arc2);
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
id = data->AddGObject(p);
quint32 id = _id;
quint32 arc1id = 0;
quint32 arc2id = 0;
if (typeCreation == Valentina::FromGui)
VArc * ar1 = new VArc(arc1);
arc1id = data->AddGObject(ar1);
VArc * ar2 = new VArc(arc2);
arc2id = data->AddGObject(ar2);
}
else
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
data->UpdateGObject(id, p);
arc1id = id + 1;
arc2id = id + 2;
VArc * ar1 = new VArc(arc1);
data->UpdateGObject(arc1id, ar1);
VArc * ar2 = new VArc(arc2);
data->UpdateGObject(arc2id, ar2);
if (parse != Document::FullParse)
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
id = data->AddGObject(p);
VArc * ar1 = new VArc(arc1);
arc1id = data->AddGObject(ar1);
VArc * ar2 = new VArc(arc2);
arc2id = data->AddGObject(ar2);
doc->UpdateToolData(id, data);
}
else
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
data->UpdateGObject(id, p);
}
data->AddLengthArc(arc1id);
data->AddLengthArc(arc2id);
arc1id = id + 1;
arc2id = id + 2;
VArc * ar1 = new VArc(arc1);
data->UpdateGObject(arc1id, ar1);
VArc * ar2 = new VArc(arc2);
data->UpdateGObject(arc2id, ar2);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
data->AddLengthArc(arc1id);
data->AddLengthArc(arc2id);
VDrawTool::AddRecord(id, Valentina::CutArcTool, doc);
if (parse == Document::FullParse)
{
VToolCutArc *point = new VToolCutArc(doc, data, id, formula, arcId, arc1id, arc2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(arc1id, point);
doc->AddTool(arc2id, point);
doc->IncrementReferens(arcId);
}
VDrawTool::AddRecord(id, Valentina::CutArcTool, doc);
if (parse == Document::FullParse)
{
VToolCutArc *point = new VToolCutArc(doc, data, id, formula, arcId, arc1id, arc2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(arc1id, point);
doc->AddTool(arc2id, point);
doc->IncrementReferens(arcId);
}
}

View File

@ -96,64 +96,62 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
const Document::Documents &parse, const Valentina::Sources &typeCreation)
{
const VSpline *spl = data->GeometricObject<const VSpline *>(splineId);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
QPointF point = spl->CutSpline(qApp->toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3);
quint32 id = _id;
quint32 spl1id = 0;
quint32 spl2id = 0;
if (typeCreation == Valentina::FromGui)
{
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
QPointF point = spl->CutSpline(qApp->toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3);
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
id = data->AddGObject(p);
quint32 id = _id;
quint32 spl1id = 0;
quint32 spl2id = 0;
if (typeCreation == Valentina::FromGui)
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
spl1id = data->AddGObject(spline1);
data->AddLengthSpline(spline1->name(), qApp->fromPixel(spline1->GetLength()));
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
spl2id = data->AddGObject(spline2);
data->AddLengthSpline(spline2->name(), qApp->fromPixel(spline2->GetLength()));
}
else
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
data->UpdateGObject(id, p);
spl1id = id + 1;
spl2id = id + 2;
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
data->UpdateGObject(spl1id, spline1);
data->AddLengthSpline(spline1->name(), qApp->fromPixel(spline1->GetLength()));
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
data->UpdateGObject(spl2id, spline2);
data->AddLengthSpline(spline2->name(), qApp->fromPixel(spline2->GetLength()));
if (parse != Document::FullParse)
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
id = data->AddGObject(p);
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
spl1id = data->AddGObject(spline1);
data->AddLengthSpline(spline1->name(), qApp->fromPixel(spline1->GetLength()));
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
spl2id = data->AddGObject(spline2);
data->AddLengthSpline(spline2->name(), qApp->fromPixel(spline2->GetLength()));
}
else
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
data->UpdateGObject(id, p);
spl1id = id + 1;
spl2id = id + 2;
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
data->UpdateGObject(spl1id, spline1);
data->AddLengthSpline(spline1->name(), qApp->fromPixel(spline1->GetLength()));
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
data->UpdateGObject(spl2id, spline2);
data->AddLengthSpline(spline2->name(), qApp->fromPixel(spline2->GetLength()));
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::CutSplineTool, doc);
if (parse == Document::FullParse)
{
VToolCutSpline *point = new VToolCutSpline(doc, data, id, formula, splineId, spl1id, spl2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(spl1id, point);
doc->AddTool(spl2id, point);
doc->IncrementReferens(splineId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::CutSplineTool, doc);
if (parse == Document::FullParse)
{
VToolCutSpline *point = new VToolCutSpline(doc, data, id, formula, splineId, spl1id, spl2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(spl1id, point);
doc->AddTool(spl2id, point);
doc->IncrementReferens(splineId);
}
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -97,136 +97,134 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, con
{
const VSplinePath *splPath = data->GeometricObject<const VSplinePath *>(splinePathId);
Q_CHECK_PTR(splPath);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
quint32 id = _id;
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
qint32 p1 = 0, p2 = 0;
const QPointF point = splPath->CutSplinePath(qApp->toPixel(result), p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
if (typeCreation == Valentina::FromGui)
{
quint32 id = _id;
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
qint32 p1 = 0, p2 = 0;
id = data->AddGObject(p);
}
else
{
data->UpdateGObject(id, p);
}
const QPointF point = splPath->CutSplinePath(qApp->toPixel(result), p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
if (typeCreation == Valentina::FromGui)
quint32 splPath1id = id + 1;
quint32 splPath2id = id + 2;
VSplinePoint splP1 = splPath->at(p1);
VSplinePoint splP2 = splPath->at(p2);
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve());
const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve());
VSplinePath *splPath1 = new VSplinePath();
VSplinePath *splPath2 = new VSplinePath();
if (typeCreation == Valentina::FromGui)
{
for (qint32 i = 0; i < splPath->CountPoint(); i++)
{
id = data->AddGObject(p);
}
else
{
data->UpdateGObject(id, p);
}
quint32 splPath1id = id + 1;
quint32 splPath2id = id + 2;
VSplinePoint splP1 = splPath->at(p1);
VSplinePoint splP2 = splPath->at(p2);
const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve());
const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve());
VSplinePath *splPath1 = new VSplinePath();
VSplinePath *splPath2 = new VSplinePath();
if (typeCreation == Valentina::FromGui)
{
for (qint32 i = 0; i < splPath->CountPoint(); i++)
if (i <= p1 && i < p2)
{
if (i <= p1 && i < p2)
if (i == p1)
{
if (i == p1)
{
splPath1->append(VSplinePoint(splP1.P(), splP1.KAsm1(), spl1.GetAngle1()+180, spl1.GetKasm1(),
spl1.GetAngle1()));
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(),
spl1.GetAngle2()+180, spl1.GetAngle2());
splPath1->append(cutPoint);
continue;
}
splPath1->append(splPath->at(i));
}
else
{
if (i == p2)
{
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl2.GetAngle1()+180,
spl2.GetKasm1(), spl2.GetAngle1());
splPath2->append(cutPoint);
splPath2->append(VSplinePoint(splP2.P(), spl2.GetKasm2(), spl2.GetAngle2(), splP2.KAsm2(),
spl2.GetAngle2()+180));
continue;
}
splPath2->append(splPath->at(i));
splPath1->append(VSplinePoint(splP1.P(), splP1.KAsm1(), spl1.GetAngle1()+180, spl1.GetKasm1(),
spl1.GetAngle1()));
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(),
spl1.GetAngle2()+180, spl1.GetAngle2());
splPath1->append(cutPoint);
continue;
}
splPath1->append(splPath->at(i));
}
splPath1->setMaxCountPoints(splPath->CountPoint());
splPath2->setMaxCountPoints(splPath->CountPoint());
splPath1id = data->AddGObject(splPath1);
data->AddLengthSpline(splPath1->name(), qApp->fromPixel(splPath1->GetLength()));
splPath2id = data->AddGObject(splPath2);
data->AddLengthSpline(splPath2->name(), qApp->fromPixel(splPath2->GetLength()));
}
else
{
for (qint32 i = 0; i < splPath->CountPoint(); i++)
else
{
if (i <= p1 && i < p2)
if (i == p2)
{
if (i == p1)
{
splPath1->append(VSplinePoint(splP1.P(), splP1.KAsm1(), spl1.GetAngle1()+180, spl1.GetKasm1(),
spl1.GetAngle1()));
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(),
spl2.GetKasm1(), spl1.GetAngle2()+180);
splPath1->append(cutPoint);
continue;
}
splPath1->append(splPath->at(i));
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl2.GetAngle1()+180,
spl2.GetKasm1(), spl2.GetAngle1());
splPath2->append(cutPoint);
splPath2->append(VSplinePoint(splP2.P(), spl2.GetKasm2(), spl2.GetAngle2(), splP2.KAsm2(),
spl2.GetAngle2()+180));
continue;
}
else
{
if (i == p2)
{
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl2.GetAngle1()+180,
spl2.GetKasm1(), spl2.GetAngle1());
splPath2->append(cutPoint);
splPath2->append(VSplinePoint(splP2.P(), spl2.GetKasm2(), spl2.GetAngle2(), splP2.KAsm2(),
spl2.GetAngle2()+180));
continue;
}
splPath2->append(splPath->at(i));
}
}
splPath1->setMaxCountPoints(splPath->CountPoint());
splPath2->setMaxCountPoints(splPath->CountPoint());
data->UpdateGObject(splPath1id, splPath1);
data->AddLengthSpline(splPath1->name(), qApp->fromPixel(splPath1->GetLength()));
data->UpdateGObject(splPath2id, splPath2);
data->AddLengthSpline(splPath2->name(), qApp->fromPixel(splPath2->GetLength()));
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
splPath2->append(splPath->at(i));
}
}
VDrawTool::AddRecord(id, Valentina::CutSplinePathTool, doc);
if (parse == Document::FullParse)
splPath1->setMaxCountPoints(splPath->CountPoint());
splPath2->setMaxCountPoints(splPath->CountPoint());
splPath1id = data->AddGObject(splPath1);
data->AddLengthSpline(splPath1->name(), qApp->fromPixel(splPath1->GetLength()));
splPath2id = data->AddGObject(splPath2);
data->AddLengthSpline(splPath2->name(), qApp->fromPixel(splPath2->GetLength()));
}
else
{
for (qint32 i = 0; i < splPath->CountPoint(); i++)
{
VToolCutSplinePath *point = new VToolCutSplinePath(doc, data, id, formula, splinePathId, splPath1id,
splPath2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(splPath1id, point);
doc->AddTool(splPath2id, point);
doc->IncrementReferens(splinePathId);
if (i <= p1 && i < p2)
{
if (i == p1)
{
splPath1->append(VSplinePoint(splP1.P(), splP1.KAsm1(), spl1.GetAngle1()+180, spl1.GetKasm1(),
spl1.GetAngle1()));
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl1.GetAngle2(),
spl2.GetKasm1(), spl1.GetAngle2()+180);
splPath1->append(cutPoint);
continue;
}
splPath1->append(splPath->at(i));
}
else
{
if (i == p2)
{
const VSplinePoint cutPoint = VSplinePoint(*p, spl1.GetKasm2(), spl2.GetAngle1()+180,
spl2.GetKasm1(), spl2.GetAngle1());
splPath2->append(cutPoint);
splPath2->append(VSplinePoint(splP2.P(), spl2.GetKasm2(), spl2.GetAngle2(), splP2.KAsm2(),
spl2.GetAngle2()+180));
continue;
}
splPath2->append(splPath->at(i));
}
}
splPath1->setMaxCountPoints(splPath->CountPoint());
splPath2->setMaxCountPoints(splPath->CountPoint());
data->UpdateGObject(splPath1id, splPath1);
data->AddLengthSpline(splPath1->name(), qApp->fromPixel(splPath1->GetLength()));
data->UpdateGObject(splPath2id, splPath2);
data->AddLengthSpline(splPath2->name(), qApp->fromPixel(splPath2->GetLength()));
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::CutSplinePathTool, doc);
if (parse == Document::FullParse)
{
VToolCutSplinePath *point = new VToolCutSplinePath(doc, data, id, formula, splinePathId, splPath1id,
splPath2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->AddTool(splPath1id, point);
doc->AddTool(splPath2id, point);
doc->IncrementReferens(splinePathId);
}
}

View File

@ -88,40 +88,38 @@ void VToolEndLine::Create(const quint32 _id, const QString &pointName, const QSt
{
const VPointF *basePoint = data->GeometricObject<const VPointF *>(basePointId);
QLineF line = QLineF(basePoint->toQPointF(), QPointF(basePoint->x()+100, basePoint->y()));
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
line.setLength(qApp->toPixel(result));
line.setAngle(angle);
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
line.setLength(qApp->toPixel(result));
line.setAngle(angle);
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject(new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(basePointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(basePointId, id);
if (parse != Document::FullParse)
{
id = data->AddGObject(new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(basePointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
data->AddLine(basePointId, id);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::EndLineTool, doc);
if (parse == Document::FullParse)
{
VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, formula, angle,
basePointId, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::EndLineTool, doc);
if (parse == Document::FullParse)
{
VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, formula, angle,
basePointId, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
}
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -90,41 +90,39 @@ void VToolNormal::Create(const quint32 _id, const QString &formula, const quint3
{
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
qApp->toPixel(result), angle);
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
qApp->toPixel(result), angle);
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
if (parse != Document::FullParse)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::NormalTool, doc);
if (parse == Document::FullParse)
{
VToolNormal *point = new VToolNormal(doc, data, id, typeLine, formula, angle,
firstPointId, secondPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolNormal::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolNormal::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::NormalTool, doc);
if (parse == Document::FullParse)
{
VToolNormal *point = new VToolNormal(doc, data, id, typeLine, formula, angle,
firstPointId, secondPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolNormal::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolNormal::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
}
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -118,45 +118,42 @@ void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const
const VPointF *secondP = data->GeometricObject<const VPointF *>(secondPointId);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(radius, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(radius);
QPointF fPoint = VToolPointOfContact::FindPoint(qApp->toPixel(result), centerP->toQPointF(),
firstP->toQPointF(), secondP->toQPointF());
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
QPointF fPoint = VToolPointOfContact::FindPoint(qApp->toPixel(result), centerP->toQPointF(),
firstP->toQPointF(), secondP->toQPointF());
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(secondPointId, id);
data->AddLine(center, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(secondPointId, id);
data->AddLine(center, id);
if (parse != Document::FullParse)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(secondPointId, id);
data->AddLine(center, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(firstPointId, id);
data->AddLine(secondPointId, id);
data->AddLine(center, id);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::PointOfContact, doc);
if (parse == Document::FullParse)
{
VToolPointOfContact *point = new VToolPointOfContact(doc, data, id, radius, center,
firstPointId, secondPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolPointOfContact::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPointOfContact::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(center);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::PointOfContact, doc);
if (parse == Document::FullParse)
{
VToolPointOfContact *point = new VToolPointOfContact(doc, data, id, radius, center,
firstPointId, secondPointId, typeCreation);
scene->addItem(point);
connect(point, &VToolPointOfContact::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPointOfContact::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(center);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);
}
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -120,44 +120,41 @@ void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const
const VPointF *shoulderPoint = data->GeometricObject<const VPointF *>(pShoulder);
Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
const qreal result = cal.EvalFormula(formula);
QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
shoulderPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
{
QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
shoulderPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id;
if (typeCreation == Valentina::FromGui)
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(p1Line, id);
data->AddLine(p2Line, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(p1Line, id);
data->AddLine(p2Line, id);
if (parse != Document::FullParse)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(p1Line, id);
data->AddLine(p2Line, id);
}
else
{
data->UpdateGObject(id, new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
data->AddLine(p1Line, id);
data->AddLine(p2Line, id);
if (parse != Document::FullParse)
{
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::ShoulderPointTool, doc);
if (parse == Document::FullParse)
{
VToolShoulderPoint *point = new VToolShoulderPoint(doc, data, id, typeLine, formula,
p1Line, p2Line, pShoulder,
typeCreation);
scene->addItem(point);
connect(point, &VToolShoulderPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolShoulderPoint::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(p1Line);
doc->IncrementReferens(p2Line);
doc->IncrementReferens(pShoulder);
doc->UpdateToolData(id, data);
}
}
VDrawTool::AddRecord(id, Valentina::ShoulderPointTool, doc);
if (parse == Document::FullParse)
{
VToolShoulderPoint *point = new VToolShoulderPoint(doc, data, id, typeLine, formula,
p1Line, p2Line, pShoulder,
typeCreation);
scene->addItem(point);
connect(point, &VToolShoulderPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolShoulderPoint::SetFactor);
doc->AddTool(id, point);
doc->IncrementReferens(p1Line);
doc->IncrementReferens(p2Line);
doc->IncrementReferens(pShoulder);
}
}
//---------------------------------------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -31,6 +31,7 @@
#include <QApplication>
#include "../options.h"
#include "vtranslation.h"
class VApplication;
@ -71,12 +72,36 @@ public:
QString pathToTables() const;
qreal widthMainLine() const;
qreal widthHairLine() const;
QString VarToUser(const QString &var) const;
QString VarFromUser(const QString &var) const;
QString GuiText(const QString &measurement) const;
QString Description(const QString &measurement) const;
QString Variable(const QString &name) const;
QString Function(const QString &name) const;
QString PostfixOperator(const QString &name) const;
QString FormulaFromUser(const QString &formula);
QString FormulaToUser(const QString &formula);
private:
Valentina::Units _patternUnit;
Pattern::Measurements _patternType;
qreal _widthMainLine;
qreal _widthHairLine;
QMap<QString, VTranslation> measurements;
QMap<QString, VTranslation> guiTexts;
QMap<QString, VTranslation> descriptions;
QMap<QString, VTranslation> variables;
QMap<QString, VTranslation> functions;
QMap<QString, VTranslation> postfixOperators;
void InitLineWidth();
void InitMeasurements();
void InitVariables();
void InitFunctions();
void InitPostfixOperators();
bool MeasurementsFromUser(QString &newFormula, int position, const QString &token) const;
bool VariablesFromUser(QString &newFormula, int position, const QString &token) const;
bool PostfixOperatorsFromUser(QString &newFormula, int position, const QString &token) const;
bool FunctionsFromUser(QString &newFormula, int position, const QString &token) const;
bool VariablesToUser(QString &newFormula, int position, const QString &token) const;
};
inline Valentina::Units VApplication::patternUnit() const

View File

@ -0,0 +1,75 @@
/************************************************************************
**
** @file vtranslation.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 12 5, 2014
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2014 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#include "vtranslation.h"
//---------------------------------------------------------------------------------------------------------------------
VTranslation VTranslation::translate(const QString &context, const QString &sourceText, const QString &disambiguation,
int n)
{
if (n < 0)
{
n = -1;
}
VTranslation t(context, sourceText, disambiguation, n);
return t;
}
//---------------------------------------------------------------------------------------------------------------------
VTranslation::VTranslation()
:mcontext(QString()), msourceText(QString()), mdisambiguation(QString()), mn(-1)
{}
//---------------------------------------------------------------------------------------------------------------------
VTranslation::VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation, int n)
:mcontext(context), msourceText(sourceText), mdisambiguation(disambiguation), mn(n)
{}
//---------------------------------------------------------------------------------------------------------------------
VTranslation &VTranslation::operator=(const VTranslation &tr)
{
this->mcontext = tr.getMcontext();
this->msourceText = tr.getMsourceText();
this->mdisambiguation = tr.getMdisambiguation();
this->mn = tr.getN();
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
VTranslation::VTranslation(const VTranslation &tr)
:mcontext(tr.getMcontext()), msourceText(tr.getMsourceText()), mdisambiguation(tr.getMdisambiguation()),
mn(tr.getN())
{}
//---------------------------------------------------------------------------------------------------------------------
QString VTranslation::VTranslation::translate() const
{
return QCoreApplication::translate(mcontext.toUtf8().constData(), msourceText.toUtf8().constData(),
mdisambiguation.toUtf8().constData(), mn);
}

View File

@ -0,0 +1,96 @@
/************************************************************************
**
** @file vtranslation.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 12 5, 2014
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2014 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef VTRANSLATION_H
#define VTRANSLATION_H
#include <QCoreApplication>
#include <QString>
/**
* @file
* @brief The VTranslation class help store string for translation.
*
* I took idea from this article http://ololoepepe.blogspot.com/2013/08/qt.html.
* As you know, if wrap string to a function translate, it will be marked for translation. No matter what namespace
* contains this function. In class Translation used this circumstance.
* It is mean never change name of method translate!!!!!.
* Instead of using QT_TRANSLATE_NOOP3 macros we can store strings in QMap.
* Example:
* create map and fill up its
* QMap<QString, VTranslation> map;
* map.insert("head_girth", VTranslation::translate("Measurements", "head_girth", "Around fullest part of Head."));
* get translated string
* map.value(measurement).translate();
*/
class VTranslation
{
public:
VTranslation();
VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = 0, int n = -1);
VTranslation &operator=(const VTranslation &tr);
VTranslation(const VTranslation &tr);
QString translate() const;
static VTranslation translate(const QString &context, const QString &sourceText, const QString &disambiguation = 0,
int n = -1);
QString getMcontext() const;
QString getMsourceText() const;
QString getMdisambiguation() const;
int getN() const;
private:
QString mcontext;
QString msourceText;
QString mdisambiguation;
int mn;
};
//---------------------------------------------------------------------------------------------------------------------
inline QString VTranslation::getMcontext() const
{
return mcontext;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VTranslation::getMsourceText() const
{
return msourceText;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VTranslation::getMdisambiguation() const
{
return mdisambiguation;
}
//---------------------------------------------------------------------------------------------------------------------
inline int VTranslation::getN() const
{
return mn;
}
#endif // VTRANSLATION_H

View File

@ -10,7 +10,8 @@ HEADERS += \
widgets/vsimplespline.h \
widgets/vsimplesplinepath.h \
widgets/vsimplearc.h \
widgets/textdelegate.h
widgets/textdelegate.h \
widgets/vtranslation.h
SOURCES += \
widgets/vtablegraphicsview.cpp \
@ -24,4 +25,5 @@ SOURCES += \
widgets/vsimplespline.cpp \
widgets/vsimplesplinepath.cpp \
widgets/vsimplearc.cpp \
widgets/textdelegate.cpp
widgets/textdelegate.cpp \
widgets/vtranslation.cpp

View File

@ -83,11 +83,12 @@ inline qint64 MessageHandler::column() const
return m_sourceLocation.column();
}
const QString VDomDocument::AttrId = QStringLiteral("id");
const QString VDomDocument::AttrUnit = QStringLiteral("unit");
const QString VDomDocument::UnitMM = QStringLiteral("mm");
const QString VDomDocument::UnitCM = QStringLiteral("cm");
const QString VDomDocument::AttrId = QStringLiteral("id");
const QString VDomDocument::AttrUnit = QStringLiteral("unit");
const QString VDomDocument::UnitMM = QStringLiteral("mm");
const QString VDomDocument::UnitCM = QStringLiteral("cm");
const QString VDomDocument::UnitINCH = QStringLiteral("inch");
const QString VDomDocument::TagVersion = QStringLiteral("version");
//---------------------------------------------------------------------------------------------------------------------
VDomDocument::VDomDocument(VContainer *data)
@ -431,6 +432,30 @@ bool VDomDocument::SaveDocument(const QString &fileName)
return result;
}
//---------------------------------------------------------------------------------------------------------------------
QString VDomDocument::Major() const
{
QString version = UniqueTagText(TagVersion, "0.0.0");
QStringList v = version.split(".");
return v.at(0);
}
//---------------------------------------------------------------------------------------------------------------------
QString VDomDocument::Minor() const
{
QString version = UniqueTagText(TagVersion, "0.0.0");
QStringList v = version.split(".");
return v.at(1);
}
//---------------------------------------------------------------------------------------------------------------------
QString VDomDocument::Patch() const
{
QString version = UniqueTagText(TagVersion, "0.0.0");
QStringList v = version.split(".");
return v.at(2);
}
//---------------------------------------------------------------------------------------------------------------------
void VDomDocument::setTagText(const QString &tag, const QString &text)
{

View File

@ -35,6 +35,11 @@
#include <QDebug>
#include "../options.h"
/*
can be used like #if (V_FORMAT_VERSION >= V_FORMAT_VERSION_CHECK(4, 4, 0))
*/
#define V_FORMAT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
@ -70,6 +75,7 @@ public:
static const QString UnitMM;
static const QString UnitCM;
static const QString UnitINCH;
static const QString TagVersion;
/**
* @param data container with variables
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
@ -145,7 +151,10 @@ public:
void setContent(const QString &fileName);
static Valentina::Units StrToUnits(const QString &unit);
static QString UnitsToStr(const Valentina::Units &unit);
virtual bool SaveDocument(const QString &fileName);
virtual bool SaveDocument(const QString &fileName);
QString Major() const;
QString Minor() const;
QString Patch() const;
protected:
/**
* @brief data container with data.

View File

@ -27,22 +27,15 @@
*************************************************************************/
#include "vindividualmeasurements.h"
#include "../widgets/vapplication.h"
const QString VIndividualMeasurements::AttrIgnore = QStringLiteral("ignore");
const QString VIndividualMeasurements::AttrName = QStringLiteral("name");
const QString VIndividualMeasurements::AttrM_number = QStringLiteral("m_number");
const QString VIndividualMeasurements::AttrGui_text = QStringLiteral("gui_text");
const QString VIndividualMeasurements::AttrValue = QStringLiteral("value");
const QString VIndividualMeasurements::AttrDescription = QStringLiteral("description");
const QString VIndividualMeasurements::TagLang = QStringLiteral("lang");
const QString VIndividualMeasurements::TagFamily_name = QStringLiteral("family-name");
const QString VIndividualMeasurements::TagGiven_name = QStringLiteral("given-name");
const QString VIndividualMeasurements::TagBirth_date = QStringLiteral("birth-date");
const QString VIndividualMeasurements::TagSex = QStringLiteral("sex");
const QString VIndividualMeasurements::TagUnit = QStringLiteral("unit");
const QString VIndividualMeasurements::TagEmail = QStringLiteral("email");
const QString VIndividualMeasurements::TagEmail = QStringLiteral("email");
const QString VIndividualMeasurements::SexMale = QStringLiteral("male");
const QString VIndividualMeasurements::SexFemale = QStringLiteral("female");
@ -67,92 +60,142 @@ void VIndividualMeasurements::setUnit(const Valentina::Units &unit)
void VIndividualMeasurements::Measurements()
{
//head and neck
Measurement("head_girth");
Measurement("mid_neck_girth");
Measurement("neck_base_girth");
Measurement("head_and_neck_length");
Measurement(headGirth_M);
Measurement(midNeckGirth_M);
Measurement(neckBaseGirth_M);
Measurement(headAndNeckLength_M);
//torso
Measurement("center_front_waist_length");
Measurement("center_back_waist_length");
Measurement("shoulder_length");
Measurement("side_waist_length");
Measurement("trunk_length");
Measurement("shoulder_girth");
Measurement("upper_chest_girth");
Measurement("bust__girth");
Measurement("under_bust_girth");
Measurement("waist_girth");
Measurement("high_hip_girth");
Measurement("hip_girth");
Measurement("upper_front_chest_width");
Measurement("front_chest_width");
Measurement("across_front_shoulder_width");
Measurement("across_back_shoulder_width");
Measurement("upper_back_width");
Measurement("back_width");
Measurement("bustpoint_to_bustpoint");
Measurement("halter_bustpoint_to_bustpoint");
Measurement("neck_to_bustpoint");
Measurement("crotch_length");
Measurement("rise_height");
Measurement("shoulder_drop");
Measurement("shoulder_slope_degrees");
Measurement("front_shoulder_slope_length");
Measurement("back_shoulder_slope_length");
Measurement("front_shoulder_to_waist_length");
Measurement("back_shoulder_to_waist_length");
Measurement("front_neck_arc");
Measurement("back_neck_arc");
Measurement("front_upper-bust_arc");
Measurement("back_upper-bust_arc");
Measurement("front_waist_arc");
Measurement("back_waist_arc");
Measurement("front_upper-hip_arc");
Measurement("back_upper-hip_arc");
Measurement("front_hip_arc");
Measurement("back_hip_arc");
Measurement("chest_slope");
Measurement("back_slope");
Measurement("front_waist_slope");
Measurement("back_waist_slope");
Measurement("front-neck_to_upper-chest_height");
Measurement("front-neck_to_bust_height");
Measurement(centerFrontWaistLength_M);
Measurement(centerBackWaistLength_M);
Measurement(shoulderLength_M);
Measurement(sideWaistLength_M);
Measurement(trunkLength_M);
Measurement(shoulderGirth_M);
Measurement(upperChestGirth_M);
Measurement(bustGirth_M);
Measurement(underBustGirth_M);
Measurement(waistGirth_M);
Measurement(highHipGirth_M);
Measurement(hipGirth_M);
Measurement(upperFrontChestWidth_M);
Measurement(frontChestWidth_M);
Measurement(acrossFrontShoulderWidth_M);
Measurement(acrossBackShoulderWidth_M);
Measurement(upperBackWidth_M);
Measurement(backWidth_M);
Measurement(bustpointToBustpoint_M);
Measurement(halterBustpointToBustpoint_M);
Measurement(neckToBustpoint_M);
Measurement(crotchLength_M);
Measurement(riseHeight_M);
Measurement(shoulderDrop_M);
Measurement(shoulderSlopeDegrees_M);
Measurement(frontShoulderSlopeLength_M);
Measurement(backShoulderSlopeLength_M);
Measurement(frontShoulderToWaistLength_M);
Measurement(backShoulderToWaistLength_M);
Measurement(frontNeckArc_M);
Measurement(backNeckArc_M);
Measurement(frontUpperChestArc_M);
Measurement(backUpperChestArc_M);
Measurement(frontWaistArc_M);
Measurement(backWaistArc_M);
Measurement(frontUpperHipArc_M);
Measurement(backUpperHipArc_M);
Measurement(frontHipArc_M);
Measurement(backHipArc_M);
Measurement(chestSlope_M);
Measurement(backSlope_M);
Measurement(frontWaistSlope_M);
Measurement(backWaistSlope_M);
Measurement(frontNeckToUpperChestHeight_M);
Measurement(frontNeckToBustHeight_M);
//arm
Measurement("armscye_girth");
Measurement("elbow_girth");
Measurement("upper-arm_girth");
Measurement("wrist_girth");
Measurement("scye_depth");
Measurement("shoulder_and_arm_length");
Measurement("underarm_length");
Measurement("cervicale_to_wrist_length");
Measurement("shoulder_to_elbow_length");
Measurement("arm_length");
Measurement(armscyeGirth_M);
Measurement(elbowGirth_M);
Measurement(upperArmGirth_M);
Measurement(wristGirth_M);
Measurement(scyeDepth_M);
Measurement(shoulderAndArmLength_M);
Measurement(underarmLength_M);
Measurement(cervicaleToWristLength_M);
Measurement(shoulderToElbowLength_M);
Measurement(armLength_M);
//hand
Measurement("hand_width");
Measurement("hand_length");
Measurement("hand_girth");
Measurement(handWidth_M);
Measurement(handLength_M);
Measurement(handGirth_M);
//leg
Measurement("thigh_girth");
Measurement("mid_thigh_girth");
Measurement("knee_girth");
Measurement("calf_girth");
Measurement("ankle_girth");
Measurement("knee_height");
Measurement("ankle_height");
Measurement(thighGirth_M);
Measurement(midThighGirth_M);
Measurement(kneeGirth_M);
Measurement(calfGirth_M);
Measurement(ankleGirth_M);
Measurement(kneeHeight_M);
Measurement(ankleHeight_M);
//foot
Measurement("foot_width");
Measurement("foot_length");
Measurement(footWidth_M);
Measurement(footLength_M);
//heights
Measurement("height");
Measurement("cervicale_height");
Measurement("cervicale_to_knee_height");
Measurement("waist_height");
Measurement("high_hip_height");
Measurement("hip_height");
Measurement("waist_to_hip_height");
Measurement("waist_to_knee_height");
Measurement("crotch_height");
Measurement(height_M);
Measurement(cervicaleHeight_M);
Measurement(cervicaleToKneeHeight_M);
Measurement(waistHeight_M);
Measurement(highHipHeight_M);
Measurement(hipHeight_M);
Measurement(waistToHipHeight_M);
Measurement(waistToKneeHeight_M);
Measurement(crotchHeight_M);
//extended
Measurement(size_M);
Measurement(heightFrontNeckBasePoint_M);
Measurement(heightBaseNeckSidePoint_M);
Measurement(heightShoulderPoint_M);
Measurement(heightNipplePoint_M);
Measurement(heightBackAngleAxilla_M);
Measurement(heightScapularPoint_M);
Measurement(heightUnderButtockFolds_M);
Measurement(hipsExcludingProtrudingAbdomen_M);
Measurement(girthFootInstep_M);
Measurement(sideWaistToFloor_M);
Measurement(frontWaistToFloor_M);
Measurement(arcThroughGroinArea_M);
Measurement(waistToPlaneSeat_M);
Measurement(neckToRadialPoint_M);
Measurement(neckToThirdFinger_M);
Measurement(neckToFirstLineChestCircumference_M);
Measurement(frontWaistLength_M);
Measurement(arcThroughShoulderJoint_M);
Measurement(neckToBackLineChestCircumference_M);
Measurement(waistToNeckSide_M);
Measurement(arcLengthUpperBody_M);
Measurement(chestWidth_M);
Measurement(anteroposteriorDiameterHands_M);
Measurement(heightClavicularPoint_M);
Measurement(heightArmholeSlash_M);
Measurement(slashShoulderHeight_M);
Measurement(halfGirthNeck_M);
Measurement(halfGirthNeckForShirts_M);
Measurement(halfGirthChestFirst_M);
Measurement(halfGirthChestSecond_M);
Measurement(halfGirthChestThird_M);
Measurement(halfGirthWaist_M);
Measurement(halfGirthHipsConsideringProtrudingAbdomen_M);
Measurement(halfGirthHipsExcludingProtrudingAbdomen_M);
Measurement(girthKneeFlexedFeet_M);
Measurement(neckTransverseDiameter_M);
Measurement(frontSlashShoulderHeight_M);
Measurement(neckToFrontWaistLine_M);
Measurement(handVerticalDiameter_M);
Measurement(neckToKneePoint_M);
Measurement(waistToKnee_M);
Measurement(shoulderHeight_M);
Measurement(headHeight_M);
Measurement(bodyPosition_M);
Measurement(arcBehindShoulderGirdle_M);
Measurement(neckToNeckBase_M);
Measurement(depthWaistFirst_M);
Measurement(depthWaistSecond_M);
}
//---------------------------------------------------------------------------------------------------------------------
@ -172,62 +215,18 @@ void VIndividualMeasurements::Measurement(const QString &tag)
const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false)
{
const bool ignore = QVariant(GetParametrString(domElement, AttrIgnore, "false")).toBool();
if (ignore)
{
return;
}
const QString name = GetParametrString(domElement, AttrName, "");
if (name.isEmpty())
{
return;
}
const QString m_number = GetParametrString(domElement, AttrM_number, "");
const QString gui_text = GetParametrString(domElement, AttrGui_text, "");
const qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
const QString description = GetParametrString(domElement, AttrDescription, "");
qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
if (Unit() == Valentina::Mm)//Convert to Cm.
{
data->AddMeasurement(name, VMeasurement(value/10.0, gui_text, description, tag));
if (m_number.isEmpty())
{
qDebug()<<"Can't find language-independent measurement name for "<< tag;
return;
}
else
{
VMeasurement m(value/10.0, gui_text, description, tag);
m.setVirtual(true);
data->AddMeasurement(m_number, m);
}
}
else//Cm or inch.
{
data->AddMeasurement(name, VMeasurement(value, gui_text, description, tag));
if (m_number.isEmpty())
{
qDebug()<<"Can't find language-independent measurement name for "<< tag;
return;
}
else
{
VMeasurement m(value, gui_text, description, tag);
m.setVirtual(true);
data->AddMeasurement(m_number, m);
}
value = value / 10.0;
}
data->AddMeasurement(tag, VMeasurement(value, qApp->GuiText(tag), qApp->Description(tag), tag));
}
}
}
}
//---------------------------------------------------------------------------------------------------------------------
QString VIndividualMeasurements::Language() const
{
return UniqueTagText(TagLang, "en");
}
//---------------------------------------------------------------------------------------------------------------------
QString VIndividualMeasurements::FamilyName() const
{

View File

@ -32,6 +32,14 @@
#include "vdomdocument.h"
#include <QDate>
/*
VIT_VERSION is (major << 16) + (minor << 8) + patch.
*/
// version without patch part
#define VIT_MIN_VERSION 0x000100
// max support version of format
#define VIT_VERSION 0x000100
class VIndividualMeasurements:public VDomDocument
{
public:
@ -42,7 +50,6 @@ public:
Valentina::Units Unit() const;
void setUnit(const Valentina::Units &unit);
void Measurements();
QString Language() const;
QString FamilyName() const;
void setFamilyName(const QString &text);
QString GivenName() const;
@ -53,21 +60,13 @@ public:
void setSex(const VIndividualMeasurements::Genders &sex);
QString Mail() const;
void setMail(const QString &text);
static const QString AttrIgnore;
static const QString AttrName;
static const QString AttrM_number;
static const QString AttrGui_text;
static const QString AttrValue;
static const QString AttrDescription;
static const QString TagLang;
static const QString TagFamily_name;
static const QString TagGiven_name;
static const QString TagBirth_date;
static const QString TagSex;
static const QString TagUnit;
static const QString TagEmail;
static const QString SexMale;
static const QString SexFemale;

View File

@ -39,6 +39,7 @@
#include "vindividualmeasurements.h"
#include <QMessageBox>
#include <qmuparsererror.h>
const QString VPattern::TagPattern = QStringLiteral("pattern");
const QString VPattern::TagCalculation = QStringLiteral("calculation");
@ -83,6 +84,11 @@ void VPattern::CreateEmptyFile(const QString &tablePath)
QDomElement patternElement = this->createElement(TagPattern);
patternElement.appendChild(createComment("Valentina pattern format."));
QDomElement version = createElement(TagVersion);
QDomText newNodeText = createTextNode(VAL_STR_VERSION);
version.appendChild(newNodeText);
patternElement.appendChild(createElement(TagAuthor));
patternElement.appendChild(createElement(TagDescription));
patternElement.appendChild(createElement(TagNotes));
@ -209,7 +215,8 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
if (domElement.isNull() == false)
{
QStringList tags;
tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements;
tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements
<< TagVersion;
switch (tags.indexOf(domElement.tagName()))
{
case 0: // TagDraw
@ -242,8 +249,10 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
break;
case 5: // TagMeasurements
break;
case 6: // TagVersion
break;
default:
qDebug()<<"Wrong tag name"<<Q_FUNC_INFO;
qDebug()<<"Wrong tag name"<<domElement.tagName()<<Q_FUNC_INFO;
break;
}
}
@ -845,6 +854,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point of end line"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 2: //VToolAlongLine::ToolType
try
@ -868,6 +885,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point along line"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 3: //VToolShoulderPoint::ToolType
try
@ -892,6 +917,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point of shoulder"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 4: //VToolNormal::ToolType
try
@ -916,6 +949,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point of normal"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 5: //VToolBisector::ToolType
try
@ -940,6 +981,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point of bisector"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 6: //VToolLineIntersect::ToolType
try
@ -984,6 +1033,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating point of contact"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 8: //VNodePoint::ToolType
try
@ -1089,6 +1146,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating cut spline point"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 13: //VToolCutSplinePath::ToolType
try
@ -1109,6 +1174,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating cut spline path point"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 14: //VToolCutArc::ToolType
try
@ -1128,6 +1201,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating cut arc point"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
default:
qDebug() << "Illegal point type in VDomDocument::ParsePointElement().";
@ -1311,6 +1392,14 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
excep.AddMoreInformation(e.ErrorMessage());
throw excep;
}
catch(qmu::QmuParserError &e)
{
VExceptionObjectError excep(tr("Error creating or updating simple arc"), domElement);
QString message("Message: " + e.GetMsg() + "\n"+
"Expression: " + e.GetExpr());
excep.AddMoreInformation(message);
throw excep;
}
break;
case 1: //VNodeArc::ToolType
try

View File

@ -45,6 +45,16 @@ namespace Document
}
Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents)
/*
VAL_VERSION is (major << 16) + (minor << 8) + patch.
*/
// version without patch part
#define VAL_MIN_VERSION 0x000100
// max support version of format
#define VAL_VERSION 0x000100
#define VAL_STR_VERSION "0.1.0"
/**
* @brief The VPattern class working with pattern file.
*/

View File

@ -28,17 +28,14 @@
#include "vstandardmeasurements.h"
#include <QDebug>
#include "../widgets/vapplication.h"
const QString VStandardMeasurements::TagMeasurement = QStringLiteral("measurement");
const QString VStandardMeasurements::TagDescription = QStringLiteral("description");
const QString VStandardMeasurements::TagSize = QStringLiteral("size");
const QString VStandardMeasurements::TagHeight = QStringLiteral("height");
const QString VStandardMeasurements::AttrName = QStringLiteral("name");
const QString VStandardMeasurements::AttrGui_text = QStringLiteral("gui_text");
const QString VStandardMeasurements::AttrBase = QStringLiteral("base");
const QString VStandardMeasurements::AttrValue = QStringLiteral("value");
const QString VStandardMeasurements::AttrSize_increace = QStringLiteral("size_increace");
const QString VStandardMeasurements::AttrHeight_increase = QStringLiteral("height_increase");
const QString VStandardMeasurements::AttrNumber = QStringLiteral("number");
//---------------------------------------------------------------------------------------------------------------------
VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data)
@ -65,43 +62,173 @@ QString VStandardMeasurements::Description()
//---------------------------------------------------------------------------------------------------------------------
void VStandardMeasurements::Measurements()
{
const QDomNodeList nodeList = this->elementsByTagName(TagMeasurement);
//head and neck
Measurement(headGirth_M);
Measurement(midNeckGirth_M);
Measurement(neckBaseGirth_M);
Measurement(headAndNeckLength_M);
//torso
Measurement(centerFrontWaistLength_M);
Measurement(centerBackWaistLength_M);
Measurement(shoulderLength_M);
Measurement(sideWaistLength_M);
Measurement(trunkLength_M);
Measurement(shoulderGirth_M);
Measurement(upperChestGirth_M);
Measurement(bustGirth_M);
Measurement(underBustGirth_M);
Measurement(waistGirth_M);
Measurement(highHipGirth_M);
Measurement(hipGirth_M);
Measurement(upperFrontChestWidth_M);
Measurement(frontChestWidth_M);
Measurement(acrossFrontShoulderWidth_M);
Measurement(acrossBackShoulderWidth_M);
Measurement(upperBackWidth_M);
Measurement(backWidth_M);
Measurement(bustpointToBustpoint_M);
Measurement(halterBustpointToBustpoint_M);
Measurement(neckToBustpoint_M);
Measurement(crotchLength_M);
Measurement(riseHeight_M);
Measurement(shoulderDrop_M);
Measurement(shoulderSlopeDegrees_M);
Measurement(frontShoulderSlopeLength_M);
Measurement(backShoulderSlopeLength_M);
Measurement(frontShoulderToWaistLength_M);
Measurement(backShoulderToWaistLength_M);
Measurement(frontNeckArc_M);
Measurement(backNeckArc_M);
Measurement(frontUpperChestArc_M);
Measurement(backUpperChestArc_M);
Measurement(frontWaistArc_M);
Measurement(backWaistArc_M);
Measurement(frontUpperHipArc_M);
Measurement(backUpperHipArc_M);
Measurement(frontHipArc_M);
Measurement(backHipArc_M);
Measurement(chestSlope_M);
Measurement(backSlope_M);
Measurement(frontWaistSlope_M);
Measurement(backWaistSlope_M);
Measurement(frontNeckToUpperChestHeight_M);
Measurement(frontNeckToBustHeight_M);
//arm
Measurement(armscyeGirth_M);
Measurement(elbowGirth_M);
Measurement(upperArmGirth_M);
Measurement(wristGirth_M);
Measurement(scyeDepth_M);
Measurement(shoulderAndArmLength_M);
Measurement(underarmLength_M);
Measurement(cervicaleToWristLength_M);
Measurement(shoulderToElbowLength_M);
Measurement(armLength_M);
//hand
Measurement(handWidth_M);
Measurement(handLength_M);
Measurement(handGirth_M);
//leg
Measurement(thighGirth_M);
Measurement(midThighGirth_M);
Measurement(kneeGirth_M);
Measurement(calfGirth_M);
Measurement(ankleGirth_M);
Measurement(kneeHeight_M);
Measurement(ankleHeight_M);
//foot
Measurement(footWidth_M);
Measurement(footLength_M);
//heights
Measurement(cervicaleHeight_M);
Measurement(cervicaleToKneeHeight_M);
Measurement(waistHeight_M);
Measurement(highHipHeight_M);
Measurement(hipHeight_M);
Measurement(waistToHipHeight_M);
Measurement(waistToKneeHeight_M);
Measurement(crotchHeight_M);
//extended
Measurement(heightFrontNeckBasePoint_M);
Measurement(heightBaseNeckSidePoint_M);
Measurement(heightShoulderPoint_M);
Measurement(heightNipplePoint_M);
Measurement(heightBackAngleAxilla_M);
Measurement(heightScapularPoint_M);
Measurement(heightUnderButtockFolds_M);
Measurement(hipsExcludingProtrudingAbdomen_M);
Measurement(girthFootInstep_M);
Measurement(sideWaistToFloor_M);
Measurement(frontWaistToFloor_M);
Measurement(arcThroughGroinArea_M);
Measurement(waistToPlaneSeat_M);
Measurement(neckToRadialPoint_M);
Measurement(neckToThirdFinger_M);
Measurement(neckToFirstLineChestCircumference_M);
Measurement(frontWaistLength_M);
Measurement(arcThroughShoulderJoint_M);
Measurement(neckToBackLineChestCircumference_M);
Measurement(waistToNeckSide_M);
Measurement(arcLengthUpperBody_M);
Measurement(chestWidth_M);
Measurement(anteroposteriorDiameterHands_M);
Measurement(heightClavicularPoint_M);
Measurement(heightArmholeSlash_M);
Measurement(slashShoulderHeight_M);
Measurement(halfGirthNeck_M);
Measurement(halfGirthNeckForShirts_M);
Measurement(halfGirthChestFirst_M);
Measurement(halfGirthChestSecond_M);
Measurement(halfGirthChestThird_M);
Measurement(halfGirthWaist_M);
Measurement(halfGirthHipsConsideringProtrudingAbdomen_M);
Measurement(halfGirthHipsExcludingProtrudingAbdomen_M);
Measurement(girthKneeFlexedFeet_M);
Measurement(neckTransverseDiameter_M);
Measurement(frontSlashShoulderHeight_M);
Measurement(neckToFrontWaistLine_M);
Measurement(handVerticalDiameter_M);
Measurement(neckToKneePoint_M);
Measurement(waistToKnee_M);
Measurement(shoulderHeight_M);
Measurement(headHeight_M);
Measurement(bodyPosition_M);
Measurement(arcBehindShoulderGirdle_M);
Measurement(neckToNeckBase_M);
Measurement(depthWaistFirst_M);
Measurement(depthWaistSecond_M);
}
//---------------------------------------------------------------------------------------------------------------------
void VStandardMeasurements::Measurement(const QString &tag)
{
const QDomNodeList nodeList = this->elementsByTagName(tag);
if (nodeList.isEmpty())
{
qDebug()<<"Measurement list is empty"<<Q_FUNC_INFO;
qDebug()<<"Measurement" << tag <<"doesn't exist"<<Q_FUNC_INFO;
return;
}
else
{
for (qint32 i = 0; i < nodeList.size(); ++i)
const QDomNode domNode = nodeList.at(0);
if (domNode.isNull() == false && domNode.isElement())
{
const QDomNode domNode = nodeList.at(i);
if (domNode.isNull() == false && domNode.isElement())
const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false)
{
const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false)
{
const QString name = GetParametrString(domElement, AttrName, "");
if (name.isEmpty())
{
continue;
}
const QString gui_text = GetParametrString(domElement, AttrGui_text, "");
const qreal base = GetParametrDouble(domElement, AttrBase, "0.0");
const qreal size_increace = GetParametrDouble(domElement, AttrSize_increace, "0.0");
const qreal height_increase = GetParametrDouble(domElement, AttrHeight_increase, "0.0");
const QString number = GetParametrString(domElement, AttrNumber, "");
const qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
const qreal size_increace = GetParametrDouble(domElement, AttrSize_increace, "0.0");
const qreal height_increase = GetParametrDouble(domElement, AttrHeight_increase, "0.0");
if (Unit() == Valentina::Mm)// Convert to Cm.
{
data->AddMeasurement(name, VMeasurement(base/10.0, size_increace/10.0, height_increase/10.0,
gui_text, number));
}
else// Cm or inch.
{
data->AddMeasurement(name, VMeasurement(base, size_increace, height_increase,
gui_text, number));
}
if (Unit() == Valentina::Mm)// Convert to Cm.
{
data->AddMeasurement(tag, VMeasurement(value/10.0, size_increace/10.0, height_increase/10.0,
qApp->GuiText(tag), qApp->Description(tag), tag));
}
else// Cm or inch.
{
data->AddMeasurement(tag, VMeasurement(value, size_increace, height_increase, qApp->GuiText(tag),
qApp->Description(tag), tag));
}
}
}
@ -115,7 +242,7 @@ void VStandardMeasurements::SetSize()
if (nodeList.isEmpty())
{
data->SetSize(50);
data->SetSizeName("Сг");
data->SetSizeName(size_M);
}
else
{
@ -125,18 +252,13 @@ void VStandardMeasurements::SetSize()
const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false)
{
const QString name = GetParametrString(domElement, AttrName, "Сг");
const qreal base = GetParametrDouble(domElement, AttrBase, "50.0");
qreal value = GetParametrDouble(domElement, AttrValue, "50.0");
if (Unit() == Valentina::Mm)// Convert to Cm.
{
data->SetSize(base/10.0);
data->SetSizeName(name);
}
else// Cm or inch.
{
data->SetSize(base);
data->SetSizeName(name);
value = value/10.0;
}
data->SetSize(value);
data->SetSizeName(size_M);
}
}
}
@ -149,7 +271,7 @@ void VStandardMeasurements::SetHeight()
if (nodeList.isEmpty())
{
data->SetHeight(176);
data->SetHeightName("P");
data->SetHeightName(height_M);
}
else
{
@ -159,18 +281,13 @@ void VStandardMeasurements::SetHeight()
const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false)
{
const QString name = GetParametrString(domElement, AttrName, "Р");
const qreal base = GetParametrDouble(domElement, AttrBase, "176.0");
qreal value = GetParametrDouble(domElement, AttrValue, "176.0");
if (Unit() == Valentina::Mm)// Convert to Cm.
{
data->SetHeight(base/10.0);
data->SetHeightName(name);
}
else// Cm or inch.
{
data->SetHeight(base);
data->SetHeightName(name);
value = value / 10.0;
}
data->SetHeight(value);
data->SetHeightName(height_M);
}
}
}

View File

@ -31,6 +31,14 @@
#include "vdomdocument.h"
/*
VST_VERSION is (major << 16) + (minor << 8) + patch.
*/
// version without patch part
#define VST_MIN_VERSION 0x000100
// max support version of format
#define VST_VERSION 0x000100
class VStandardMeasurements:public VDomDocument
{
public:
@ -44,12 +52,11 @@ public:
static const QString TagDescription;
static const QString TagSize;
static const QString TagHeight;
static const QString AttrName;
static const QString AttrGui_text;
static const QString AttrBase;
static const QString AttrValue;
static const QString AttrSize_increace;
static const QString AttrHeight_increase;
static const QString AttrNumber;
private:
void Measurement(const QString &tag);
};
#endif // VSTANDARDMEASUREMENTS_H

View File

@ -202,11 +202,7 @@ int QmuParser::IsVal(const QString &a_szExpr, int *a_iPos, qreal *a_fVal)
{
qreal fVal(0);
#if defined(_UNICODE)
std::wstring a_szExprStd = a_szExpr.toStdWString();
#else
std::string a_szExprStd = a_szExpr.toStdString();
#endif
std::wstring a_szExprStd = a_szExpr.toStdWString();
stringstream_type stream(a_szExprStd);
stream.seekg(0); // todo: check if this really is necessary
stream.imbue(QmuParser::s_locale);

View File

@ -74,7 +74,7 @@ namespace qmu
static qreal Sign(qreal);
// Prefix operators
// !!! Unary Minus is a MUST if you want to use negative signs !!!
static qreal UnaryMinus(qreal v) Q_DECL_NOEXCEPT;
static qreal UnaryMinus(qreal v);
// Functions with variable number of arguments
static qreal Sum(const qreal*, int); // sum
static qreal Avg(const qreal*, int); // mean value
@ -88,7 +88,7 @@ namespace qmu
* @param v The value to negate
* @return -v
*/
inline qreal QmuParser::UnaryMinus(qreal v) Q_DECL_NOEXCEPT
inline qreal QmuParser::UnaryMinus(qreal v)
{
return -v;
}

View File

@ -24,10 +24,7 @@ MOC_DIR = moc
OBJECTS_DIR = obj
# files created rcc
RCC_DIR = rcc
# files created uic
UI_DIR = uic
#RCC_DIR = rcc
SOURCES += \
qmuparser.cpp \
@ -73,8 +70,8 @@ CONFIG(debug, debug|release){
# Debug
unix {
*-g++{
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" \
-isystem "$${MOC_DIR}" -isystem "$${RCC_DIR}" \
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtCore" -isystem "$${MOC_DIR}" \
#-isystem "$${RCC_DIR}" \
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
@ -101,8 +98,9 @@ CONFIG(debug, debug|release){
}
# Remove generated files at cleaning
QMAKE_DISTCLEAN += $${DESTDIR}/* \
$${OBJECTS_DIR}/* \
$${UI_DIR}/* \
$${MOC_DIR}/* \
$${RCC_DIR}/*
QMAKE_DISTCLEAN += \
$${DESTDIR}/* \
$${OBJECTS_DIR}/* \
#$${RCC_DIR}/* \
$${MOC_DIR}/*

View File

@ -64,7 +64,7 @@ QmuParserBase::QmuParserBase()
:m_pParseFormula(&QmuParserBase::ParseString), m_vRPN(), m_vStringBuf(), m_vStringVarBuf(), m_pTokenReader(),
m_FunDef(), m_PostOprtDef(), m_InfixOprtDef(), m_OprtDef(), m_ConstDef(), m_StrVarDef(), m_VarDef(),
m_bBuiltInOp(true), m_sNameChars(), m_sOprtChars(), m_sInfixOprtChars(), m_nIfElseCounter(0), m_vStackBuffer(),
m_nFinalResultIdx(0)
m_nFinalResultIdx(0), m_Tokens(QMap<int, QString>()), m_Numbers(QMap<int, QString>())
{
InitTokenReader();
}
@ -79,7 +79,7 @@ QmuParserBase::QmuParserBase(const QmuParserBase &a_Parser)
:m_pParseFormula(&QmuParserBase::ParseString), m_vRPN(), m_vStringBuf(), m_vStringVarBuf(), m_pTokenReader(),
m_FunDef(), m_PostOprtDef(), m_InfixOprtDef(), m_OprtDef(), m_ConstDef(), m_StrVarDef(), m_VarDef(),
m_bBuiltInOp(true), m_sNameChars(), m_sOprtChars(), m_sInfixOprtChars(), m_nIfElseCounter(0), m_vStackBuffer(),
m_nFinalResultIdx(0)
m_nFinalResultIdx(0), m_Tokens(QMap<int, QString>()), m_Numbers(QMap<int, QString>())
{
m_pTokenReader.reset(new token_reader_type(this));
Assign(a_Parser);
@ -98,7 +98,7 @@ QmuParserBase::~QmuParserBase()
* @return *this
* @throw nothrow
*/
QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT
QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser)
{
Assign(a_Parser);
return *this;
@ -199,13 +199,15 @@ void QmuParserBase::ResetLocale()
* Clear bytecode, reset the token reader.
* @throw nothrow
*/
void QmuParserBase::ReInit() const Q_DECL_NOEXCEPT
void QmuParserBase::ReInit() const
{
m_pParseFormula = &QmuParserBase::ParseString;
m_vStringBuf.clear();
m_vRPN.clear();
m_pTokenReader->ReInit();
m_nIfElseCounter = 0;
m_Tokens.clear();
m_Numbers.clear();
}
//---------------------------------------------------------------------------------------------------------------------
@ -318,13 +320,9 @@ void QmuParserBase::AddCallback(const QString &a_strName, const QmuParserCallbac
void QmuParserBase::CheckOprt(const QString &a_sName, const QmuParserCallback &a_Callback,
const QString &a_szCharSet) const
{
#if defined(_UNICODE)
const std::wstring a_sNameStd = a_sName.toStdWString();
const std::wstring a_szCharSetStd = a_szCharSet.toStdWString();
#else
const std::string a_sNameStd = a_sName.toStdString();
const std::string a_szCharSetStd = a_szCharSet.toStdString();
#endif
if ( a_sNameStd.length() == false || (a_sNameStd.find_first_not_of(a_szCharSetStd)!=string_type::npos) ||
(a_sNameStd.at(0)>='0' && a_sNameStd.at(0)<='9'))
{
@ -385,13 +383,9 @@ void QmuParserBase::CheckOprt(const QString &a_sName, const QmuParserCallback &a
*/
void QmuParserBase::CheckName(const QString &a_sName, const QString &a_szCharSet) const
{
#if defined(_UNICODE)
std::wstring a_sNameStd = a_sName.toStdWString();
std::wstring a_szCharSetStd = a_szCharSet.toStdWString();
#else
std::string a_sNameStd = a_sName.toStdString();
std::string a_szCharSetStd = a_szCharSet.toStdString();
#endif
if ( a_sNameStd.length() == false || (a_sNameStd.find_first_not_of(a_szCharSetStd)!=string_type::npos) ||
(a_sNameStd[0]>='0' && a_sNameStd[0]<='9'))
{
@ -1494,14 +1488,17 @@ void QmuParserBase::CreateRPN() const
opt.SetIdx(m_vStringBuf.size()); // Assign buffer index to token
stVal.push(opt);
m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break;
case cmVAR:
stVal.push(opt);
m_vRPN.AddVar( static_cast<qreal*>(opt.GetVar()) );
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break;
case cmVAL:
stVal.push(opt);
m_vRPN.AddVal( opt.GetVal() );
m_Numbers.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break;
case cmELSE:
m_nIfElseCounter--;
@ -1643,10 +1640,12 @@ void QmuParserBase::CreateRPN() const
case cmFUNC_BULK:
case cmFUNC_STR:
stOpt.push(opt);
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break;
case cmOPRT_POSTFIX:
stOpt.push(opt);
ApplyFunc(stOpt, stVal, 1); // this is the postfix operator
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break;
case cmENDIF:
case cmVARPOW2:
@ -1753,7 +1752,7 @@ void Q_NORETURN QmuParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const QStr
* Resets the parser to string parsing mode by calling #ReInit.
*/
// cppcheck-suppress unusedFunction
void QmuParserBase::ClearVar() Q_DECL_NOEXCEPT
void QmuParserBase::ClearVar()
{
m_VarDef.clear();
ReInit();
@ -1766,7 +1765,7 @@ void QmuParserBase::ClearVar() Q_DECL_NOEXCEPT
*
* Removes a variable if it exists. If the Variable does not exist nothing will be done.
*/
void QmuParserBase::RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT
void QmuParserBase::RemoveVar(const QString &a_strVarName)
{
varmap_type::iterator item = m_VarDef.find(a_strVarName);
if (item!=m_VarDef.end())
@ -1783,7 +1782,7 @@ void QmuParserBase::RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT
* @throw nothrow
*/
// cppcheck-suppress unusedFunction
void QmuParserBase::ClearFun() Q_DECL_NOEXCEPT
void QmuParserBase::ClearFun()
{
m_FunDef.clear();
ReInit();
@ -1797,7 +1796,7 @@ void QmuParserBase::ClearFun() Q_DECL_NOEXCEPT
* @post Resets the parser to string parsing mode.
* @throw nothrow
*/
void QmuParserBase::ClearConst() Q_DECL_NOEXCEPT
void QmuParserBase::ClearConst()
{
m_ConstDef.clear();
m_StrVarDef.clear();
@ -1810,7 +1809,7 @@ void QmuParserBase::ClearConst() Q_DECL_NOEXCEPT
* @post Resets the parser to string parsing mode.
* @throw nothrow
*/
void QmuParserBase::ClearPostfixOprt() Q_DECL_NOEXCEPT
void QmuParserBase::ClearPostfixOprt()
{
m_PostOprtDef.clear();
ReInit();
@ -1823,7 +1822,7 @@ void QmuParserBase::ClearPostfixOprt() Q_DECL_NOEXCEPT
* @throw nothrow
*/
// cppcheck-suppress unusedFunction
void QmuParserBase::ClearOprt() Q_DECL_NOEXCEPT
void QmuParserBase::ClearOprt()
{
m_OprtDef.clear();
ReInit();
@ -1836,7 +1835,7 @@ void QmuParserBase::ClearOprt() Q_DECL_NOEXCEPT
* @throw nothrow
*/
// cppcheck-suppress unusedFunction
void QmuParserBase::ClearInfixOprt() Q_DECL_NOEXCEPT
void QmuParserBase::ClearInfixOprt()
{
m_InfixOprtDef.clear();
ReInit();
@ -1848,7 +1847,7 @@ void QmuParserBase::ClearInfixOprt() Q_DECL_NOEXCEPT
* @post Resets the parser to string parser mode.
* @throw nothrow
*/
void QmuParserBase::EnableOptimizer(bool a_bIsOn) Q_DECL_NOEXCEPT
void QmuParserBase::EnableOptimizer(bool a_bIsOn)
{
m_vRPN.EnableOptimizer(a_bIsOn);
ReInit();
@ -1879,7 +1878,7 @@ void QmuParserBase::EnableDebugDump(bool bDumpCmd, bool bDumpStack)
* manually one by one. It is not possible to disable built in operators selectively. This function will Reinitialize
* the parser by calling ReInit().
*/
void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn) Q_DECL_NOEXCEPT
void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn)
{
m_bBuiltInOp = a_bIsOn;
ReInit();

View File

@ -58,22 +58,22 @@ class QMUPARSERSHARED_EXPORT QmuParserBase
public:
QmuParserBase();
QmuParserBase(const QmuParserBase &a_Parser);
QmuParserBase& operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT;
QmuParserBase& operator=(const QmuParserBase &a_Parser);
virtual ~QmuParserBase();
static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
qreal Eval() const;
qreal* Eval(int &nStackSize) const;
void Eval(qreal *results, int nBulkSize) const;
int GetNumResults() const Q_DECL_NOEXCEPT;
int GetNumResults() const;
void SetExpr(const QString &a_sExpr);
void SetVarFactory(facfun_type a_pFactory, void *pUserData = nullptr);
void SetDecSep(char_type cDecSep);
void SetThousandsSep(char_type cThousandsSep = 0);
void ResetLocale();
void EnableOptimizer(bool a_bIsOn=true) Q_DECL_NOEXCEPT;
void EnableBuiltInOprt(bool a_bIsOn=true) Q_DECL_NOEXCEPT;
bool HasBuiltInOprt() const Q_DECL_NOEXCEPT;
void EnableOptimizer(bool a_bIsOn=true);
void EnableBuiltInOprt(bool a_bIsOn=true);
bool HasBuiltInOprt() const;
void AddValIdent(identfun_type a_pCallback);
void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0,
EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false);
@ -84,23 +84,25 @@ public:
void DefineInfixOprt(const QString &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX,
bool a_bAllowOpt=true);
// Clear user defined variables, constants or functions
void ClearVar() Q_DECL_NOEXCEPT;
void ClearFun() Q_DECL_NOEXCEPT;
void ClearConst() Q_DECL_NOEXCEPT;
void ClearInfixOprt() Q_DECL_NOEXCEPT;
void ClearPostfixOprt() Q_DECL_NOEXCEPT;
void ClearOprt() Q_DECL_NOEXCEPT;
void RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT;
void ClearVar();
void ClearFun();
void ClearConst();
void ClearInfixOprt();
void ClearPostfixOprt();
void ClearOprt();
void RemoveVar(const QString &a_strVarName);
const varmap_type& GetUsedVar() const;
const varmap_type& GetVar() const Q_DECL_NOEXCEPT;
const valmap_type& GetConst() const Q_DECL_NOEXCEPT;
const varmap_type& GetVar() const;
const valmap_type& GetConst() const;
const QString& GetExpr() const;
const funmap_type& GetFunDef() const Q_DECL_NOEXCEPT;
const funmap_type& GetFunDef() const;
static QString GetVersion(EParserVersionInfo eInfo = pviFULL);
static const QStringList& GetOprtDef() Q_DECL_NOEXCEPT;
void DefineNameChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
void DefineOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
void DefineInfixOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT;
static const QStringList& GetOprtDef();
QMap<int, QString> GetTokens() const;
QMap<int, QString> GetNumbers() const;
void DefineNameChars(const QString &a_szCharset);
void DefineOprtChars(const QString &a_szCharset);
void DefineInfixOprtChars(const QString &a_szCharset);
const QString& ValidNameChars() const;
const QString& ValidOprtChars() const;
const QString& ValidInfixOprtChars() const;
@ -232,10 +234,12 @@ private:
// items merely used for caching state information
mutable valbuf_type m_vStackBuffer; ///< This is merely a buffer used for the stack in the cmd parsing routine
mutable int m_nFinalResultIdx;
mutable QMap<int, QString> m_Tokens;///< Keep all tokens that we can translate
mutable QMap<int, QString> m_Numbers;///< Keep all numbers what exist in formula
void Assign(const QmuParserBase &a_Parser);
void InitTokenReader();
void ReInit() const Q_DECL_NOEXCEPT;
void ReInit() const;
void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback,
funmap_type &a_Storage, const QString &a_szCharSet );
void ApplyRemainingOprt(QStack<token_type> &a_stOpt, QStack<token_type> &a_stVal) const;
@ -297,16 +301,26 @@ inline void QmuParserBase::SetVarFactory(facfun_type a_pFactory, void *pUserData
* @brief Get the default symbols used for the built in operators.
* @sa c_DefaultOprt
*/
inline const QStringList &QmuParserBase::GetOprtDef() Q_DECL_NOEXCEPT
inline const QStringList &QmuParserBase::GetOprtDef()
{
return c_DefaultOprt;
}
inline QMap<int, QString> QmuParserBase::GetTokens() const
{
return m_Tokens;
}
inline QMap<int, QString> QmuParserBase::GetNumbers() const
{
return m_Numbers;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief Define the set of valid characters to be used in names of functions, variables, constants.
*/
inline void QmuParserBase::DefineNameChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
inline void QmuParserBase::DefineNameChars(const QString &a_szCharset)
{
m_sNameChars = a_szCharset;
}
@ -315,7 +329,7 @@ inline void QmuParserBase::DefineNameChars(const QString &a_szCharset) Q_DECL_NO
/**
* @brief Define the set of valid characters to be used in names of binary operators and postfix operators.
*/
inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset)
{
m_sOprtChars = a_szCharset;
}
@ -324,7 +338,7 @@ inline void QmuParserBase::DefineOprtChars(const QString &a_szCharset) Q_DECL_NO
/**
* @brief Define the set of valid characters to be used in names of infix operators.
*/
inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT
inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset)
{
m_sInfixOprtChars = a_szCharset;
}
@ -333,7 +347,7 @@ inline void QmuParserBase::DefineInfixOprtChars(const QString &a_szCharset) Q_DE
/**
* @brief Return a map containing the used variables only.
*/
inline const varmap_type &QmuParserBase::GetVar() const Q_DECL_NOEXCEPT
inline const varmap_type &QmuParserBase::GetVar() const
{
return m_VarDef;
}
@ -342,7 +356,7 @@ inline const varmap_type &QmuParserBase::GetVar() const Q_DECL_NOEXCEPT
/**
* @brief Return a map containing all parser constants.
*/
inline const valmap_type &QmuParserBase::GetConst() const Q_DECL_NOEXCEPT
inline const valmap_type &QmuParserBase::GetConst() const
{
return m_ConstDef;
}
@ -358,7 +372,7 @@ inline const valmap_type &QmuParserBase::GetConst() const Q_DECL_NOEXCEPT
* parser functions. String functions are not part of this map. The Prototype definition is encapsulated in objects
* of the class FunProt one per parser function each associated with function names via a map construct.
*/
inline const funmap_type &QmuParserBase::GetFunDef() const Q_DECL_NOEXCEPT
inline const funmap_type &QmuParserBase::GetFunDef() const
{
return m_FunDef;
}
@ -378,7 +392,7 @@ inline const QString& QmuParserBase::GetExpr() const
* @return #m_bBuiltInOp; true if built in operators are enabled.
* @throw nothrow
*/
inline bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT
inline bool QmuParserBase::HasBuiltInOprt() const
{
return m_bBuiltInOp;
}
@ -391,7 +405,7 @@ inline bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT
* value. This function returns the number of available results.
*/
// cppcheck-suppress unusedFunction
inline int QmuParserBase::GetNumResults() const Q_DECL_NOEXCEPT
inline int QmuParserBase::GetNumResults() const
{
return m_nFinalResultIdx;
}

View File

@ -40,7 +40,7 @@ namespace qmu
* @brief Bytecode default constructor.
*/
// cppcheck-suppress uninitMemberVar
QmuParserByteCode::QmuParserByteCode() Q_DECL_NOEXCEPT
QmuParserByteCode::QmuParserByteCode()
:m_iStackPos(0), m_iMaxStackSize(0), m_vRPN(), m_bEnableOptimizer(true)
{
m_vRPN.reserve(50);
@ -53,7 +53,7 @@ QmuParserByteCode::QmuParserByteCode() Q_DECL_NOEXCEPT
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/
// cppcheck-suppress uninitMemberVar
QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode)
:m_iStackPos(a_ByteCode.m_iStackPos), m_iMaxStackSize(a_ByteCode.m_iMaxStackSize), m_vRPN(a_ByteCode.m_vRPN),
m_bEnableOptimizer(true)
{
@ -67,7 +67,7 @@ QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/
// cppcheck-suppress operatorEqVarError
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode)
{
Assign(a_ByteCode);
return *this;
@ -79,7 +79,7 @@ QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteC
*
* @throw nowthrow
*/
void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT
void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode)
{
if (this==&a_ByteCode)
{
@ -98,7 +98,7 @@ void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXC
* @param a_pVar Pointer to be added.
* @throw nothrow
*/
void QmuParserByteCode::AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddVar(qreal *a_pVar)
{
++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));
@ -126,7 +126,7 @@ void QmuParserByteCode::AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT
* @param a_pVal Value to be added.
* @throw nothrow
*/
void QmuParserByteCode::AddVal(qreal a_fVal) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddVal(qreal a_fVal)
{
++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));
@ -472,7 +472,7 @@ void QmuParserByteCode::AddOp(ECmdCode a_Oprt)
}
//---------------------------------------------------------------------------------------------------------------------
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt)
{
SToken tok;
tok.Cmd = a_Oprt;
@ -491,7 +491,7 @@ void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT
*
* @sa ParserToken::ECmdCode
*/
void QmuParserByteCode::AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddAssignOp(qreal *a_pVar)
{
--m_iStackPos;
@ -508,7 +508,7 @@ void QmuParserByteCode::AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT
* @param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback.
*/
void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
{
if (a_iArgc>=0)
{
@ -535,7 +535,7 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEX
* @param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback.
*/
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
{
m_iStackPos = m_iStackPos - a_iArgc + 1;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos));
@ -555,7 +555,7 @@ void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_
* A string function entry consists of the stack position of the return value, followed by a cmSTRFUNC code, the
* function pointer and an index into the string buffer maintained by the parser.
*/
void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) Q_DECL_NOEXCEPT
void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
{
m_iStackPos = m_iStackPos - a_iArgc + 1;
@ -575,7 +575,7 @@ void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iI
*
* @throw nothrow
*/
void QmuParserByteCode::Finalize() Q_DECL_NOEXCEPT
void QmuParserByteCode::Finalize()
{
SToken tok;
tok.Cmd = cmEND;
@ -662,7 +662,7 @@ const SToken* QmuParserByteCode::GetBase() const
* The name of this function is a violation of my own coding guidelines but this way it's more in line with the STL
* functions thus more intuitive.
*/
void QmuParserByteCode::clear() Q_DECL_NOEXCEPT
void QmuParserByteCode::clear()
{
m_vRPN.clear();
m_iStackPos = 0;

View File

@ -81,23 +81,23 @@ struct SToken
class QmuParserByteCode
{
public:
QmuParserByteCode() Q_DECL_NOEXCEPT;
QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
void Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT;
void AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT;
void AddVal(qreal a_fVal) Q_DECL_NOEXCEPT;
QmuParserByteCode();
QmuParserByteCode(const QmuParserByteCode &a_ByteCode);
QmuParserByteCode& operator=(const QmuParserByteCode &a_ByteCode);
void Assign(const QmuParserByteCode &a_ByteCode);
void AddVar(qreal *a_pVar);
void AddVal(qreal a_fVal);
void AddOp(ECmdCode a_Oprt);
void AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT;
void AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT;
void AddFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT;
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc) Q_DECL_NOEXCEPT;
void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx) Q_DECL_NOEXCEPT;
void EnableOptimizer(bool bStat) Q_DECL_NOEXCEPT;
void Finalize() Q_DECL_NOEXCEPT;
void clear() Q_DECL_NOEXCEPT;
std::size_t GetMaxStackSize() const Q_DECL_NOEXCEPT;
std::size_t GetSize() const Q_DECL_NOEXCEPT;
void AddIfElse(ECmdCode a_Oprt);
void AddAssignOp(qreal *a_pVar);
void AddFun(generic_fun_type a_pFun, int a_iArgc);
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc);
void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx);
void EnableOptimizer(bool bStat);
void Finalize();
void clear();
std::size_t GetMaxStackSize() const;
std::size_t GetSize() const;
const SToken* GetBase() const;
void AsciiDump();
private:
@ -122,13 +122,13 @@ private:
};
//---------------------------------------------------------------------------------------------------------------------
inline void QmuParserByteCode::EnableOptimizer(bool bStat) Q_DECL_NOEXCEPT
inline void QmuParserByteCode::EnableOptimizer(bool bStat)
{
m_bEnableOptimizer = bStat;
}
//---------------------------------------------------------------------------------------------------------------------
inline std::size_t QmuParserByteCode::GetMaxStackSize() const Q_DECL_NOEXCEPT
inline std::size_t QmuParserByteCode::GetMaxStackSize() const
{
return m_iMaxStackSize+1;
}
@ -138,7 +138,7 @@ inline std::size_t QmuParserByteCode::GetMaxStackSize() const Q_DECL_NOEXCEPT
* @brief Returns the number of entries in the bytecode.
*/
// cppcheck-suppress unusedFunction
inline std::size_t QmuParserByteCode::GetSize() const Q_DECL_NOEXCEPT
inline std::size_t QmuParserByteCode::GetSize() const
{
return m_vRPN.size();
}

View File

@ -34,7 +34,7 @@ namespace qmu
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -44,7 +44,6 @@ QmuParserCallback::QmuParserCallback ( fun_type0 a_pFun, bool a_bAllowOpti ) Q_D
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode )
Q_DECL_NOEXCEPT
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( a_iPrec ), m_eOprtAsct ( oaNONE ),
m_iCode ( a_iCode ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -57,7 +56,7 @@ Q_DECL_NOEXCEPT
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -75,7 +74,7 @@ QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti ) Q_D
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec,
EOprtAssociativity a_eOprtAsct ) Q_DECL_NOEXCEPT
EOprtAssociativity a_eOprtAsct )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( a_iPrec ), m_eOprtAsct ( a_eOprtAsct ),
m_iCode ( cmOPRT_BIN ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -84,7 +83,7 @@ QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 3 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -94,7 +93,7 @@ QmuParserCallback::QmuParserCallback ( fun_type3 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 4 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -104,7 +103,7 @@ QmuParserCallback::QmuParserCallback ( fun_type4 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 5 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -113,7 +112,7 @@ QmuParserCallback::QmuParserCallback ( fun_type5 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 6 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -122,7 +121,7 @@ QmuParserCallback::QmuParserCallback ( fun_type6 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 7 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -131,7 +130,7 @@ QmuParserCallback::QmuParserCallback ( fun_type7 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 8 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -140,7 +139,7 @@ QmuParserCallback::QmuParserCallback ( fun_type8 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 9 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -149,7 +148,7 @@ QmuParserCallback::QmuParserCallback ( fun_type9 a_pFun, bool a_bAllowOpti ) Q_D
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 10 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -158,7 +157,7 @@ QmuParserCallback::QmuParserCallback ( fun_type10 a_pFun, bool a_bAllowOpti ) Q_
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -167,7 +166,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type0 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -180,7 +179,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type1 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -189,7 +188,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type2 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 3 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -198,7 +197,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type3 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 4 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -207,7 +206,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type4 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 5 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -216,7 +215,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type5 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 6 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -225,7 +224,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type6 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 7 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -234,7 +233,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type7 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 8 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -243,7 +242,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type8 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 9 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -252,7 +251,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type9 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 10 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_BULK ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -261,7 +260,7 @@ QmuParserCallback::QmuParserCallback ( bulkfun_type10 a_pFun, bool a_bAllowOpti
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( -1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -270,7 +269,7 @@ QmuParserCallback::QmuParserCallback ( multfun_type a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -279,7 +278,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type1 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 1 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -288,7 +287,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type2 a_pFun, bool a_bAllowOpti )
#ifdef __GNUC__
__extension__
#endif
QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti )
: m_pFun ( reinterpret_cast<void*> ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ),
m_iCode ( cmFUNC_STR ), m_iType ( tpSTR ), m_bAllowOpti ( a_bAllowOpti )
{}
@ -298,7 +297,7 @@ QmuParserCallback::QmuParserCallback ( strfun_type3 a_pFun, bool a_bAllowOpti )
* @brief Default constructor.
* @throw nothrow
*/
QmuParserCallback::QmuParserCallback() Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback()
: m_pFun ( 0 ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ), m_iCode ( cmUNKNOWN ), m_iType ( tpVOID ),
m_bAllowOpti ( 0 )
{}
@ -308,7 +307,7 @@ QmuParserCallback::QmuParserCallback() Q_DECL_NOEXCEPT
* @brief Copy constructor.
* @throw nothrow
*/
QmuParserCallback::QmuParserCallback ( const QmuParserCallback &ref ) Q_DECL_NOEXCEPT
QmuParserCallback::QmuParserCallback ( const QmuParserCallback &ref )
: m_pFun ( ref.m_pFun ), m_iArgc ( ref.m_iArgc ), m_iPri ( ref.m_iPri ), m_eOprtAsct ( ref.m_eOprtAsct ),
m_iCode ( ref.m_iCode ), m_iType ( ref.m_iType ), m_bAllowOpti ( ref.m_bAllowOpti )
{

Some files were not shown because too many files have changed in this diff Show More