kexi
reportwidgets.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIREPORTWIDGETS_H
00021 #define KEXIREPORTWIDGETS_H
00022
00023 #include <qlabel.h>
00024 #include <qscrollview.h>
00025
00026 namespace KFormDesigner {
00027 class Form;
00028 class FormManager;
00029 }
00030
00031 using KFormDesigner::Form;
00032
00034 class KexiSubReport : public QScrollView
00035 {
00036 Q_OBJECT
00037 Q_PROPERTY(QString reportName READ reportName WRITE setReportName DESIGNABLE true);
00038
00039 public:
00040 KexiSubReport(QWidget *parent, const char *name);
00041 ~KexiSubReport() {}
00042
00044 QString reportName() const { return m_reportName; }
00045 void setReportName(const QString &name);
00046
00047 private:
00048
00049 Form *m_form;
00050 QWidget *m_widget;
00051 QString m_reportName;
00052 };
00053
00055 class Label : public QLabel
00056 {
00057 Q_OBJECT
00058
00059 public:
00060 Label(const QString &text, QWidget *parent, const char *name);
00061 ~Label() {}
00062 };
00063
00065 class PicLabel : public QLabel
00066 {
00067 Q_OBJECT
00068
00069 public:
00070 PicLabel(const QPixmap &pix, QWidget *parent, const char *name);
00071 ~PicLabel() {}
00072
00073 virtual bool setProperty(const char *name, const QVariant &value);
00074 };
00075
00077 class ReportLine : public QWidget
00078 {
00079 Q_OBJECT
00080 Q_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
00081 Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
00082 Q_PROPERTY(QColor color READ color WRITE setColor)
00083 Q_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
00084
00085 public:
00086 enum ReportLineStyle { NoLine = Qt::NoPen, Solid = Qt::SolidLine, Dash = Qt::DashLine, Dot = Qt::DotLine,
00087 DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine };
00088 enum CapStyle { Flat = Qt::FlatCap, Square = Qt::SquareCap, Round = Qt::RoundCap };
00089
00090 ReportLine(QWidget *parent, const char *name);
00091 ~ReportLine(){;}
00092
00093 ReportLineStyle lineStyle() const;
00094 void setLineStyle(ReportLineStyle style);
00095
00096 int lineWidth() const;
00097 void setLineWidth(int width);
00098
00099 QColor color() const;
00100 void setColor(const QColor &color);
00101
00102 CapStyle capStyle() const;
00103 void setCapStyle(CapStyle capStyle);
00104
00105 protected:
00106 virtual void paintEvent (QPaintEvent *ev);
00107
00108 private:
00109 ReportLineStyle m_lineStyle;
00110 int m_lineWidth;
00111 CapStyle m_capStyle;
00112 QColor m_color;
00113 };
00114
00115
00116 #endif
00117
|