File indexing completed on 2024-05-12 05:55:17

0001 // This file is part of the SpeedCrunch project
0002 // Copyright (C) 2013 @heldercorreia
0003 // Copyright (C) 2015 Pol Welter <polwelter@gmail.com>
0004 //
0005 // This program is free software; you can redistribute it and/or
0006 // modify it under the terms of the GNU General Public License
0007 // as published by the Free Software Foundation; either version 2
0008 // of the License, or (at your option) any later version.
0009 //
0010 // This program is distributed in the hope that it will be useful,
0011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013 // GNU General Public License for more details.
0014 //
0015 // You should have received a copy of the GNU General Public License
0016 // along with this program; see the file COPYING.  If not, write to
0017 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0018 // Boston, MA 02110-1301, USA.
0019 
0020 #ifndef CORE_NUMBERFORMATTER_H
0021 #define CORE_NUMBERFORMATTER_H
0022 
0023 #include "quantity.h"
0024 
0025 #include <QtCore/QString>
0026 
0027 struct NumberFormatter {
0028     static QString format(HNumber &num) { return format(Quantity(num)); }
0029     static QString format(CNumber &num) { return format(Quantity(num)); }
0030     static QString format(Quantity);
0031 };
0032 
0033 #endif