Ananas Library  0.9.5
Static Public Member Functions | Static Protected Member Functions | List of all members
aService Class Reference

#include <aservice.h>

Static Public Member Functions

static QString number2money (double rubli, bool need_kopeyki=true, bool male=true, const QString &end1="рублей", const QString &end2="рубль", const QString &end3="рубля")
 
static QString number2money (QString currency, double rubli)
 
static QString parts2money (Q_ULLONG rubli, unsigned int kopeyki, bool need_kopeyki=true, bool positive=true, bool male=true, const QString &end1="рублей", const QString &end2="рубль", const QString &end3="рубля")
 
static QString Date2Print (const QString &ISODate)
 
static void saveSize2Config (QRect size, const QString &mdname)
 
static QRect loadSizeFromConfig (const QString &mdname)
 
static QString readConfigVariable (const QString &name, bool *ok)
 
static void writeConfigVariable (const QString &name, const QString &value)
 
static QString convertNumber2MoneyFormat (double number)
 
static bool copyFile (const QString &srcFileName, const QString &destFileName, bool replaceIfExists=true)
 

Static Protected Member Functions

static QString part2string (unsigned int st3, unsigned int st2, unsigned int st1, int stepen, bool male, const QString &end1, const QString &end2, const QString &end3)
 

Detailed Description

Class contains static functions for various destination: convertation, work with config file etc.

See also
aForm aTests

Member Function Documentation

◆ convertNumber2MoneyFormat()

QString aService::convertNumber2MoneyFormat ( double  number)
static

Converted number to money format (publi.kk).

Parameters
number- number to convertion
Returns
- Converted value

Referenced by aForm::ConvertNumber2MoneyFormat().

◆ Date2Print()

QString aService::Date2Print ( const QString &  ISODate)
static

Converted date from ISO format (yyyy-mm-dd) to local format.

Parameters
ISODate- Date to convertion
Returns
- Converted value

Referenced by aForm::ConvertDateFromIso().

◆ loadSizeFromConfig()

QRect aService::loadSizeFromConfig ( const QString &  mdname)
static

Reads window size from config file.

Parameters
mdname- Window name. If config not contains info about mdname, return default value (400x300)
Returns
- Window size
See also
saveSize2Config(QRect windowSize, const QString &mdname)

◆ number2money()

QString aService::number2money ( double  rubli,
bool  need_kopeyki = true,
bool  male = true,
const QString &  end1 = "рублей",
const QString &  end2 = "рубль",
const QString &  end3 = "рубля" 
)
static

Converted double currency value to string representation (ru currency).

Parameters
rubli- Value to convertions
Returns
- Converted value
See also
parts2money(Q_ULLONG rubli, unsigned int kopeyki, bool positive)
part2string(unsigned int st3, unsigned int st2, unsigned int st1, int stepen)
convertNumber2MoneyFormat(double number)

References parts2money().

Referenced by aForm::Propis().

◆ part2string()

QString aService::part2string ( unsigned int  st3,
unsigned int  st2,
unsigned int  st1,
int  stepen,
bool  male,
const QString &  end1,
const QString &  end2,
const QString &  end3 
)
staticprotected

Convertions implementation.

Returns
- Converted value
See also
number2money(double rubli)
parts2money(Q_ULLONG rubli, unsigned int kopeyki, bool positive)

Referenced by parts2money().

◆ parts2money()

QString aService::parts2money ( Q_ULLONG  rubli,
unsigned int  kopeyki,
bool  need_kopeyki = true,
bool  positive = true,
bool  male = true,
const QString &  end1 = "рублей",
const QString &  end2 = "рубль",
const QString &  end3 = "рубля" 
)
static

Converted currency value to string representation (ru currency).

Returns
- Converted value
See also
number2money(double rubli)
part2string(unsigned int st3, unsigned int st2, unsigned int st1, int stepen)

References part2string().

Referenced by number2money().

◆ readConfigVariable()

QString aService::readConfigVariable ( const QString &  name,
bool *  ok 
)
static

Reads variable from config file.

Parameters
name- variable name to read
ok(out) - true if success, false otherwise
    \return - Variable value 
    \see writeConfigVariable(const QString &name, const QString &value)
    \see loadSizeFromConfig(const QString &mdname)
    \see saveSize2Config(QRect windowSize, const QString &mdname)

Referenced by aExtSERVICE::GetOffice(), aLog::init(), and aReport::show().

◆ saveSize2Config()

void aService::saveSize2Config ( QRect  windowSize,
const QString &  mdname 
)
static

Writes window size to config file.

Parameters
windowSize- Rect of window geometry
mdname- Unical name
See also
loadSizeFromConfig(const QString &mdname)

◆ writeConfigVariable()

void aService::writeConfigVariable ( const QString &  name,
const QString &  value 
)
static

Writes variable to config file.

Parameters
name- Variable name
value- Variable value
See also
loadSizeFromConfig(const QString &mdname)
saveSize2Config(QRect windowSize, const QString &mdname)
readConfigVariable(const QString &name, bool *ok)

Referenced by aReport::show().


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