Search found 41 matches

Go to advanced search

by DevJohan
Mon Aug 18, 2014 1:25 pm
Forum: Developers corner
Topic: customizing multiple keys shortcut doesn't work
Replies: 11
Views: 3814

Re: customizing multiple keys shortcut doesn't work

txt += (QString)ks; This is really a C-style cast and IMO (not just my opinion) should very rarely if ever be used in C++code. In this case if there are ambiguities I would use txt += static_cast<QString>(ks); or if this is dependent on a deprecated operator txt += ks.toQString(); . The reason C-st...
by DevJohan
Mon Aug 11, 2014 6:39 pm
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

My point is that the QuantityParser as is stands today is more than just a facility to enter a number with digits. The QuantityParser handles both numbers, units and functions. You can for instance enter mod( numa , numb ) or atan2( numy, numx). In this way the QuantityParser is more than just a fac...
by DevJohan
Mon Aug 11, 2014 2:00 pm
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

Besides this the ambiguity only arises if both "," and "." appear in the input string passed to the quantity parser. I don't understand which case you are addressing here. In my opinion, this is FreeCAD and not a type setter. The locale is not used to analyze the string and doesn't need to be stric...
by DevJohan
Mon Aug 11, 2014 12:45 pm
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

Juergen, I don't think the input fields were agnostic in the way you describe since the remove group separators code was already there I just delegated every instance to a function that already existed and added some extra code for + and - signs. I like Juergens idea of removing the group separators...
by DevJohan
Thu Jul 31, 2014 11:18 am
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

I don't know if extending the parser to include more unicode characters is the the right way to go. This increases the complexity of the parser without much gain. What I propose is to complement InputField::fixup(...) and QuantitySpinBox::fixup(...) to read something like void CLASS_NAME::fixup(QStr...
by DevJohan
Tue Jul 29, 2014 4:51 pm
Forum: Archived Pull Requests
Topic: [Merged]Regular polygons
Replies: 25
Views: 6342

Re: [Merged]Regular polygons

Thanks guys!

I don't think I will change anything more regarding this feature without more input. But if you want me to change anything just let me know and I'll do it :).
by DevJohan
Tue Jul 29, 2014 2:28 pm
Forum: Archived Pull Requests
Topic: [Merged]Regular polygons
Replies: 25
Views: 6342

Re: [Merged]Regular polygons

I think I've fixed the problems now. Did a clean build and It seems to work. I have not added the Regular polygon to the ProfileLib Menu because that would require some sort of dialog to choose the number of sides. Perhaps all the Regular polygon buttons should only be in the ProfileLib menu, but th...
by DevJohan
Tue Jul 29, 2014 12:52 pm
Forum: Archived Pull Requests
Topic: [Merged]Regular polygons
Replies: 25
Views: 6342

Re: [Merged]Regular polygons

Then it seems you forgot to add the file RegularPolygon.py
Ok, thanks :oops:

Will look at the other stuff as well
by DevJohan
Tue Jul 29, 2014 12:46 pm
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

What UnitSchema are you using? The imperial one skips the group separators added by default in MKS and Internal UnitsSchemaMKS::, UnitsSchemaInternal:: and UnitsSchemaImperial1::schemaTranslate(...): return QString::fromUtf8("%L1 %2").arg(quant.getValue() / factor).arg(unitString); UnitsSchemaImperi...
by DevJohan
Tue Jul 29, 2014 10:29 am
Forum: Developers corner
Topic: Problem with negative values in InputField
Replies: 40
Views: 7611

Re: Problem with negative values in InputField

Hi, I'm on Ubuntu 14.04 64-bit, but I think I had the same problem on 13.10. Any negative value is replaced with DOUBLE_MIN How do you come to this conclusion? From QuantityParser.c line 1453-1454 #line 33 "QuantityParser.y" { QuantResult = Quantity(DOUBLE_MIN); /* empty input */ } the unrecognized ...

Go to advanced search