Merge with develop

--HG--
branch : DialogTools
This commit is contained in:
dismine 2014-05-26 17:26:25 +03:00
commit 6f009a8ee4
111 changed files with 44211 additions and 8498 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) 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) # Use out-of-source builds (shadow builds)
include(../../Valentina.pri)
QT += core gui widgets xml svg printsupport xmlpatterns QT += core gui widgets xml svg printsupport xmlpatterns
TEMPLATE = app TEMPLATE = app
@ -45,7 +47,8 @@ SOURCES += \
mainwindow.cpp \ mainwindow.cpp \
tablewindow.cpp \ tablewindow.cpp \
stable.cpp \ stable.cpp \
version.cpp version.cpp \
options.cpp
HEADERS += \ HEADERS += \
mainwindow.h \ mainwindow.h \
@ -62,7 +65,8 @@ RESOURCES += \
share/resources/icon.qrc \ share/resources/icon.qrc \
share/resources/cursor.qrc \ share/resources/cursor.qrc \
share/resources/theme.qrc \ share/resources/theme.qrc \
share/resources/schema.qrc share/resources/schema.qrc \
share/resources/measurements.qrc
OTHER_FILES += \ OTHER_FILES += \
share/resources/valentina.rc \ share/resources/valentina.rc \
@ -75,7 +79,9 @@ TRANSLATIONS += share/translations/valentina.ts \
share/translations/valentina_de.ts \ share/translations/valentina_de.ts \
share/translations/valentina_cs.ts \ share/translations/valentina_cs.ts \
share/translations/valentina_he_IL.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 { unix {
QMAKE_CXX = ccache g++ QMAKE_CXX = ccache g++
@ -94,8 +100,8 @@ CONFIG(debug, debug|release){
*-g++{ *-g++{
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ 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/QtXml" -isystem "/usr/include/qt5/QtGui" \
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \ -isystem "/usr/include/qt5/QtCore" -isystem "/usr/include/qt5/QtXmlPatterns" \
-isystem "$${RCC_DIR}" \ -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" -isystem "$${RCC_DIR}" \
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \ -O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \ -Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \ -Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
@ -153,16 +159,15 @@ QMAKE_DISTCLEAN += $${DESTDIR}/* \
$${RCC_DIR}/* \ $${RCC_DIR}/* \
$$PWD/share/translations/valentina_*.qm $$PWD/share/translations/valentina_*.qm
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \ INSTALL_TRANSLATIONS += \
share/translations/valentina_ru.qm \
share/translations/valentina_uk.qm \ share/translations/valentina_uk.qm \
share/translations/valentina_de.qm \ share/translations/valentina_de.qm \
share/translations/valentina_cs.qm \ share/translations/valentina_cs.qm \
share/translations/valentina_he_IL.qm \ share/translations/valentina_he_IL.qm \
share/translations/valentina_fr.qm share/translations/valentina_fr.qm
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
unix { unix {
#VARIABLES #VARIABLES
@ -182,14 +187,12 @@ translations.path = $$DATADIR/$${TARGET}/translations/
translations.files = $$INSTALL_TRANSLATIONS translations.files = $$INSTALL_TRANSLATIONS
standard.path = $$DATADIR/$${TARGET}/tables/standard/ standard.path = $$DATADIR/$${TARGET}/tables/standard/
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
individual.path = $$DATADIR/$${TARGET}/tables/individual/ INSTALLS += \
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS target \
INSTALLS += target \
desktop \ desktop \
pixmaps \ pixmaps \
translations \ translations \
standard \ standard
individual
} }
!isEmpty(TRANSLATIONS): { !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) { for(DIR, INSTALL_TRANSLATIONS) {
#add these absolute paths to a variable which #add these absolute paths to a variable which
#ends up as 'mkcommands = path1 path2 path3 ...' #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)) 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 win32:CONFIG(release, debug|release): LIBS += -L../libs/qmuparser/bin -lqmuparser2
else:win32:CONFIG(debug, 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 else:unix: LIBS += -L../libs/qmuparser/bin -lqmuparser

View File

@ -28,15 +28,9 @@
#include "calculator.h" #include "calculator.h"
#include <QDebug> #include <QDebug>
#include "../widgets/vapplication.h"
#define DELIMITER 1 int Calculator::iVal = -1;
#define VARIABLE 2
#define NUMBER 3
#define COMMAND 4
#define STRING 5
#define QUOTE 6
#define FINISHED 10
#define EOL 9
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
@ -44,433 +38,309 @@
* @param data pointer to a variable container. * @param data pointer to a variable container.
*/ */
Calculator::Calculator(const VContainer *data) Calculator::Calculator(const VContainer *data)
:errorMsg(nullptr), token(QString()), tok(0), token_type(0), prog(QString()), index(0), data(data), :QmuParser(), vVarVal(nullptr)
debugFormula(QString()) {
{} 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. * @brief eval calculate formula.
* @param prog string of formula. * @param formula string of formula.
* @param errorMsg keep error message.
* @return value of formula. * @return value of formula.
*/ */
qreal Calculator::eval(QString prog, QString *errorMsg) qreal Calculator::EvalFormula(const QString &formula)
{ {
this->errorMsg = errorMsg; SetExpr(formula);
this->errorMsg->clear(); return Eval();
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;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** void Calculator::InitVariables(const VContainer *data)
* @brief get_exp calculate formula.
* @return value of formula.
*/
qreal Calculator::get_exp()
{ {
qreal result = 0; int num = 0;
get_token(); if (qApp->patternType() == Pattern::Standard)
if (token.isEmpty())
{ {
serror(2); num +=2;
return 0;
} }
level2(&result);
putback();
return result;
}
//--------------------------------------------------------------------------------------------------------------------- const QHash<QString, qreal> *lengthLines = data->DataLengthLines();
/** num += lengthLines->size();
* @brief level2 method of addition and subtraction of two terms.
* @param result result of operation.
*/
void Calculator::level2(qreal *result)
{
QChar op;
qreal hold;
level3(result); const QHash<QString, qreal> *lengthSplines = data->DataLengthSplines();
while ((op=token[0]) == '+' || op == '-') 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(); vVarVal[j] = data->size();
level3(&hold); DefineVar(data->SizeName(), &vVarVal[j]);
arith(op, result, &hold); ++j;
vVarVal[j] = data->height();
DefineVar(data->HeightName(), &vVarVal[j]);
++j;
}
{
QHash<QString, qreal>::const_iterator i = lengthLines->constBegin();
while (i != lengthLines->constEnd())
{
vVarVal[j] = i.value();
DefineVar(i.key(), &vVarVal[j]);
++j;
++i;
}
}
{
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;
}
} }
} }
//--------------------------------------------------------------------------------------------------------------------- void Calculator::InitCharacterSets()
/**
* @brief level3 method of multiplication, division, finding percent.
* @param result result of operation.
*/
void Calculator::level3(qreal *result)
{ {
QChar op; //String with all unique symbols for supported alpabets.
qreal hold; // 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շÕúտŔ");
level4(result); // Defining identifier character sets
DefineNameChars(QStringLiteral("0123456789_") + symbols);
while ((op = token[0]) == '*' || op == '/' || op == '%') DefineOprtChars(symbols + QStringLiteral("+-*^/?<>=#!$%&|~'_"));
{
get_token();
level4(&hold);
arith(op, result, &hold);
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** qreal Calculator::CmUnit(qreal val)
* @brief level4 method of degree two numbers.
* @param result result of operation.
*/
void Calculator::level4(qreal *result)
{ {
qreal hold; qreal unit = val;
switch(qApp->patternUnit())
level5(result);
if (token[0] == '^')
{ {
get_token(); case Valentina::Mm:
level4(&hold); unit = val * 10.0;
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] != ')')
{
serror(1);
}
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);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @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)
{
qreal t;//, ex;
switch (o.toLatin1())
{
case '-':
*r = *r-*h;
break; break;
case '+': case Valentina::Cm:
*r = *r+*h;
break; break;
case '*': case Valentina::Inch:
*r = *r * *h; unit = val / 2.54;
break;
case '/':
*r = (*r)/(*h);
break;
case '%':
t = (*r)/(*h);
*r = *r-(t*(*h));
break;
case '^':
*r = pow(*r, *h);
break; break;
default: default:
break; break;
} }
return unit;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** qreal Calculator::MmUnit(qreal val)
* @brief unary method changes the sign.
* @param o sign of symbol.
* @param r element.
*/
void Calculator::unary(QChar o, qreal *r)
{ {
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;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** qreal Calculator::InchUnit(qreal val)
* @brief find_var method is finding variable by name.
* @param s name of variable.
* @return value of variable.
*/
qreal Calculator::find_var(QString s)
{ {
bool ok = false; qreal unit = val;
qreal value = data->FindVar(s, &ok); switch(qApp->patternUnit())
if (ok == false)
{ {
qDebug()<<s; case Valentina::Mm:
serror(4); /* don't variable */ unit = val * 25.4;
return 0; break;
case Valentina::Cm:
unit = val * 2.54;
break;
case Valentina::Inch:
break;
default:
break;
} }
return value;
return unit;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------
/** // Factory function for creating new parser variables
* @brief serror report an error // This could as well be a function performing database queries.
* @param error error code qreal* Calculator::AddVariable(const QString &a_szName, void *a_pUserData)
*/
void Calculator::serror(qint32 error)
{ {
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", throw qmu::QmuParserError( "Variable buffer overflow." );
"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;
} }
else 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" #include "vcontainer.h"
/** #include "../../libs/qmuparser/qmuparser.h"
* @brief The Calculator class calculate formulas of pattern. Support operation +,-,/,* and braces. using namespace qmu;
* Can replace name of variables her value.
*/ class Calculator:public QmuParser
class Calculator
{ {
public: public:
explicit Calculator(const VContainer *data); Calculator(const VContainer *data);
qreal eval(QString prog, QString *errorMsg); Calculator(const QString &formula, bool fromUser = true);
~Calculator();
qreal EvalFormula(const QString &formula);
private: private:
Q_DISABLE_COPY(Calculator) Q_DISABLE_COPY(Calculator)
/** qreal *vVarVal;
* @brief errorMsg keeps error message of calculation. static int iVal;
*/ void InitVariables(const VContainer *data);
QString *errorMsg; void InitCharacterSets();
/** static qreal CmUnit(qreal val);
* @brief token теперішня лексема. static qreal MmUnit(qreal val);
*/ static qreal InchUnit(qreal val);
QString token; static qreal* AddVariable(const QString &a_szName, void *a_pUserData);
/**
* @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);
}; };
#endif // CALCULATOR_H #endif // CALCULATOR_H

View File

@ -35,14 +35,22 @@
quint32 VContainer::_id = 0; quint32 VContainer::_id = 0;
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/**
* @brief VContainer create empty container
*/
VContainer::VContainer() 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>()), measurements(QHash<QString, VMeasurement>()), increments(QHash<QString, VIncrement>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()), lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>()) lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>())
{} {}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/**
* @brief operator = copy constructor
* @param data container
* @return copy container
*/
VContainer &VContainer::operator =(const VContainer &data) VContainer &VContainer::operator =(const VContainer &data)
{ {
setData(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) 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>()), measurements(QHash<QString, VMeasurement>()), increments(QHash<QString, VIncrement>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()), lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>()) 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) void VContainer::setData(const VContainer &data)
{ {
_size = data.size(); _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 // cppcheck-suppress unusedFunction
const VGObject *VContainer::GetGObject(quint32 id)const 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> template <typename key, typename val>
const val VContainer::GetObject(const QHash<key, val> &obj, key id) const 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> template <typename key, typename val>
val VContainer::GetVariable(const QHash<key, val> &obj, key id) const 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 const VMeasurement VContainer::GetMeasurement(const QString &name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 const VIncrement VContainer::GetIncrement(const QString& name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 qreal VContainer::GetLine(const QString &name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 qreal VContainer::GetLengthArc(const QString &name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 qreal VContainer::GetLengthSpline(const QString &name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 qreal VContainer::GetLineAngle(const QString &name) const
{ {
Q_ASSERT(name.isEmpty()==false); 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 const VDetail VContainer::GetDetail(quint32 id) const
{ {
return GetVariable(details, id); 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) quint32 VContainer::AddGObject(VGObject *obj)
{ {
return AddObject(gObjects, 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 VContainer::AddDetail(VDetail detail)
{ {
quint32 id = getNextId(); 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) void VContainer::AddIncrement(const QString &name, VIncrement incr)
{ {
increments[name] = incr; increments[name] = incr;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/**
* @brief getNextId generate next unique id
* @return next unique id
*/
quint32 VContainer::getNextId() quint32 VContainer::getNextId()
{ {
_id++; _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) void VContainer::UpdateId(quint32 newId)
{ {
if (newId > _id) 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> template <typename val>
void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val point) 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) void VContainer::AddLengthSpline(const QString &name, const qreal &value)
{ {
Q_ASSERT(name.isEmpty() == false); 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) void VContainer::AddLengthArc(const quint32 &id)
{ {
const VArc * arc = GeometricObject<const VArc *>(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) void VContainer::AddLineAngle(const QString &name, const qreal &value)
{ {
Q_ASSERT(name.isEmpty() == false); 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 qreal VContainer::GetValueStandardTableRow(const QString& name) const
{ {
const VMeasurement m = GetMeasurement(name); 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 qreal VContainer::GetValueIncrementTableRow(const QString& name) const
{ {
const VIncrement icr = GetIncrement(name); 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() void VContainer::Clear()
{ {
_id = 0; _id = 0;
@ -309,6 +433,9 @@ void VContainer::Clear()
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
*/
void VContainer::ClearGObjects() void VContainer::ClearGObjects()
{ {
if (gObjects.size()>0) 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 qreal VContainer::FindVar(const QString &name, bool *ok)const
{ {
if (sizeName == name) 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) void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
{ {
QString nameLine = GetNameLine(firstPointId, 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> template <typename key, typename val>
quint32 VContainer::AddObject(QHash<key, val> &obj, val value) 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 QString VContainer::GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const
{ {
const VPointF *first = GeometricObject<const VPointF *>(firstPoint); const VPointF *first = GeometricObject<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(secondPoint); 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 QString VContainer::GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const
{ {
const VPointF *first = GeometricObject<const VPointF *>(firstPoint); const VPointF *first = GeometricObject<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(secondPoint); 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) void VContainer::UpdateGObject(quint32 id, VGObject* obj)
{ {
UpdateObject(gObjects, id, 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) void VContainer::UpdateDetail(quint32 id, const VDetail &detail)
{ {
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); 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) void VContainer::AddLengthLine(const QString &name, const qreal &value)
{ {
Q_ASSERT(name.isEmpty() == false); Q_ASSERT(name.isEmpty() == false);

View File

@ -45,20 +45,8 @@ class VContainer
{ {
Q_DECLARE_TR_FUNCTIONS(VContainer) Q_DECLARE_TR_FUNCTIONS(VContainer)
public: public:
/**
* @brief VContainer create empty container
*/
VContainer(); VContainer();
/**
* @brief operator = copy constructor
* @param data container
* @return copy container
*/
VContainer &operator=(const VContainer &data); VContainer &operator=(const VContainer &data);
/**
* @brief VContainer create container from another container
* @param data container
*/
VContainer(const VContainer &data); VContainer(const VContainer &data);
~VContainer(); ~VContainer();
template <typename T> template <typename T>
@ -67,10 +55,6 @@ public:
T *obj = new T(*data.GeometricObject<const T *>(id)); T *obj = new T(*data.GeometricObject<const T *>(id));
UpdateGObject(id, obj); 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> template <typename T>
const T GeometricObject(const quint32 &id) const const T GeometricObject(const quint32 &id) const
@ -100,288 +84,65 @@ public:
return nullptr; return nullptr;
} }
/**
* @brief GetGObject returns a point by id
* @param id id of point
* @return point
*/
const VGObject *GetGObject(quint32 id) const; 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; 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; 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; 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; 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; 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; 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; const VDetail GetDetail(quint32 id) const;
/** static quint32 getId(){return _id;}
* @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); 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); 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); 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); 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); 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); 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); 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); 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); 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
*/
// cppcheck-suppress functionStatic // cppcheck-suppress functionStatic
QString GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const; 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
*/
// cppcheck-suppress functionStatic // cppcheck-suppress functionStatic
QString GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const; 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); 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); 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); 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); 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; 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; qreal GetValueIncrementTableRow(const QString& name) const;
/**
* @brief Clear clear data in container. Id will be 0.
*/
void Clear(); void Clear();
/**
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
*/
void ClearGObjects(); void ClearGObjects();
void ClearCalculationGObjects(); void ClearCalculationGObjects();
/**
* @brief ClearIncrementTable clear increment table
*/
void ClearIncrementTable(); void ClearIncrementTable();
void ClearMeasurements(); void ClearMeasurements();
/**
* @brief ClearLengthLines clear length lines
*/
void ClearLengthLines(); void ClearLengthLines();
/**
* @brief ClearLengthSplines clear length splines
*/
void ClearLengthSplines(); void ClearLengthSplines();
/**
* @brief ClearLengthArcs clear length arcs
*/
void ClearLengthArcs(); void ClearLengthArcs();
/**
* @brief ClearLineAngles clear angles of lines
*/
void ClearLineAngles(); void ClearLineAngles();
void ClearDetails(); void ClearDetails();
/**
* @brief SetSize set value of size
* @param size value of size
*/
void SetSize(qreal size); void SetSize(qreal size);
void SetSizeName(const QString &name); void SetSizeName(const QString &name);
/**
* @brief SetGrowth set value of growth
* @param growth value of growth
*/
void SetHeight(qreal height); void SetHeight(qreal height);
void SetHeightName(const QString &name); void SetHeightName(const QString &name);
/**
* @brief size return size
* @return size in mm
*/
qreal size() const; qreal size() const;
QString SizeName()const; QString SizeName()const;
/**
* @brief height return height
* @return height in pattern units
*/
qreal height() const; qreal height() const;
QString HeightName()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; 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); bool IncrementTableContains(const QString& name);
/**
* @brief getNextId generate next unique id
* @return next unique id
*/
static quint32 getNextId(); static quint32 getNextId();
/**
* @brief RemoveIncrementTableRow remove row by name from increment table
* @param name name of existing row
*/
void RemoveIncrementTableRow(const QString& name); 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.
*/
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); static void UpdateId(quint32 newId);
const QHash<quint32, VGObject*> *DataGObjects() const;
const QHash<QString, VMeasurement> *DataMeasurements() const;
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: private:
/** /**
* @brief _id current id. New object will have value +1. For empty class equal 0. * @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 * @brief details container of details
*/ */
QHash<quint32, VDetail> details; QHash<quint32, VDetail> details;
template <typename key, typename val> template <typename key, typename val>
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
// cppcheck-suppress functionStatic // cppcheck-suppress functionStatic
const val GetObject(const QHash<key, val> &obj, key id) const; const val GetObject(const QHash<key, val> &obj, key id) const;
template <typename key, typename val> template <typename key, typename val>
/**
* @brief GetObject return object from container
* @param obj container
* @param id id of object
* @return Object
*/
// cppcheck-suppress functionStatic // cppcheck-suppress functionStatic
val GetVariable(const QHash<key, val> &obj, key id) const; val GetVariable(const QHash<key, val> &obj, key id) const;
template <typename val> 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); void UpdateObject(QHash<quint32, val > &obj, const quint32 &id, val point);
template <typename key, typename val> 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); 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) inline void VContainer::AddMeasurement(const QString &name, const VMeasurement &m)
{ {
measurements[name] = 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) inline void VContainer::UpdateMeasurement(const QString &name, VMeasurement m)
{ {
measurements[name] = 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) inline void VContainer::UpdateIncrement(const QString &name, VIncrement incr)
{ {
increments[name] = incr; increments[name] = incr;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearIncrementTable clear increment table
*/
inline void VContainer::ClearIncrementTable() inline void VContainer::ClearIncrementTable()
{ {
increments.clear(); increments.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::ClearMeasurements() inline void VContainer::ClearMeasurements()
{ {
measurements.clear(); measurements.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthLines clear length lines
*/
inline void VContainer::ClearLengthLines() inline void VContainer::ClearLengthLines()
{ {
lengthLines.clear(); lengthLines.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthSplines clear length splines
*/
inline void VContainer::ClearLengthSplines() inline void VContainer::ClearLengthSplines()
{ {
lengthSplines.clear(); lengthSplines.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLengthArcs clear length arcs
*/
inline void VContainer::ClearLengthArcs() inline void VContainer::ClearLengthArcs()
{ {
lengthArcs.clear(); lengthArcs.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ClearLineAngles clear angles of lines
*/
inline void VContainer::ClearLineAngles() inline void VContainer::ClearLineAngles()
{ {
lineAngles.clear(); lineAngles.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::ClearDetails() inline void VContainer::ClearDetails()
{ {
details.clear(); details.clear();
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetSize set value of size
* @param size value of size
*/
inline void VContainer::SetSize(qreal size) inline void VContainer::SetSize(qreal size)
{ {
_size = size; _size = size;
} }
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::SetSizeName(const QString &name) inline void VContainer::SetSizeName(const QString &name)
{ {
sizeName = name; sizeName = name;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief SetGrowth set value of growth
* @param growth value of growth
*/
inline void VContainer::SetHeight(qreal height) inline void VContainer::SetHeight(qreal height)
{ {
_height = height; _height = height;
} }
//---------------------------------------------------------------------------------------------------------------------
inline void VContainer::SetHeightName(const QString &name) inline void VContainer::SetHeightName(const QString &name)
{ {
heightName = name; heightName = name;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief size return size
* @return size in mm
*/
inline qreal VContainer::size() const inline qreal VContainer::size() const
{ {
return _size; return _size;
} }
//---------------------------------------------------------------------------------------------------------------------
inline QString VContainer::SizeName() const inline QString VContainer::SizeName() const
{ {
return sizeName; return sizeName;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief height return height
* @return height in pattern units
*/
inline qreal VContainer::height() const inline qreal VContainer::height() const
{ {
return _height; return _height;
} }
//---------------------------------------------------------------------------------------------------------------------
inline QString VContainer::HeightName() const inline QString VContainer::HeightName() const
{ {
return heightName; 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) inline bool VContainer::IncrementTableContains(const QString &name)
{ {
return increments.contains(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) inline void VContainer::RemoveIncrementTableRow(const QString &name)
{ {
increments.remove(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 inline const QHash<quint32, VGObject *> *VContainer::DataGObjects() const
{ {
return &gObjects; return &gObjects;
} }
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief DataMeasurements container with measurements.
* @return pointer to measurements.
*/
inline const QHash<QString, VMeasurement> *VContainer::DataMeasurements() const inline const QHash<QString, VMeasurement> *VContainer::DataMeasurements() const
{ {
return &measurements; 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 inline const QHash<QString, VIncrement> *VContainer::DataIncrements() const
{ {
return &increments; 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 inline const QHash<QString, qreal> *VContainer::DataLengthLines() const
{ {
return &lengthLines; 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 inline const QHash<QString, qreal> *VContainer::DataLengthSplines() const
{ {
return &lengthSplines; 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 inline const QHash<QString, qreal> *VContainer::DataLengthArcs() const
{ {
return &lengthArcs; 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 inline const QHash<QString, qreal> *VContainer::DataLineAngles() const
{ {
return &lineAngles; 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 inline const QHash<quint32, VDetail> *VContainer::DataDetails() const
{ {
return &details; return &details;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -57,9 +57,7 @@ DialogIndividualMeasurements::DialogIndividualMeasurements(VContainer *data, con
ui->lineEditName->setText(_name); ui->lineEditName->setText(_name);
LoadIndividualTables();
InitUnits(); InitUnits();
CheckState(); CheckState();
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogIndividualMeasurements::CheckState); connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogIndividualMeasurements::CheckState);
connect(ui->buttonGroupPath, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, connect(ui->buttonGroupPath, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this,
@ -91,9 +89,10 @@ void DialogIndividualMeasurements::DialogAccepted()
table.remove(); table.remove();
} }
const qint32 index = ui->comboBoxLang->currentIndex(); //just in case
QString path = ui->comboBoxLang->itemData(index).toString(); VDomDocument::ValidateXML("://schema/individual_measurements.xsd", qApp->pathToTables());
QFile iMeasur(path); QFile iMeasur(qApp->pathToTables());
//TODO maybe make copy save?
if ( iMeasur.copy(_tablePath) == false ) if ( iMeasur.copy(_tablePath) == false )
{ {
QMessageBox::warning(this, tr("Could not create measurements file"), tr("Please try again or change file")); 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->lineEditPathNewM->setEnabled(false);
ui->toolButtonOpenNew->setEnabled(false); ui->toolButtonOpenNew->setEnabled(false);
ui->comboBoxLang->setEnabled(false);
ui->comboBoxUnits->setEnabled(false); ui->comboBoxUnits->setEnabled(false);
if (ui->lineEditPathExistM->text().isEmpty() == false) if (ui->lineEditPathExistM->text().isEmpty() == false)
@ -165,7 +163,6 @@ void DialogIndividualMeasurements::CheckState()
{ {
ui->lineEditPathNewM->setEnabled(true); ui->lineEditPathNewM->setEnabled(true);
ui->toolButtonOpenNew->setEnabled(true); ui->toolButtonOpenNew->setEnabled(true);
ui->comboBoxLang->setEnabled(true);
ui->comboBoxUnits->setEnabled(true); ui->comboBoxUnits->setEnabled(true);
ui->toolButtonOpenExist->setEnabled(false); 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); QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
Q_CHECK_PTR(bOk); Q_CHECK_PTR(bOk);
bOk->setEnabled(flagName && flagPath && flagLang); bOk->setEnabled(flagName && flagPath);
}
//---------------------------------------------------------------------------------------------------------------------
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);
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

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

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Individual measurements</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
@ -90,33 +90,6 @@
</attribute> </attribute>
</widget> </widget>
</item> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -56,7 +56,6 @@ DialogEndLine::DialogEndLine(const VContainer *data, QWidget *parent)
InitArrow(ui); InitArrow(ui);
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogEndLine::PutHere); connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogEndLine::PutHere);
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogEndLine::PutVal); connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogEndLine::PutVal);
connect(ui->toolButtonEqual, &QPushButton::clicked, this, &DialogEndLine::EvalFormula); connect(ui->toolButtonEqual, &QPushButton::clicked, this, &DialogEndLine::EvalFormula);
@ -116,7 +115,7 @@ void DialogEndLine::setTypeLine(const QString &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogEndLine::setFormula(const QString &value) void DialogEndLine::setFormula(const QString &value)
{ {
formula = value; formula = qApp->FormulaToUser(value);
// increase height if needed. TODO : see if I can get the max number of caracters in one line // increase height if needed. TODO : see if I can get the max number of caracters in one line
// of this PlainTextEdit to change 80 to this value // of this PlainTextEdit to change 80 to this value
if (formula.length() > 80) if (formula.length() > 80)
@ -164,6 +163,7 @@ void DialogEndLine::SaveData()
formula.replace("\n"," "); formula.replace("\n"," ");
angle = ui->doubleSpinBoxAngle->value(); angle = ui->doubleSpinBoxAngle->value();
basePointId = getCurrentObjectId(ui->comboBoxBasePoint); basePointId = getCurrentObjectId(ui->comboBoxBasePoint);
emit DialogClosed(QDialog::Accepted);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

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

View File

@ -10,6 +10,12 @@
<height>522</height> <height>522</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Point in the end of a line</string> <string>Point in the end of a line</string>
</property> </property>
@ -515,6 +521,12 @@
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioButtonSizeGrowth"> <widget class="QRadioButton" name="radioButtonSizeGrowth">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Size and height</string> <string>Size and height</string>
</property> </property>
@ -525,6 +537,12 @@
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioButtonStandardTable"> <widget class="QRadioButton" name="radioButtonStandardTable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Standard table</string> <string>Standard table</string>
</property> </property>
@ -532,6 +550,12 @@
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioButtonIncrements"> <widget class="QRadioButton" name="radioButtonIncrements">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Increments</string> <string>Increments</string>
</property> </property>
@ -542,6 +566,12 @@
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Length of lines</string> <string>Length of lines</string>
</property> </property>
@ -552,6 +582,12 @@
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Length of arcs</string> <string>Length of arcs</string>
</property> </property>
@ -562,6 +598,12 @@
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Length of curves</string> <string>Length of curves</string>
</property> </property>
@ -582,8 +624,17 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="labelDescription"> <widget class="QLabel" name="labelDescription">
<property name="text"> <property name="sizePolicy">
<string/> <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> </property>
</widget> </widget>
</item> </item>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -464,7 +464,8 @@ protected:
} }
else else
{ {
radioButtonSizeGrowth->setVisible(false); radioButtonSizeGrowth->setEnabled(false);
radioButtonStandardTable->setChecked(true);
Measurements(); Measurements();
} }
connect(radioButtonStandardTable, &QRadioButton::clicked, this, &DialogTool::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), : VGObject(GObject::Arc, idObject, mode), f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2),
radius(radius), formulaRadius(formulaRadius), center(center) 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) void VArc::setId(const quint32 &id)
{ {
_id = 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() 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) void VSplinePath::append(const VSplinePoint &point)
{ {
path.append(point); path.append(point);
_name = QString("SplPath"); _name = splPath;
_name.append(QString("_%1").arg(path.first().P().name())); _name.append(QString("_%1").arg(path.first().P().name()));
if (path.size() > 1) 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. ** GNU General Public License for more details.
** **
** You should have received a copy of the GNU General Public License ** 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 <QFlags>
#include <QString> #include <QString>
#include <QMetaType> #include <QMetaType>
#include <QtGlobal>
#define SceneSize 50000 #define SceneSize 50000
extern const QString translationsPath;
namespace Valentina namespace Valentina
{ {
/** /**
@ -113,4 +112,175 @@ namespace Pattern
} }
Q_DECLARE_OPERATORS_FOR_FLAGS( Pattern::Measurements ) 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 #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:element name="pattern">
<xs:complexType> <xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded"> <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="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="description" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="notes" 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:enumeration value="individual"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </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> </xs:schema>

View File

@ -3,6 +3,7 @@
<xs:element name="vst"> <xs:element name="vst">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="version" type="formatVersion"></xs:element>
<xs:element name="description" type="xs:string"></xs:element> <xs:element name="description" type="xs:string"></xs:element>
<xs:element name="unit" type="units"></xs:element> <xs:element name="unit" type="units"></xs:element>
<xs:element name="size"> <xs:element name="size">
@ -17,17 +18,956 @@
<xs:attribute name="name" type="xs:string"></xs:attribute> <xs:attribute name="name" type="xs:string"></xs:attribute>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="measurements"> <xs:element name="body-measurements">
<xs:complexType> <xs:complexType>
<xs:sequence> <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:complexType>
<xs:attribute name="name" type="shortMeasurementName" use="required"></xs:attribute> <xs:sequence>
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute> <xs:element name="head_girth">
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute> <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: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="height_increase" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="size_increace" 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:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
@ -36,11 +976,9 @@
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:simpleType name="shortMeasurementName"> </xs:sequence>
<xs:restriction base="xs:string"> </xs:complexType>
<xs:pattern value="^([^0-9-*/^+=\s\(\)%:;!]){1,1}([^-*/^+=\s\(\)%:;!]){0,}$"/> </xs:element>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="units"> <xs:simpleType name="units">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="mm"/> <xs:enumeration value="mm"/>
@ -48,4 +986,9 @@
<xs:enumeration value="inch"/> <xs:enumeration value="inch"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </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> </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 #ifdef Q_CC_MSVC
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#endif #endif
#ifdef QT_CORE_LIB
#include <QtCore> #include <QtCore>
#include <QApplication> #endif
#include <QtGlobal>
#include <QtXml> #ifdef QT_GUI_LIB
#include <QtGui>
#endif
#ifdef QT_WIDGETS_LIB
#include <QtWidgets> #include <QtWidgets>
#endif
#ifdef QT_XML_LIB
#include <QtXml>
#endif
#ifdef QT_SVG_LIB
#include <QtSvg/QtSvg> #include <QtSvg/QtSvg>
#endif #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 #endif // STABLE_H

View File

@ -30,6 +30,8 @@
#include "../../container/calculator.h" #include "../../container/calculator.h"
#include "../../dialogs/tools/dialogalongline.h" #include "../../dialogs/tools/dialogalongline.h"
#include "exception/vexceptionobjecterror.h"
const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -179,12 +181,11 @@ void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const Q
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId); const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId); const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
QLineF line = QLineF(firstPoint->toQPointF(), secondPoint->toQPointF()); QLineF line = QLineF(firstPoint->toQPointF(), secondPoint->toQPointF());
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
line.setLength(qApp->toPixel(result)); line.setLength(qApp->toPixel(result));
quint32 id = _id; quint32 id = _id;
if (typeCreation == Valentina::FromGui) if (typeCreation == Valentina::FromGui)
{ {
@ -214,5 +215,4 @@ void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const Q
doc->IncrementReferens(firstPointId); doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId); 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; qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
Calculator cal(data); Calculator cal(data);
QString errorMsg;
qreal result = cal.eval(radius, &errorMsg); qreal result = cal.EvalFormula(radius);
if (errorMsg.isEmpty())
{
calcRadius = qApp->toPixel(result); calcRadius = qApp->toPixel(result);
}
errorMsg.clear(); calcF1 = cal.EvalFormula(f1);
result = cal.eval(f1, &errorMsg); calcF2 = cal.EvalFormula(f2);
if (errorMsg.isEmpty())
{
calcF1 = result;
}
errorMsg.clear();
result = cal.eval(f2, &errorMsg);
if (errorMsg.isEmpty())
{
calcF2 = result;
}
VPointF c = *data->GeometricObject<const VPointF *>(center); VPointF c = *data->GeometricObject<const VPointF *>(center);
VArc *arc = new VArc(c, calcRadius, radius, calcF1, f1, calcF2, f2 ); VArc *arc = new VArc(c, calcRadius, radius, calcF1, f1, calcF2, f2 );

View File

@ -115,10 +115,8 @@ void VToolBisector::Create(const quint32 _id, const QString &formula, const quin
const VPointF *thirdPoint = data->GeometricObject<const VPointF *>(thirdPointId); const VPointF *thirdPoint = data->GeometricObject<const VPointF *>(thirdPointId);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(), QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
thirdPoint->toQPointF(), qApp->toPixel(result)); thirdPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id; quint32 id = _id;
@ -149,7 +147,6 @@ void VToolBisector::Create(const quint32 _id, const QString &formula, const quin
doc->IncrementReferens(secondPointId); doc->IncrementReferens(secondPointId);
doc->IncrementReferens(thirdPointId); doc->IncrementReferens(thirdPointId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -95,11 +95,10 @@ void VToolCutArc::Create(const quint32 _id, const QString &pointName, const QStr
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation) VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
{ {
const VArc *arc = data->GeometricObject<const VArc *>(arcId); const VArc *arc = data->GeometricObject<const VArc *>(arcId);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
VArc arc1; VArc arc1;
VArc arc2; VArc arc2;
QPointF point = arc->CutArc(qApp->toPixel(result), arc1, arc2); QPointF point = arc->CutArc(qApp->toPixel(result), arc1, arc2);
@ -152,7 +151,6 @@ void VToolCutArc::Create(const quint32 _id, const QString &pointName, const QStr
doc->AddTool(arc2id, point); doc->AddTool(arc2id, point);
doc->IncrementReferens(arcId); doc->IncrementReferens(arcId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -96,11 +96,10 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
const Document::Documents &parse, const Valentina::Sources &typeCreation) const Document::Documents &parse, const Valentina::Sources &typeCreation)
{ {
const VSpline *spl = data->GeometricObject<const VSpline *>(splineId); const VSpline *spl = data->GeometricObject<const VSpline *>(splineId);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
QPointF spl1p2, spl1p3, spl2p2, spl2p3; QPointF spl1p2, spl1p3, spl2p2, spl2p3;
QPointF point = spl->CutSpline(qApp->toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3); QPointF point = spl->CutSpline(qApp->toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3);
@ -153,7 +152,6 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
doc->AddTool(spl2id, point); doc->AddTool(spl2id, point);
doc->IncrementReferens(splineId); doc->IncrementReferens(splineId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -97,11 +97,10 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, con
{ {
const VSplinePath *splPath = data->GeometricObject<const VSplinePath *>(splinePathId); const VSplinePath *splPath = data->GeometricObject<const VSplinePath *>(splinePathId);
Q_CHECK_PTR(splPath); Q_CHECK_PTR(splPath);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
quint32 id = _id; quint32 id = _id;
QPointF spl1p2, spl1p3, spl2p2, spl2p3; QPointF spl1p2, spl1p3, spl2p2, spl2p3;
qint32 p1 = 0, p2 = 0; qint32 p1 = 0, p2 = 0;
@ -227,7 +226,6 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, con
doc->AddTool(splPath2id, point); doc->AddTool(splPath2id, point);
doc->IncrementReferens(splinePathId); doc->IncrementReferens(splinePathId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -77,7 +77,7 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene
qreal angle = dialogTool->getAngle(); qreal angle = dialogTool->getAngle();
quint32 basePointId = dialogTool->getBasePointId(); quint32 basePointId = dialogTool->getBasePointId();
VToolEndLine *point; VToolEndLine *point = nullptr;
point=Create(0, pointName, typeLine, formula, angle, basePointId, 5, 10, scene, doc, data, Document::FullParse, point=Create(0, pointName, typeLine, formula, angle, basePointId, 5, 10, scene, doc, data, Document::FullParse,
Valentina::FromGui); Valentina::FromGui);
if (point != nullptr) { if (point != nullptr) {
@ -94,11 +94,10 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
{ {
const VPointF *basePoint = data->GeometricObject<const VPointF *>(basePointId); const VPointF *basePoint = data->GeometricObject<const VPointF *>(basePointId);
QLineF line = QLineF(basePoint->toQPointF(), QPointF(basePoint->x()+100, basePoint->y())); QLineF line = QLineF(basePoint->toQPointF(), QPointF(basePoint->x()+100, basePoint->y()));
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
line.setLength(qApp->toPixel(result)); line.setLength(qApp->toPixel(result));
line.setAngle(angle); line.setAngle(angle);
quint32 id = _id; quint32 id = _id;
@ -115,6 +114,15 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
{ {
doc->UpdateToolData(id, data); doc->UpdateToolData(id, data);
} }
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); VDrawTool::AddRecord(id, Valentina::EndLineTool, doc);
if (parse == Document::FullParse) if (parse == Document::FullParse)
@ -128,7 +136,6 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
doc->IncrementReferens(basePointId); doc->IncrementReferens(basePointId);
return point; return point;
} }
}
return nullptr; return nullptr;
} }

View File

@ -90,11 +90,10 @@ void VToolNormal::Create(const quint32 _id, const QString &formula, const quint3
{ {
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId); const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId); const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(), QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
qApp->toPixel(result), angle); qApp->toPixel(result), angle);
quint32 id = _id; quint32 id = _id;
@ -124,7 +123,6 @@ void VToolNormal::Create(const quint32 _id, const QString &formula, const quint3
doc->IncrementReferens(firstPointId); doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId); doc->IncrementReferens(secondPointId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -118,10 +118,8 @@ void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const
const VPointF *secondP = data->GeometricObject<const VPointF *>(secondPointId); const VPointF *secondP = data->GeometricObject<const VPointF *>(secondPointId);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(radius);
qreal result = cal.eval(radius, &errorMsg);
if (errorMsg.isEmpty())
{
QPointF fPoint = VToolPointOfContact::FindPoint(qApp->toPixel(result), centerP->toQPointF(), QPointF fPoint = VToolPointOfContact::FindPoint(qApp->toPixel(result), centerP->toQPointF(),
firstP->toQPointF(), secondP->toQPointF()); firstP->toQPointF(), secondP->toQPointF());
quint32 id = _id; quint32 id = _id;
@ -156,7 +154,6 @@ void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const
doc->IncrementReferens(firstPointId); doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId); doc->IncrementReferens(secondPointId);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -120,10 +120,8 @@ void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const
const VPointF *shoulderPoint = data->GeometricObject<const VPointF *>(pShoulder); const VPointF *shoulderPoint = data->GeometricObject<const VPointF *>(pShoulder);
Calculator cal(data); Calculator cal(data);
QString errorMsg; const qreal result = cal.EvalFormula(formula);
qreal result = cal.eval(formula, &errorMsg);
if (errorMsg.isEmpty())
{
QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(), QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
shoulderPoint->toQPointF(), qApp->toPixel(result)); shoulderPoint->toQPointF(), qApp->toPixel(result));
quint32 id = _id; quint32 id = _id;
@ -157,7 +155,6 @@ void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const
doc->IncrementReferens(p2Line); doc->IncrementReferens(p2Line);
doc->IncrementReferens(pShoulder); doc->IncrementReferens(pShoulder);
} }
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -31,6 +31,7 @@
#include <QApplication> #include <QApplication>
#include "../options.h" #include "../options.h"
#include "vtranslation.h"
class VApplication; class VApplication;
@ -71,12 +72,36 @@ public:
QString pathToTables() const; QString pathToTables() const;
qreal widthMainLine() const; qreal widthMainLine() const;
qreal widthHairLine() 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: private:
Valentina::Units _patternUnit; Valentina::Units _patternUnit;
Pattern::Measurements _patternType; Pattern::Measurements _patternType;
qreal _widthMainLine; qreal _widthMainLine;
qreal _widthHairLine; 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 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 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/vsimplespline.h \
widgets/vsimplesplinepath.h \ widgets/vsimplesplinepath.h \
widgets/vsimplearc.h \ widgets/vsimplearc.h \
widgets/textdelegate.h widgets/textdelegate.h \
widgets/vtranslation.h
SOURCES += \ SOURCES += \
widgets/vtablegraphicsview.cpp \ widgets/vtablegraphicsview.cpp \
@ -24,4 +25,5 @@ SOURCES += \
widgets/vsimplespline.cpp \ widgets/vsimplespline.cpp \
widgets/vsimplesplinepath.cpp \ widgets/vsimplesplinepath.cpp \
widgets/vsimplearc.cpp \ widgets/vsimplearc.cpp \
widgets/textdelegate.cpp widgets/textdelegate.cpp \
widgets/vtranslation.cpp

View File

@ -88,6 +88,7 @@ const QString VDomDocument::AttrUnit = QStringLiteral("unit");
const QString VDomDocument::UnitMM = QStringLiteral("mm"); const QString VDomDocument::UnitMM = QStringLiteral("mm");
const QString VDomDocument::UnitCM = QStringLiteral("cm"); const QString VDomDocument::UnitCM = QStringLiteral("cm");
const QString VDomDocument::UnitINCH = QStringLiteral("inch"); const QString VDomDocument::UnitINCH = QStringLiteral("inch");
const QString VDomDocument::TagVersion = QStringLiteral("version");
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VDomDocument::VDomDocument(VContainer *data) VDomDocument::VDomDocument(VContainer *data)
@ -431,6 +432,30 @@ bool VDomDocument::SaveDocument(const QString &fileName)
return result; 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) void VDomDocument::setTagText(const QString &tag, const QString &text)
{ {

View File

@ -35,6 +35,11 @@
#include <QDebug> #include <QDebug>
#include "../options.h" #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 #ifdef Q_CC_GNU
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++" #pragma GCC diagnostic ignored "-Weffc++"
@ -70,6 +75,7 @@ public:
static const QString UnitMM; static const QString UnitMM;
static const QString UnitCM; static const QString UnitCM;
static const QString UnitINCH; static const QString UnitINCH;
static const QString TagVersion;
/** /**
* @param data container with variables * @param data container with variables
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names * @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
@ -146,6 +152,9 @@ public:
static Valentina::Units StrToUnits(const QString &unit); static Valentina::Units StrToUnits(const QString &unit);
static QString UnitsToStr(const Valentina::Units &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: protected:
/** /**
* @brief data container with data. * @brief data container with data.

View File

@ -27,22 +27,15 @@
*************************************************************************/ *************************************************************************/
#include "vindividualmeasurements.h" #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::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::TagFamily_name = QStringLiteral("family-name");
const QString VIndividualMeasurements::TagGiven_name = QStringLiteral("given-name"); const QString VIndividualMeasurements::TagGiven_name = QStringLiteral("given-name");
const QString VIndividualMeasurements::TagBirth_date = QStringLiteral("birth-date"); const QString VIndividualMeasurements::TagBirth_date = QStringLiteral("birth-date");
const QString VIndividualMeasurements::TagSex = QStringLiteral("sex"); const QString VIndividualMeasurements::TagSex = QStringLiteral("sex");
const QString VIndividualMeasurements::TagUnit = QStringLiteral("unit"); 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::SexMale = QStringLiteral("male");
const QString VIndividualMeasurements::SexFemale = QStringLiteral("female"); const QString VIndividualMeasurements::SexFemale = QStringLiteral("female");
@ -67,92 +60,142 @@ void VIndividualMeasurements::setUnit(const Valentina::Units &unit)
void VIndividualMeasurements::Measurements() void VIndividualMeasurements::Measurements()
{ {
//head and neck //head and neck
Measurement("head_girth"); Measurement(headGirth_M);
Measurement("mid_neck_girth"); Measurement(midNeckGirth_M);
Measurement("neck_base_girth"); Measurement(neckBaseGirth_M);
Measurement("head_and_neck_length"); Measurement(headAndNeckLength_M);
//torso //torso
Measurement("center_front_waist_length"); Measurement(centerFrontWaistLength_M);
Measurement("center_back_waist_length"); Measurement(centerBackWaistLength_M);
Measurement("shoulder_length"); Measurement(shoulderLength_M);
Measurement("side_waist_length"); Measurement(sideWaistLength_M);
Measurement("trunk_length"); Measurement(trunkLength_M);
Measurement("shoulder_girth"); Measurement(shoulderGirth_M);
Measurement("upper_chest_girth"); Measurement(upperChestGirth_M);
Measurement("bust__girth"); Measurement(bustGirth_M);
Measurement("under_bust_girth"); Measurement(underBustGirth_M);
Measurement("waist_girth"); Measurement(waistGirth_M);
Measurement("high_hip_girth"); Measurement(highHipGirth_M);
Measurement("hip_girth"); Measurement(hipGirth_M);
Measurement("upper_front_chest_width"); Measurement(upperFrontChestWidth_M);
Measurement("front_chest_width"); Measurement(frontChestWidth_M);
Measurement("across_front_shoulder_width"); Measurement(acrossFrontShoulderWidth_M);
Measurement("across_back_shoulder_width"); Measurement(acrossBackShoulderWidth_M);
Measurement("upper_back_width"); Measurement(upperBackWidth_M);
Measurement("back_width"); Measurement(backWidth_M);
Measurement("bustpoint_to_bustpoint"); Measurement(bustpointToBustpoint_M);
Measurement("halter_bustpoint_to_bustpoint"); Measurement(halterBustpointToBustpoint_M);
Measurement("neck_to_bustpoint"); Measurement(neckToBustpoint_M);
Measurement("crotch_length"); Measurement(crotchLength_M);
Measurement("rise_height"); Measurement(riseHeight_M);
Measurement("shoulder_drop"); Measurement(shoulderDrop_M);
Measurement("shoulder_slope_degrees"); Measurement(shoulderSlopeDegrees_M);
Measurement("front_shoulder_slope_length"); Measurement(frontShoulderSlopeLength_M);
Measurement("back_shoulder_slope_length"); Measurement(backShoulderSlopeLength_M);
Measurement("front_shoulder_to_waist_length"); Measurement(frontShoulderToWaistLength_M);
Measurement("back_shoulder_to_waist_length"); Measurement(backShoulderToWaistLength_M);
Measurement("front_neck_arc"); Measurement(frontNeckArc_M);
Measurement("back_neck_arc"); Measurement(backNeckArc_M);
Measurement("front_upper-bust_arc"); Measurement(frontUpperChestArc_M);
Measurement("back_upper-bust_arc"); Measurement(backUpperChestArc_M);
Measurement("front_waist_arc"); Measurement(frontWaistArc_M);
Measurement("back_waist_arc"); Measurement(backWaistArc_M);
Measurement("front_upper-hip_arc"); Measurement(frontUpperHipArc_M);
Measurement("back_upper-hip_arc"); Measurement(backUpperHipArc_M);
Measurement("front_hip_arc"); Measurement(frontHipArc_M);
Measurement("back_hip_arc"); Measurement(backHipArc_M);
Measurement("chest_slope"); Measurement(chestSlope_M);
Measurement("back_slope"); Measurement(backSlope_M);
Measurement("front_waist_slope"); Measurement(frontWaistSlope_M);
Measurement("back_waist_slope"); Measurement(backWaistSlope_M);
Measurement("front-neck_to_upper-chest_height"); Measurement(frontNeckToUpperChestHeight_M);
Measurement("front-neck_to_bust_height"); Measurement(frontNeckToBustHeight_M);
//arm //arm
Measurement("armscye_girth"); Measurement(armscyeGirth_M);
Measurement("elbow_girth"); Measurement(elbowGirth_M);
Measurement("upper-arm_girth"); Measurement(upperArmGirth_M);
Measurement("wrist_girth"); Measurement(wristGirth_M);
Measurement("scye_depth"); Measurement(scyeDepth_M);
Measurement("shoulder_and_arm_length"); Measurement(shoulderAndArmLength_M);
Measurement("underarm_length"); Measurement(underarmLength_M);
Measurement("cervicale_to_wrist_length"); Measurement(cervicaleToWristLength_M);
Measurement("shoulder_to_elbow_length"); Measurement(shoulderToElbowLength_M);
Measurement("arm_length"); Measurement(armLength_M);
//hand //hand
Measurement("hand_width"); Measurement(handWidth_M);
Measurement("hand_length"); Measurement(handLength_M);
Measurement("hand_girth"); Measurement(handGirth_M);
//leg //leg
Measurement("thigh_girth"); Measurement(thighGirth_M);
Measurement("mid_thigh_girth"); Measurement(midThighGirth_M);
Measurement("knee_girth"); Measurement(kneeGirth_M);
Measurement("calf_girth"); Measurement(calfGirth_M);
Measurement("ankle_girth"); Measurement(ankleGirth_M);
Measurement("knee_height"); Measurement(kneeHeight_M);
Measurement("ankle_height"); Measurement(ankleHeight_M);
//foot //foot
Measurement("foot_width"); Measurement(footWidth_M);
Measurement("foot_length"); Measurement(footLength_M);
//heights //heights
Measurement("height"); Measurement(height_M);
Measurement("cervicale_height"); Measurement(cervicaleHeight_M);
Measurement("cervicale_to_knee_height"); Measurement(cervicaleToKneeHeight_M);
Measurement("waist_height"); Measurement(waistHeight_M);
Measurement("high_hip_height"); Measurement(highHipHeight_M);
Measurement("hip_height"); Measurement(hipHeight_M);
Measurement("waist_to_hip_height"); Measurement(waistToHipHeight_M);
Measurement("waist_to_knee_height"); Measurement(waistToKneeHeight_M);
Measurement("crotch_height"); 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,60 +215,16 @@ void VIndividualMeasurements::Measurement(const QString &tag)
const QDomElement domElement = domNode.toElement(); const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
const bool ignore = QVariant(GetParametrString(domElement, AttrIgnore, "false")).toBool(); qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
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, "");
if (Unit() == Valentina::Mm)//Convert to Cm. if (Unit() == Valentina::Mm)//Convert to Cm.
{ {
data->AddMeasurement(name, VMeasurement(value/10.0, gui_text, description, tag)); value = value / 10.0;
if (m_number.isEmpty())
{
qDebug()<<"Can't find language-independent measurement name for "<< tag;
return;
} }
else data->AddMeasurement(tag, VMeasurement(value, qApp->GuiText(tag), qApp->Description(tag), tag));
{
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);
} }
} }
} }
}
}
}
//---------------------------------------------------------------------------------------------------------------------
QString VIndividualMeasurements::Language() const
{
return UniqueTagText(TagLang, "en");
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -32,6 +32,14 @@
#include "vdomdocument.h" #include "vdomdocument.h"
#include <QDate> #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 class VIndividualMeasurements:public VDomDocument
{ {
public: public:
@ -42,7 +50,6 @@ public:
Valentina::Units Unit() const; Valentina::Units Unit() const;
void setUnit(const Valentina::Units &unit); void setUnit(const Valentina::Units &unit);
void Measurements(); void Measurements();
QString Language() const;
QString FamilyName() const; QString FamilyName() const;
void setFamilyName(const QString &text); void setFamilyName(const QString &text);
QString GivenName() const; QString GivenName() const;
@ -53,21 +60,13 @@ public:
void setSex(const VIndividualMeasurements::Genders &sex); void setSex(const VIndividualMeasurements::Genders &sex);
QString Mail() const; QString Mail() const;
void setMail(const QString &text); 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 AttrValue;
static const QString AttrDescription;
static const QString TagLang;
static const QString TagFamily_name; static const QString TagFamily_name;
static const QString TagGiven_name; static const QString TagGiven_name;
static const QString TagBirth_date; static const QString TagBirth_date;
static const QString TagSex; static const QString TagSex;
static const QString TagUnit; static const QString TagUnit;
static const QString TagEmail; static const QString TagEmail;
static const QString SexMale; static const QString SexMale;
static const QString SexFemale; static const QString SexFemale;

View File

@ -39,6 +39,7 @@
#include "vindividualmeasurements.h" #include "vindividualmeasurements.h"
#include <QMessageBox> #include <QMessageBox>
#include <qmuparsererror.h>
const QString VPattern::TagPattern = QStringLiteral("pattern"); const QString VPattern::TagPattern = QStringLiteral("pattern");
const QString VPattern::TagCalculation = QStringLiteral("calculation"); const QString VPattern::TagCalculation = QStringLiteral("calculation");
@ -83,6 +84,11 @@ void VPattern::CreateEmptyFile(const QString &tablePath)
QDomElement patternElement = this->createElement(TagPattern); QDomElement patternElement = this->createElement(TagPattern);
patternElement.appendChild(createComment("Valentina pattern format.")); 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(TagAuthor));
patternElement.appendChild(createElement(TagDescription)); patternElement.appendChild(createElement(TagDescription));
patternElement.appendChild(createElement(TagNotes)); patternElement.appendChild(createElement(TagNotes));
@ -209,7 +215,8 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
QStringList tags; QStringList tags;
tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements; tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements
<< TagVersion;
switch (tags.indexOf(domElement.tagName())) switch (tags.indexOf(domElement.tagName()))
{ {
case 0: // TagDraw case 0: // TagDraw
@ -242,8 +249,10 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
break; break;
case 5: // TagMeasurements case 5: // TagMeasurements
break; break;
case 6: // TagVersion
break;
default: default:
qDebug()<<"Wrong tag name"<<Q_FUNC_INFO; qDebug()<<"Wrong tag name"<<domElement.tagName()<<Q_FUNC_INFO;
break; break;
} }
} }
@ -845,6 +854,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 2: //VToolAlongLine::ToolType case 2: //VToolAlongLine::ToolType
try try
@ -868,6 +885,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 3: //VToolShoulderPoint::ToolType case 3: //VToolShoulderPoint::ToolType
try try
@ -892,6 +917,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 4: //VToolNormal::ToolType case 4: //VToolNormal::ToolType
try try
@ -916,6 +949,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 5: //VToolBisector::ToolType case 5: //VToolBisector::ToolType
try try
@ -940,6 +981,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 6: //VToolLineIntersect::ToolType case 6: //VToolLineIntersect::ToolType
try try
@ -984,6 +1033,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 8: //VNodePoint::ToolType case 8: //VNodePoint::ToolType
try try
@ -1089,6 +1146,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 13: //VToolCutSplinePath::ToolType case 13: //VToolCutSplinePath::ToolType
try try
@ -1109,6 +1174,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 14: //VToolCutArc::ToolType case 14: //VToolCutArc::ToolType
try try
@ -1128,6 +1201,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
default: default:
qDebug() << "Illegal point type in VDomDocument::ParsePointElement()."; qDebug() << "Illegal point type in VDomDocument::ParsePointElement().";
@ -1311,6 +1392,14 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
excep.AddMoreInformation(e.ErrorMessage()); excep.AddMoreInformation(e.ErrorMessage());
throw excep; 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; break;
case 1: //VNodeArc::ToolType case 1: //VNodeArc::ToolType
try try

View File

@ -45,6 +45,16 @@ namespace Document
} }
Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents) 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. * @brief The VPattern class working with pattern file.
*/ */

View File

@ -28,17 +28,14 @@
#include "vstandardmeasurements.h" #include "vstandardmeasurements.h"
#include <QDebug> #include <QDebug>
#include "../widgets/vapplication.h"
const QString VStandardMeasurements::TagMeasurement = QStringLiteral("measurement");
const QString VStandardMeasurements::TagDescription = QStringLiteral("description"); const QString VStandardMeasurements::TagDescription = QStringLiteral("description");
const QString VStandardMeasurements::TagSize = QStringLiteral("size"); const QString VStandardMeasurements::TagSize = QStringLiteral("size");
const QString VStandardMeasurements::TagHeight = QStringLiteral("height"); const QString VStandardMeasurements::TagHeight = QStringLiteral("height");
const QString VStandardMeasurements::AttrName = QStringLiteral("name"); const QString VStandardMeasurements::AttrValue = QStringLiteral("value");
const QString VStandardMeasurements::AttrGui_text = QStringLiteral("gui_text");
const QString VStandardMeasurements::AttrBase = QStringLiteral("base");
const QString VStandardMeasurements::AttrSize_increace = QStringLiteral("size_increace"); const QString VStandardMeasurements::AttrSize_increace = QStringLiteral("size_increace");
const QString VStandardMeasurements::AttrHeight_increase = QStringLiteral("height_increase"); const QString VStandardMeasurements::AttrHeight_increase = QStringLiteral("height_increase");
const QString VStandardMeasurements::AttrNumber = QStringLiteral("number");
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data) VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data)
@ -65,43 +62,173 @@ QString VStandardMeasurements::Description()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VStandardMeasurements::Measurements() 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()) if (nodeList.isEmpty())
{ {
qDebug()<<"Measurement list is empty"<<Q_FUNC_INFO; qDebug()<<"Measurement" << tag <<"doesn't exist"<<Q_FUNC_INFO;
return; return;
} }
else else
{ {
for (qint32 i = 0; i < nodeList.size(); ++i) const QDomNode domNode = nodeList.at(0);
{
const QDomNode domNode = nodeList.at(i);
if (domNode.isNull() == false && domNode.isElement()) if (domNode.isNull() == false && domNode.isElement())
{ {
const QDomElement domElement = domNode.toElement(); const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
const QString name = GetParametrString(domElement, AttrName, ""); const qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
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 size_increace = GetParametrDouble(domElement, AttrSize_increace, "0.0");
const qreal height_increase = GetParametrDouble(domElement, AttrHeight_increase, "0.0"); const qreal height_increase = GetParametrDouble(domElement, AttrHeight_increase, "0.0");
const QString number = GetParametrString(domElement, AttrNumber, "");
if (Unit() == Valentina::Mm)// Convert to Cm. if (Unit() == Valentina::Mm)// Convert to Cm.
{ {
data->AddMeasurement(name, VMeasurement(base/10.0, size_increace/10.0, height_increase/10.0, data->AddMeasurement(tag, VMeasurement(value/10.0, size_increace/10.0, height_increase/10.0,
gui_text, number)); qApp->GuiText(tag), qApp->Description(tag), tag));
} }
else// Cm or inch. else// Cm or inch.
{ {
data->AddMeasurement(name, VMeasurement(base, size_increace, height_increase, data->AddMeasurement(tag, VMeasurement(value, size_increace, height_increase, qApp->GuiText(tag),
gui_text, number)); qApp->Description(tag), tag));
}
} }
} }
} }
@ -115,7 +242,7 @@ void VStandardMeasurements::SetSize()
if (nodeList.isEmpty()) if (nodeList.isEmpty())
{ {
data->SetSize(50); data->SetSize(50);
data->SetSizeName("Сг"); data->SetSizeName(size_M);
} }
else else
{ {
@ -125,18 +252,13 @@ void VStandardMeasurements::SetSize()
const QDomElement domElement = domNode.toElement(); const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
const QString name = GetParametrString(domElement, AttrName, "Сг"); qreal value = GetParametrDouble(domElement, AttrValue, "50.0");
const qreal base = GetParametrDouble(domElement, AttrBase, "50.0");
if (Unit() == Valentina::Mm)// Convert to Cm. if (Unit() == Valentina::Mm)// Convert to Cm.
{ {
data->SetSize(base/10.0); value = value/10.0;
data->SetSizeName(name);
}
else// Cm or inch.
{
data->SetSize(base);
data->SetSizeName(name);
} }
data->SetSize(value);
data->SetSizeName(size_M);
} }
} }
} }
@ -149,7 +271,7 @@ void VStandardMeasurements::SetHeight()
if (nodeList.isEmpty()) if (nodeList.isEmpty())
{ {
data->SetHeight(176); data->SetHeight(176);
data->SetHeightName("P"); data->SetHeightName(height_M);
} }
else else
{ {
@ -159,18 +281,13 @@ void VStandardMeasurements::SetHeight()
const QDomElement domElement = domNode.toElement(); const QDomElement domElement = domNode.toElement();
if (domElement.isNull() == false) if (domElement.isNull() == false)
{ {
const QString name = GetParametrString(domElement, AttrName, "Р"); qreal value = GetParametrDouble(domElement, AttrValue, "176.0");
const qreal base = GetParametrDouble(domElement, AttrBase, "176.0");
if (Unit() == Valentina::Mm)// Convert to Cm. if (Unit() == Valentina::Mm)// Convert to Cm.
{ {
data->SetHeight(base/10.0); value = value / 10.0;
data->SetHeightName(name);
}
else// Cm or inch.
{
data->SetHeight(base);
data->SetHeightName(name);
} }
data->SetHeight(value);
data->SetHeightName(height_M);
} }
} }
} }

View File

@ -31,6 +31,14 @@
#include "vdomdocument.h" #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 class VStandardMeasurements:public VDomDocument
{ {
public: public:
@ -44,12 +52,11 @@ public:
static const QString TagDescription; static const QString TagDescription;
static const QString TagSize; static const QString TagSize;
static const QString TagHeight; static const QString TagHeight;
static const QString AttrName; static const QString AttrValue;
static const QString AttrGui_text;
static const QString AttrBase;
static const QString AttrSize_increace; static const QString AttrSize_increace;
static const QString AttrHeight_increase; static const QString AttrHeight_increase;
static const QString AttrNumber; private:
void Measurement(const QString &tag);
}; };
#endif // VSTANDARDMEASUREMENTS_H #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); qreal fVal(0);
#if defined(_UNICODE)
std::wstring a_szExprStd = a_szExpr.toStdWString(); std::wstring a_szExprStd = a_szExpr.toStdWString();
#else
std::string a_szExprStd = a_szExpr.toStdString();
#endif
stringstream_type stream(a_szExprStd); stringstream_type stream(a_szExprStd);
stream.seekg(0); // todo: check if this really is necessary stream.seekg(0); // todo: check if this really is necessary
stream.imbue(QmuParser::s_locale); stream.imbue(QmuParser::s_locale);

View File

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

View File

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

View File

@ -64,7 +64,7 @@ QmuParserBase::QmuParserBase()
:m_pParseFormula(&QmuParserBase::ParseString), m_vRPN(), m_vStringBuf(), m_vStringVarBuf(), m_pTokenReader(), :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_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_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(); InitTokenReader();
} }
@ -79,7 +79,7 @@ QmuParserBase::QmuParserBase(const QmuParserBase &a_Parser)
:m_pParseFormula(&QmuParserBase::ParseString), m_vRPN(), m_vStringBuf(), m_vStringVarBuf(), m_pTokenReader(), :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_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_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)); m_pTokenReader.reset(new token_reader_type(this));
Assign(a_Parser); Assign(a_Parser);
@ -98,7 +98,7 @@ QmuParserBase::~QmuParserBase()
* @return *this * @return *this
* @throw nothrow * @throw nothrow
*/ */
QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT QmuParserBase& QmuParserBase::operator=(const QmuParserBase &a_Parser)
{ {
Assign(a_Parser); Assign(a_Parser);
return *this; return *this;
@ -199,13 +199,15 @@ void QmuParserBase::ResetLocale()
* Clear bytecode, reset the token reader. * Clear bytecode, reset the token reader.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ReInit() const Q_DECL_NOEXCEPT void QmuParserBase::ReInit() const
{ {
m_pParseFormula = &QmuParserBase::ParseString; m_pParseFormula = &QmuParserBase::ParseString;
m_vStringBuf.clear(); m_vStringBuf.clear();
m_vRPN.clear(); m_vRPN.clear();
m_pTokenReader->ReInit(); m_pTokenReader->ReInit();
m_nIfElseCounter = 0; 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, void QmuParserBase::CheckOprt(const QString &a_sName, const QmuParserCallback &a_Callback,
const QString &a_szCharSet) const const QString &a_szCharSet) const
{ {
#if defined(_UNICODE)
const std::wstring a_sNameStd = a_sName.toStdWString(); const std::wstring a_sNameStd = a_sName.toStdWString();
const std::wstring a_szCharSetStd = a_szCharSet.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) || 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')) (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 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_sNameStd = a_sName.toStdWString();
std::wstring a_szCharSetStd = a_szCharSet.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) || if ( a_sNameStd.length() == false || (a_sNameStd.find_first_not_of(a_szCharSetStd)!=string_type::npos) ||
(a_sNameStd[0]>='0' && a_sNameStd[0]<='9')) (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 opt.SetIdx(m_vStringBuf.size()); // Assign buffer index to token
stVal.push(opt); stVal.push(opt);
m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break; break;
case cmVAR: case cmVAR:
stVal.push(opt); stVal.push(opt);
m_vRPN.AddVar( static_cast<qreal*>(opt.GetVar()) ); m_vRPN.AddVar( static_cast<qreal*>(opt.GetVar()) );
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break; break;
case cmVAL: case cmVAL:
stVal.push(opt); stVal.push(opt);
m_vRPN.AddVal( opt.GetVal() ); m_vRPN.AddVal( opt.GetVal() );
m_Numbers.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break; break;
case cmELSE: case cmELSE:
m_nIfElseCounter--; m_nIfElseCounter--;
@ -1643,10 +1640,12 @@ void QmuParserBase::CreateRPN() const
case cmFUNC_BULK: case cmFUNC_BULK:
case cmFUNC_STR: case cmFUNC_STR:
stOpt.push(opt); stOpt.push(opt);
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break; break;
case cmOPRT_POSTFIX: case cmOPRT_POSTFIX:
stOpt.push(opt); stOpt.push(opt);
ApplyFunc(stOpt, stVal, 1); // this is the postfix operator ApplyFunc(stOpt, stVal, 1); // this is the postfix operator
m_Tokens.insert(m_pTokenReader->GetPos()-opt.GetAsString().length(), opt.GetAsString());
break; break;
case cmENDIF: case cmENDIF:
case cmVARPOW2: 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. * Resets the parser to string parsing mode by calling #ReInit.
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearVar() Q_DECL_NOEXCEPT void QmuParserBase::ClearVar()
{ {
m_VarDef.clear(); m_VarDef.clear();
ReInit(); 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. * 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); varmap_type::iterator item = m_VarDef.find(a_strVarName);
if (item!=m_VarDef.end()) if (item!=m_VarDef.end())
@ -1783,7 +1782,7 @@ void QmuParserBase::RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearFun() Q_DECL_NOEXCEPT void QmuParserBase::ClearFun()
{ {
m_FunDef.clear(); m_FunDef.clear();
ReInit(); ReInit();
@ -1797,7 +1796,7 @@ void QmuParserBase::ClearFun() Q_DECL_NOEXCEPT
* @post Resets the parser to string parsing mode. * @post Resets the parser to string parsing mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ClearConst() Q_DECL_NOEXCEPT void QmuParserBase::ClearConst()
{ {
m_ConstDef.clear(); m_ConstDef.clear();
m_StrVarDef.clear(); m_StrVarDef.clear();
@ -1810,7 +1809,7 @@ void QmuParserBase::ClearConst() Q_DECL_NOEXCEPT
* @post Resets the parser to string parsing mode. * @post Resets the parser to string parsing mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::ClearPostfixOprt() Q_DECL_NOEXCEPT void QmuParserBase::ClearPostfixOprt()
{ {
m_PostOprtDef.clear(); m_PostOprtDef.clear();
ReInit(); ReInit();
@ -1823,7 +1822,7 @@ void QmuParserBase::ClearPostfixOprt() Q_DECL_NOEXCEPT
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearOprt() Q_DECL_NOEXCEPT void QmuParserBase::ClearOprt()
{ {
m_OprtDef.clear(); m_OprtDef.clear();
ReInit(); ReInit();
@ -1836,7 +1835,7 @@ void QmuParserBase::ClearOprt() Q_DECL_NOEXCEPT
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
void QmuParserBase::ClearInfixOprt() Q_DECL_NOEXCEPT void QmuParserBase::ClearInfixOprt()
{ {
m_InfixOprtDef.clear(); m_InfixOprtDef.clear();
ReInit(); ReInit();
@ -1848,7 +1847,7 @@ void QmuParserBase::ClearInfixOprt() Q_DECL_NOEXCEPT
* @post Resets the parser to string parser mode. * @post Resets the parser to string parser mode.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserBase::EnableOptimizer(bool a_bIsOn) Q_DECL_NOEXCEPT void QmuParserBase::EnableOptimizer(bool a_bIsOn)
{ {
m_vRPN.EnableOptimizer(a_bIsOn); m_vRPN.EnableOptimizer(a_bIsOn);
ReInit(); 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 * manually one by one. It is not possible to disable built in operators selectively. This function will Reinitialize
* the parser by calling ReInit(). * the parser by calling ReInit().
*/ */
void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn) Q_DECL_NOEXCEPT void QmuParserBase::EnableBuiltInOprt(bool a_bIsOn)
{ {
m_bBuiltInOp = a_bIsOn; m_bBuiltInOp = a_bIsOn;
ReInit(); ReInit();

View File

@ -58,22 +58,22 @@ class QMUPARSERSHARED_EXPORT QmuParserBase
public: public:
QmuParserBase(); QmuParserBase();
QmuParserBase(const QmuParserBase &a_Parser); QmuParserBase(const QmuParserBase &a_Parser);
QmuParserBase& operator=(const QmuParserBase &a_Parser) Q_DECL_NOEXCEPT; QmuParserBase& operator=(const QmuParserBase &a_Parser);
virtual ~QmuParserBase(); virtual ~QmuParserBase();
static void EnableDebugDump(bool bDumpCmd, bool bDumpStack); static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
qreal Eval() const; qreal Eval() const;
qreal* Eval(int &nStackSize) const; qreal* Eval(int &nStackSize) const;
void Eval(qreal *results, int nBulkSize) const; void Eval(qreal *results, int nBulkSize) const;
int GetNumResults() const Q_DECL_NOEXCEPT; int GetNumResults() const;
void SetExpr(const QString &a_sExpr); void SetExpr(const QString &a_sExpr);
void SetVarFactory(facfun_type a_pFactory, void *pUserData = nullptr); void SetVarFactory(facfun_type a_pFactory, void *pUserData = nullptr);
void SetDecSep(char_type cDecSep); void SetDecSep(char_type cDecSep);
void SetThousandsSep(char_type cThousandsSep = 0); void SetThousandsSep(char_type cThousandsSep = 0);
void ResetLocale(); void ResetLocale();
void EnableOptimizer(bool a_bIsOn=true) Q_DECL_NOEXCEPT; void EnableOptimizer(bool a_bIsOn=true);
void EnableBuiltInOprt(bool a_bIsOn=true) Q_DECL_NOEXCEPT; void EnableBuiltInOprt(bool a_bIsOn=true);
bool HasBuiltInOprt() const Q_DECL_NOEXCEPT; bool HasBuiltInOprt() const;
void AddValIdent(identfun_type a_pCallback); void AddValIdent(identfun_type a_pCallback);
void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0, void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0,
EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false); 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, void DefineInfixOprt(const QString &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX,
bool a_bAllowOpt=true); bool a_bAllowOpt=true);
// Clear user defined variables, constants or functions // Clear user defined variables, constants or functions
void ClearVar() Q_DECL_NOEXCEPT; void ClearVar();
void ClearFun() Q_DECL_NOEXCEPT; void ClearFun();
void ClearConst() Q_DECL_NOEXCEPT; void ClearConst();
void ClearInfixOprt() Q_DECL_NOEXCEPT; void ClearInfixOprt();
void ClearPostfixOprt() Q_DECL_NOEXCEPT; void ClearPostfixOprt();
void ClearOprt() Q_DECL_NOEXCEPT; void ClearOprt();
void RemoveVar(const QString &a_strVarName) Q_DECL_NOEXCEPT; void RemoveVar(const QString &a_strVarName);
const varmap_type& GetUsedVar() const; const varmap_type& GetUsedVar() const;
const varmap_type& GetVar() const Q_DECL_NOEXCEPT; const varmap_type& GetVar() const;
const valmap_type& GetConst() const Q_DECL_NOEXCEPT; const valmap_type& GetConst() const;
const QString& GetExpr() 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 QString GetVersion(EParserVersionInfo eInfo = pviFULL);
static const QStringList& GetOprtDef() Q_DECL_NOEXCEPT; static const QStringList& GetOprtDef();
void DefineNameChars(const QString &a_szCharset) Q_DECL_NOEXCEPT; QMap<int, QString> GetTokens() const;
void DefineOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT; QMap<int, QString> GetNumbers() const;
void DefineInfixOprtChars(const QString &a_szCharset) Q_DECL_NOEXCEPT; void DefineNameChars(const QString &a_szCharset);
void DefineOprtChars(const QString &a_szCharset);
void DefineInfixOprtChars(const QString &a_szCharset);
const QString& ValidNameChars() const; const QString& ValidNameChars() const;
const QString& ValidOprtChars() const; const QString& ValidOprtChars() const;
const QString& ValidInfixOprtChars() const; const QString& ValidInfixOprtChars() const;
@ -232,10 +234,12 @@ private:
// items merely used for caching state information // 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 valbuf_type m_vStackBuffer; ///< This is merely a buffer used for the stack in the cmd parsing routine
mutable int m_nFinalResultIdx; 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 Assign(const QmuParserBase &a_Parser);
void InitTokenReader(); void InitTokenReader();
void ReInit() const Q_DECL_NOEXCEPT; void ReInit() const;
void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback, void AddCallback(const QString &a_strName, const QmuParserCallback &a_Callback,
funmap_type &a_Storage, const QString &a_szCharSet ); funmap_type &a_Storage, const QString &a_szCharSet );
void ApplyRemainingOprt(QStack<token_type> &a_stOpt, QStack<token_type> &a_stVal) const; 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. * @brief Get the default symbols used for the built in operators.
* @sa c_DefaultOprt * @sa c_DefaultOprt
*/ */
inline const QStringList &QmuParserBase::GetOprtDef() Q_DECL_NOEXCEPT inline const QStringList &QmuParserBase::GetOprtDef()
{ {
return c_DefaultOprt; 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. * @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; 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. * @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; 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. * @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; 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. * @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; 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. * @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; 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 * 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. * 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; return m_FunDef;
} }
@ -378,7 +392,7 @@ inline const QString& QmuParserBase::GetExpr() const
* @return #m_bBuiltInOp; true if built in operators are enabled. * @return #m_bBuiltInOp; true if built in operators are enabled.
* @throw nothrow * @throw nothrow
*/ */
inline bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT inline bool QmuParserBase::HasBuiltInOprt() const
{ {
return m_bBuiltInOp; return m_bBuiltInOp;
} }
@ -391,7 +405,7 @@ inline bool QmuParserBase::HasBuiltInOprt() const Q_DECL_NOEXCEPT
* value. This function returns the number of available results. * value. This function returns the number of available results.
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
inline int QmuParserBase::GetNumResults() const Q_DECL_NOEXCEPT inline int QmuParserBase::GetNumResults() const
{ {
return m_nFinalResultIdx; return m_nFinalResultIdx;
} }

View File

@ -40,7 +40,7 @@ namespace qmu
* @brief Bytecode default constructor. * @brief Bytecode default constructor.
*/ */
// cppcheck-suppress uninitMemberVar // cppcheck-suppress uninitMemberVar
QmuParserByteCode::QmuParserByteCode() Q_DECL_NOEXCEPT QmuParserByteCode::QmuParserByteCode()
:m_iStackPos(0), m_iMaxStackSize(0), m_vRPN(), m_bEnableOptimizer(true) :m_iStackPos(0), m_iMaxStackSize(0), m_vRPN(), m_bEnableOptimizer(true)
{ {
m_vRPN.reserve(50); m_vRPN.reserve(50);
@ -53,7 +53,7 @@ QmuParserByteCode::QmuParserByteCode() Q_DECL_NOEXCEPT
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode) * Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/ */
// cppcheck-suppress uninitMemberVar // 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_iStackPos(a_ByteCode.m_iStackPos), m_iMaxStackSize(a_ByteCode.m_iMaxStackSize), m_vRPN(a_ByteCode.m_vRPN),
m_bEnableOptimizer(true) m_bEnableOptimizer(true)
{ {
@ -67,7 +67,7 @@ QmuParserByteCode::QmuParserByteCode(const QmuParserByteCode &a_ByteCode) Q_DECL
* Implemented in Terms of Assign(const QParserByteCode &a_ByteCode) * Implemented in Terms of Assign(const QParserByteCode &a_ByteCode)
*/ */
// cppcheck-suppress operatorEqVarError // cppcheck-suppress operatorEqVarError
QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteCode)
{ {
Assign(a_ByteCode); Assign(a_ByteCode);
return *this; return *this;
@ -79,7 +79,7 @@ QmuParserByteCode& QmuParserByteCode::operator=(const QmuParserByteCode &a_ByteC
* *
* @throw nowthrow * @throw nowthrow
*/ */
void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode) Q_DECL_NOEXCEPT void QmuParserByteCode::Assign(const QmuParserByteCode &a_ByteCode)
{ {
if (this==&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. * @param a_pVar Pointer to be added.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserByteCode::AddVar(qreal *a_pVar) Q_DECL_NOEXCEPT void QmuParserByteCode::AddVar(qreal *a_pVar)
{ {
++m_iStackPos; ++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(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. * @param a_pVal Value to be added.
* @throw nothrow * @throw nothrow
*/ */
void QmuParserByteCode::AddVal(qreal a_fVal) Q_DECL_NOEXCEPT void QmuParserByteCode::AddVal(qreal a_fVal)
{ {
++m_iStackPos; ++m_iStackPos;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(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; SToken tok;
tok.Cmd = a_Oprt; tok.Cmd = a_Oprt;
@ -491,7 +491,7 @@ void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt) Q_DECL_NOEXCEPT
* *
* @sa ParserToken::ECmdCode * @sa ParserToken::ECmdCode
*/ */
void QmuParserByteCode::AddAssignOp(qreal *a_pVar) Q_DECL_NOEXCEPT void QmuParserByteCode::AddAssignOp(qreal *a_pVar)
{ {
--m_iStackPos; --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_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback. * @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) 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_iArgc Number of arguments, negative numbers indicate multiarg functions.
* @param a_pFun Pointer to function callback. * @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_iStackPos = m_iStackPos - a_iArgc + 1;
m_iMaxStackSize = qMax(m_iMaxStackSize, static_cast<size_t>(m_iStackPos)); 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 * 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. * 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; 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 * @throw nothrow
*/ */
void QmuParserByteCode::Finalize() Q_DECL_NOEXCEPT void QmuParserByteCode::Finalize()
{ {
SToken tok; SToken tok;
tok.Cmd = cmEND; 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 * 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. * functions thus more intuitive.
*/ */
void QmuParserByteCode::clear() Q_DECL_NOEXCEPT void QmuParserByteCode::clear()
{ {
m_vRPN.clear(); m_vRPN.clear();
m_iStackPos = 0; m_iStackPos = 0;

View File

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

View File

@ -34,7 +34,7 @@ namespace qmu
#ifdef __GNUC__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ __extension__
#endif #endif
QmuParserCallback::QmuParserCallback ( fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode ) 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_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 ) m_iCode ( a_iCode ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti )
{} {}
@ -57,7 +56,7 @@ Q_DECL_NOEXCEPT
#ifdef __GNUC__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ __extension__
#endif #endif
QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, 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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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__ #ifdef __GNUC__
__extension__ __extension__
#endif #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_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 ) 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. * @brief Default constructor.
* @throw nothrow * @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_pFun ( 0 ), m_iArgc ( 0 ), m_iPri ( -1 ), m_eOprtAsct ( oaNONE ), m_iCode ( cmUNKNOWN ), m_iType ( tpVOID ),
m_bAllowOpti ( 0 ) m_bAllowOpti ( 0 )
{} {}
@ -308,7 +307,7 @@ QmuParserCallback::QmuParserCallback() Q_DECL_NOEXCEPT
* @brief Copy constructor. * @brief Copy constructor.
* @throw nothrow * @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_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 ) m_iCode ( ref.m_iCode ), m_iType ( ref.m_iType ), m_bAllowOpti ( ref.m_bAllowOpti )
{ {

View File

@ -46,47 +46,47 @@ namespace qmu
class QmuParserCallback class QmuParserCallback
{ {
public: public:
QmuParserCallback(fun_type0 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type0 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity) QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity)
Q_DECL_NOEXCEPT; ;
QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type4 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type4 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type5 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type5 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type6 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type6 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type7 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type7 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type8 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type8 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type9 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type9 a_pFun, bool a_bAllowOpti);
QmuParserCallback(fun_type10 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti);
QmuParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
QmuParserCallback(multfun_type a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
QmuParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti) Q_DECL_NOEXCEPT; QmuParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
QmuParserCallback() Q_DECL_NOEXCEPT; QmuParserCallback();
QmuParserCallback(const QmuParserCallback &a_Fun) Q_DECL_NOEXCEPT; QmuParserCallback(const QmuParserCallback &a_Fun);
QmuParserCallback* Clone() const; QmuParserCallback* Clone() const;
bool IsOptimizable() const Q_DECL_NOEXCEPT; bool IsOptimizable() const;
void* GetAddr() const Q_DECL_NOEXCEPT; void* GetAddr() const;
ECmdCode GetCode() const Q_DECL_NOEXCEPT; ECmdCode GetCode() const;
ETypeCode GetType() const Q_DECL_NOEXCEPT; ETypeCode GetType() const;
int GetPri() const Q_DECL_NOEXCEPT; int GetPri() const;
EOprtAssociativity GetAssociativity() const Q_DECL_NOEXCEPT; EOprtAssociativity GetAssociativity() const;
int GetArgc() const Q_DECL_NOEXCEPT; int GetArgc() const;
private: private:
void *m_pFun; ///< Pointer to the callback function, casted to void void *m_pFun; ///< Pointer to the callback function, casted to void
@ -127,7 +127,7 @@ inline QmuParserCallback* QmuParserCallback::Clone() const
* @throw nothrow * @throw nothrow
*/ */
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
inline bool QmuParserCallback::IsOptimizable() const Q_DECL_NOEXCEPT inline bool QmuParserCallback::IsOptimizable() const
{ {
return m_bAllowOpti; return m_bAllowOpti;
} }
@ -141,7 +141,7 @@ inline bool QmuParserCallback::IsOptimizable() const Q_DECL_NOEXCEPT
* @throw nothrow * @throw nothrow
* @return #pFun * @return #pFun
*/ */
inline void* QmuParserCallback::GetAddr() const Q_DECL_NOEXCEPT inline void* QmuParserCallback::GetAddr() const
{ {
return m_pFun; return m_pFun;
} }
@ -150,13 +150,13 @@ inline void* QmuParserCallback::GetAddr() const Q_DECL_NOEXCEPT
/** /**
* @brief Return the callback code. * @brief Return the callback code.
*/ */
inline ECmdCode QmuParserCallback::GetCode() const Q_DECL_NOEXCEPT inline ECmdCode QmuParserCallback::GetCode() const
{ {
return m_iCode; return m_iCode;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
inline ETypeCode QmuParserCallback::GetType() const Q_DECL_NOEXCEPT inline ETypeCode QmuParserCallback::GetType() const
{ {
return m_iType; return m_iType;
} }
@ -168,7 +168,7 @@ inline ETypeCode QmuParserCallback::GetType() const Q_DECL_NOEXCEPT
* *
* Only valid if the callback token is an operator token (binary or infix). * Only valid if the callback token is an operator token (binary or infix).
*/ */
inline int QmuParserCallback::GetPri() const Q_DECL_NOEXCEPT inline int QmuParserCallback::GetPri() const
{ {
return m_iPri; return m_iPri;
} }
@ -180,7 +180,7 @@ inline int QmuParserCallback::GetPri() const Q_DECL_NOEXCEPT
* *
* Only valid if the callback token is a binary operator token. * Only valid if the callback token is a binary operator token.
*/ */
inline EOprtAssociativity QmuParserCallback::GetAssociativity() const Q_DECL_NOEXCEPT inline EOprtAssociativity QmuParserCallback::GetAssociativity() const
{ {
return m_eOprtAsct; return m_eOprtAsct;
} }
@ -189,7 +189,7 @@ inline EOprtAssociativity QmuParserCallback::GetAssociativity() const Q_DECL_NOE
/** /**
* @brief Returns the number of function Arguments. * @brief Returns the number of function Arguments.
*/ */
inline int QmuParserCallback::GetArgc() const Q_DECL_NOEXCEPT inline int QmuParserCallback::GetArgc() const
{ {
return m_iArgc; return m_iArgc;
} }

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