Giter Club home page Giter Club logo

numeral-qt's People

Contributors

eugene-malashkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

numeral-qt's Issues

Make single class responsible for storying format and doing format

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"

Package numeral-qt as a pod

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*.

Change asterisk semantic for format string

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"

Rename class Numeral

What can somebody suppose Numeral class does, when only class name is known?

Better name is "NumeralFormat".

Wrap library into namespace

Class names "Numeral" and "NumeralLocale" may be already used in client code (for another or the same purpose).

Let's wrap it into namespace.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.