summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/reports/kexireportview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/reports/kexireportview.cpp')
-rw-r--r--kexi/plugins/reports/kexireportview.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/kexi/plugins/reports/kexireportview.cpp b/kexi/plugins/reports/kexireportview.cpp
index 6b7f46b59..913a493ea 100644
--- a/kexi/plugins/reports/kexireportview.cpp
+++ b/kexi/plugins/reports/kexireportview.cpp
@@ -39,15 +39,15 @@
#define NO_DSWIZARD
-KexiReportScrollView::KexiReportScrollView(QWidget *parent, bool preview)
- : KexiScrollView(parent, preview)
+KexiReportScrollView::KexiReportScrollView(TQWidget *tqparent, bool preview)
+ : KexiScrollView(tqparent, preview)
{
if(preview) {
setRecordNavigatorVisible(true);
recordNavigator()->setLabelText(i18n("Page:"));
recordNavigator()->setInsertingButtonVisible(false);
}
- connect(this, SIGNAL(resizingStarted()), this, SLOT(slotResizingStarted()));
+ connect(this, TQT_SIGNAL(resizingStarted()), this, TQT_SLOT(slotResizingStarted()));
}
KexiReportScrollView::~KexiReportScrollView()
@@ -61,7 +61,7 @@ KexiReportScrollView::show()
//now get resize mode settings for entire form
if (m_preview) {
- KexiReportView* fv = dynamic_cast<KexiReportView*>(parent());
+ KexiReportView* fv = dynamic_cast<KexiReportView*>(tqparent());
int resizeMode = fv ? fv->resizeMode() : KexiReportView::ResizeAuto;
if (resizeMode == KexiReportView::ResizeAuto)
setResizePolicy(AutoOneFit);
@@ -80,12 +80,12 @@ KexiReportScrollView::slotResizingStarted()
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char *name,
+KexiReportView::KexiReportView(KexiMainWindow *win, TQWidget *tqparent, const char *name,
KexiDB::Connection *conn)
- : KexiViewBase(win, parent, name), m_propertySet(0), m_conn(conn)
+ : KexiViewBase(win, tqparent, name), m_propertySet(0), m_conn(conn)
, m_resizeMode(KexiReportView::ResizeDefault)
{
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiReportScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -93,7 +93,7 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
// m_scrollView->show();
m_reportform = new KexiReportForm(m_scrollView->viewport(), name/*, conn*/);
-// m_reportform->resize(QSize(400, 300));
+// m_reportform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_reportform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -102,54 +102,54 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->viewport()->setPaletteBackgroundColor(m_reportform->palette().active().background());
#if 0
- connect(reportPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ connect(reportPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
#endif
}
else {
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form *, bool)),
- this, SLOT(slotDirty(KFormDesigner::Form *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
// action stuff
- /*connect(reportPart()->manager(), SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
- connect(reportPart()->manager(), SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
- connect(reportPart()->manager(), SIGNAL(undoEnabled(bool, const QString&)), this, SLOT(setUndoEnabled(bool)));
- connect(reportPart()->manager(), SIGNAL(redoEnabled(bool, const QString&)), this, SLOT(setRedoEnabled(bool)));*/
-
- plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), SLOT(copyWidget()));
- plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), SLOT(cutWidget()));
- plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), SLOT(pasteWidget()));
- plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), SLOT(deleteWidget()));
- plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), SLOT(selectAll()));
- plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
-
- plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ /*connect(reportPart()->manager(), TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
+ connect(reportPart()->manager(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), this, TQT_SLOT(setUndoEnabled(bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), this, TQT_SLOT(setRedoEnabled(bool)));*/
+
+ plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()));
+ plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()));
+ plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()));
+ plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()));
+ plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()));
+ plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()));
+ plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), TQT_SLOT(redo()));
+
+ plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("reportpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("reportpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
+ plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
}
initForm();
- connect(this, SIGNAL(focus(bool)), this, SLOT(slotFocus(bool)));
+ connect(this, TQT_SIGNAL(focus(bool)), this, TQT_SLOT(slotFocus(bool)));
/// @todo skip this if ther're no borders
-// m_reportform->resize( m_reportform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_reportform->resize( m_reportform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiReportView::~KexiReportView()
@@ -187,10 +187,10 @@ KexiReportView::initForm()
// Show the form wizard if this is a new Form
// KexiDB::FieldList *fields = 0;
- if(parentDialog()->id() < 0)
+ if(tqparentDialog()->id() < 0)
{
#ifndef NO_DSWIZARD
- KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (QWidget*)mainWin(), "datasource_wizard");
+ KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (TQWidget*)mainWin(), "datasource_wizard");
if(!w->exec())
fields = 0;
else
@@ -202,7 +202,7 @@ KexiReportView::initForm()
/* if(fields)
{
@todo generate a report from a table or a query
- QDomDocument dom;
+ TQDomDocument dom;
reportPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_reportform, dom);
}
@@ -220,7 +220,7 @@ KexiReportView::loadForm()
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << tqparentDialog()->id() << endl;
// If we are previewing the Form, use the tempData instead of the form stored in the db
if(viewMode()==Kexi::DataViewMode && !tempData()->tempForm.isNull() ) {
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, tempData()->tempForm);
@@ -228,7 +228,7 @@ KexiReportView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, data);
}
@@ -249,7 +249,7 @@ KexiReportView::beforeSwitchTo(int mode, bool &dontStore)
if (mode!=viewMode() && viewMode()!=Kexi::DataViewMode) {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
// we don't store on db, but in our TempData
@@ -322,12 +322,12 @@ tristate
KexiReportView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk)
- kexipluginsdbg << "KexiReportForm::storeData(): " << parentDialog()->partItem()->name() << " [" << parentDialog()->id() << "]" << endl;
- QString data;
+ kexipluginsdbg << "KexiReportForm::storeData(): " << tqparentDialog()->partItem()->name() << " [" << tqparentDialog()->id() << "]" << endl;
+ TQString data;
KFormDesigner::FormIO::saveFormToString(tempData()->form, data);
if (!storeDataBlock(data))
return false;
- tempData()->tempForm = QString();
+ tempData()->tempForm = TQString();
return true;
}
@@ -428,17 +428,17 @@ KexiReportView::setRedoEnabled(bool enabled)
}
#endif
-QSize
-KexiReportView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiReportView::preferredSizeHint(const TQSize& otherSize)
{
return (m_reportform->size()
- +QSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
+ +TQSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
m_scrollView->horizontalScrollBar()->isVisible() ? m_scrollView->horizontalScrollBar()->height()*3/2 : 10))
.expandedTo( KexiViewBase::preferredSizeHint(otherSize) );
}
void
-KexiReportView::resizeEvent( QResizeEvent *e )
+KexiReportView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -461,7 +461,7 @@ KexiReportView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}