summaryrefslogtreecommitdiffstats
path: root/kexi/widget/kexibrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/kexibrowser.cpp')
-rw-r--r--kexi/widget/kexibrowser.cpp216
1 files changed, 108 insertions, 108 deletions
diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp
index ca637cd2..a4ec402f 100644
--- a/kexi/widget/kexibrowser.cpp
+++ b/kexi/widget/kexibrowser.cpp
@@ -22,12 +22,12 @@
#include "kexibrowser_p.h"
#include "kexibrowseritem.h"
-#include <qheader.h>
-#include <qpoint.h>
-#include <qpixmapcache.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqpixmapcache.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -53,23 +53,23 @@
#include <kexidb/utils.h>
/*
-class KexiBrowserView : public QWidget
+class KexiBrowserView : public TQWidget
{
KexiBrowserView*(
};
KexiBrowserView::KexiBrowserView(KexiMainWindow *mainWin)
- : QWidget(mainWin, "KexiBrowserView")
+ : TQWidget(mainWin, "KexiBrowserView")
{
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
KexiFlowLayout *buttons_flyr = new KexiFlowLayout(lyr);
m_browser = KexiBrowser(this, mainWin);
lyr->addWidget(m_browser);
setFocusProxy(m_browser);
}*/
-KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
- : QWidget(parent, "KexiBrowser")
+KexiBrowser::KexiBrowser(TQWidget* tqparent, KexiMainWindow *mainWin, int features)
+ : TQWidget(tqparent, "KexiBrowser")
, m_mainWin(mainWin)
, m_features(features)
, m_actions( new KActionCollection(this) )
@@ -84,14 +84,14 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
setCaption(i18n("Project Navigator"));
setIcon(*m_mainWin->icon());
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
KexiFlowLayout *buttons_flyr = new KexiFlowLayout(lyr);
m_list = new KexiBrowserListView(this);
lyr->addWidget(m_list);
m_list->installEventFilter(this);
m_list->renameLineEdit()->installEventFilter(this);
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(0);
m_list->header()->hide();
@@ -101,30 +101,30 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
m_list->sort();
m_list->setAllColumnsShowFocus(true);
m_list->setTooltipColumn(0);
- m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(this) );
- m_list->setResizeMode(QListView::LastColumn);
- connect(m_list, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem *, const QPoint&)));
- connect(m_list, SIGNAL(selectionChanged(QListViewItem*)), this,
- SLOT(slotSelectionChanged(QListViewItem*)));
+ m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this)) );
+ m_list->setResizeMode(TQListView::LastColumn);
+ connect(m_list, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem *, const TQPoint&)));
+ connect(m_list, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
KConfig *config = kapp->config();
config->setGroup("MainWindow");
if ((m_features & SingleClickOpensItemOptionEnabled)
&& config->readBoolEntry("SingleClickOpensItem", false))
{
- connect(m_list, SIGNAL(executed(QListViewItem*)), this,
- SLOT(slotExecuteItem(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(executed(TQListViewItem*)), this,
+ TQT_SLOT(slotExecuteItem(TQListViewItem*)));
}
else {
- connect(m_list, SIGNAL(doubleClicked(QListViewItem*)), this,
- SLOT(slotExecuteItem(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this,
+ TQT_SLOT(slotExecuteItem(TQListViewItem*)));
m_list->enableExecuteArea = false;
}
// actions
- m_openAction = new KAction(i18n("&Open"), "fileopen", 0/*Qt::Key_Enter conflict!*/, this,
- SLOT(slotOpenObject()), this, "open_object");
+ m_openAction = new KAction(i18n("&Open"), "fileopen", 0/*TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this),
+ TQT_SLOT(slotOpenObject()), TQT_TQOBJECT(this), "open_object");
m_openAction->setToolTip(i18n("Open object"));
m_openAction->setWhatsThis(i18n("Opens object selected in the list"));
@@ -145,21 +145,21 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
m_newObjectPopup = 0;
}
else {
- m_deleteAction = new KAction(i18n("&Delete"), "editdelete", 0/*Qt::Key_Delete*/,
- this, SLOT(slotRemove()), m_actions, "edit_delete");
+ m_deleteAction = new KAction(i18n("&Delete"), "editdelete", 0/*TQt::Key_Delete*/,
+ TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), m_actions, "edit_delete");
//! @todo 1.1: just add "Delete" tooltip and what's this
- m_deleteAction->setToolTip(i18n("&Delete").replace("&",""));
+ m_deleteAction->setToolTip(i18n("&Delete").tqreplace("&",""));
m_renameAction = new KAction(i18n("&Rename"), "", 0,
- this, SLOT(slotRename()), m_actions, "edit_rename");
+ TQT_TQOBJECT(this), TQT_SLOT(slotRename()), m_actions, "edit_rename");
#ifdef KEXI_SHOW_UNIMPLEMENTED
- //todo plugSharedAction("edit_cut",SLOT(slotCut()));
- //todo plugSharedAction("edit_copy",SLOT(slotCopy()));
- //todo plugSharedAction("edit_paste",SLOT(slotPaste()));
+ //todo plugSharedAction("edit_cut",TQT_SLOT(slotCut()));
+ //todo plugSharedAction("edit_copy",TQT_SLOT(slotCopy()));
+ //todo plugSharedAction("edit_paste",TQT_SLOT(slotPaste()));
#endif
- m_designAction = new KAction(i18n("&Design"), "edit", 0/*Qt::CTRL + Qt::Key_Enter conflict!*/, this,
- SLOT(slotDesignObject()), this, "design_object");
+ m_designAction = new KAction(i18n("&Design"), "edit", 0/*TQt::CTRL + TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this),
+ TQT_SLOT(slotDesignObject()), TQT_TQOBJECT(this), "design_object");
m_designAction->setToolTip(i18n("Design object"));
m_designAction->setWhatsThis(i18n("Starts designing of the object selected in the list"));
if (m_features & Toolbar) {
@@ -167,21 +167,21 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
buttons_flyr->add(btn);
}
- m_editTextAction = new KAction(i18n("Open in &Text View"), "", 0, this,
- SLOT(slotEditTextObject()), this, "editText_object");
+ m_editTextAction = new KAction(i18n("Open in &Text View"), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotEditTextObject()), TQT_TQOBJECT(this), "editText_object");
m_editTextAction->setToolTip(i18n("Open object in text view"));
m_editTextAction->setWhatsThis(i18n("Opens selected object in the list in text view"));
- m_newObjectAction = new KAction("", "filenew", 0, this, SLOT(slotNewObject()), this, "new_object");
+ m_newObjectAction = new KAction("", "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewObject()), TQT_TQOBJECT(this), "new_object");
if (m_features & Toolbar) {
- m_newObjectToolButton = new KexiSmallToolButton(this, "", QIconSet(), "new_object");
+ m_newObjectToolButton = new KexiSmallToolButton(this, "", TQIconSet(), "new_object");
m_newObjectPopup = new KPopupMenu(this, "newObjectPopup");
- connect(m_newObjectPopup, SIGNAL(aboutToShow()), this, SLOT(slotNewObjectPopupAboutToShow()));
+ connect(m_newObjectPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObjectPopupAboutToShow()));
// KexiPart::Part* part = Kexi::partManager().part("kexi/table");
// m_newObjectPopup->insertItem( SmallIconSet(part->info()->createItemIcon()), part->instanceName() );
m_newObjectToolButton->setPopup(m_newObjectPopup);
- m_newObjectToolButton->setPopupDelay(QApplication::startDragTime());
- connect(m_newObjectToolButton, SIGNAL(clicked()), this, SLOT(slotNewObject()));
+ m_newObjectToolButton->setPopupDelay(TQApplication::startDragTime());
+ connect(m_newObjectToolButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObject()));
buttons_flyr->add(m_newObjectToolButton);
m_deleteObjectToolButton = new KexiSmallToolButton(this, m_deleteAction);
@@ -190,22 +190,22 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
}
}
- m_executeAction = new KAction(i18n("Execute"), "player_play", 0, this,
- SLOT(slotExecuteObject()), this, "data_execute");
+ m_executeAction = new KAction(i18n("Execute"), "player_play", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotExecuteObject()), TQT_TQOBJECT(this), "data_execute");
m_exportActionMenu = new KActionMenu(i18n("Export"));
m_dataExportAction = new KAction(i18n("Export->To File as Data &Table... ", "To &File as Data Table..."),
- "table", 0, this, SLOT(slotExportAsDataTable()), this, "exportAsDataTable");
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportAsDataTable()), TQT_TQOBJECT(this), "exportAsDataTable");
m_dataExportAction->setWhatsThis(
i18n("Exports data from the currently selected table or query data to a file."));
m_exportActionMenu->insert( m_dataExportAction );
- m_printAction = new KAction(i18n("&Print..."), "fileprint", 0, this,
- SLOT(slotPrintItem()), this, "printItem");
+ m_printAction = new KAction(i18n("&Print..."), "fileprint", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotPrintItem()), TQT_TQOBJECT(this), "printItem");
m_printAction->setWhatsThis(
i18n("Prints data from the currently selected table or query."));
- m_pageSetupAction = new KAction(i18n("Page Setup..."), "", 0, this,
- SLOT(slotPageSetupForItem()), this, "pageSetupForItem");
+ m_pageSetupAction = new KAction(i18n("Page Setup..."), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotPageSetupForItem()), TQT_TQOBJECT(this), "pageSetupForItem");
m_pageSetupAction->setWhatsThis(
i18n("Shows page setup for printing the active table or query."));
@@ -288,8 +288,8 @@ KexiBrowser::~KexiBrowser()
{
}
-void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
- QString* partManagerErrorMessages)
+void KexiBrowser::setProject(KexiProject* prj, const TQString& itemsMimeType,
+ TQString* partManagerErrorMessages)
{
clear();
m_itemsMimeType = itemsMimeType;
@@ -333,16 +333,16 @@ void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
}
else {
//add this error to the list that will be displayed later
- QString msg, details;
+ TQString msg, details;
KexiDB::getHTMLErrorMesage(&Kexi::partManager(), msg, details);
if (!msg.isEmpty() && partManagerErrorMessages) {
if (partManagerErrorMessages->isEmpty()) {
- *partManagerErrorMessages = QString("<qt><p>")
+ *partManagerErrorMessages = TQString("<qt><p>")
+i18n("Errors encountered during loading plugins:")+"<ul>";
}
- partManagerErrorMessages->append( QString("<li>") + msg );
+ partManagerErrorMessages->append( TQString("<li>") + msg );
if (!details.isEmpty())
- partManagerErrorMessages->append(QString("<br>")+details);
+ partManagerErrorMessages->append(TQString("<br>")+details);
partManagerErrorMessages->append("</li>");
}
}
@@ -351,7 +351,7 @@ void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
partManagerErrorMessages->append("</ul></p>");
}
-QString KexiBrowser::itemsMimeType() const
+TQString KexiBrowser::itemsMimeType() const
{
return m_itemsMimeType;
}
@@ -370,18 +370,18 @@ KexiBrowserItem *KexiBrowser::addGroup(KexiPart::Info& info)
KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item)
{
//part object for this item
- KexiBrowserItem *parent = item.mimeType().isEmpty() ? 0 : m_baseItems.find(item.mimeType().lower());
- return addItem(item, parent, parent->info());
+ KexiBrowserItem *tqparent = item.mimeType().isEmpty() ? 0 : m_baseItems.tqfind(item.mimeType().lower());
+ return addItem(item, tqparent, tqparent->info());
}
-KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item, KexiBrowserItem *parent, KexiPart::Info* info)
+KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item, KexiBrowserItem *tqparent, KexiPart::Info* info)
{
-// if (!parent) //TODO: add "Other" part group for that
+// if (!tqparent) //TODO: add "Other" part group for that
// return 0;
-// kdDebug() << "KexiBrowser::addItem() found parent:" << parent << endl;
+// kdDebug() << "KexiBrowser::addItem() found tqparent:" << tqparent << endl;
KexiBrowserItem *bitem;
- if (parent)
- bitem = new KexiBrowserItem(parent, info, &item);
+ if (tqparent)
+ bitem = new KexiBrowserItem(tqparent, info, &item);
else
bitem = new KexiBrowserItem(m_list, info, &item);
m_normalItems.insert(item.identifier(), bitem);
@@ -397,10 +397,10 @@ KexiBrowser::slotRemoveItem(const KexiPart::Item &item)
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(m_list->selectedItem());
- QListViewItem *new_item_to_select = 0;
+ TQListViewItem *new_item_to_select = 0;
if (it==to_remove) {//compute item to select if current one will be removed
new_item_to_select = it->itemBelow();//nearest item to select
- if (!new_item_to_select || new_item_to_select->parent()!=it->parent()) {
+ if (!new_item_to_select || new_item_to_select->tqparent()!=it->tqparent()) {
new_item_to_select = it->itemAbove();
}
}
@@ -411,7 +411,7 @@ KexiBrowser::slotRemoveItem(const KexiPart::Item &item)
}
void
-KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPoint &pos)
+KexiBrowser::slotContextMenu(KListView* /*list*/, TQListViewItem *item, const TQPoint &pos)
{
if(!item || !(m_features & ContextMenus))
return;
@@ -420,8 +420,8 @@ KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPo
if (bit->item()) {
pm = m_itemPopup;
//update popup title
- QString title_text = bit->text(0).stripWhiteSpace();
- KexiBrowserItem *par_it = static_cast<KexiBrowserItem*>(bit->parent());
+ TQString title_text = bit->text(0).stripWhiteSpace();
+ KexiBrowserItem *par_it = static_cast<KexiBrowserItem*>(bit->tqparent());
KexiPart::Part* par_part = 0;
if (par_it && par_it->info() && ((par_part = Kexi::partManager().part(par_it->info()))) && !par_part->instanceCaption().isEmpty()) {
//add part type name
@@ -431,23 +431,23 @@ KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPo
}
else if (m_partPopup) {
pm = m_partPopup;
- QString title_text = bit->text(0).stripWhiteSpace();
+ TQString title_text = bit->text(0).stripWhiteSpace();
pm->changeTitle(m_partPopupTitle_id, *bit->pixmap(0), title_text);
/* KexiPart::Part* part = Kexi::partManager().part(bit->info());
if (part)
- m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceName() ));
+ m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceName() ));
else
m_newObjectAction->setText(i18n("&Create Object..."));
m_newObjectAction->setIconSet( SmallIconSet(bit->info()->itemIcon()) );*/
m_list->setCurrentItem(item);
- m_list->repaintItem(item);
+ m_list->tqrepaintItem(item);
}
if (pm)
pm->exec(pos);
}
void
-KexiBrowser::slotExecuteItem(QListViewItem *vitem)
+KexiBrowser::slotExecuteItem(TQListViewItem *vitem)
{
// kdDebug() << "KexiBrowser::slotExecuteItem()" << endl;
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(vitem);
@@ -464,14 +464,14 @@ KexiBrowser::slotExecuteItem(QListViewItem *vitem)
}
void
-KexiBrowser::slotSelectionChanged(QListViewItem* i)
+KexiBrowser::slotSelectionChanged(TQListViewItem* i)
{
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(i);
if (!it)
return;
KexiPart::Part* part = Kexi::partManager().part(it->info());
if (!part) {
- it = static_cast<KexiBrowserItem*>(it->parent());
+ it = static_cast<KexiBrowserItem*>(it->tqparent());
if (it) {
part = Kexi::partManager().part(it->info());
}
@@ -523,14 +523,14 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
m_prevSelectedPart = part;
if (part) {
if (m_newObjectAction) {
- m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceCaption() ));
+ m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceCaption() ));
m_newObjectAction->setIcon( part->info()->createItemIcon() );
if (m_features & Toolbar) {
m_newObjectToolButton->setIconSet( part->info()->createItemIcon() );
- QToolTip::add(m_newObjectToolButton,
- i18n("Create object: %1").arg( part->instanceCaption().lower() ));
- QWhatsThis::add(m_newObjectToolButton,
- i18n("Creates a new object: %1").arg( part->instanceCaption().lower() ));
+ TQToolTip::add(m_newObjectToolButton,
+ i18n("Create object: %1").tqarg( part->instanceCaption().lower() ));
+ TQWhatsThis::add(m_newObjectToolButton,
+ i18n("Creates a new object: %1").tqarg( part->instanceCaption().lower() ));
}
}
} else {
@@ -540,8 +540,8 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
// m_newObjectToolbarAction->setText(m_newObjectAction->text());
if (m_features & Toolbar) {
m_newObjectToolButton->setIconSet( "filenew" );
- QToolTip::add(m_newObjectToolButton, i18n("Create object"));
- QWhatsThis::add(m_newObjectToolButton, i18n("Creates a new object"));
+ TQToolTip::add(m_newObjectToolButton, i18n("Create object"));
+ TQWhatsThis::add(m_newObjectToolButton, i18n("Creates a new object"));
}
}
}
@@ -549,56 +549,56 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
emit selectionChanged(it ? it->item() : 0);
}
-void KexiBrowser::installEventFilter ( const QObject * filterObj )
+void KexiBrowser::installEventFilter ( const TQObject * filterObj )
{
if (!filterObj)
return;
- m_list->installEventFilter ( filterObj );
- QWidget::installEventFilter ( filterObj );
+ m_list->installEventFilter ( const_cast<TQObject*>(filterObj) );
+ TQWidget::installEventFilter ( const_cast<TQObject*>(filterObj) );
}
-bool KexiBrowser::eventFilter ( QObject *o, QEvent * e )
+bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e )
{
- if (o==m_list && e->type()==QEvent::Resize) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list) && e->type()==TQEvent::Resize) {
kdDebug() << "resize!" << endl;
}
- if (o==m_list->renameLineEdit()) {
- if (e->type()==QEvent::Hide)
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list->renameLineEdit())) {
+ if (e->type()==TQEvent::Hide)
itemRenameDone();
}
- else if (e->type()==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
- if (0==(ke->state() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton))) {
- QListViewItem *it = m_list->selectedItem();
+ else if (e->type()==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
+ if (0==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) {
+ TQListViewItem *it = m_list->selectedItem();
if (it)
slotExecuteItem(it);
}
- else if (Qt::ControlButton==(ke->state() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton))) {
+ else if (TQt::ControlButton==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) {
slotDesignObject();
}
}
}
- else if (e->type()==QEvent::AccelOverride) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ else if (e->type()==TQEvent::AccelOverride) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
//override delete action
- if (ke->key()==Qt::Key_Delete && ke->state()==Qt::NoButton) {
+ if (ke->key()==TQt::Key_Delete && ke->state()==Qt::NoButton) {
slotRemove();
ke->accept();
return true;
}
//override rename action
- if (ke->key()==Qt::Key_F2 && ke->state()==Qt::NoButton) {
+ if (ke->key()==TQt::Key_F2 && ke->state()==Qt::NoButton) {
slotRename();
ke->accept();
return true;
}
-/* else if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+/* else if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
if (ke->state()==ControlButton) {
slotDesignObject();
}
else if (ke->state()==0 && !m_list->renameLineEdit()->isVisible()) {
- QListViewItem *it = m_list->selectedItem();
+ TQListViewItem *it = m_list->selectedItem();
if (it)
slotExecuteItem(it);
}
@@ -695,7 +695,7 @@ void KexiBrowser::itemRenameDone()
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(m_list->selectedItem());
if (!it)
return;
- QString txt = it->text(0).stripWhiteSpace();
+ TQString txt = it->text(0).stripWhiteSpace();
bool ok = it->item()->name().lower()!=txt.lower(); //the new name must be different
if (ok) {
/* TODO */
@@ -710,7 +710,7 @@ void KexiBrowser::itemRenameDone()
m_list->nameEndsWithAsterisk = false;
}
it->setText(0, txt);
- it->parent()->sort();
+ it->tqparent()->sort();
setFocus();
}
@@ -749,7 +749,7 @@ void KexiBrowser::selectItem(KexiPart::Item& item)
void KexiBrowser::clearSelection()
{
m_list->clearSelection();
- QListViewItem *item = m_list->firstChild();
+ TQListViewItem *item = m_list->firstChild();
if (item) {
m_list->ensureItemVisible(item);
}
@@ -763,7 +763,7 @@ void KexiBrowser::slotNewObjectPopupAboutToShow()
for (KexiPart::PartInfoListIterator it(*list); it.current(); ++it) {
//add an item to "New object" toolbar popup
KAction *action = m_mainWin->actionCollection()->action(
- KexiPart::nameForCreateAction(*it.current()) );
+ TQString(KexiPart::nameForCreateAction(*it.current())) );
if (action) {
action->plug(m_newObjectPopup);
}
@@ -798,7 +798,7 @@ KexiPart::Item* KexiBrowser::selectedPartItem() const
return it ? it->item() : 0;
}
-bool KexiBrowser::actionEnabled(const QCString& actionName) const
+bool KexiBrowser::actionEnabled(const TQCString& actionName) const
{
if (actionName=="project_export_data_table" && (m_features & ContextMenus))
return m_itemPopup->isItemVisible(m_exportActionMenu_id);
@@ -852,8 +852,8 @@ void KexiBrowser::clear()
}
//--------------------------------------------
-KexiBrowserListView::KexiBrowserListView(QWidget *parent)
- : KListView(parent, "KexiBrowserListView")
+KexiBrowserListView::KexiBrowserListView(TQWidget *tqparent)
+ : KListView(tqparent, "KexiBrowserListView")
, nameEndsWithAsterisk(false)
, enableExecuteArea(true)
{
@@ -863,7 +863,7 @@ KexiBrowserListView::~KexiBrowserListView()
{
}
-void KexiBrowserListView::rename(QListViewItem *item, int c)
+void KexiBrowserListView::rename(TQListViewItem *item, int c)
{
if (renameLineEdit()->isVisible())
return;
@@ -881,7 +881,7 @@ void KexiBrowserListView::rename(QListViewItem *item, int c)
}
}
-bool KexiBrowserListView::isExecuteArea( const QPoint& point )
+bool KexiBrowserListView::isExecuteArea( const TQPoint& point )
{
return enableExecuteArea && KListView::isExecuteArea(point);
}