summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets/kexidbsubform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbsubform.cpp')
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp
index 8d1971a97..8cb4f7959 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp
@@ -29,38 +29,38 @@
#include <formeditor/container.h>
#include <formeditor/formmanager.h>
-KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, QWidget *parent, const char *name)
-: QScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0)
+KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *tqparentForm, TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_parentForm(tqparentForm), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
}
/*
void
-KexiDBSubForm::paintEvent(QPaintEvent *ev)
+KexiDBSubForm::paintEvent(TQPaintEvent *ev)
{
- QScrollView::paintEvent(ev);
- QPainter p;
+ TQScrollView::paintEvent(ev);
+ TQPainter p;
setWFlags(WPaintUnclipped);
- QString txt("Subform");
- QFont f = font();
+ TQString txt("Subform");
+ TQFont f = font();
f.setPointSize(f.pointSize() * 3);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
const int txtw = fm.width(txt), txth = fm.height();
p.begin(this, true);
p.setPen(black);
p.setFont(f);
- p.drawText(width()/2, height()/2, txt, Qt::AlignCenter|Qt::AlignVCenter);
+ p.drawText(width()/2, height()/2, txt, TQt::AlignCenter|TQt::AlignVCenter);
p.end();
clearWFlags( WPaintUnclipped );
}
*/
void
-KexiDBSubForm::setFormName(const QString &name)
+KexiDBSubForm::setFormName(const TQString &name)
{
if(m_formName==name)
return;
@@ -74,12 +74,12 @@ KexiDBSubForm::setFormName(const QString &name)
return;
}
- QWidget *pw = parentWidget();
+ TQWidget *pw = tqparentWidget();
KexiFormView *view = 0;
- QStringList list;
+ TQStringList list;
while(pw) {
if(pw->isA("KexiDBSubForm")) {
- if(list.contains(pw->name())) {
+ if(list.tqcontains(pw->name())) {
//! @todo error message
return; // Be sure to don't run into a endless-loop cause of recursive subforms.
}
@@ -87,18 +87,18 @@ KexiDBSubForm::setFormName(const QString &name)
}
else if(! view && pw->isA("KexiFormView"))
view = static_cast<KexiFormView*>(pw); // we need a KexiFormView*
- pw = pw->parentWidget();
+ pw = pw->tqparentWidget();
}
- if (!view || !view->parentDialog() || !view->parentDialog()->mainWin()
- || !view->parentDialog()->mainWin()->project()->dbConnection())
+ if (!view || !view->tqparentDialog() || !view->tqparentDialog()->mainWin()
+ || !view->tqparentDialog()->mainWin()->project()->dbConnection())
return;
- KexiDB::Connection *conn = view->parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = view->tqparentDialog()->mainWin()->project()->dbConnection();
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*conn, name, KexiPart::FormObjectType);
- 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
@@ -110,22 +110,22 @@ KexiDBSubForm::setFormName(const QString &name)
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = conn->loadDataBlock(id, data, QString::null);
+ TQString data;
+ tristate res = conn->loadDataBlock(id, data, TQString());
if (res == true)
res = KFormDesigner::FormIO::loadFormFromString(m_form, m_widget, data);
if(res != true) {
delete m_widget;
m_widget = 0;
updateScrollBars();
- m_formName = QString::null;
+ m_formName = TQString();
return;
}
m_form->setDesignMode(false);
// Install event filters on the whole newly created form
- KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(QObject::name());
- KFormDesigner::installRecursiveEventFilter(this, tree->eventEater());
+ KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(TQT_TQOBJECT(this)->name());
+ KFormDesigner::installRecursiveEventFilter(TQT_TQOBJECT(this), tree->eventEater());
}
#include "kexidbsubform.moc"