Back to index

fet  5.18.0
Static Public Member Functions
CustomFETString Class Reference

#include <timetable_defs.h>

List of all members.

Static Public Member Functions

static QString number (int n)
static QString number (double x)

Detailed Description

Definition at line 273 of file timetable_defs.h.


Member Function Documentation

QString CustomFETString::number ( int  n) [static]

Definition at line 154 of file timetable_defs.cpp.

{
       return QString::number(n);
}
QString CustomFETString::number ( double  x) [static]

Definition at line 159 of file timetable_defs.cpp.

{
       QString tmp=QString::number(x, 'f', CUSTOM_DOUBLE_PRECISION);
       
       //remove trailing zeroes AFTER decimal points
       if(tmp.contains('.')){
              int n=tmp.length()-1;
              int del=0;
              while(tmp.at(n)=='0'){
                     n--;
                     del++;
              }
              if(tmp.at(n)=='.'){
                     n--;
                     del++;
              }
              tmp.chop(del);
       }

       return tmp;
}

Here is the call graph for this function:


The documentation for this class was generated from the following files: