eugene-malashkin / numeral-qt Goto Github PK
View Code? Open in Web Editor NEWNumeral format for Qt-based applications
Numeral format for Qt-based applications
Nowadays there are two classed, 1) NumeralFormat for storying format and 2) Numeral for doing format. That's too complex!
For simple usage, needed:
Numeral n("+0.00");
QString s = n.format(1.234);
qDebug() << s; // "+1.23"
qDebug() << Numeral::format(1.234, "+0.00"); // "+1.23"
QtPods is a "package manager" for tiny Qt code fragments that lets users integrate and update your with tool with just a click in a standardized way and with proper version control.
Check here:
https://github.com/cybercatalyst/qt-pods
I've tried my best for documentation, if you need assistance just let me know. It would be useful to rename it to qtnumeral, as all other pods are called qt*.
To following:
0.00****
means mininal fractional part is 2 digits and maximal fraction part is 6 digits (due two '0' + four '*').
Format samples:
1.2345678 -> "1.234568"
1.2345 -> "1.2345"
1.2 -> "1.20"
What can somebody suppose Numeral class does, when only class name is known?
Better name is "NumeralFormat".
Class names "Numeral" and "NumeralLocale" may be already used in client code (for another or the same purpose).
Let's wrap it into namespace.
Because of QLocale doesn't allow to change group separator, it's necessary to create class (let's name it NumeralLocale) which allows.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.