Ananas Library  0.9.5
aservice.h
1 /****************************************************************************
2 ** $Id: aservice.h,v 1.7 2007/03/31 14:29:55 app Exp $
3 **
4 ** Service functions header file of
5 ** Ananas application library
6 **
7 ** Created : 20050425
8 **
9 ** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola.
10 **
11 ** This file is part of the Designer application of the Ananas
12 ** automation accounting system.
13 **
14 ** This file may be distributed and/or modified under the terms of the
15 ** GNU General Public License version 2 as published by the Free Software
16 ** Foundation and appearing in the file LICENSE.GPL included in the
17 ** packaging of this file.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
23 ** See http://www.leaderit.ru/gpl/ for GPL licensing information.
24 **
25 ** Contact org@leaderit.ru if any conditions of this licensing are
26 ** not clear to you.
27 **
28 **********************************************************************/
29 
30 #ifndef ASERVICE_H
31 #define ASERVICE_H
32 
33 //#include <qmainwindow.h>
34 #include "ananas.h"
35 
47 class ANANAS_EXPORT aService
48 {
49  public:
50 
51  static QString number2money( double rubli,
52  bool need_kopeyki=true,
53  bool male=true,
54  const QString &end1="рублей",
55  const QString &end2="рубль",
56  const QString &end3="рубля");
57  static QString number2money( QString currency, double rubli );
58  static QString parts2money( Q_ULLONG rubli,
59  unsigned int kopeyki,
60  bool need_kopeyki=true,
61  bool positive = true,
62  bool male=true,
63  const QString &end1="рублей",
64  const QString &end2="рубль",
65  const QString &end3="рубля");
66  static QString Date2Print(const QString &ISODate);
67  static void saveSize2Config(QRect size, const QString &mdname);
68  static QRect loadSizeFromConfig(const QString &mdname);
69  static QString readConfigVariable(const QString &name, bool *ok);
70  static void writeConfigVariable(const QString &name, const QString &value);
71  static QString convertNumber2MoneyFormat(double number);
72  static bool copyFile(const QString& srcFileName, const QString& destFileName, bool replaceIfExists=true);
73  protected:
74 
75  static QString part2string( unsigned int st3,
76  unsigned int st2,
77  unsigned int st1,
78  int stepen,
79  bool male,
80  const QString &end1,
81  const QString &end2,
82  const QString &end3);
83  private:
84  aService();
85 };
86 #endif// AREPORT_H
Класс содержит статические методы различного назначен...
Definition: aservice.h:47