kexi

reportwidgets.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXIREPORTWIDGETS_H
21#define KEXIREPORTWIDGETS_H
22
23#include <tqlabel.h>
24#include <tqscrollview.h>
25
26namespace KFormDesigner {
27 class Form;
28 class FormManager;
29}
30
32
34class KexiSubReport : public TQScrollView
35{
36 TQ_OBJECT
37
38 TQ_PROPERTY(TQString reportName READ reportName WRITE setReportName DESIGNABLE true);
39
40 public:
41 KexiSubReport(TQWidget *parent, const char *name);
42 ~KexiSubReport() {}
43
45 TQString reportName() const { return m_reportName; }
46 void setReportName(const TQString &name);
47
48 private:
49// KFormDesigner::FormManager *m_manager;
50 Form *m_form;
51 TQWidget *m_widget;
52 TQString m_reportName;
53};
54
56class Label : public TQLabel
57{
58 TQ_OBJECT
59
60
61 public:
62 Label(const TQString &text, TQWidget *parent, const char *name);
63 ~Label() {}
64};
65
67class PicLabel : public TQLabel
68{
69 TQ_OBJECT
70
71
72 public:
73 PicLabel(const TQPixmap &pix, TQWidget *parent, const char *name);
74 ~PicLabel() {}
75
76 virtual bool setProperty(const char *name, const TQVariant &value);
77};
78
80class ReportLine : public TQWidget
81{
82 TQ_OBJECT
83
84 TQ_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
85 TQ_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
86 TQ_PROPERTY(TQColor color READ color WRITE setColor)
87 TQ_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
88
89 public:
90 enum ReportLineStyle { NoLine = TQt::NoPen, Solid = TQt::SolidLine, Dash = TQt::DashLine, Dot = TQt::DotLine,
91 DashDot = TQt::DashDotLine, DashDotDot = TQt::DashDotDotLine };
92 enum CapStyle { Flat = TQt::FlatCap, Square = TQt::SquareCap, Round = TQt::RoundCap };
93
94 ReportLine(TQWidget *parent, const char *name);
95 ~ReportLine(){;}
96
97 ReportLineStyle lineStyle() const;
98 void setLineStyle(ReportLineStyle style);
99
100 int lineWidth() const;
101 void setLineWidth(int width);
102
103 TQColor color() const;
104 void setColor(const TQColor &color);
105
106 CapStyle capStyle() const;
107 void setCapStyle(CapStyle capStyle);
108
109 protected:
110 virtual void paintEvent (TQPaintEvent *ev);
111
112 private:
113 ReportLineStyle m_lineStyle;
114 int m_lineWidth;
115 CapStyle m_capStyle;
116 TQColor m_color;
117};
118
119
120#endif
121
A class to manage (create/load/save) Forms.
Definition formmanager.h:73
A simple class representing a form.
Definition form.h:136
TQString reportName() const