summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/reports/reportwidgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/reports/reportwidgets.cpp')
-rw-r--r--kexi/plugins/reports/reportwidgets.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kexi/plugins/reports/reportwidgets.cpp b/kexi/plugins/reports/reportwidgets.cpp
index 5437325a..393beaad 100644
--- a/kexi/plugins/reports/reportwidgets.cpp
+++ b/kexi/plugins/reports/reportwidgets.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <form.h>
#include <formIO.h>
@@ -28,20 +28,20 @@
#include "kexireportview.h"
#include "reportwidgets.h"
-Label::Label(const QString &text, QWidget *parent, const char *name)
-: QLabel(text, parent, name)
+Label::Label(const TQString &text, TQWidget *tqparent, const char *name)
+: TQLabel(text, tqparent, name)
{
setPaletteBackgroundColor(white);
}
////////////////////////////////////////////////////////////////////
-ReportLine::ReportLine(QWidget *parent, const char *name)
-: QWidget(parent, name)
+ReportLine::ReportLine(TQWidget *tqparent, const char *name)
+: TQWidget(tqparent, name)
{
- m_lineStyle = (ReportLineStyle)Qt::SolidLine;
+ m_lineStyle = (ReportLineStyle)TQt::SolidLine;
m_lineWidth = 1;
- m_capStyle = (CapStyle)Qt::FlatCap;
+ m_capStyle = (CapStyle)TQt::FlatCap;
m_color = paletteForegroundColor();
setPaletteBackgroundColor(white);
}
@@ -72,14 +72,14 @@ ReportLine::setLineWidth(int width)
update();
}
-QColor
+TQColor
ReportLine::color() const
{
return m_color;
}
void
-ReportLine::setColor(const QColor &color)
+ReportLine::setColor(const TQColor &color)
{
m_color = color;
update();
@@ -99,13 +99,13 @@ ReportLine::setCapStyle(CapStyle capStyle)
}
void
-ReportLine::paintEvent (QPaintEvent *ev)
+ReportLine::paintEvent (TQPaintEvent *ev)
{
- QPainter p(this);
+ TQPainter p(this);
if(!ev->erased())
p.eraseRect(0, 0, width(), height());
- QPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
- pen.setCapStyle((Qt::PenCapStyle)m_capStyle);
+ TQPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
+ pen.setCapStyle((TQt::PenCapStyle)m_capStyle);
p.setPen(pen);
p.drawLine(0, 0, width() -1, height() - 1);
}
@@ -113,8 +113,8 @@ ReportLine::paintEvent (QPaintEvent *ev)
////////////////////////////////////////////////////////////////////
-PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
- : QLabel(parent, name)
+PicLabel::PicLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name)
{
setPixmap(pix);
setScaledContents(false);
@@ -122,52 +122,52 @@ PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
}
bool
-PicLabel::setProperty(const char *name, const QVariant &value)
+PicLabel::setProperty(const char *name, const TQVariant &value)
{
- if(QString(name) == "pixmap")
+ if(TQString(name) == "pixmap")
resize(value.toPixmap().height(), value.toPixmap().width());
- return QLabel::setProperty(name, value);
+ return TQLabel::setProperty(name, value);
}
////////////////////////////////////////////////////////////////////
-KexiSubReport::KexiSubReport(QWidget *parent, const char *name)
-: QScrollView(parent, name), m_form(0), m_widget(0)
+KexiSubReport::KexiSubReport(TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::Plain | QFrame::Box);
+ setFrameStyle(TQFrame::Plain | TQFrame::Box);
viewport()->setPaletteBackgroundColor(white);
}
void
-KexiSubReport::setReportName(const QString &name)
+KexiSubReport::setReportName(const TQString &name)
{
if(name.isEmpty())
return;
// we need a KexiReportView*
- QWidget *w = parentWidget();
+ TQWidget *w = tqparentWidget();
while(w && !w->isA("KexiReportView"))
- w = w->parentWidget();
+ w = w->tqparentWidget();
KexiReportView *view = (KexiReportView*)w;
if(!view)
return;
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*(view->connection()), name, KexiPart::ReportObjectType);
- if((id == 0) || (id == view->parentDialog()->id())) // == our form
+ if((id == 0) || (id == view->tqparentDialog()->id())) // == our form
return; // because of recursion when loading
// we create the container widget
delete m_widget;
- m_widget = new QWidget(viewport(), "kexisubreport_widget");
+ m_widget = new TQWidget(viewport(), "kexisubreport_widget");
m_widget->show();
addChild(m_widget);
m_form = new Form(KexiReportPart::library(), this->name());
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = view->connection()->loadDataBlock(id, data , QString::null);
+ TQString data;
+ tristate res = view->connection()->loadDataBlock(id, data , TQString());
if(res != true)
return;