summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/kexiformview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/kexiformview.cpp')
-rw-r--r--kexi/plugins/forms/kexiformview.cpp360
1 files changed, 180 insertions, 180 deletions
diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp
index 7e52e5b6..9a14a0c9 100644
--- a/kexi/plugins/forms/kexiformview.cpp
+++ b/kexi/plugins/forms/kexiformview.cpp
@@ -20,8 +20,8 @@
#include "kexiformview.h"
-#include <qobjectlist.h>
-#include <qfileinfo.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
#include <formeditor/form.h>
#include <formeditor/formIO.h>
@@ -60,9 +60,9 @@
//! @todo #define KEXI_SHOW_SPLITTER_WIDGET
-KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
+KexiFormView::KexiFormView(KexiMainWindow *mainWin, TQWidget *tqparent,
const char *name, bool /*dbAware*/)
- : KexiDataAwareView( mainWin, parent, name )
+ : KexiDataAwareView( mainWin, tqparent, name )
, m_propertySet(0)
, m_resizeMode(KexiFormView::ResizeDefault)
, m_query(0)
@@ -72,7 +72,7 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
{
m_delayedFormContentsResizeOnShow = 0;
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiFormScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -81,8 +81,8 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
// m_scrollView->show();
m_dbform = new KexiDBForm(m_scrollView->viewport(), m_scrollView, name/*, conn*/);
-// m_dbform->resize( m_scrollView->viewport()->size() - QSize(20, 20) );
-// m_dbform->resize(QSize(400, 300));
+// m_dbform->resize( m_scrollView->viewport()->size() - TQSize(20, 20) );
+// m_dbform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_dbform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -90,68 +90,68 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->recordNavigator()->setRecordHandler( m_scrollView );
- m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->palette().active().background());
-//moved to formmanager connect(formPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->tqpalette().active().background());
+//moved to formmanager connect(formPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
}
else
{
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const QCString&)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const QCString&)));
- 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, const TQCString&)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const TQCString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
- connect(m_dbform, SIGNAL(handleDragMoveEvent(QDragMoveEvent*)),
- this, SLOT(slotHandleDragMoveEvent(QDragMoveEvent*)));
- connect(m_dbform, SIGNAL(handleDropEvent(QDropEvent*)),
- this, SLOT(slotHandleDropEvent(QDropEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDragMoveEvent(TQDragMoveEvent*)),
+ this, TQT_SLOT(slotHandleDragMoveEvent(TQDragMoveEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDropEvent(TQDropEvent*)),
+ this, TQT_SLOT(slotHandleDropEvent(TQDropEvent*)));
// action stuff
- plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), SLOT(editTabOrder()));
- plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()));
-//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), SLOT(editFormPixmapCollection()));
-//TODO plugSharedAction("formpart_connections", formPart()->manager(), SLOT(editConnections()));
-
- 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("formpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
+ plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()));
+ plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()));
+//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), TQT_SLOT(editFormPixmapCollection()));
+//TODO plugSharedAction("formpart_connections", formPart()->manager(), TQT_SLOT(editConnections()));
+
+ 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("formpart_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("formpart_layout_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), SLOT(layoutHBox()) );
- plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), SLOT(layoutVBox()) );
- plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), SLOT(layoutGrid()) );
+ plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()) );
+ plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()) );
+ plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()) );
#ifdef KEXI_SHOW_SPLITTER_WIDGET
- plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()) );
- plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()) );
+ plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()) );
+ plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()) );
#endif
- plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), SLOT(breakLayout()) );
+ plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()) );
- plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("other_widgets_menu", KFormDesigner::FormManager::self(), 0 );
setAvailable("other_widgets_menu", true);
plugSharedAction("formpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("formpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
-
- plugSharedAction("format_font", KFormDesigner::FormManager::self(), SLOT(changeFont()) );
+ plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
+
+ plugSharedAction("format_font", KFormDesigner::FormManager::self(), TQT_SLOT(changeFont()) );
}
initForm();
@@ -159,15 +159,15 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
KexiDataAwareView::init( m_scrollView, m_scrollView, m_scrollView,
/* skip data-awarness if design mode */ viewMode()==Kexi::DesignViewMode );
- 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_dbform->resize( m_dbform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_dbform->resize( m_dbform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiFormView::~KexiFormView()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -184,7 +184,7 @@ void
KexiFormView::deleteQuery()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -225,17 +225,17 @@ KexiFormView::initForm()
if (viewMode()==Kexi::DesignViewMode) {
//we want to be informed about executed commands
- connect(form()->commandHistory(), SIGNAL(commandExecuted()),
- KFormDesigner::FormManager::self(), SLOT(slotHistoryCommandExecuted()));
+ connect(form()->commandHistory(), TQT_SIGNAL(commandExecuted()),
+ KFormDesigner::FormManager::self(), TQT_SLOT(slotHistoryCommandExecuted()));
}
- const bool newForm = parentDialog()->id() < 0;
+ const bool newForm = tqparentDialog()->id() < 0;
KexiDB::FieldList *fields = 0;
if (newForm) {
// Show the form wizard if this is a new Form
#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
@@ -246,7 +246,7 @@ KexiFormView::initForm()
if(fields)
{
- QDomDocument dom;
+ TQDomDocument dom;
formPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_dbform, dom);
//! @todo handle errors
@@ -267,8 +267,8 @@ KexiFormView::initForm()
m_scrollView->setForm(form());
// m_dbform->updateTabStopsOrder(form());
-// QSize s = m_dbform->size();
-// QApplication::sendPostedEvents();
+// TQSize s = m_dbform->size();
+// TQApplication::sendPostedEvents();
// m_scrollView->resize( s );
// m_dbform->resize(s);
m_scrollView->refreshContentsSize();
@@ -294,9 +294,9 @@ void KexiFormView::updateAutoFieldsDataSource()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -323,9 +323,9 @@ void KexiFormView::updateValuesForSubproperties()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -339,22 +339,22 @@ void KexiFormView::updateValuesForSubproperties()
KFormDesigner::WidgetWithSubpropertiesInterface* subpropIface
= dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>( it.current()->widget() );
if (subpropIface && subpropIface->subwidget() && it.current()->subproperties() ) {
- QWidget *subwidget = subpropIface->subwidget();
- QMap<QString, QVariant>* subprops = it.current()->subproperties();
- for (QMapConstIterator<QString, QVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
+ TQWidget *subwidget = subpropIface->subwidget();
+ TQMap<TQString, TQVariant>* subprops = it.current()->subproperties();
+ for (TQMapConstIterator<TQString, TQVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
kexipluginsdbg << "KexiFormView::loadForm(): delayed setting of the subproperty: widget="
<< it.current()->widget()->name() << " prop=" << subpropIt.key() << " val=" << subpropIt.data() << endl;
- const int count = subwidget->metaObject()->findProperty(subpropIt.key().latin1(), true);
- const QMetaProperty *meta = count!=-1 ? subwidget->metaObject()->property(count, true) : 0;
+ const int count = subwidget->tqmetaObject()->tqfindProperty(subpropIt.key().latin1(), true);
+ const TQMetaProperty *meta = count!=-1 ? subwidget->tqmetaObject()->property(count, true) : 0;
if (meta) {
// Special case: the property value of type enum (set) but is saved as a string list,
// not as int, so we need to translate it to int. It's been created as such
- // by FormIO::readPropertyValue(). Example: "alignment" property.
- if (meta->isSetType() && subpropIt.data().type()==QVariant::StringList) {
- QStrList keys;
- const QStringList list( subpropIt.data().toStringList() );
- for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ // by FormIO::readPropertyValue(). Example: "tqalignment" property.
+ if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) {
+ TQStrList keys;
+ const TQStringList list( subpropIt.data().toStringList() );
+ for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
keys.append((*it).latin1());
subwidget->setProperty( subpropIt.key().latin1(), meta->keysToValue(keys) );
}
@@ -369,19 +369,19 @@ void KexiFormView::updateValuesForSubproperties()
//! Used in KexiFormView::loadForm()
static void setUnsavedBLOBIdsForDataViewMode(
- QWidget* widget, const QMap<QCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
+ TQWidget* widget, const TQMap<TQCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
{
- if (-1 != widget->metaObject()->findProperty("pixmapId")) {
+ if (-1 != widget->tqmetaObject()->tqfindProperty("pixmapId")) {
const KexiBLOBBuffer::Id_t blobID = unsavedLocalBLOBsByName[ widget->name() ];
if (blobID > 0)
- widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)blobID);
+ widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)blobID);
}
- const QObjectList *list = widget->children();
- if (!list)
+ const TQObjectList list = widget->childrenListObject();
+ if (list.isEmpty())
return;
- for (QObjectListIterator it(*list); it.current(); ++it) {
- if (dynamic_cast<QWidget*>(it.current()))
- setUnsavedBLOBIdsForDataViewMode(dynamic_cast<QWidget*>(it.current()), unsavedLocalBLOBsByName);
+ for (TQObjectListIterator it(list); it.current(); ++it) {
+ if (dynamic_cast<TQWidget*>(it.current()))
+ setUnsavedBLOBIdsForDataViewMode(dynamic_cast<TQWidget*>(it.current()), unsavedLocalBLOBsByName);
}
}
@@ -390,7 +390,7 @@ KexiFormView::loadForm()
{
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiFormView::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiFormView::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() )
{
@@ -402,7 +402,7 @@ KexiFormView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_dbform, data);
@@ -414,9 +414,9 @@ KexiFormView::loadForm()
}
void
-KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const QCString& propertyToSelect)
+KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const TQCString& propertyToSelect)
{
-// if (set && parentDialog()!=parentDialog()->mainWin()->currentDialog())
+// if (set && tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog())
if (form() != KFormDesigner::FormManager::self()->activeForm())
return; //this is not the current form view
m_propertySet = set;
@@ -441,7 +441,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
else {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
}
@@ -454,7 +454,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
//collect blobs from design mode by name for use in data view mode
temp->unsavedLocalBLOBsByName.clear();
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
it!=temp->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key())
@@ -470,8 +470,8 @@ tristate
KexiFormView::afterSwitchFrom(int mode)
{
if (mode == 0 || mode == Kexi::DesignViewMode) {
- if (parentDialog()->neverSaved()) {
- m_dbform->resize(QSize(400, 300));
+ if (tqparentDialog()->neverSaved()) {
+ m_dbform->resize(TQSize(400, 300));
m_scrollView->refreshContentsSizeLater(true,true);
//m_delayedFormContentsResizeOnShow = false;
}
@@ -521,16 +521,16 @@ KexiFormView::afterSwitchFrom(int mode)
initDataSource();
//handle events for this form
- m_scrollView->setMainWidgetForEventHandling(parentDialog()->mainWin(), m_dbform);
+ m_scrollView->setMainWidgetForEventHandling(tqparentDialog()->mainWin(), m_dbform);
//set focus on 1st focusable widget which has valid dataSource property set
if (!m_dbform->orderedFocusWidgets()->isEmpty()) {
-// QWidget *www = focusWidget();
- //if (Kexi::hasParent(this, qApp->focusWidget())) {
- KexiUtils::unsetFocusWithReason(qApp->focusWidget(), QFocusEvent::Tab);
+// TQWidget *www = tqfocusWidget();
+ //if (Kexi::hasParent(this, tqApp->tqfocusWidget())) {
+ KexiUtils::unsetFocusWithReason(tqApp->tqfocusWidget(), TQFocusEvent::Tab);
//}
- QPtrListIterator<QWidget> it(*m_dbform->orderedFocusWidgets());
+ TQPtrListIterator<TQWidget> it(*m_dbform->orderedFocusWidgets());
for (;it.current(); ++it) {
KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>(it.current());
if (iface)
@@ -545,7 +545,7 @@ KexiFormView::afterSwitchFrom(int mode)
it.toFirst();
it.current()->setFocus();
- KexiUtils::setFocusWithReason(it.current(), QFocusEvent::Tab);
+ KexiUtils::setFocusWithReason(it.current(), TQFocusEvent::Tab);
m_setFocusInternalOnce = it.current();
}
@@ -555,7 +555,7 @@ KexiFormView::afterSwitchFrom(int mode)
//dirty only if it's a new object
if (mode == 0)
- setDirty( parentDialog()->partItem()->neverSaved() );
+ setDirty( tqparentDialog()->partItem()->neverSaved() );
if (mode==Kexi::DataViewMode && viewMode()==Kexi::DesignViewMode) {
// slotPropertySetSwitched
@@ -568,8 +568,8 @@ KexiFormView::afterSwitchFrom(int mode)
void KexiFormView::initDataSource()
{
deleteQuery();
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
//! @todo also handle anonymous (not stored) queries provided as statements here
bool ok = !dataSourceString.isEmpty();
@@ -581,7 +581,7 @@ void KexiFormView::initDataSource()
KexiDB::TableSchema *tableSchema = 0;
KexiDB::Connection *conn = 0;
- QStringList sources;
+ TQStringList sources;
bool forceReadOnlyDataSource = false;
if (ok) {
@@ -590,7 +590,7 @@ void KexiFormView::initDataSource()
//collect all data-aware widgets and create query schema
m_scrollView->setMainDataSourceWidget(m_dbform);
sources = m_scrollView->usedDataSources();
- conn = parentDialog()->mainWin()->project()->dbConnection();
+ conn = tqparentDialog()->mainWin()->project()->dbConnection();
if (dataSourceMimeTypeString.isEmpty() /*table type is the default*/
|| dataSourceMimeTypeString=="kexi/table")
{
@@ -627,7 +627,7 @@ void KexiFormView::initDataSource()
}
}
- QDict<char> invalidSources(997);
+ TQDict<char> invalidSources(997);
if (ok) {
KexiDB::IndexSchema *pkey = tableSchema ? tableSchema->primaryKey() : 0;
if (pkey) {
@@ -639,10 +639,10 @@ void KexiFormView::initDataSource()
kexipluginsdbg << "KexiFormView::initDataSource(): sources=" << sources << endl;
uint index = 0;
- for (QStringList::ConstIterator it = sources.constBegin();
+ for (TQStringList::ConstIterator it = sources.constBegin();
it!=sources.constEnd(); ++it, index++) {
/*! @todo add expression support */
- QString fieldName( (*it).lower() );
+ TQString fieldName( (*it).lower() );
//remove "tablename." if it was prepended
if (tableSchema && fieldName.startsWith( tableSchema->name().lower()+"." ))
fieldName = fieldName.mid(tableSchema->name().length()+1);
@@ -673,7 +673,7 @@ void KexiFormView::initDataSource()
else {
KexiDB::debug( m_query->parameters() );
// like in KexiQueryView::executeQuery()
- QValueList<QVariant> params;
+ TQValueList<TQVariant> params;
{
KexiUtils::WaitCursorRemover remover;
params = KexiQueryParameters::getParameters(this, *conn->driver(), *m_query, ok);
@@ -681,7 +681,7 @@ void KexiFormView::initDataSource()
if (ok) //input cancelled
m_cursor = conn->executeQuery( *m_query, params );
}
- m_scrollView->invalidateDataSources( invalidSources, m_query );
+ m_scrollView->tqinvalidateDataSources( invalidSources, m_query );
ok = m_cursor!=0;
}
@@ -730,7 +730,7 @@ KexiFormView::storeNewData(const KexiDB::SchemaData& sdata, bool &cancel)
}
if (!storeData()) {
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( s->id() );
delete s;
return 0;
@@ -742,19 +742,19 @@ tristate
KexiFormView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk);
- kexipluginsdbg << "KexiDBForm::storeData(): " << parentDialog()->partItem()->name()
- << " [" << parentDialog()->id() << "]" << endl;
+ kexipluginsdbg << "KexiDBForm::storeData(): " << tqparentDialog()->partItem()->name()
+ << " [" << tqparentDialog()->id() << "]" << endl;
//-- first, store local BLOBs, so identifiers can be updated
//! @todo remove unused data stored previously
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableSchema *blobsTable = conn->tableSchema("kexi__blobs");
if (!blobsTable) { //compatibility check for older Kexi project versions
//! @todo show message about missing kexi__blobs?
return false;
}
// Not all engines accept passing NULL to PKEY o_id, so we're omitting it.
- QStringList blobsFieldNamesWithoutID(blobsTable->names());
+ TQStringList blobsFieldNamesWithoutID(blobsTable->names());
blobsFieldNamesWithoutID.pop_front();
KexiDB::FieldList *blobsFieldsWithoutID = blobsTable->subList(blobsFieldNamesWithoutID);
@@ -767,9 +767,9 @@ KexiFormView::storeData(bool dontAsk)
}
KexiBLOBBuffer *blobBuf = KexiBLOBBuffer::self();
KexiFormView *designFormView
- = dynamic_cast<KexiFormView*>( parentDialog()->viewForMode(Kexi::DesignViewMode) );
+ = dynamic_cast<KexiFormView*>( tqparentDialog()->viewForMode(Kexi::DesignViewMode) );
if (designFormView) {
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
it!=tempData()->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key()) {
@@ -781,12 +781,12 @@ KexiFormView::storeData(bool dontAsk)
if (!h)
continue; //no BLOB assigned
- QString originalFileName(h.originalFileName());
- QFileInfo fi(originalFileName);
- QString caption(fi.baseName().replace('_', " ").simplifyWhiteSpace());
+ TQString originalFileName(h.originalFileName());
+ TQFileInfo fi(originalFileName);
+ TQString caption(fi.baseName().tqreplace('_', " ").simplifyWhiteSpace());
if (st) {
- *st /* << NO, (pgsql doesn't support this):QVariant()*/ /*id*/
+ *st /* << NO, (pgsql doesn't support this):TQVariant()*/ /*id*/
<< h.data() << originalFileName << caption
<< h.mimeType() << (uint)/*! @todo unsafe */h.folderId();
if (!st->execute()) {
@@ -797,17 +797,17 @@ KexiFormView::storeData(bool dontAsk)
}
delete blobsFieldsWithoutID;
blobsFieldsWithoutID=0;
- const Q_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
- if ((Q_ULLONG)-1 == storedBLOBID) {
+ const TQ_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
+ if ((TQ_ULLONG)-1 == storedBLOBID) {
//! @todo show message?
return false;
}
kexipluginsdbg << " storedDataID=" << storedBLOBID << endl;
- h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in Qt4*/)storedBLOBID);
+ h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in TQt4*/)storedBLOBID);
//set widget's internal property so it can be saved...
- const QVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
+ const TQVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
it.key()->setProperty("storedPixmapId",
- QVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)storedBLOBID));
+ TQVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)storedBLOBID));
KFormDesigner::ObjectTreeItem *widgetItem = designFormView->form()->objectTree()->lookup(it.key()->name()); //form()->objectTree()->lookup(it.key()->name());
if (widgetItem)
widgetItem->addModifiedProperty( "storedPixmapId", oldStoredPixmapId );
@@ -817,7 +817,7 @@ KexiFormView::storeData(bool dontAsk)
}
//-- now, save form's XML
- QString data;
+ TQString data;
if (!KFormDesigner::FormIO::saveFormToString(tempData()->form, data))
return false;
if (!storeDataBlock(data))
@@ -826,7 +826,7 @@ KexiFormView::storeData(bool dontAsk)
//all blobs are now saved
tempData()->unsavedLocalBLOBs.clear();
- tempData()->tempForm = QString::null;
+ tempData()->tempForm = TQString();
return true;
}
@@ -860,7 +860,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
setAvailable("formpart_format_raise", true);
setAvailable("formpart_format_lower", true);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
if(!multiple)
{
KFormDesigner::ObjectTreeItem *item = f->objectTree()->lookup( f->selectedWidgets()->first()->name() );
@@ -874,7 +874,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
KFormDesigner::Container *container = f->activeContainer();
setAvailable("formpart_break_layout", container ?
- (container->layoutType() != KFormDesigner::Container::NoLayout) : false );
+ (container->tqlayoutType() != KFormDesigner::Container::NoLayout) : false );
}
void
@@ -890,7 +890,7 @@ KexiFormView::slotFormWidgetSelected(KFormDesigner::Form *f)
setAvailable("formpart_layout_hbox", true);
setAvailable("formpart_layout_vbox", true);
setAvailable("formpart_layout_grid", true);
- setAvailable("formpart_break_layout", (f->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ setAvailable("formpart_break_layout", (f->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -964,22 +964,22 @@ KexiFormView::setRedoEnabled(bool enabled)
}
#endif //0
-QSize
-KexiFormView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiFormView::preferredSizeHint(const TQSize& otherSize)
{
- if (parentDialog()->neverSaved()) {
+ if (tqparentDialog()->neverSaved()) {
//ignore otherSize if possible
-// return KexiViewBase::preferredSizeHint( (parentDialog() && parentDialog()->mdiParent()) ? QSize(10000,10000) : otherSize);
+// return KexiViewBase::preferredSizeHint( (tqparentDialog() && tqparentDialog()->mdiParent()) ? TQSize(10000,10000) : otherSize);
}
return (m_dbform->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
-KexiFormView::resizeEvent( QResizeEvent *e )
+KexiFormView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -991,7 +991,7 @@ KexiFormView::resizeEvent( QResizeEvent *e )
m_scrollView->updateNavPanelGeometry();
if (m_delayedFormContentsResizeOnShow>0) { // && isVisible()) {
m_delayedFormContentsResizeOnShow--;
- m_dbform->resize( e->size() - QSize(30, 30) );
+ m_dbform->resize( e->size() - TQSize(30, 30) );
}
}
@@ -999,19 +999,19 @@ void
KexiFormView::setFocusInternal()
{
if (viewMode() == Kexi::DataViewMode) {
- if (m_dbform->focusWidget()) {
+ if (m_dbform->tqfocusWidget()) {
//better-looking focus
if (m_setFocusInternalOnce) {
- KexiUtils::setFocusWithReason(m_setFocusInternalOnce, QFocusEvent::Other);//Tab);
+ KexiUtils::setFocusWithReason(m_setFocusInternalOnce, TQFocusEvent::Other);//Tab);
m_setFocusInternalOnce = 0;
}
else {
- //ok? SET_FOCUS_USING_REASON(m_dbform->focusWidget(), QFocusEvent::Other);//Tab);
+ //ok? SET_FOCUS_USING_REASON(m_dbform->tqfocusWidget(), TQFocusEvent::Other);//Tab);
}
return;
}
}
- QWidget::setFocus();
+ TQWidget::setFocus();
}
void
@@ -1025,7 +1025,7 @@ KexiFormView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == KexiFormView::ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}
@@ -1042,11 +1042,11 @@ void
KexiFormView::updateDataSourcePage()
{
if (viewMode()==Kexi::DesignViewMode) {
- QCString dataSourceMimeType, dataSource;
+ TQCString dataSourceMimeType, dataSource;
KFormDesigner::WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet();
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
dataSourceMimeType = (*set)["dataSourceMimeType"].value().toCString();
- if (set->contains("dataSource"))
+ if (set->tqcontains("dataSource"))
dataSource = (*set)["dataSource"].value().toCString();
formPart()->dataSourcePage()->setDataSource(dataSourceMimeType, dataSource);
@@ -1054,25 +1054,25 @@ KexiFormView::updateDataSourcePage()
}
void
-KexiFormView::slotHandleDragMoveEvent(QDragMoveEvent* e)
+KexiFormView::slotHandleDragMoveEvent(TQDragMoveEvent* e)
{
if (KexiFieldDrag::canDecodeMultiple( e )) {
e->accept(true);
- //dirty: drawRect(QRect( e->pos(), QSize(50, 20)), 2);
+ //dirty: drawRect(TQRect( e->pos(), TQSize(50, 20)), 2);
}
}
void
-KexiFormView::slotHandleDropEvent(QDropEvent* e)
+KexiFormView::slotHandleDropEvent(TQDropEvent* e)
{
- const QWidget *targetContainerWidget = dynamic_cast<const QWidget*>(sender());
+ const TQWidget *targetContainerWidget = dynamic_cast<const TQWidget*>(sender());
KFormDesigner::ObjectTreeItem *targetContainerWidgetItem = targetContainerWidget
? form()->objectTree()->lookup( targetContainerWidget->name() ) : 0;
if (targetContainerWidgetItem && targetContainerWidgetItem->container()
&& KexiFieldDrag::canDecodeMultiple( e ))
{
- QString sourceMimeType, sourceName;
- QStringList fields;
+ TQString sourceMimeType, sourceName;
+ TQStringList fields;
if (!KexiFieldDrag::decodeMultiple( e, sourceMimeType, sourceName, fields ))
return;
insertAutoFields(sourceMimeType, sourceName, fields,
@@ -1081,13 +1081,13 @@ KexiFormView::slotHandleDropEvent(QDropEvent* e)
}
void
-KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, KFormDesigner::Container* targetContainer, const QPoint& _pos)
+KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, KFormDesigner::Container* targetContainer, const TQPoint& _pos)
{
if (fields.isEmpty())
return;
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(conn, sourceName.latin1(), sourceMimeType=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query()) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such table/query \""
@@ -1095,15 +1095,15 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
return;
}
- QPoint pos(_pos);
+ TQPoint pos(_pos);
//if pos is not specified, compute a new position:
- if (pos==QPoint(-1,-1)) {
+ if (pos==TQPoint(-1,-1)) {
if (m_widgetGeometryForRecentInsertAutoFields.isValid()) {
pos = m_widgetGeometryForRecentInsertAutoFields.bottomLeft()
- + QPoint(0,form()->gridSize());
+ + TQPoint(0,form()->gridSize());
}
else {
- pos = QPoint(40, 40); //start here
+ pos = TQPoint(40, 40); //start here
}
}
@@ -1115,11 +1115,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets();
KFormDesigner::WidgetList widgetsToSelect;
KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup(
- fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()),
+ fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()),
KFormDesigner::FormManager::self()->propertySet()
);
- foreach( QStringList::ConstIterator, it, fields ) {
+ foreach( TQStringList::ConstIterator, it, fields ) {
KexiDB::QueryColumnInfo* column = tableOrQuery.columnInfo(*it);
if (!column) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such field \""
@@ -1128,11 +1128,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
//! todo add autolabel using field's caption or name
//KFormDesigner::Container *targetContainer;
-/* QWidget* targetContainerWidget = QApplication::widgetAt(pos, true);
+/* TQWidget* targetContainerWidget = TQApplication::widgetAt(pos, true);
while (targetContainerWidget
&& !dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
{
- targetContainerWidget = targetContainerWidget->parentWidget();
+ targetContainerWidget = targetContainerWidget->tqparentWidget();
}
if (dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
targetContainer = dynamic_cast<KFormDesigner::Container*>(targetContainerWidget);
@@ -1149,14 +1149,14 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(insertCmd, false/*don't exec twice*/);
KFormDesigner::ObjectTreeItem *newWidgetItem
- = form()->objectTree()->dict()->find(insertCmd->widgetName());
+ = form()->objectTree()->dict()->tqfind(insertCmd->widgetName());
KexiDBAutoField* newWidget
= newWidgetItem ? dynamic_cast<KexiDBAutoField*>(newWidgetItem->widget()) : 0;
widgetsToSelect.append(newWidget);
//#if 0
KFormDesigner::CommandGroup *subGroup
= new KFormDesigner::CommandGroup("", KFormDesigner::FormManager::self()->propertySet());
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", column->aliasOrName());
propValues.insert("fieldTypeInternal", (int)column->field->type());
propValues.insert("fieldCaptionInternal", column->captionOrAliasOrName());
@@ -1173,8 +1173,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// newWidget->setDataSource(column->aliasOrName());
// newWidget->setFieldTypeInternal((int)column->field->type());
// newWidget->setFieldCaptionInternal(column->captionOrAliasOrName());
- //resize again because autofield's type changed what can lead to changed sizeHint()
-// newWidget->resize(newWidget->sizeHint());
+ //resize again because autofield's type changed what can lead to changed tqsizeHint()
+// newWidget->resize(newWidget->tqsizeHint());
KFormDesigner::WidgetList list;
list.append(newWidget);
KFormDesigner::AdjustSizeCommand *adjustCommand
@@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
if (widgetsToSelect.last()) {
//resize form if needed
- QRect oldFormRect( m_dbform->geometry() );
- QRect newFormRect( oldFormRect );
- newFormRect.setWidth(QMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1));
- newFormRect.setHeight(QMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1));
+ TQRect oldFormRect( m_dbform->tqgeometry() );
+ TQRect newFormRect( oldFormRect );
+ newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1));
+ newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1));
if (newFormRect != oldFormRect) {
//1. resize by hand
m_dbform->setGeometry( newFormRect );
@@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/);
}
- //remember geometry of the last inserted widget
- m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry();
+ //remember tqgeometry of the last inserted widget
+ m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry();
}
//eventually, add entire command group to active form
@@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
//enable proper REDO usage
group->resetAllowExecuteFlags();
- m_scrollView->repaint();
- m_scrollView->viewport()->repaint();
- m_scrollView->repaintContents();
+ m_scrollView->tqrepaint();
+ m_scrollView->viewport()->tqrepaint();
+ m_scrollView->tqrepaintContents();
m_scrollView->updateContents();
- m_scrollView->clipper()->repaint();
+ m_scrollView->clipper()->tqrepaint();
m_scrollView->refreshContentsSize();
//select all inserted widgets, if multiple
@@ -1236,7 +1236,7 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
void
-KexiFormView::setUnsavedLocalBLOB(QWidget *widget, KexiBLOBBuffer::Id_t id)
+KexiFormView::setUnsavedLocalBLOB(TQWidget *widget, KexiBLOBBuffer::Id_t id)
{
//! @todo if there already was data assigned, remember it should be dereferenced
if (id==0)
@@ -1264,12 +1264,12 @@ void KexiFormView::updateActions(bool activated)
}*/
/*
-void KexiFormView::parentDialogDetached()
+void KexiFormView::tqparentDialogDetached()
{
m_dbform->updateTabStopsOrder(form());
}
-void KexiFormView::parentDialogAttached(KMdiChildFrm *)
+void KexiFormView::tqparentDialogAttached(KMdiChildFrm *)
{
m_dbform->updateTabStopsOrder(form());
}*/