Ananas Library 0.9.5
areport.h
1/****************************************************************************
2** $Id: areport.h,v 1.17 2007/10/12 10:48:07 app Exp $
3**
4** Report metadata object header file of
5** Ananas application library
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10** Copyright (C) 2003-2005 Grigory Panov <gr1313 at mail.ru>, Yoshkar-Ola.
11**
12** This file is part of the Designer application of the Ananas
13** automation accounting system.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22**
23** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25**
26** Contact org@leaderit.ru if any conditions of this licensing are
27** not clear to you.
28**
29**********************************************************************/
30
31#ifndef AREPORT_H
32#define AREPORT_H
33
34#include <qmainwindow.h>
35#include <qtextbrowser.h>
36#include <qworkspace.h>
37#include "acfg.h"
38#include "aobject.h"
39#include "engine.h"
40#include "atemplate.h"
41#include "aootemplate.h"
42#include "amsotemplate.h"
43
44class aDatabase;
45
53class ANANAS_EXPORT aReportBrowser :public QMainWindow
54{
55 Q_OBJECT
56public:
57 QWorkspace *ws;
58 QTextBrowser *textBrowser;
59 aReportBrowser( QWidget *parent = 0, const char *name = 0, WFlags f = WDestructiveClose );
60 void append( const QString &text );
61 void clear();
62public slots:
63 void print();
64 void saveAs();
65protected slots:
66 virtual void languageChange();
67};
68
79class ANANAS_EXPORT aReport :public aObject
80{
81 Q_OBJECT
82public:
83
89 enum RT_type {
90 RT_text,
91 RT_office_writer,
92 RT_office_calc,
93 RT_msoffice_word,
94 RT_msoffice_excel
95 };
96
97 aEngine *engine;
98 iTemplate *tpl;
99 aReportBrowser *browser;
100 RT_type type;
101
102 aReport( aCfgItem context, RT_type r_type = RT_text, aEngine * e = 0 );
103 aReport( QString name, RT_type r_type = RT_text, aEngine * e = 0 );
104 virtual ~aReport();
105 virtual ERR_Code initObject();
106
107 QString path2workdir();
108
109public slots:
110 void setTable( const QString &name );
111 void setValue( const QString &name, const QString &value );
112 QString value( const QString &name );
113 void clear();
114 void exec( const QString &section );
115 void close();
116 void show();
117 void save(const QString&);
118protected:
119 QString getName4NewTemplate();
120private:
121 QString tplName;
122
123};
124
125#endif// AREPORT_H
Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует QObject.
Definition adatabase.h:78
Определяет программный интерфейс Runtime системы, который используется Ананас скриптом....
Definition engine.h:88
Базовый класс для невизуальных классов (моделей в терминологии MVC) Ананаса, которым необходим доступ...
Definition aobject.h:64
Класс для показа отчета в формате HTML. Наследует QMainWindow.
Definition areport.h:54
Определяет программный интерфейс для работы со всеми типами отчетов. Наследует aObject.
Definition areport.h:80
RT_type
Definition areport.h:89
Интерфейс для работы с отчетами. Наследует QObject.
Definition itemplate.h:59