summaryrefslogtreecommitdiffstats
path: root/kexi/main/keximainwindowimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/main/keximainwindowimpl.cpp')
-rw-r--r--kexi/main/keximainwindowimpl.cpp938
1 files changed, 469 insertions, 469 deletions
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp
index d5ce9939c..15491d5c8 100644
--- a/kexi/main/keximainwindowimpl.cpp
+++ b/kexi/main/keximainwindowimpl.cpp
@@ -22,19 +22,19 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qobjectlist.h>
-#include <qprocess.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qfiledialog.h>
-#include <qdockwindow.h>
-#include <qdockarea.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqobjectlist.h>
+#include <tqprocess.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqfiledialog.h>
+#include <tqdockwindow.h>
+#include <tqdockarea.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -101,7 +101,7 @@
#include "printing/kexisimpleprintingpagesetup.h"
//Extreme verbose debug
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
# include <krecentdirs.h>
# include <win32_utils.h>
//# define KexiVDebug kdDebug()
@@ -111,7 +111,7 @@
# define KexiVDebug if (0) kdDebug()
#endif
-//first fix the geometry
+//first fix the tqgeometry
//#define KEXI_NO_CTXT_HELP 1
#ifndef KEXI_NO_CTXT_HELP
@@ -127,7 +127,7 @@
//! width changes will be removed in KMDI
//#define PROPEDITOR_VISIBILITY_CHANGES
-//temporary fix to manage layout
+//temporary fix to manage tqlayout
#include "ksplitter.h"
#define KDOCKWIDGET_P 1
@@ -149,7 +149,7 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
Kexi::initCmdLineArgs( argc, argv, aboutdata );
bool GUIenabled = true;
- QWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created
+ TQWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created
//! @todo switch GUIenabled off when needed
KApplication* app = new KApplication(true, GUIenabled);
@@ -165,10 +165,10 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
#endif
#ifdef KEXI_DEBUG_GUI
- QWidget* debugWindow = 0;
+ TQWidget* debugWindow = 0;
#endif
if (GUIenabled) {
- dummyWidget = new QWidget();
+ dummyWidget = new TQWidget();
dummyWidget->setIcon( DesktopIcon( "kexi" ) );
app->setMainWidget(dummyWidget);
#ifdef KEXI_DEBUG_GUI
@@ -203,7 +203,7 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
app->setMainWidget(win);
#ifdef KEXI_DEBUG_GUI
//if (debugWindow)
- //debugWindow->reparent(win, QPoint(1,1));
+ //debugWindow->reparent(win, TQPoint(1,1));
#endif
delete dummyWidget;
@@ -242,11 +242,11 @@ KexiMainWindowImpl::KexiMainWindowImpl()
d->config = kapp->config();
if ( !initialGeometrySet() ) {
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(tqparentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
d->config->setGroup("MainWindow");
- QSize s ( d->config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 700 ),
- d->config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 480 ) );
+ TQSize s ( d->config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ),
+ d->config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) );
resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height()));
}
@@ -259,15 +259,15 @@ KexiMainWindowImpl::KexiMainWindowImpl()
KGlobal::iconLoader()->addAppDir("koffice");
//get informed
- connect(&Kexi::partManager(),SIGNAL(partLoaded(KexiPart::Part*)),this,SLOT(slotPartLoaded(KexiPart::Part*)));
- connect( m_pMdi, SIGNAL(nowMaximized(bool)), this, SLOT(slotCaptionForCurrentMDIChild(bool)) );
- connect( m_pMdi, SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), this, SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*)));
-// connect( this, SIGNAL(lastChildFrmClosed()), this, SLOT(slotLastChildFrmClosed()));
- connect( this, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastChildViewClosed()));
+ connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*)));
+ connect( m_pMdi, TQT_SIGNAL(nowMaximized(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotCaptionForCurrentMDIChild(bool)) );
+ connect( m_pMdi, TQT_SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), TQT_TQOBJECT(this), TQT_SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*)));
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildFrmClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildFrmClosed()));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildViewClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildViewClosed()));
- connect( this, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(slotChildViewIsDetachedNow(QWidget*)));
- connect( this, SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)),
- this, SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode)));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotChildViewIsDetachedNow(TQWidget*)));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode)));
//if (!userMode()) {
@@ -290,19 +290,19 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
{//store menu popups list
- QObjectList *l = queryList( "QPopupMenu" );
- for (QObjectListIt it( *l ); it.current(); ++it ) {
+ TQObjectList *l = queryList( TQPOPUPMENU_OBJECT_NAME_STRING );
+ for (TQObjectListIt it( *l ); it.current(); ++it ) {
//kdDebug() << "name=" <<it.current()->name() << " cname="<<it.current()->className()<<endl;
//KexiMainWindowImpl::eventFilter() will filter our popups:
it.current()->installEventFilter(this);
- d->popups.insert(it.current()->name(), static_cast<QPopupMenu*>(it.current()));
+ d->popups.insert(it.current()->name(), static_cast<TQPopupMenu*>(TQT_TQWIDGET(it.current())));
}
delete l;
d->createMenu = d->popups["create"];
#ifdef KEXI_NO_REPORTBUG_COMMAND
//remove "bug report" action to avoid confusion for supported with commercial technical support
- QPopupMenu *helpMenu = d->popups["help"];
+ TQPopupMenu *helpMenu = d->popups["help"];
if (helpMenu) {
//const int idx = helpMenu->indexOf( (int)KHelpMenu::menuReportBug );
helpMenu->removeItemAt(int(KHelpMenu::menuReportBug)-1);
@@ -322,8 +322,8 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
if (!isFakingSDIApplication()/* && !userMode()*/) {
-// QPopupMenu *menu = (QPopupMenu*) child( "window", "KPopupMenu" );
- QPopupMenu *menu = d->popups["window"];
+// TQPopupMenu *menu = (TQPopupMenu*) child( "window", "KPopupMenu" );
+ TQPopupMenu *menu = d->popups["window"];
unsigned int count = menuBar()->count();
if (menu)
setWindowMenu(menu);
@@ -332,7 +332,7 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
if (userMode()) {
//hide "insert" menu and disable "project_import", "edit_paste_special" menus
- QPopupMenu *menu = d->popups["insert"];
+ TQPopupMenu *menu = d->popups["insert"];
if (menu) {
for (uint i=0; i < menuBar()->count(); i++) {
if (menuBar()->text( menuBar()->idAt(i) ) == i18n("&Insert")) {
@@ -348,8 +348,8 @@ KexiMainWindowImpl::KexiMainWindowImpl()
m_pTaskBar->setCaption(i18n("Task Bar")); //js TODO: move this to KMDIlib
// if (!userMode()) {
- invalidateActions();
- d->timer.singleShot(0,this,SLOT(slotLastActions()));
+ tqinvalidateActions();
+ d->timer.singleShot(0,this,TQT_SLOT(slotLastActions()));
// }
setTabWidgetVisibility(KMdi::AlwaysShowTabs);
@@ -357,17 +357,17 @@ KexiMainWindowImpl::KexiMainWindowImpl()
d->config->setGroup("MainWindow");
tabWidget()->setHoverCloseButton(d->config->readBoolEntry("HoverCloseButtonForTabs", false));
//create special close button as corner widget for IDEAl mode
- QToolButton *closeButton = new QToolButton( tabWidget() );
+ TQToolButton *closeButton = new TQToolButton( tabWidget() );
closeButton->setAutoRaise( true );
- closeButton->setPixmap( QPixmap( kde2_closebutton ) );
- closeButton->setPaletteBackgroundColor(closeButton->palette().active().background());
+ closeButton->setPixmap( TQPixmap( kde2_closebutton ) );
+ closeButton->setPaletteBackgroundColor(closeButton->tqpalette().active().background());
// closeButton->setIconSet(SmallIconSet("tab_remove"));
- tabWidget()->setCornerWidget( closeButton, Qt::TopRight );
+ tabWidget()->setCornerWidget( closeButton, TQt::TopRight );
closeButton->hide(); // hide until it's needed to avoid problems in "user mode"
// when initially the main window is empty
- QToolTip::add(closeButton,
+ TQToolTip::add(closeButton,
i18n("Close the current tab page in Kexi tab interface", "Close the current tab"));
- QObject::connect( closeButton, SIGNAL( clicked() ), this, SLOT( closeActiveView() ) );
+ TQObject::connect( closeButton, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( closeActiveView() ) );
}
#ifdef KEXI_ADD_CUSTOM_KEXIMAINWINDOWIMPL
@@ -387,13 +387,13 @@ KexiProject *KexiMainWindowImpl::project()
return d->prj;
}
-void KexiMainWindowImpl::setWindowMenu(QPopupMenu *menu)
+void KexiMainWindowImpl::setWindowMenu(TQPopupMenu *menu)
{
delete m_pWindowMenu;
m_pWindowMenu = menu;
int count = menuBar()->count();
//try to move "window" menu just before "Settings" menu (count-3)
- const QString txt = i18n("&Window");
+ const TQString txt = i18n("&Window");
int i;
for (i=0; i<count; i++) {
//kdDebug() << menuBar()->text( menuBar()->idAt(i) ) << endl;
@@ -406,7 +406,7 @@ void KexiMainWindowImpl::setWindowMenu(QPopupMenu *menu)
menuBar()->insertItem(txt, m_pWindowMenu, id, count-3);
}
m_pWindowMenu->setCheckable(true);
- QObject::connect( m_pWindowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu()) );
+ TQObject::connect( m_pWindowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(fillWindowMenu()) );
}
void KexiMainWindowImpl::fillWindowMenu()
@@ -433,7 +433,7 @@ void KexiMainWindowImpl::fillWindowMenu()
}
//insert window_next, window_previous actions:
-// const QString t = i18n("&Dock/Undock...");
+// const TQString t = i18n("&Dock/Undock...");
int i = m_pWindowMenu->count()-1;
for (int index;; i--) {
index = m_pWindowMenu->idAt(i);
@@ -465,7 +465,7 @@ void KexiMainWindowImpl::switchToIDEAlMode(bool showMessage)
else {
KMessageBox::information(this,
i18n("User interface mode will be switched to IDEAl at next %1 application startup.")
- .arg(KEXI_APP_NAME));
+ .tqarg(KEXI_APP_NAME));
//delayed
d->mdiModeToSwitchAfterRestart = KMdi::IDEAlMode;
}
@@ -492,7 +492,7 @@ void KexiMainWindowImpl::switchToChildframeMode(bool showMessage)
else {
KMessageBox::information(this,
i18n("User interface mode will be switched to Childframe at next %1 application startup.")
- .arg(KEXI_APP_NAME));
+ .tqarg(KEXI_APP_NAME));
//delayed
d->mdiModeToSwitchAfterRestart = KMdi::ChildframeMode;
}
@@ -501,7 +501,7 @@ void KexiMainWindowImpl::switchToChildframeMode(bool showMessage)
KexiMainWindow::switchToChildframeMode();
}
-QPopupMenu* KexiMainWindowImpl::findPopupMenu(const char *popupName)
+TQPopupMenu* KexiMainWindowImpl::findPopupMenu(const char *popupName)
{
return d->popups[popupName];
}
@@ -520,78 +520,78 @@ void KexiMainWindowImpl::initActions()
{
// setupGUI(KMainWindow::Keys|KMainWindow::StatusBar|KMainWindow::Save|KMainWindow::Create);
-// d->actionMapper = new QSignalMapper(this, "act_map");
-// connect(d->actionMapper, SIGNAL(mapped(const QString &)), this, SLOT(slotAction(const QString &)));
+// d->actionMapper = new TQSignalMapper(this, "act_map");
+// connect(d->actionMapper, TQT_SIGNAL(mapped(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotAction(const TQString &)));
// PROJECT MENU
KAction *action = new KAction(i18n("&New..."), "filenew", KStdAccel::shortcut(KStdAccel::New),
- this, SLOT(slotProjectNew()), actionCollection(), "project_new");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectNew()), actionCollection(), "project_new");
action->setToolTip(i18n("Create a new project"));
action->setWhatsThis(i18n("Creates a new project. Currently opened project is not affected."));
- action = KStdAction::open( this, SLOT( slotProjectOpen() ), actionCollection(), "project_open" );
+ action = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotProjectOpen() ), actionCollection(), "project_open" );
action->setToolTip(i18n("Open an existing project"));
action->setWhatsThis(i18n("Opens an existing project. Currently opened project is not affected."));
#ifdef HAVE_KNEWSTUFF
action = new KAction(i18n("&Download Example Databases..."), "kget", KShortcut(0),
- this, SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples");
+ TQT_TQOBJECT(this), TQT_SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples");
action->setToolTip(i18n("Download example databases from the Internet"));
action->setWhatsThis(i18n("Downloads example databases from the Internet."));
#endif
-// d->action_open_recent = KStdAction::openRecent( this, SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" );
+// d->action_open_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" );
//#ifdef KEXI_SHOW_UNIMPLEMENTED
#ifndef KEXI_NO_UNFINISHED
d->action_open_recent = new KActionMenu(i18n("Open Recent"),
actionCollection(), "project_open_recent");
- connect(d->action_open_recent->popupMenu(),SIGNAL(activated(int)),
- this,SLOT(slotProjectOpenRecent(int)));
- connect(d->action_open_recent->popupMenu(), SIGNAL(aboutToShow()),
- this,SLOT(slotProjectOpenRecentAboutToShow()));
+ connect(d->action_open_recent->popupMenu(),TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(slotProjectOpenRecent(int)));
+ connect(d->action_open_recent->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this,TQT_SLOT(slotProjectOpenRecentAboutToShow()));
//moved down d->action_open_recent_projects_title_id =
// d->action_open_recent->popupMenu()->insertTitle(i18n("Recently Opened Databases"));
//moved down d->action_open_recent_connections_title_id =
// d->action_open_recent->popupMenu()->insertTitle(i18n("Recently Connected Database Servers"));
// d->action_open_recent->popupMenu()->insertSeparator();
// d->action_open_recent_more_id = d->action_open_recent->popupMenu()
-// ->insertItem(i18n("&More Projects..."), this, SLOT(slotProjectOpenRecentMore()), 0, 1000);
+// ->insertItem(i18n("&More Projects..."), TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecentMore()), 0, 1000);
#else
d->action_open_recent = d->dummy_action;
#endif
d->action_save = KStdAction::save(
- this, SLOT( slotProjectSave() ), actionCollection(), "project_save" );
+ TQT_TQOBJECT(this), TQT_SLOT( slotProjectSave() ), actionCollection(), "project_save" );
// d->action_save = new KAction(i18n("&Save"), "filesave", KStdAccel::shortcut(KStdAccel::Save),
-// this, SLOT(slotProjectSave()), actionCollection(), "project_save");
+// TQT_TQOBJECT(this), TQT_SLOT(slotProjectSave()), actionCollection(), "project_save");
d->action_save->setToolTip(i18n("Save object changes"));
d->action_save->setWhatsThis(i18n("Saves object changes from currently selected window."));
#ifdef KEXI_SHOW_UNIMPLEMENTED
d->action_save_as = new KAction(i18n("Save &As..."), "filesaveas", 0,
- this, SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas");
d->action_save_as->setToolTip(i18n("Save object as"));
d->action_save_as->setWhatsThis(
i18n("Saves object changes from currently selected window under a new name (within the same project)."));
d->action_project_properties = new KAction(i18n("Project Properties"), "info", 0,
- this, SLOT(slotProjectProperties()), actionCollection(), "project_properties");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectProperties()), actionCollection(), "project_properties");
#else
d->action_save_as = d->dummy_action;
d->action_project_properties = d->dummy_action;
#endif
d->action_close = new KAction(i18n("&Close Project"), "fileclose", 0,
- this, SLOT(slotProjectClose()), actionCollection(), "project_close" );
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectClose()), actionCollection(), "project_close" );
d->action_close->setToolTip(i18n("Close the current project"));
d->action_close->setWhatsThis(i18n("Closes the current project."));
- KStdAction::quit( this, SLOT(slotProjectQuit()), actionCollection(), "quit");
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotProjectQuit()), actionCollection(), "quit");
#ifdef KEXI_SHOW_UNIMPLEMENTED
- d->action_project_relations = new KAction(i18n("&Relationships..."), "relation", Qt::CTRL + Qt::Key_R,
- this, SLOT(slotProjectRelations()), actionCollection(), "project_relations");
+ d->action_project_relations = new KAction(i18n("&Relationships..."), "relation", TQt::CTRL + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectRelations()), actionCollection(), "project_relations");
d->action_project_relations->setToolTip(i18n("Project relationships"));
d->action_project_relations->setWhatsThis(i18n("Shows project relationships."));
@@ -600,13 +600,13 @@ void KexiMainWindowImpl::initActions()
#endif
d->action_tools_data_migration = new KAction(
i18n("&Import Database..."), "database_import", 0,
- this, SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project");
+ TQT_TQOBJECT(this), TQT_SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project");
d->action_tools_data_migration->setToolTip(i18n("Import entire database as a Kexi project"));
d->action_tools_data_migration->setWhatsThis(i18n("Imports entire database as a Kexi project."));
d->action_tools_compact_database = new KAction(
i18n("&Compact Database..."), "", 0,
- this, SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database");
+ TQT_TQOBJECT(this), TQT_SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database");
d->action_tools_compact_database->setToolTip(i18n("Compact the current database project"));
d->action_tools_compact_database->setWhatsThis(
i18n("Compacts the current database project, so it will take less space and work faster."));
@@ -617,7 +617,7 @@ void KexiMainWindowImpl::initActions()
d->action_project_import_data_table = new KAction(
i18n("Import->Table Data From File...", "Table Data From &File..."),
"table"/*! @todo: change to "file_import" or so*/,
- 0, this, SLOT(slotProjectImportDataTable()), actionCollection(),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectImportDataTable()), actionCollection(),
"project_import_data_table");
d->action_project_import_data_table->setToolTip(i18n("Import table data from a file"));
d->action_project_import_data_table->setWhatsThis(i18n("Imports table data from a file."));
@@ -626,7 +626,7 @@ void KexiMainWindowImpl::initActions()
d->action_project_export_data_table = new KAction(i18n("Export->Table or Query Data to File...",
"Table or Query Data to &File..."),
"table"/*! @todo: change to "file_export" or so*/,
- 0, this, SLOT(slotProjectExportDataTable()), actionCollection(),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectExportDataTable()), actionCollection(),
"project_export_data_table");
d->action_project_export_data_table->setToolTip(
i18n("Export data from the active table or query data to a file"));
@@ -634,17 +634,17 @@ void KexiMainWindowImpl::initActions()
i18n("Exports data from the active table or query data to a file."));
//TODO new KAction(i18n("From File..."), "fileopen", 0,
-//TODO this, SLOT(slotImportFile()), actionCollection(), "project_import_file");
+//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportFile()), actionCollection(), "project_import_file");
//TODO new KAction(i18n("From Server..."), "server", 0,
-//TODO this, SLOT(slotImportServer()), actionCollection(), "project_import_server");
+//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportServer()), actionCollection(), "project_import_server");
- d->action_project_print = KStdAction::print(this, SLOT(slotProjectPrint()),
+ d->action_project_print = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrint()),
actionCollection(), "project_print" );
d->action_project_print->setToolTip(i18n("Print data from the active table or query"));
d->action_project_print->setWhatsThis(i18n("Prints data from the active table or query."));
d->action_project_print_preview = KStdAction::printPreview(
- this, SLOT(slotProjectPrintPreview()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrintPreview()),
actionCollection(), "project_print_preview" );
d->action_project_print_preview->setToolTip(
i18n("Show print preview for the active table or query"));
@@ -652,7 +652,7 @@ void KexiMainWindowImpl::initActions()
i18n("Shows print preview for the active table or query."));
d->action_project_print_setup = new KAction(i18n("Page Set&up..."),
- "", 0, this, SLOT(slotProjectPageSetup()), actionCollection(),
+ "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectPageSetup()), actionCollection(),
"project_print_setup");
d->action_project_print_setup->setToolTip(
i18n("Show page setup for printing the active table or query"));
@@ -669,7 +669,7 @@ void KexiMainWindowImpl::initActions()
else {
d->action_edit_paste_special_data_table =
new KAction(i18n("Paste Special->As Data &Table...", "As Data &Table..."),
- "table", 0, this, SLOT(slotEditPasteSpecialDataTable()),
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPasteSpecialDataTable()),
actionCollection(), "edit_paste_special_data_table");
d->action_edit_paste_special_data_table->setToolTip(
i18n("Paste clipboard data as a table"));
@@ -680,7 +680,7 @@ void KexiMainWindowImpl::initActions()
d->action_edit_copy_special_data_table =
new KAction(i18n("Copy Special->Table or Query Data...",
"Table or Query as Data Table..."),
- "table", 0, this, SLOT(slotEditCopySpecialDataTable()),
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditCopySpecialDataTable()),
actionCollection(), "edit_copy_special_data_table");
d->action_edit_copy_special_data_table->setToolTip(
i18n("Copy selected table or query data to clipboard"));
@@ -693,35 +693,35 @@ void KexiMainWindowImpl::initActions()
d->action_edit_redo->setWhatsThis(i18n("Reverts the most recent undo action."));
#if 0 //old
- d->action_edit_find = createSharedAction( KStdAction::Find, "edit_find");
+ d->action_edit_tqfind = createSharedAction( KStdAction::Find, "edit_tqfind");
d->action_edit_findnext = createSharedAction( KStdAction::FindNext, "edit_findnext");
d->action_edit_findprev = createSharedAction( KStdAction::FindPrev, "edit_findprevious");
-//! @todo d->action_edit_paste = createSharedAction( KStdAction::Replace, "edit_replace");
+//! @todo d->action_edit_paste = createSharedAction( KStdAction::Replace, "edit_tqreplace");
#endif
- d->action_edit_find = KStdAction::find(
- this, SLOT(slotEditFind()), actionCollection(), "edit_find" );
-// d->action_edit_find = createSharedAction( KStdAction::Find, "edit_find");
+ d->action_edit_tqfind = KStdAction::find(
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFind()), actionCollection(), "edit_tqfind" );
+// d->action_edit_tqfind = createSharedAction( KStdAction::Find, "edit_tqfind");
d->action_edit_findnext = KStdAction::findNext(
- this, SLOT(slotEditFindNext()), actionCollection(), "edit_findnext");
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFindNext()), actionCollection(), "edit_findnext");
d->action_edit_findprev = KStdAction::findPrev(
- this, SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious");
- d->action_edit_replace = 0;
-//! @todo d->action_edit_replace = KStdAction::replace(
-//! this, SLOT(slotEditReplace()), actionCollection(), "project_print_preview" );
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious");
+ d->action_edit_tqreplace = 0;
+//! @todo d->action_edit_tqreplace = KStdAction::tqreplace(
+//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplace()), actionCollection(), "project_print_preview" );
d->action_edit_replace_all = 0;
//! @todo d->action_edit_replace_all = new KAction( i18n("Replace All"), "", 0,
-//! this, SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall");
+//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall");
d->action_edit_select_all = createSharedAction( KStdAction::SelectAll, "edit_select_all");
d->action_edit_delete = createSharedAction(i18n("&Delete"), "editdelete",
- 0/*Qt::Key_Delete*/, "edit_delete");
+ 0/*TQt::Key_Delete*/, "edit_delete");
d->action_edit_delete->setToolTip(i18n("Delete selected object"));
d->action_edit_delete->setWhatsThis(i18n("Deletes currently selected object."));
d->action_edit_delete_row = createSharedAction(i18n("Delete Row"), "delete_table_row",
- Qt::CTRL+Qt::Key_Delete, "edit_delete_row");
+ TQt::CTRL+TQt::Key_Delete, "edit_delete_row");
d->action_edit_delete_row->setToolTip(i18n("Delete currently selected row"));
d->action_edit_delete_row->setWhatsThis(i18n("Deletes currently selected row."));
@@ -731,21 +731,21 @@ void KexiMainWindowImpl::initActions()
d->action_edit_clear_table->setWhatsThis(i18n("Clears table contents."));
setActionVolatile( d->action_edit_clear_table, true );
- d->action_edit_edititem = createSharedAction(i18n("Edit Item"), 0, 0, /* CONFLICT in TV: Qt::Key_F2, */
+ d->action_edit_edititem = createSharedAction(i18n("Edit Item"), 0, 0, /* CONFLICT in TV: TQt::Key_F2, */
"edit_edititem");
d->action_edit_edititem->setToolTip(i18n("Edit currently selected item"));
d->action_edit_edititem->setWhatsThis(i18n("Edits currently selected item."));
d->action_edit_insert_empty_row = createSharedAction(i18n("&Insert Empty Row"), "insert_table_row",
- Qt::SHIFT | Qt::CTRL | Qt::Key_Insert, "edit_insert_empty_row");
+ TQt::SHIFT | TQt::CTRL | TQt::Key_Insert, "edit_insert_empty_row");
setActionVolatile( d->action_edit_insert_empty_row, true );
d->action_edit_insert_empty_row->setToolTip(i18n("Insert one empty row above"));
d->action_edit_insert_empty_row->setWhatsThis(i18n("Inserts one empty row above currently selected table row."));
//VIEW MENU
if (!userMode()) {
- d->action_view_data_mode = new KRadioAction(i18n("&Data View"), "state_data", Qt::Key_F6,
- this, SLOT(slotViewDataMode()), actionCollection(), "view_data_mode");
+ d->action_view_data_mode = new KRadioAction(i18n("&Data View"), "state_data", TQt::Key_F6,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewDataMode()), actionCollection(), "view_data_mode");
d->actions_for_view_modes.insert( Kexi::DataViewMode, d->action_view_data_mode );
d->action_view_data_mode->setExclusiveGroup("view_mode");
d->action_view_data_mode->setToolTip(i18n("Switch to data view"));
@@ -755,8 +755,8 @@ void KexiMainWindowImpl::initActions()
d->action_view_data_mode = 0;
if (!userMode()) {
- d->action_view_design_mode = new KRadioAction(i18n("D&esign View"), "state_edit", Qt::Key_F7,
- this, SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode");
+ d->action_view_design_mode = new KRadioAction(i18n("D&esign View"), "state_edit", TQt::Key_F7,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode");
d->actions_for_view_modes.insert( Kexi::DesignViewMode, d->action_view_design_mode );
d->action_view_design_mode->setExclusiveGroup("view_mode");
d->action_view_design_mode->setToolTip(i18n("Switch to design view"));
@@ -766,8 +766,8 @@ void KexiMainWindowImpl::initActions()
d->action_view_design_mode = 0;
if (!userMode()) {
- d->action_view_text_mode = new KRadioAction(i18n("&Text View"), "state_sql", Qt::Key_F8,
- this, SLOT(slotViewTextMode()), actionCollection(), "view_text_mode");
+ d->action_view_text_mode = new KRadioAction(i18n("&Text View"), "state_sql", TQt::Key_F8,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewTextMode()), actionCollection(), "view_text_mode");
d->actions_for_view_modes.insert( Kexi::TextViewMode, d->action_view_text_mode );
d->action_view_text_mode->setExclusiveGroup("view_mode");
d->action_view_text_mode->setToolTip(i18n("Switch to text view"));
@@ -777,22 +777,22 @@ void KexiMainWindowImpl::initActions()
d->action_view_text_mode = 0;
if (d->isProjectNavigatorVisible) {
- d->action_view_nav = new KAction(i18n("Project Navigator"), "", Qt::ALT + Qt::Key_1,
- this, SLOT(slotViewNavigator()), actionCollection(), "view_navigator");
+ d->action_view_nav = new KAction(i18n("Project Navigator"), "", TQt::ALT + TQt::Key_1,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewNavigator()), actionCollection(), "view_navigator");
d->action_view_nav->setToolTip(i18n("Go to project navigator panel"));
d->action_view_nav->setWhatsThis(i18n("Goes to project navigator panel."));
}
else
d->action_view_nav = 0;
- d->action_view_mainarea = new KAction(i18n("Main Area"), "", Qt::ALT + Qt::Key_2,
- this, SLOT(slotViewMainArea()), actionCollection(), "view_mainarea");
+ d->action_view_mainarea = new KAction(i18n("Main Area"), "", TQt::ALT + TQt::Key_2,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewMainArea()), actionCollection(), "view_mainarea");
d->action_view_mainarea->setToolTip(i18n("Go to main area"));
d->action_view_mainarea->setWhatsThis(i18n("Goes to main area."));
if (!userMode()) {
- d->action_view_propeditor = new KAction(i18n("Property Editor"), "", Qt::ALT + Qt::Key_3,
- this, SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor");
+ d->action_view_propeditor = new KAction(i18n("Property Editor"), "", TQt::ALT + TQt::Key_3,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor");
d->action_view_propeditor->setToolTip(i18n("Go to property editor panel"));
d->action_view_propeditor->setWhatsThis(i18n("Goes to property editor panel."));
}
@@ -801,7 +801,7 @@ void KexiMainWindowImpl::initActions()
//DATA MENU
d->action_data_save_row = createSharedAction(i18n("&Save Row"), "button_ok",
- Qt::SHIFT | Qt::Key_Return, "data_save_row");
+ TQt::SHIFT | TQt::Key_Return, "data_save_row");
d->action_data_save_row->setToolTip(i18n("Save changes made to the current row"));
d->action_data_save_row->setWhatsThis(i18n("Saves changes made to the current row."));
//temp. disable because of problems with volatile actions setActionVolatile( d->action_data_save_row, true );
@@ -849,7 +849,7 @@ void KexiMainWindowImpl::initActions()
//TOOLS MENU
//WINDOW MENU
-#ifndef Q_WS_WIN
+#ifndef TQ_WS_WIN
//KMDI <= 3.5.1 has no shortcut here:
KAction *closeWindowAction = actionCollection()->action("window_close");
if (closeWindowAction)
@@ -858,32 +858,32 @@ void KexiMainWindowImpl::initActions()
//additional 'Window' menu items
d->action_window_next = new KAction( i18n("&Next Window"), "",
-#ifdef Q_WS_WIN
- Qt::CTRL+Qt::Key_Tab,
+#ifdef TQ_WS_WIN
+ TQt::CTRL+TQt::Key_Tab,
#else
- Qt::ALT+Qt::Key_Right,
+ TQt::ALT+TQt::Key_Right,
#endif
- this, SLOT(activateNextWin()), actionCollection(), "window_next");
+ TQT_TQOBJECT(this), TQT_SLOT(activateNextWin()), actionCollection(), "window_next");
d->action_window_next->setToolTip( i18n("Next window") );
d->action_window_next->setWhatsThis(i18n("Switches to the next window."));
d->action_window_previous = new KAction( i18n("&Previous Window"), "",
-#ifdef Q_WS_WIN
- Qt::CTRL+Qt::SHIFT+Qt::Key_Tab,
+#ifdef TQ_WS_WIN
+ TQt::CTRL+TQt::SHIFT+TQt::Key_Tab,
#else
- Qt::ALT+Qt::Key_Left,
+ TQt::ALT+TQt::Key_Left,
#endif
- this, SLOT(activatePrevWin()), actionCollection(), "window_previous");
+ TQT_TQOBJECT(this), TQT_SLOT(activatePrevWin()), actionCollection(), "window_previous");
d->action_window_previous->setToolTip( i18n("Previous window") );
d->action_window_previous->setWhatsThis(i18n("Switches to the previous window."));
//SETTINGS MENU
setStandardToolBarMenuEnabled( true );
- action = KStdAction::keyBindings(this, SLOT( slotConfigureKeys() ), actionCollection() );
+ action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() );
action->setWhatsThis(i18n("Lets you configure shortcut keys."));
#ifdef KEXI_SHOW_UNIMPLEMENTED
- action = KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
+ action = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
action->setWhatsThis(i18n("Lets you configure toolbars."));
d->action_show_other = new KActionMenu(i18n("Other"),
@@ -891,7 +891,7 @@ void KexiMainWindowImpl::initActions()
#endif
#ifndef KEXI_NO_CTXT_HELP
- d->action_show_helper = new KToggleAction(i18n("Show Context Help"), "", Qt::CTRL + Qt::Key_H,
+ d->action_show_helper = new KToggleAction(i18n("Show Context Help"), "", TQt::CTRL + TQt::Key_H,
actionCollection(), "options_show_contexthelp");
#if KDE_IS_VERSION(3,2,90)
d->action_show_helper->setCheckedState(i18n("Hide Context Help"));
@@ -923,31 +923,31 @@ void KexiMainWindowImpl::initActions()
#endif
#ifdef KEXI_SHOW_UNIMPLEMENTED
- d->action_configure = KStdAction::preferences(this, SLOT(slotShowSettings()), actionCollection());
+ d->action_configure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings()), actionCollection());
action->setWhatsThis(i18n("Lets you configure Kexi."));
#endif
//HELP MENU
#if 0//js: todo reenable later
- KStdAction::tipOfDay( this, SLOT( slotTipOfTheDayAction() ), actionCollection() )
+ KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotTipOfTheDayAction() ), actionCollection() )
->setWhatsThis(i18n("This shows useful tips on the use of this application."));
#endif
#if 0 //we don't have a time for updating info text for each new version
new KAction(i18n("Important Information"), "messagebox_info", 0,
- this, SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info");
+ TQT_TQOBJECT(this), TQT_SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info");
#endif
//TODO: UNCOMMENT TO REMOVE MDI MODES SETTING m_pMdiModeMenu->hide();
#ifndef KEXI_NO_FEEDBACK_AGENT
#ifdef FEEDBACK_CLASS
new KAction(i18n("Give Feedback..."), "messagebox_info", 0,
- this, SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent");
+ TQT_TQOBJECT(this), TQT_SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent");
#endif
#endif
// KAction *actionSettings = new KAction(i18n("Configure Kexi..."), "configure", 0,
// actionCollection(), "kexi_settings");
// actionSettings->setWhatsThis(i18n("Lets you configure Kexi."));
-// connect(actionSettings, SIGNAL(activated()), this, SLOT(slotShowSettings()));
+// connect(actionSettings, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings()));
// -- add a few missing tooltips (usable especially in Form's "Assign action" dialog)
if ((action = actionCollection()->action("window_close")))
@@ -1005,7 +1005,7 @@ void KexiMainWindowImpl::initActions()
acat->addAction("edit_edititem", Kexi::PartItemActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType);
- acat->addAction("edit_find", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
+ acat->addAction("edit_tqfind", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
acat->addAction("edit_findnext", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
@@ -1014,7 +1014,7 @@ void KexiMainWindowImpl::initActions()
acat->addAction("edit_findprevious", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
- acat->addAction("edit_replace", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
+ acat->addAction("edit_tqreplace", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
acat->addAction("edit_paste_special_data_table", Kexi::GlobalActionCategory);
@@ -1112,13 +1112,13 @@ void KexiMainWindowImpl::initActions()
acat->addAction("scriptpart_create", Kexi::NoActionCategory);
}
-void KexiMainWindowImpl::invalidateActions()
+void KexiMainWindowImpl::tqinvalidateActions()
{
- invalidateProjectWideActions();
- invalidateSharedActions();
+ tqinvalidateProjectWideActions();
+ tqinvalidateSharedActions();
}
-void KexiMainWindowImpl::invalidateSharedActions(QObject *o)
+void KexiMainWindowImpl::tqinvalidateSharedActions(TQObject *o)
{
//TODO: enabling is more complex...
/* d->action_edit_cut->setEnabled(true);
@@ -1126,22 +1126,22 @@ void KexiMainWindowImpl::invalidateSharedActions(QObject *o)
d->action_edit_paste->setEnabled(true);*/
if (!o)
- o = focusWindow();
- KexiSharedActionHost::invalidateSharedActions(o);
+ o = TQT_TQOBJECT(focusWindow());
+ KexiSharedActionHost::tqinvalidateSharedActions(o);
}
-void KexiMainWindowImpl::invalidateSharedActions()
+void KexiMainWindowImpl::tqinvalidateSharedActions()
{
- invalidateSharedActions(0);
+ tqinvalidateSharedActions(0);
}
// unused, I think
-void KexiMainWindowImpl::invalidateSharedActionsLater()
+void KexiMainWindowImpl::tqinvalidateSharedActionsLater()
{
- QTimer::singleShot(1, this, SLOT(invalidateSharedActions()));
+ TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(tqinvalidateSharedActions()));
}
-void KexiMainWindowImpl::invalidateProjectWideActions()
+void KexiMainWindowImpl::tqinvalidateProjectWideActions()
{
// stateChanged("project_opened",d->prj ? StateNoReverse : StateReverse);
@@ -1234,7 +1234,7 @@ void KexiMainWindowImpl::invalidateProjectWideActions()
d->propEditorTabWidget->setEnabled(d->prj);
}
-void KexiMainWindowImpl::invalidateViewModeActions()
+void KexiMainWindowImpl::tqinvalidateViewModeActions()
{
if (d->curDialog) {
//update toggle action
@@ -1276,12 +1276,12 @@ tristate KexiMainWindowImpl::startup()
return true;
}
-static QString internalReason(KexiDB::Object *obj)
+static TQString internalReason(KexiDB::Object *obj)
{
- const QString &s = obj->errorMsg();
+ const TQString &s = obj->errorMsg();
if (s.isEmpty())
return s;
- return QString("<br>(%1) ").arg(i18n("reason:")+" <i>"+s+"</i>");
+ return TQString("<br>(%1) ").tqarg(i18n("reason:")+" <i>"+s+"</i>");
}
tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
@@ -1300,7 +1300,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
//ask for password
KexiDBPasswordDialog pwdDlg(this, *newProjectData->connectionData(),
false /*!showDetailsButton*/);
- if (QDialog::Accepted!=pwdDlg.exec()) {
+ if (TQDialog::Accepted!=pwdDlg.exec()) {
delete d->prj;
d->prj = 0;
return cancelled;
@@ -1319,7 +1319,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
if (incompatibleWithKexi) {
if (KMessageBox::Yes == KMessageBox::questionYesNo(this,
i18n("<qt>Database project %1 does not appear to have been created using Kexi.<br><br>"
- "Do you want to import it as a new Kexi project?</qt>").arg(projectData.infoString()),
+ "Do you want to import it as a new Kexi project?</qt>").tqarg(projectData.infoString()),
0, KGuiItem(i18n("Import Database", "&Import..."), "database_import"),
KStdGuiItem::quit()))
{
@@ -1341,30 +1341,30 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
initNavigator();
Kexi::recentProjects().addProjectData( newProjectData );
updateReadOnlyState();
- invalidateActions();
+ tqinvalidateActions();
// d->disableErrorMessages = true;
enableMessages( false );
- QTimer::singleShot(1, this, SLOT(slotAutoOpenObjectsLater()));
+ TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(slotAutoOpenObjectsLater()));
return true;
}
tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& projectData)
{
- QStringList mimetypes;
+ TQStringList mimetypes;
mimetypes.append( KexiDB::Driver::defaultFileBasedDriverMimeType() );
- QString fname;
- const QString startDir(":OpenExistingOrCreateNewProject"/*as in KexiNewProjectWizard*/);
- const QString caption( i18n("Select New Project's Location") );
+ TQString fname;
+ const TQString startDir(":OpenExistingOrCreateNewProject"/*as in KexiNewProjectWizard*/);
+ const TQString caption( i18n("Select New Project's Location") );
while (true) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//! @todo remove
- QString recentDir = KGlobalSettings::documentPath();
+ TQString recentDir = KGlobalSettings::documentPath();
if (fname.isEmpty() && !projectData.constConnectionData()->dbFileName().isEmpty()) //propose filename from db template name
fname = KFileDialog::getStartURL(startDir, recentDir).path()
+ '/' + projectData.constConnectionData()->dbFileName();
- fname = QFileDialog::getSaveFileName(
+ fname = TQFileDialog::getSaveFileName(
KFileDialog::getStartURL(fname.isEmpty() ? startDir : fname, recentDir).path(),
KexiUtils::fileDialogFilterStrings(mimetypes, false),
this, "CreateProjectFromTemplate", caption);
@@ -1385,7 +1385,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr
}
const bool specialDir = fname.isEmpty();
kdDebug() << fname << "............." << endl;
- KFileDialog dlg( specialDir ? startDir : QString::null,
+ KFileDialog dlg( specialDir ? startDir : TQString(),
mimetypes.join(" "), this, "filedialog", true);
if ( !specialDir )
dlg.setSelection( fname ); // may also be a filename
@@ -1410,7 +1410,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr
return false;
}
- return openProject(fname, 0, QString::null, projectData.autoopenObjects/*copy*/);
+ return openProject(fname, 0, TQString(), projectData.autoopenObjects/*copy*/);
}
void KexiMainWindowImpl::updateReadOnlyState()
@@ -1422,7 +1422,7 @@ void KexiMainWindowImpl::updateReadOnlyState()
// update "insert ....." actions for every part
KActionCollection *ac = actionCollection();
for (KexiPart::PartInfoListIterator it(*Kexi::partManager().partInfoList()); it.current(); ++it) {
- KAction *a = ac->action( KexiPart::nameForCreateAction( *it.current() ) );
+ KAction *a = ac->action( TQString(KexiPart::nameForCreateAction( *it.current() )) );
if (a)
a->setEnabled(!readOnly);
}
@@ -1430,26 +1430,26 @@ void KexiMainWindowImpl::updateReadOnlyState()
void KexiMainWindowImpl::slotAutoOpenObjectsLater()
{
- QString not_found_msg;
+ TQString not_found_msg;
bool openingCancelled;
//ok, now open "autoopen: objects
if (d->prj) {
- for (QValueList<KexiProjectData::ObjectInfo>::ConstIterator it =
+ for (TQValueList<KexiProjectData::ObjectInfo>::ConstIterator it =
d->prj->data()->autoopenObjects.constBegin();
it != d->prj->data()->autoopenObjects.constEnd(); ++it )
{
KexiProjectData::ObjectInfo info = *it;
KexiPart::Info *i = Kexi::partManager().infoForMimeType(
- QCString("kexi/")+info["type"].lower().latin1() );
+ TQCString("kexi/")+info["type"].lower().latin1() );
if (!i) {
not_found_msg += "<li>";
if (!info["name"].isEmpty())
- not_found_msg += (QString("\"") + info["name"] + "\" - ");
+ not_found_msg += (TQString("\"") + info["name"] + "\" - ");
if (info["action"]=="new")
not_found_msg += i18n("cannot create object - unknown object type \"%1\"")
- .arg(info["type"]);
+ .tqarg(info["type"]);
else
- not_found_msg += i18n("unknown object type \"%1\"").arg(info["type"]);
+ not_found_msg += i18n("unknown object type \"%1\"").tqarg(info["type"]);
not_found_msg += internalReason(&Kexi::partManager())+"<br></li>";
continue;
}
@@ -1457,7 +1457,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (info["action"]=="new") {
if (!newObject( i, openingCancelled) && !openingCancelled) {
not_found_msg += "<li>";
- not_found_msg += (i18n("cannot create object of type \"%1\"").arg(info["type"])+
+ not_found_msg += (i18n("cannot create object of type \"%1\"").tqarg(info["type"])+
internalReason(d->prj)+"<br></li>");
}
else
@@ -1468,7 +1468,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
KexiPart::Item *item = d->prj->item(i, info["name"]);
if (!item) {
- QString taskName;
+ TQString taskName;
if (info["action"]=="print-preview")
taskName = i18n("making print preview for");
else if (info["action"]=="print")
@@ -1478,7 +1478,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else
taskName = i18n("opening");
- not_found_msg += (QString("<li>")+ taskName + " \"" + info["name"] + "\" - ");
+ not_found_msg += (TQString("<li>")+ taskName + " \"" + info["name"] + "\" - ");
if ("table"==info["type"].lower())
not_found_msg += i18n("table not found");
else if ("query"==info["type"].lower())
@@ -1496,7 +1496,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (info["action"]=="execute") {
tristate res = executeItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot execute object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot execute object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1504,7 +1504,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else if (info["action"]=="print") {
tristate res = printItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot print object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot print object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1512,7 +1512,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else if (info["action"]=="print-preview") {
tristate res = printPreviewForItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot make print preview of object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot make print preview of object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1528,11 +1528,11 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else
continue; //sanity
- QString openObjectMessage;
+ TQString openObjectMessage;
if (!openObject(item, viewMode, openingCancelled, 0, &openObjectMessage)
&& (!openingCancelled || !openObjectMessage.isEmpty()))
{
- not_found_msg += (QString("<li>\"")+ info["name"] + "\" - ");
+ not_found_msg += (TQString("<li>\"")+ info["name"] + "\" - ");
if (openObjectMessage.isEmpty())
not_found_msg += i18n("cannot open object");
else
@@ -1551,13 +1551,13 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (!not_found_msg.isEmpty())
showErrorMessage(i18n("You have requested selected objects to be automatically opened "
"or processed on startup. Several objects cannot be opened or processed."),
- QString("<ul>%1</ul>").arg(not_found_msg) );
+ TQString("<ul>%1</ul>").tqarg(not_found_msg) );
d->updatePropEditorVisibility(d->curDialog ? d->curDialog->currentViewMode() : 0);
#if defined(KDOCKWIDGET_P)
if (d->propEditor) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if(ds)
ds->setSeparatorPosInPercent(d->config->readNumEntry("RightDockPosition", 80/* % */));
}
@@ -1579,8 +1579,8 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
d->restoreNavigatorWidth();
#ifndef PROPEDITOR_VISIBILITY_CHANGES
-// KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
-// KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+// KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
+// KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// const int pos = ds->separatorPos();
//if (!d->curDialog || d->curDialog->currentViewMode()==Kexi::DataViewMode)
@@ -1591,7 +1591,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (d->nav) {
d->nav->updateGeometry();
}
- qApp->processEvents();
+ tqApp->processEvents();
emit projectOpened();
}
@@ -1624,8 +1624,8 @@ tristate KexiMainWindowImpl::closeProject()
#if defined(KDOCKWIDGET_P)
//remember docks position - will be used on storeSettings()
if (d->propEditor) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if (ds)
d->propEditorDockSeparatorPos = ds->separatorPosInPercent();
}
@@ -1635,14 +1635,14 @@ tristate KexiMainWindowImpl::closeProject()
if (d->propEditor) {
if (d->openedDialogsCount() == 0)
makeWidgetDockVisible(d->propEditorTabWidget);
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if(ds)
ds->setSeparatorPosInPercent(80);
}
- KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
int dwWidth = dw->width();
if (ds) {
if (d->openedDialogsCount()!=0 && d->propEditorTabWidget && d->propEditorTabWidget->isVisible())
@@ -1691,7 +1691,7 @@ tristate KexiMainWindowImpl::closeProject()
// Kexi::partManager().unloadAllParts();
updateReadOnlyState();
- invalidateActions();
+ tqinvalidateActions();
// if (!userMode())
updateAppCaption();
@@ -1721,45 +1721,45 @@ void KexiMainWindowImpl::initNavigator()
if(!d->nav)
{
d->nav = new KexiBrowser(this, this);
- d->nav->installEventFilter(this);
+ d->nav->installEventFilter(TQT_TQOBJECT(this));
d->navToolWindow = addToolWindow(d->nav, KDockWidget::DockLeft, getMainDockWidget(), 20/*, lv, 35, "2"*/);
// d->navToolWindow->hide();
- connect(d->nav,SIGNAL(openItem(KexiPart::Item*,int)),this,SLOT(openObject(KexiPart::Item*,int)));
- connect(d->nav,SIGNAL(openOrActivateItem(KexiPart::Item*,int)),
- this,SLOT(openObjectFromNavigator(KexiPart::Item*,int)));
- connect(d->nav,SIGNAL(newItem( KexiPart::Info* )),
- this,SLOT(newObject(KexiPart::Info*)));
- connect(d->nav,SIGNAL(removeItem(KexiPart::Item*)),
- this,SLOT(removeObject(KexiPart::Item*)));
- connect(d->nav,SIGNAL(renameItem(KexiPart::Item*,const QString&, bool&)),
- this,SLOT(renameObject(KexiPart::Item*,const QString&, bool&)));
- connect(d->nav,SIGNAL(executeItem(KexiPart::Item*)),
- this,SLOT(executeItem(KexiPart::Item*)));
- connect(d->nav,SIGNAL(exportItemAsDataTable(KexiPart::Item*)),
- this,SLOT(exportItemAsDataTable(KexiPart::Item*)));
- connect(d->nav,SIGNAL(printItem( KexiPart::Item* )),
- this,SLOT(printItem(KexiPart::Item*)));
- connect(d->nav,SIGNAL(pageSetupForItem( KexiPart::Item*)),
- this,SLOT(showPageSetupForItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(openItem(KexiPart::Item*,int)),this,TQT_SLOT(openObject(KexiPart::Item*,int)));
+ connect(d->nav,TQT_SIGNAL(openOrActivateItem(KexiPart::Item*,int)),
+ this,TQT_SLOT(openObjectFromNavigator(KexiPart::Item*,int)));
+ connect(d->nav,TQT_SIGNAL(newItem( KexiPart::Info* )),
+ this,TQT_SLOT(newObject(KexiPart::Info*)));
+ connect(d->nav,TQT_SIGNAL(removeItem(KexiPart::Item*)),
+ this,TQT_SLOT(removeObject(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(renameItem(KexiPart::Item*,const TQString&, bool&)),
+ this,TQT_SLOT(renameObject(KexiPart::Item*,const TQString&, bool&)));
+ connect(d->nav,TQT_SIGNAL(executeItem(KexiPart::Item*)),
+ this,TQT_SLOT(executeItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(exportItemAsDataTable(KexiPart::Item*)),
+ this,TQT_SLOT(exportItemAsDataTable(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(printItem( KexiPart::Item* )),
+ this,TQT_SLOT(printItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(pageSetupForItem( KexiPart::Item*)),
+ this,TQT_SLOT(showPageSetupForItem(KexiPart::Item*)));
if (d->prj) {//connect to the project
- connect(d->prj, SIGNAL(itemRemoved(const KexiPart::Item&)),
- d->nav, SLOT(slotRemoveItem(const KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)),
+ d->nav, TQT_SLOT(slotRemoveItem(const KexiPart::Item&)));
}
- connect(d->nav,SIGNAL(selectionChanged(KexiPart::Item*)),
- this,SLOT(slotPartItemSelectedInNavigator(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(selectionChanged(KexiPart::Item*)),
+ this,TQT_SLOT(slotPartItemSelectedInNavigator(KexiPart::Item*)));
// d->restoreNavigatorWidth();
}
if(d->prj->isConnected()) {
- QString partManagerErrorMessages;
- d->nav->setProject( d->prj, QString::null/*all mimetypes*/, &partManagerErrorMessages );
+ TQString partManagerErrorMessages;
+ d->nav->setProject( d->prj, TQString()/*all mimetypes*/, &partManagerErrorMessages );
if (!partManagerErrorMessages.isEmpty()) {
- showWarningContinueMessage(partManagerErrorMessages, QString::null,
+ showWarningContinueMessage(partManagerErrorMessages, TQString(),
"dontShowWarningsRelatedToPluginsLoading");
}
}
- connect(d->prj, SIGNAL(newItemStored(KexiPart::Item&)), d->nav, SLOT(addItem(KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(newItemStored(KexiPart::Item&)), d->nav, TQT_SLOT(addItem(KexiPart::Item&)));
d->nav->setFocus();
if (d->forceShowProjectNavigatorOnCreation) {
@@ -1772,23 +1772,23 @@ void KexiMainWindowImpl::initNavigator()
d->forceHideProjectNavigatorOnCreation = false;
}
- invalidateActions();
+ tqinvalidateActions();
}
void KexiMainWindowImpl::slotLastActions()
{
#if defined(KDOCKWIDGET_P)
if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) {
-// KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget();
- //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+// KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget();
+ //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// Q_UNUSED(ds);
//1 ds->resize(ds->width()*3, ds->height());
//1 ds->setSeparatorPos(30, true);
//1 ds->setForcedFixedWidth( dw, 200 );
}
#endif
-#ifdef Q_WS_WIN
- showMaximized();//js: workaround for not yet completed layout settings storage on win32
+#ifdef TQ_WS_WIN
+ showMaximized();//js: workaround for not yet completed tqlayout settings storage on win32
#endif
}
@@ -1807,15 +1807,15 @@ void KexiMainWindowImpl::initPropertyEditor()
d->config->setGroup("PropertyEditor");
int size = d->config->readNumEntry("FontSize", -1);
- QFont f( Kexi::smallFont() );
+ TQFont f( Kexi::smallFont() );
if (size>0)
f.setPixelSize( size );
d->propEditorTabWidget->setFont(f);
if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
#if defined(KDOCKWIDGET_P)
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// ds->setKeepSize(true);
makeWidgetDockVisible(d->propEditorTabWidget);
// ds->show();
@@ -1836,7 +1836,7 @@ void KexiMainWindowImpl::initPropertyEditor()
//1 dw->setMinimumWidth(200);
- // ds->setSeparatorPos(d->propEditor->sizeHint().width(), true);
+ // ds->setSeparatorPos(d->propEditor->tqsizeHint().width(), true);
//heh, this is for IDEAl only, I suppose?
//js if (m_rightContainer) {
@@ -1858,13 +1858,13 @@ void KexiMainWindowImpl::slotPartLoaded(KexiPart::Part* p)
{
if (!p)
return;
- connect(p, SIGNAL(newObjectRequest(KexiPart::Info*)),
- this, SLOT(newObject(KexiPart::Info*)));
+ connect(p, TQT_SIGNAL(newObjectRequest(KexiPart::Info*)),
+ TQT_TQOBJECT(this), TQT_SLOT(newObject(KexiPart::Info*)));
p->createGUIClients(this);
}
//! internal
-void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool childrenMaximized)
+void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool tqchildrenMaximized)
{
//js todo: allow to set custom "static" app caption
@@ -1877,18 +1877,18 @@ void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool childrenMaximized)
//current dialog isn't attached! - find top level child
if (m_pMdi->topChild()) {
view = m_pMdi->topChild()->m_pClient;
- childrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized;
+ tqchildrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized;
}
else
view = 0;
}
- if (childrenMaximized && view) {
+ if (tqchildrenMaximized && view) {
setCaption( d->curDialog->caption()
- + (d->appCaptionPrefix.isEmpty() ? QString::null : (QString::fromLatin1(" - ") + d->appCaptionPrefix)) );
+ + (d->appCaptionPrefix.isEmpty() ? TQString() : (TQString::tqfromLatin1(" - ") + d->appCaptionPrefix)) );
}
else {
- setCaption( (d->appCaptionPrefix.isEmpty() ? QString::null : (d->appCaptionPrefix + QString::fromLatin1(" - ")))
+ setCaption( (d->appCaptionPrefix.isEmpty() ? TQString() : (d->appCaptionPrefix + TQString::tqfromLatin1(" - ")))
+ d->origAppCaption );
}
}
@@ -1954,13 +1954,13 @@ void KexiMainWindowImpl::slotLastChildViewClosed() //slotLastChildFrmClosed()
// d->propEditorToolWindow->hide();
}
-void KexiMainWindowImpl::slotChildViewIsDetachedNow(QWidget*)
+void KexiMainWindowImpl::slotChildViewIsDetachedNow(TQWidget*)
{
slotCaptionForCurrentMDIChild(false);
}
/*void
-KexiMainWindowImpl::closeEvent(QCloseEvent *ev)
+KexiMainWindowImpl::closeEvent(TQCloseEvent *ev)
{
storeSettings();
@@ -2014,7 +2014,7 @@ KexiMainWindowImpl::restoreSettings()
applyMainWindowSettings( d->config, "MainWindow" );
//small hack - set the default -- bottom
-// d->config->setGroup(QString(name()) + " KMdiTaskBar Toolbar style");
+// d->config->setGroup(TQString(name()) + " KMdiTaskBar Toolbar style");
d->config->setGroup("MainWindow Toolbar KMdiTaskBar");
const bool tbe = d->config->readEntry("Position").isEmpty();
if (tbe || d->config->readEntry("Position")=="Bottom") {
@@ -2070,14 +2070,14 @@ KexiMainWindowImpl::restoreSettings()
if ( !initialGeometrySet() ) {
// Default size
// int restoredWidth, restoredHeight;
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(tqparentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
//#if KDE_IS_VERSION(3,1,90)
// restoredWidth = KGlobalSettings::screenGeometry(scnum).width();
// restoredHeight = KGlobalSettings::screenGeometry(scnum).height();
//#else
-// restoredWidth = QApplication::desktop()->width();
-// restoredHeight = QApplication::desktop()->height();
+// restoredWidth = TQApplication::desktop()->width();
+// restoredHeight = TQApplication::desktop()->height();
//#endif
/* if (restoredWidth > 1100) {// very big desktop ?
restoredWidth = 1000;
@@ -2088,13 +2088,13 @@ KexiMainWindowImpl::restoreSettings()
restoredHeight = 600;
}
else {// small (800x600, 640x480) desktop
- restoredWidth = QMIN( restoredWidth, 600 );
- restoredHeight = QMIN( restoredHeight, 400 );
+ restoredWidth = TQMIN( restoredWidth, 600 );
+ restoredHeight = TQMIN( restoredHeight, 400 );
}*/
config->setGroup("MainWindow");
- QSize s ( config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 700 ),
- config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 480 ) );
+ TQSize s ( config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ),
+ config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) );
resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height()));
}
#endif
@@ -2134,25 +2134,25 @@ KexiMainWindowImpl::storeSettings()
d->propEditorDockSeparatorPos = 80;
if (d->nav && d->navDockSeparatorPos >= 0 && d->navDockSeparatorPos <= 100) {
d->config->setGroup("MainWindow");
- //KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
+ //KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
//int w = dw->width();
//int ww = width();
//int d1 = (100 * dw->width()) / width() + 1;
- //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
//int d2 = ds->separatorPosInPercent();
if (d->wasAutoOpen && d->dialogExistedBeforeCloseProject) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
d->config->writeEntry("LeftDockPositionWithAutoOpen",
d->navDockSeparatorPos);
#endif
// d->config->writeEntry("LeftDockPosition", dw->width());
// d->config->writeEntry("LeftDockPosition", d->nav->width());
} else {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
if (d->dialogExistedBeforeCloseProject)
d->config->writeEntry("LeftDockPosition", d->navDockSeparatorPos);
else
- d->config->writeEntry("LeftDockPosition", qRound(double(d->navDockSeparatorPos) / 0.77
+ d->config->writeEntry("LeftDockPosition", tqRound(double(d->navDockSeparatorPos) / 0.77
/ (double(d->propEditorDockSeparatorPos) / 80) ));
#endif
}
@@ -2172,7 +2172,7 @@ KexiMainWindowImpl::restoreWindowConfiguration(KConfig *config)
config->setGroup("MainWindow");
- QString dockGrp;
+ TQString dockGrp;
if (kapp->isRestored())
dockGrp=config->group()+"-Docking";
@@ -2188,9 +2188,9 @@ KexiMainWindowImpl::storeWindowConfiguration(KConfig *config)
{
kdDebug()<<"preparing session saving"<<endl;
config->setGroup("MainWindow");
- QString dockGrp;
+ TQString dockGrp;
-#if KDE_IS_VERSION(3,1,9) && !defined(Q_WS_WIN)
+#if KDE_IS_VERSION(3,1,9) && !defined(TQ_WS_WIN)
if (kapp->sessionSaving())
dockGrp=config->group()+"-Docking";
else
@@ -2224,12 +2224,12 @@ void
KexiMainWindowImpl::registerChild(KexiDialogBase *dlg)
{
kdDebug() << "KexiMainWindowImpl::registerChild()" << endl;
- connect(dlg, SIGNAL(activated(KMdiChildView *)),
- this, SLOT(activeWindowChanged(KMdiChildView *)));
- connect(dlg, SIGNAL(dirtyChanged(KexiDialogBase*)),
- this, SLOT(slotDirtyFlagChanged(KexiDialogBase*)));
+ connect(dlg, TQT_SIGNAL(activated(KMdiChildView *)),
+ TQT_TQOBJECT(this), TQT_SLOT(activeWindowChanged(KMdiChildView *)));
+ connect(dlg, TQT_SIGNAL(dirtyChanged(KexiDialogBase*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDirtyFlagChanged(KexiDialogBase*)));
-// connect(dlg, SIGNAL(childWindowCloseRequest(KMdiChildView *)), this, SLOT(childClosed(KMdiChildView *)));
+// connect(dlg, TQT_SIGNAL(childWindowCloseRequest(KMdiChildView *)), TQT_TQOBJECT(this), TQT_SLOT(childClosed(KMdiChildView *)));
if(dlg->id() != -1) {
d->insertDialog(dlg);
}
@@ -2323,7 +2323,7 @@ void KexiMainWindowImpl::updateCustomPropertyPanelTabs(
curDialogPart->setupCustomPropertyPanelTabs(d->propEditorTabWidget, this);
//restore current page number for this part
- if (d->recentlySelectedPropertyPanelPages.contains( curDialogPart )) {
+ if (d->recentlySelectedPropertyPanelPages.tqcontains( curDialogPart )) {
d->propEditorTabWidget->setCurrentPage(
d->recentlySelectedPropertyPanelPages[ curDialogPart ]
);
@@ -2440,7 +2440,7 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v)
d->curDialog->selectedView()->propertySetSwitched();
if (dialogChanged) {
-// invalidateSharedActions();
+// tqinvalidateSharedActions();
//update property editor's contents...
// if ((KexiPropertyBuffer*)d->propBuffer!=d->curDialog->propertyBuffer()) {
// propertyBufferSwitched();//d->curDialog);
@@ -2457,8 +2457,8 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v)
}
// if (!d->curDialog.isNull())
// d->last_checked_mode = d->actions_for_view_modes[ d->curDialog->currentViewMode() ];
- invalidateViewModeActions();
- invalidateActions();
+ tqinvalidateViewModeActions();
+ tqinvalidateActions();
d->updateFindDialogContents();
if (dlg)
dlg->setFocus();
@@ -2523,7 +2523,7 @@ void
KexiMainWindowImpl::slotConfigureToolbars()
{
KEditToolbar edit(factory());
-// connect(&edit,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+// connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
(void) edit.exec();
}
@@ -2538,7 +2538,7 @@ KexiMainWindowImpl::slotProjectNew()
//TODO use KexiStartupDialog(KexiStartupDialog::Templates...)
bool cancel;
- QString fileName;
+ TQString fileName;
KexiProjectData *new_data = createBlankProjectData(
cancel,
false, /* do not confirm prj overwrites: user will be asked on process startup */
@@ -2547,8 +2547,8 @@ KexiMainWindowImpl::slotProjectNew()
if (!new_data)
return;
- QStringList args;
- args << qApp->applicationFilePath() << "-create-opendb";
+ TQStringList args;
+ args << tqApp->applicationFilePath() << "-create-opendb";
if (new_data->connectionData()->fileName().isEmpty()) {
//server based - pass .kexic file
if (fileName.isEmpty())
@@ -2564,10 +2564,10 @@ KexiMainWindowImpl::slotProjectNew()
//todo: pass new_data->caption()
//start new instance
//! @todo use KProcess?
- QProcess proc(args, this, "process");
- proc.setCommunication((QProcess::Communication)0);
-// proc.setWorkingDirectory( QFileInfo(new_data->connectionData()->fileName()).dir(true) );
- proc.setWorkingDirectory( QFileInfo(fileName).dir(true) );
+ TQProcess proc(args, TQT_TQOBJECT(this), "process");
+ proc.setCommunication((TQProcess::Communication)0);
+// proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) );
+ proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) );
if (!proc.start()) {
d->showStartProcessMsg(args);
}
@@ -2579,22 +2579,22 @@ KexiMainWindowImpl::createKexiProject(KexiProjectData* new_data)
{
d->prj = new KexiProject( new_data, this );
// d->prj = ::createKexiProject(new_data);
-//provided by KexiMessageHandler connect(d->prj, SIGNAL(error(const QString&,KexiDB::Object*)), this, SLOT(showErrorMessage(const QString&,KexiDB::Object*)));
-//provided by KexiMessageHandler connect(d->prj, SIGNAL(error(const QString&,const QString&)), this, SLOT(showErrorMessage(const QString&,const QString&)));
- connect(d->prj, SIGNAL(itemRenamed(const KexiPart::Item&, const QCString&)), this, SLOT(slotObjectRenamed(const KexiPart::Item&, const QCString&)));
+//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,KexiDB::Object*)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,KexiDB::Object*)));
+//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,const TQString&)));
+ connect(d->prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)), TQT_TQOBJECT(this), TQT_SLOT(slotObjectRenamed(const KexiPart::Item&, const TQCString&)));
if (d->nav)
- connect(d->prj, SIGNAL(itemRemoved(const KexiPart::Item&)), d->nav, SLOT(slotRemoveItem(const KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)), d->nav, TQT_SLOT(slotRemoveItem(const KexiPart::Item&)));
}
KexiProjectData*
KexiMainWindowImpl::createBlankProjectData(bool &cancelled, bool confirmOverwrites,
- QString* shortcutFileName)
+ TQString* shortcutFileName)
{
cancelled = false;
KexiNewProjectWizard wiz(Kexi::connset(), 0, "KexiNewProjectWizard", true);
wiz.setConfirmOverwrites(confirmOverwrites);
- if (wiz.exec() != QDialog::Accepted) {
+ if (wiz.exec() != TQDialog::Accepted) {
cancelled=true;
return 0;
}
@@ -2602,7 +2602,7 @@ KexiMainWindowImpl::createBlankProjectData(bool &cancelled, bool confirmOverwrit
KexiProjectData *new_data;
if (shortcutFileName)
- *shortcutFileName = QString::null;
+ *shortcutFileName = TQString();
if (wiz.projectConnectionData()) {
//server-based project
KexiDB::ConnectionData *cdata = wiz.projectConnectionData();
@@ -2648,7 +2648,7 @@ KexiMainWindowImpl::createBlankProject()
initNavigator();
Kexi::recentProjects().addProjectData( new_data );
- invalidateActions();
+ tqinvalidateActions();
updateAppCaption();
return true;
}
@@ -2660,14 +2660,14 @@ KexiMainWindowImpl::slotProjectOpen()
KexiStartupDialog::OpenExisting, 0, Kexi::connset(), Kexi::recentProjects(),
this, "KexiOpenDialog");
- if (dlg.exec()!=QDialog::Accepted)
+ if (dlg.exec()!=TQDialog::Accepted)
return;
openProject(dlg.selectedFileName(), dlg.selectedExistingConnection());
}
-tristate KexiMainWindowImpl::openProject(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName)
+tristate KexiMainWindowImpl::openProject(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName)
{
if (d->prj)
return openProjectInExternalKexiInstance(aFileName, fileNameForConnectionData, dbName);
@@ -2683,9 +2683,9 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
return openProject(aFileName, cdata, dbName);
}
-tristate KexiMainWindowImpl::openProject(const QString& aFileName,
- KexiDB::ConnectionData *cdata, const QString& dbName,
- const QValueList<KexiProjectData::ObjectInfo>& autoopenObjects)
+tristate KexiMainWindowImpl::openProject(const TQString& aFileName,
+ KexiDB::ConnectionData *cdata, const TQString& dbName,
+ const TQValueList<KexiProjectData::ObjectInfo>& autoopenObjects)
{
if (d->prj) {
return openProjectInExternalKexiInstance(aFileName, cdata, dbName);
@@ -2708,7 +2708,7 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
}
}
else {
-// QString selFile = dlg.selectedExistingFile();
+// TQString selFile = dlg.selectedExistingFile();
if (aFileName.isEmpty()) {
kdWarning() << "KexiMainWindowImpl::openProject(): aFileName.isEmpty()" << endl;
return false;
@@ -2718,7 +2718,7 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
KexiDB::ConnectionData cdata;
cdata.setFileName( aFileName );
// cdata.driverName = KexiStartupHandler::detectDriverForFile( cdata.driverName, fileName, this );
- QString detectedDriverName;
+ TQString detectedDriverName;
KexiStartupData::Import importActionData;
const tristate res = KexiStartupHandler::detectActionForFile(
importActionData, detectedDriverName, cdata.driverName, aFileName, this );
@@ -2746,10 +2746,10 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
return res;
}
-tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aFileName,
- KexiDB::ConnectionData *cdata, const QString& dbName)
+tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const TQString& aFileName,
+ KexiDB::ConnectionData *cdata, const TQString& dbName)
{
- QString fileNameForConnectionData;
+ TQString fileNameForConnectionData;
if (aFileName.isEmpty()) { //try .kexic file
if (cdata)
fileNameForConnectionData = Kexi::connset().fileNameForConnectionData(cdata);
@@ -2757,12 +2757,12 @@ tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aF
return openProjectInExternalKexiInstance(aFileName, fileNameForConnectionData, dbName);
}
-tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName)
+tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName)
{
- QString fileName(aFileName);
- QStringList args;
- args << qApp->applicationFilePath();
+ TQString fileName(aFileName);
+ TQStringList args;
+ args << tqApp->applicationFilePath();
// open a file-based project or a server connection provided as a .kexic file
// (we have no other simple way to provide the startup data to a new process)
if (fileName.isEmpty()) { //try .kexic file
@@ -2783,8 +2783,8 @@ tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aF
}
//! @todo use KRun
args << fileName;
- QProcess proc(args, this, "process");
- proc.setWorkingDirectory( QFileInfo(fileName).dir(true) );
+ TQProcess proc(args, TQT_TQOBJECT(this), "process");
+ proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) );
const bool ok = proc.start();
if (!ok) {
d->showStartProcessMsg(args);
@@ -2873,7 +2873,7 @@ KexiMainWindowImpl::slotProjectSave()
return;
saveObject( d->curDialog );
updateAppCaption();
- invalidateActions();
+ tqinvalidateActions();
}
void
@@ -2992,8 +2992,8 @@ void KexiMainWindowImpl::slotViewPropertyEditor()
d->block_KMdiMainFrm_eventFilter=false;
/*#if defined(KDOCKWIDGET_P)
- KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
ds->setSeparatorPos(80,true);//d->config->readNumEntry("RightDockPosition", 80), true);
#endif*/
}
@@ -3006,10 +3006,10 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
}
if (!d->curDialog->supportsViewMode( viewMode )) {
showErrorMessage(i18n("Selected view is not supported for \"%1\" object.")
- .arg(d->curDialog->partItem()->name()),
+ .tqarg(d->curDialog->partItem()->name()),
i18n("Selected view (%1) is not supported by this object type (%2).")
- .arg(Kexi::nameForViewMode(viewMode))
- .arg(d->curDialog->part()->instanceCaption()) );
+ .tqarg(Kexi::nameForViewMode(viewMode))
+ .tqarg(d->curDialog->part()->instanceCaption()) );
d->toggleLastCheckedMode();
return false;
}
@@ -3019,7 +3019,7 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
tristate res = d->curDialog->switchToViewMode( viewMode );
if (!res) {
updateCustomPropertyPanelTabs(0, Kexi::NoViewMode); //revert
- showErrorMessage(i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(viewMode)),
+ showErrorMessage(i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(viewMode)),
d->curDialog);
d->toggleLastCheckedMode();
return false;
@@ -3038,8 +3038,8 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
d->curDialogViewGUIClient=viewClient; //remember
d->updatePropEditorVisibility(viewMode);
- invalidateProjectWideActions();
- invalidateSharedActions();
+ tqinvalidateProjectWideActions();
+ tqinvalidateSharedActions();
d->updateFindDialogContents();
return true;
}
@@ -3060,7 +3060,7 @@ void KexiMainWindowImpl::slotViewTextMode()
switchToViewMode(Kexi::TextViewMode);
}
-void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool layoutTaskBar)
+void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool tqlayoutTaskBar)
{
if (d->insideCloseDialog && dynamic_cast<KexiDialogBase *>(pWnd)) {
d->windowsToClose.append(dynamic_cast<KexiDialogBase *>(pWnd));
@@ -3075,12 +3075,12 @@ void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool layoutTaskBar)
}
}
*/
- closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), layoutTaskBar);
+ closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), tqlayoutTaskBar);
}
tristate KexiMainWindowImpl::getNewObjectInfo(
KexiPart::Item *partItem, KexiPart::Part *part,
- bool& allowOverwriting, const QString& messageWhenAskingForName )
+ bool& allowOverwriting, const TQString& messageWhenAskingForName )
{
//data was never saved in the past -we need to create a new object at the backend
KexiPart::Info *info = part->info();
@@ -3104,7 +3104,7 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
allowOverwriting = false;
bool found;
do {
- if (d->nameDialog->exec()!=QDialog::Accepted)
+ if (d->nameDialog->exec()!=TQDialog::Accepted)
return cancelled;
//check if that name already exists
KexiDB::SchemaData tmp_sdata;
@@ -3118,11 +3118,11 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
if (allowOverwriting) {
int res = KMessageBox::warningYesNoCancel(this,
"<p>"+part->i18nMessage("Object \"%1\" already exists.", 0)
- .arg(d->nameDialog->widget()->nameText())
+ .tqarg(d->nameDialog->widget()->nameText())
+"</p><p>"+i18n("Do you want to replace it?")+"</p>", 0,
KGuiItem(i18n("&Replace"), "button_yes"),
KGuiItem(i18n("&Choose Other Name...")),
- QString::null, KMessageBox::Notify|KMessageBox::Dangerous);
+ TQString(), KMessageBox::Notify|KMessageBox::Dangerous);
if (res == KMessageBox::No)
continue;
else if (res == KMessageBox::Cancel)
@@ -3135,11 +3135,11 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
else {
KMessageBox::information(this,
"<p>"+part->i18nMessage("Object \"%1\" already exists.", 0)
- .arg(d->nameDialog->widget()->nameText())
+ .tqarg(d->nameDialog->widget()->nameText())
+"</p><p>"+i18n("Please choose other name.")+"</p>");
// " For example: Table \"my_table\" already exists" ,
// "%1 \"%2\" already exists.\nPlease choose other name.")
-// .arg(dlg->part()->instanceName()).arg(d->nameDialog->widget()->nameText()));
+// .tqarg(dlg->part()->instanceName()).tqarg(d->nameDialog->widget()->nameText()));
continue;
}
}
@@ -3152,7 +3152,7 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
return true;
}
-tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& messageWhenAskingForName,
+tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const TQString& messageWhenAskingForName,
bool dontAsk)
{
tristate res;
@@ -3160,7 +3160,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
//data was saved in the past -just save again
res = dlg->storeData(dontAsk);
if (!res)
- showErrorMessage(i18n("Saving \"%1\" object failed.").arg(dlg->partItem()->name()),
+ showErrorMessage(i18n("Saving \"%1\" object failed.").tqarg(dlg->partItem()->name()),
d->curDialog);
return res;
}
@@ -3177,7 +3177,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
if (~res)
return cancelled;
if (!res) {
- showErrorMessage(i18n("Saving new \"%1\" object failed.").arg(dlg->partItem()->name()),
+ showErrorMessage(i18n("Saving new \"%1\" object failed.").tqarg(dlg->partItem()->name()),
d->curDialog);
return false;
}
@@ -3187,7 +3187,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
//item id changed to final one: update association in dialogs' dictionary
// d->dialogs.take(oldItemID);
d->updateDialogId(dlg, oldItemID);
- invalidateProjectWideActions();
+ tqinvalidateProjectWideActions();
return true;
}
@@ -3196,7 +3196,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg)
return closeDialog(dlg, true);
}
-tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar, bool doNotSaveChanges)
+tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskBar, bool doNotSaveChanges)
{
if (!dlg)
return true;
@@ -3224,28 +3224,28 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
saveChanges.setToolTip(i18n("Save changes"));
saveChanges.setWhatsThis(
i18n( "Pressing this button will save all recent changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
KGuiItem discardChanges( KStdGuiItem::discard() );
discardChanges.setWhatsThis(
i18n( "Pressing this button will discard all recent changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
//dialog's data is dirty:
//--adidional message, e.g. table designer will return
// "Note: This table is already filled with data which will be removed."
// if the dlg is in design view mode.
- QString additionalMessage = dlg->part()->i18nMessage(
+ TQString additionalMessage = dlg->part()->i18nMessage(
":additional message before saving design", dlg);
if (additionalMessage.startsWith(":"))
- additionalMessage = QString::null;
+ additionalMessage = TQString();
if (!additionalMessage.isEmpty())
additionalMessage = "<p>"+additionalMessage+"</p>";
const int questionRes = KMessageBox::warningYesNoCancel( this,
"<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg)
- .arg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>"
+ .tqarg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>"
+ additionalMessage /*may be empty*/,
- QString::null,
+ TQString(),
saveChanges,
discardChanges);
if (questionRes==KMessageBox::Cancel) {
@@ -3259,7 +3259,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
if (questionRes==KMessageBox::Yes) {
//save it
// if (!dlg->storeData())
- tristate res = saveObject( dlg, QString::null, true /*dontAsk*/ );
+ tristate res = saveObject( dlg, TQString(), true /*dontAsk*/ );
if (!res || ~res) {
//js:TODO show error info; (retry/ignore/cancel)
#ifndef KEXI_NO_PENDING_DIALOGS
@@ -3297,7 +3297,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
d->removeDialog(dlg_id); //don't remove -KMDI will do that
//also remove from 'print setup dialogs' cache, if needed
int printedObjectID = 0;
- if (d->pageSetupDialogItemID2dataItemID_map.contains(dlg_id))
+ if (d->pageSetupDialogItemID2dataItemID_map.tqcontains(dlg_id))
printedObjectID = d->pageSetupDialogItemID2dataItemID_map[ dlg_id ];
d->pageSetupDialogs.take(printedObjectID);
@@ -3338,7 +3338,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
const bool isInMaximizedChildFrmMode = this->isInMaximizedChildFrmMode();
- KMdiMainFrm::closeWindow(dlg, layoutTaskBar);
+ KMdiMainFrm::closeWindow(dlg, tqlayoutTaskBar);
//focus navigator if nothing else available
if (d->openedDialogsCount()==0) {
@@ -3348,7 +3348,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
d->updatePropEditorVisibility(0);
}
- invalidateActions();
+ tqinvalidateActions();
d->insideCloseDialog = false;
if (!d->windowsToClose.isEmpty()) //continue 'close all'
closeDialog(d->windowsToClose.take(0), true);
@@ -3376,13 +3376,13 @@ void KexiMainWindowImpl::detachWindow(KMdiChildView *pWnd,bool bShow)
void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool bAutomaticResize)
{
-// if (bAutomaticResize || w->size().isEmpty() || (w->size() == QSize(1,1))) {
+// if (bAutomaticResize || w->size().isEmpty() || (w->size() == TQSize(1,1))) {
KMdiMainFrm::attachWindow(pWnd,true,bAutomaticResize);
//for dialogs in normal state: decrease dialog's height if it exceeds area contents
if (pWnd->mdiParent()->state() == KMdiChildFrm::Normal
- && pWnd->geometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom())
+ && pWnd->tqgeometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom())
{
- QRect r = pWnd->geometry();
+ TQRect r = pWnd->tqgeometry();
r.setBottom( pWnd->mdiParent()->mdiAreaContentsRect().bottom() - 5 );
pWnd->setGeometry( r );
}
@@ -3392,157 +3392,157 @@ void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool
dynamic_cast<KexiDialogBase*>(pWnd)->sendAttachedStateToCurrentView();
}
-QWidget* KexiMainWindowImpl::findWindow(QWidget *w)
+TQWidget* KexiMainWindowImpl::findWindow(TQWidget *w)
{
- while (w && !acceptsSharedActions(w))
- w = w->parentWidget();
+ while (w && !acceptsSharedActions(TQT_TQOBJECT(w)))
+ w = w->tqparentWidget();
return w;
}
-bool KexiMainWindowImpl::acceptsSharedActions(QObject *w)
+bool KexiMainWindowImpl::acceptsSharedActions(TQObject *w)
{
return w->inherits("KexiDialogBase") || w->inherits("KexiViewBase");
}
-bool KexiMainWindowImpl::eventFilter( QObject *obj, QEvent * e )
+bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
{
//KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl;
- if (e->type()==QEvent::KeyPress) {
- KexiVDebug << "KEY EVENT " << QString::number(static_cast<QKeyEvent*>(e)->key(), 16) << endl;
+ if (e->type()==TQEvent::KeyPress) {
+ KexiVDebug << "KEY EVENT " << TQString::number(TQT_TQKEYEVENT(e)->key(), 16) << endl;
KexiVDebug << endl;
}
- if (e->type()==QEvent::AccelOverride) {
- //KexiVDebug << "AccelOverride EVENT " << static_cast<QKeyEvent*>(e)->key() << " " << static_cast<QKeyEvent*>(e)->state() == ControlButton << endl;
+ if (e->type()==TQEvent::AccelOverride) {
+ //KexiVDebug << "AccelOverride EVENT " << TQT_TQKEYEVENT(e)->key() << " " << TQT_TQKEYEVENT(e)->state() == ControlButton << endl;
//avoid sending CTRL+Tab key twice for tabbed/ideal mode, epecially for win32
- if (static_cast<QKeyEvent*>(e)->key()==Qt::Key_Tab && static_cast<QKeyEvent*>(e)->state() == ControlButton) {
- if (d->action_window_next->shortcut().keyCodeQt()==Qt::Key_Tab+Qt::CTRL && d->action_window_next->shortcut().count()==1
+ if (TQT_TQKEYEVENT(e)->key()==TQt::Key_Tab && TQT_TQKEYEVENT(e)->state() == ControlButton) {
+ if (d->action_window_next->shortcut().keyCodeQt()==TQt::Key_Tab+TQt::CTRL && d->action_window_next->shortcut().count()==1
&& (mdiMode()==KMdi::TabPageMode || mdiMode()==KMdi::IDEAlMode))
{
- static_cast<QKeyEvent*>(e)->accept();
+ TQT_TQKEYEVENT(e)->accept();
}
}
}
- if (e->type()==QEvent::Close) {
+ if (e->type()==TQEvent::Close) {
KexiVDebug << "Close EVENT" << endl;
}
- if (e->type()==QEvent::Resize) {
+ if (e->type()==TQEvent::Resize) {
KexiVDebug << "Resize EVENT" << endl;
}
- if (e->type()==QEvent::ShowMaximized) {
+ if (e->type()==TQEvent::ShowMaximized) {
KexiVDebug << "ShowMaximized EVENT" << endl;
}
/* if (obj==d->propEditor) {
- if (e->type()==QEvent::Resize) {
+ if (e->type()==TQEvent::Resize) {
d->updatePropEditorDockWidthInfo();
}
}*/
- QWidget *focus_w = 0;
- if (obj->inherits("QPopupMenu")) {
+ TQWidget *focus_w = 0;
+ if (obj->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
/* Fixes for popup menus behaviour:
For hiding/showing: focus previously (d->focus_before_popup)
focused window, if known, otherwise focus currently focused one.
- And: just invalidate actions.
+ And: just tqinvalidate actions.
*/
- if (e->type()==QEvent::Hide || e->type()==QEvent::Show) {
+ if (e->type()==TQEvent::Hide || e->type()==TQEvent::Show) {
KexiVDebug << e->type() << endl;
focus_w = focusWindow();
if (!d->focus_before_popup.isNull()) {
d->focus_before_popup->setFocus();
d->focus_before_popup=0;
- invalidateSharedActions();
+ tqinvalidateSharedActions();
} else {
if (focus_w) {
focus_w->setFocus();
- invalidateSharedActions();
+ tqinvalidateSharedActions();
}
}
}
return false;
}
- /*! On mouse click on the findow, make sure it's focused and actions are invalidated */
- if (e->type()==QEvent::MouseButtonPress) {
- QWidget *w = findWindow(static_cast<QWidget*>(obj));
+ /*! On mouse click on the findow, make sure it's focused and actions are tqinvalidated */
+ if (e->type()==TQEvent::MouseButtonPress) {
+ TQWidget *w = findWindow(TQT_TQWIDGET(obj));
KexiVDebug << "MouseButtonPress EVENT " << (w ? w->name() : 0) << endl;
if (w) {
w->setFocus();
- invalidateSharedActions(d->curDialog);
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
}
}
- QWidget *w = findWindow(static_cast<QWidget*>(obj));
- if (e->type()==QEvent::FocusIn) {
+ TQWidget *w = findWindow(TQT_TQWIDGET(obj));
+ if (e->type()==TQEvent::FocusIn) {
focus_w = focusWindow();
KexiVDebug << "Focus EVENT" << endl;
KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl;
#ifdef KEXI_STATUSBAR_DEBUG
- QWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0;
- d->statusBar->setStatus(QString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
- .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "")
- .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "")
+ TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0;
+ d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
+ .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "")
+ .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "")
);
#endif
}
- else if (e->type()==QEvent::FocusOut) {
+ else if (e->type()==TQEvent::FocusOut) {
focus_w = focusWindow();
KexiVDebug << "Focus OUT EVENT" << endl;
KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl;
#ifdef KEXI_STATUSBAR_DEBUG
- QWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0;
- d->statusBar->setStatus(QString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
- .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "")
- .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "")
+ TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0;
+ d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
+ .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "")
+ .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "")
);
#endif
}
- if (e->type()==QEvent::WindowActivate) {
+ if (e->type()==TQEvent::WindowActivate) {
KexiVDebug << "WindowActivate EVENT" << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl;
}
#if 0
- if (e->type()==QEvent::FocusIn) {
+ if (e->type()==TQEvent::FocusIn) {
if (focus_w) {
// if (d->actionProxies[ w ])
// if (d->actionProxies[ focus_w ]) {
if (actionProxyFor( focus_w )) {
-// invalidateSharedActions();
+// tqinvalidateSharedActions();
}
else {
-/* QObject* o = focusWidget();
+/* TQObject* o = tqfocusWidget();
while (o && !o->inherits("KexiDialogBase") && !o->inherits("KexiDockBase"))
- o = o->parent();*/
-//js invalidateSharedActions(focus_w);
+ o = o->tqparent();*/
+//js tqinvalidateSharedActions(focus_w);
}
}
-// /*|| e->type()==QEvent::FocusOut*/) && /*(!obj->inherits("KexiDialogBase")) &&*/ d->actionProxies[ obj ]) {
-// invalidateSharedActions();
+// /*|| e->type()==TQEvent::FocusOut*/) && /*(!obj->inherits("KexiDialogBase")) &&*/ d->actionProxies[ obj ]) {
+// tqinvalidateSharedActions();
}
- if (e->type()==QEvent::FocusOut && focus_w && focus_w==d->curDialog && actionProxyFor( obj )) {
- invalidateSharedActions(d->curDialog);
+ if (e->type()==TQEvent::FocusOut && focus_w && focus_w==d->curDialog && actionProxyFor( obj )) {
+ tqinvalidateSharedActions(d->curDialog);
}
#endif
- if (!d->focus_before_popup.isNull() && e->type()==QEvent::FocusOut && obj->inherits("KMenuBar")) {
+ if (!d->focus_before_popup.isNull() && e->type()==TQEvent::FocusOut && obj->inherits("KMenuBar")) {
//d->nav->setFocus();
d->focus_before_popup->setFocus();
d->focus_before_popup=0;
- invalidateSharedActions(d->curDialog);
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
return true;
}
- //remember currently focued window invalidate act.
- if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
- if (KexiUtils::hasParent(d->curDialog, focus_w)) {
- invalidateSharedActions(d->curDialog);
+ //remember currently focued window tqinvalidate act.
+ if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
+ if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) {
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
d->focus_before_popup=d->curDialog;
}
else {
-//not needed??? invalidateSharedActions(focus_w);
+//not needed??? tqinvalidateSharedActions(focus_w);
d->focus_before_popup=focus_w;
}
}
@@ -3551,25 +3551,25 @@ bool KexiMainWindowImpl::eventFilter( QObject *obj, QEvent * e )
//keep focus in main window:
if (w && w==d->nav) {
// kdDebug() << "NAV" << endl;
- if (e->type()==QEvent::FocusIn) {
+ if (e->type()==TQEvent::FocusIn) {
return true;
- } else if (e->type()==QEvent::WindowActivate && w==d->focus_before_popup) {
+ } else if (e->type()==TQEvent::WindowActivate && w==d->focus_before_popup) {
// d->nav->setFocus();
d->focus_before_popup=0;
return true;
- } else if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Tab) {
+ } else if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Tab) {
//activate current child:
if (d->curDialog) {
d->curDialog->activate();
return true;
}
}
- else if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
+ else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
d->focus_before_popup=w;
}
- //invalidateSharedActions();
- } else if (e->type()==QEvent::Hide) {
+ //tqinvalidateSharedActions();
+ } else if (e->type()==TQEvent::Hide) {
setFocus();
return false;
}
@@ -3589,8 +3589,8 @@ bool KexiMainWindowImpl::openingAllowed(KexiPart::Item* item, int viewMode)
}
KexiDialogBase *
-KexiMainWindowImpl::openObject(const QCString& mimeType, const QString& name,
- int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs)
+KexiMainWindowImpl::openObject(const TQCString& mimeType, const TQString& name,
+ int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs)
{
KexiPart::Item *item = d->prj->itemForMimeType(mimeType,name);
if (!item)
@@ -3600,12 +3600,12 @@ KexiMainWindowImpl::openObject(const QCString& mimeType, const QString& name,
KexiDialogBase *
KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &openingCancelled,
- QMap<QString,QString>* staticObjectArgs, QString* errorMessage)
+ TQMap<TQString,TQString>* staticObjectArgs, TQString* errorMessage)
{
if (!openingAllowed(item, viewMode)) {
if (errorMessage)
*errorMessage = i18n("opening is not allowed in \"data view/design view/text view\" mode",
- "opening is not allowed in \"%1\" mode").arg(Kexi::nameForViewMode(viewMode));
+ "opening is not allowed in \"%1\" mode").tqarg(Kexi::nameForViewMode(viewMode));
openingCancelled = true;
return 0;
}
@@ -3666,9 +3666,9 @@ KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &opening
d->curDialogViewGUIClient=viewClient; //remember
}
- invalidateViewModeActions();
+ tqinvalidateViewModeActions();
if (viewMode!=dlg->currentViewMode())
- invalidateSharedActions();
+ tqinvalidateSharedActions();
#ifndef KEXI_NO_PENDING_DIALOGS
d->removePendingDialog( dlg->id() );
@@ -3711,7 +3711,7 @@ KexiMainWindowImpl::openObjectFromNavigator(KexiPart::Item* item, int viewMode,
openingCancelled = false;
if (dlg) {
if (activateWindow(dlg)) {//item->identifier())) {//just activate
- invalidateViewModeActions();
+ tqinvalidateViewModeActions();
return dlg;
}
}
@@ -3790,7 +3790,7 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
"<p>"+i18n("Do you want to permanently delete:\n"
"%1\n"
"If you click \"Delete\", you will not be able to undo the deletion.")
- .arg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ),
+ .tqarg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ),
0, KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::no()))
return cancelled;
}
@@ -3798,7 +3798,7 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
//also close 'print setup' dialog for this item, if any
tristate res;
// int printedObjectID = 0;
-// if (d->pageSetupDialogItemID2dataItemID_map.contains(item->identifier()))
+// if (d->pageSetupDialogItemID2dataItemID_map.tqcontains(item->identifier()))
// printedObjectID = d->pageSetupDialogItemID2dataItemID_map[ item->identifier() ];
KexiDialogBase * pageSetupDlg = d->pageSetupDialogs[ item->identifier() ];
const bool oldInsideCloseDialog = d->insideCloseDialog;
@@ -3848,14 +3848,14 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
return true;
}
-void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const QString& _newName, bool &success )
+void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const TQString& _newName, bool &success )
{
if (userMode()) {
success = false;
return;
}
d->pendingDialogsExist();
- QString newName = _newName.stripWhiteSpace();
+ TQString newName = _newName.stripWhiteSpace();
if (newName.isEmpty()) {
showSorryMessage( i18n("Could not set empty name for this object.") );
success = false;
@@ -3865,14 +3865,14 @@ void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const QString& _new
const bool res = d->prj->renameObject(this, *item, newName);
enableMessages(true);
if (!res) {
- showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").arg(newName) );
+ showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").tqarg(newName) );
success = false;
return;
}
d->pendingDialogsExist();
}
-void KexiMainWindowImpl::slotObjectRenamed(const KexiPart::Item &item, const QCString& /*oldName*/)
+void KexiMainWindowImpl::slotObjectRenamed(const KexiPart::Item &item, const TQCString& /*oldName*/)
{
#ifndef KEXI_NO_PENDING_DIALOGS
Private::PendingJobType pendingType;
@@ -3903,10 +3903,10 @@ void KexiMainWindowImpl::acceptPropertySetEditing()
}
void KexiMainWindowImpl::propertySetSwitched(KexiDialogBase *dlg, bool force,
- bool preservePrevSelection, const QCString& propertyToSelect)
+ bool preservePrevSelection, const TQCString& propertyToSelect)
{
kdDebug() << "KexiMainWindowImpl::propertySetSwitched() d->curDialog: "
- << (d->curDialog ? d->curDialog->caption() : QString("NULL")) << " dlg: " << (dlg ? dlg->caption() : QString("NULL"))<< endl;
+ << (d->curDialog ? d->curDialog->caption() : TQString("NULL")) << " dlg: " << (dlg ? dlg->caption() : TQString("NULL"))<< endl;
if ((KexiDialogBase*)d->curDialog!=dlg) {
d->propBuffer = 0; //we'll need to move to another prop. set
return;
@@ -3932,7 +3932,7 @@ void KexiMainWindowImpl::slotDirtyFlagChanged(KexiDialogBase* dlg)
if(!userMode())
d->nav->updateItemName( *item, dlg->dirty() );
- invalidateActions();
+ tqinvalidateActions();
updateAppCaption();
}
@@ -3964,8 +3964,8 @@ void KexiMainWindowImpl::slotStartFeedbackAgent()
if ( wizard->exec() )
{
KApplication::kApplication()->invokeMailer( "kexi-reports-dummy@kexi.org",
- QString::null, QString::null,
- about->appName() + QCString( " [feedback]" ),
+ TQString(), TQString(),
+ about->appName() + TQCString( " [feedback]" ),
wizard->feedbackDocument().toString( 2 ).local8Bit() );
}
@@ -3980,7 +3980,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
if (onStartup && !d->showImportantInfoOnStartup)
return;
- QString key = QString("showImportantInfo %1").arg(KEXI_VERSION_STRING);
+ TQString key = TQString("showImportantInfo %1").tqarg(KEXI_VERSION_STRING);
d->config->setGroup("Startup");
bool show = d->config->readBoolEntry(key,true);
@@ -3989,30 +3989,30 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
if (!d->config->hasKey("RunOnStart"))
d->config->writeEntry("RunOnStart",true);
- QString lang = KGlobal::locale()->language();
- QString fname = locate("data", QString("kexi/readme_")+lang);
+ TQString lang = KGlobal::locale()->language();
+ TQString fname = locate("data", TQString("kexi/readme_")+lang);
if (fname.isEmpty())//back to default
fname = locate("data", "kexi/readme_en");
- KTipDialog tipDialog(new KTipDatabase(QString::null), 0);
+ KTipDialog tipDialog(new KTipDatabase(TQString()), 0);
tipDialog.setCaption(i18n("Important Information"));
- QObjectList *l = tipDialog.queryList( "KPushButton" );//hack: hide <- -> buttons
+ TQObjectList *l = tipDialog.queryList( "KPushButton" );//hack: hide <- -> buttons
int i=0;
- for (QObjectListIt it( *l ); it.current() && i<2; ++it, i++ )
+ for (TQObjectListIt it( *l ); it.current() && i<2; ++it, i++ )
static_cast<KPushButton*>(it.current())->hide();
- QFile f(fname);
+ TQFile f(fname);
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts.setCodec( KGlobal::locale()->codecForEncoding() );
- QTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser");
+ TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser");
if (tb) {
- tb->setText( QString("<qt>%1</qt>").arg(ts.read()) );
+ tb->setText( TQString("<qt>%1</qt>").tqarg(ts.read()) );
}
f.close();
}
tipDialog.adjustSize();
- QRect desk = QApplication::desktop()->screenGeometry( QApplication::desktop()->screenNumber(this) );
- tipDialog.resize( QMAX(tipDialog.width(),desk.width()*3/5), QMAX(tipDialog.height(),desk.height()*3/5) );
+ TQRect desk = TQApplication::desktop()->screenGeometry( TQApplication::desktop()->screenNumber(this) );
+ tipDialog.resize( TQMAX(tipDialog.width(),desk.width()*3/5), TQMAX(tipDialog.height(),desk.height()*3/5) );
KDialog::centerOnScreen(&tipDialog);
tipDialog.setModal ( true );
tipDialog.exec();
@@ -4061,8 +4061,8 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
#if 0 //todo reenable; autoopen objects are handled elsewhere
KexiDB::TableSchema *sch = d->prj->dbConnection()->tableSchema("kexi__final");
- QString err_msg = i18n("Could not start project \"%1\" in Final Mode.")
- .arg(static_cast<KexiDB::SchemaData*>(projectData)->name());
+ TQString err_msg = i18n("Could not start project \"%1\" in Final Mode.")
+ .tqarg(static_cast<KexiDB::SchemaData*>(projectData)->name());
if(!sch)
{
hide();
@@ -4078,8 +4078,8 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
return false;
}
- QString startupPart;
- QString startupItem;
+ TQString startupPart;
+ TQString startupItem;
while(c->moveNext())
{
kdDebug() << "KexiMainWinImpl::initFinalMode(): property: [" << c->value(1).toString() << "] " << c->value(2).toString() << endl;
@@ -4117,7 +4117,7 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
return false;
}
- QWidget::setCaption("MyApp");//TODO
+ TQWidget::setCaption("MyApp");//TODO
#endif
return true;
}
@@ -4138,8 +4138,8 @@ KexiMainWindowImpl::initUserActions()
/*
KexiUserAction *a1 = new KexiUserAction(this, actionCollection(), "user_dataview", "Change to dataview", "table");
Arguments args;
- args.append(QVariant("kexi/table"));
- args.append(QVariant("persons"));
+ args.append(TQVariant("kexi/table"));
+ args.append(TQVariant("persons"));
a1->setMethod(KexiUserAction::OpenObject, args);
*/
#endif
@@ -4147,7 +4147,7 @@ KexiMainWindowImpl::initUserActions()
void KexiMainWindowImpl::slotToolsProjectMigration()
{
- showProjectMigrationWizard(QString::null, QString::null);
+ showProjectMigrationWizard(TQString(), TQString());
}
void KexiMainWindowImpl::slotToolsCompactDatabase()
@@ -4161,7 +4161,7 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
KexiStartupDialog::OpenExisting, 0, Kexi::connset(), Kexi::recentProjects(),
this, "KexiOpenDialog");
- if (dlg.exec()!=QDialog::Accepted)
+ if (dlg.exec()!=TQDialog::Accepted)
return;
if (dlg.selectedFileName().isEmpty()) {
@@ -4184,7 +4184,7 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
if (!drv || !(drv->features() & KexiDB::Driver::CompactingDatabaseSupported)) {
KMessageBox::information(this, "<qt>"+
i18n("Compacting database file <nobr>\"%1\"</nobr> is not supported.")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
return;
}
data = new KexiProjectData( cdata, cdata.fileName() );
@@ -4219,40 +4219,40 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
}
tristate KexiMainWindowImpl::showProjectMigrationWizard(
- const QString& mimeType, const QString& databaseName, const KexiDB::ConnectionData *cdata)
+ const TQString& mimeType, const TQString& databaseName, const KexiDB::ConnectionData *cdata)
{
//pass arguments
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("mimeType", mimeType);
args.insert("databaseName", databaseName);
if (cdata) { //pass ConnectionData serialized as a string...
- QString str;
+ TQString str;
KexiUtils::serializeMap( KexiDB::toMap( *cdata ), str );
args.insert("connectionData", str);
}
- QDialog *dlg = KexiInternalPart::createModalDialogInstance("migration", this, this, 0, &args);
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance("migration", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
const int result = dlg->exec();
delete dlg;
//raise();
- if (result!=QDialog::Accepted)
+ if (result!=TQDialog::Accepted)
return cancelled;
//open imported project in a new Kexi instance
- QString destinationDatabaseName( args["destinationDatabaseName"] );
- QString fileName, destinationConnectionShortcut, dbName;
+ TQString destinationDatabaseName( args["destinationDatabaseName"] );
+ TQString fileName, destinationConnectionShortcut, dbName;
if (!destinationDatabaseName.isEmpty()) {
- if (args.contains("destinationConnectionShortcut")) {
+ if (args.tqcontains("destinationConnectionShortcut")) {
// server-based
destinationConnectionShortcut = args["destinationConnectionShortcut"];
}
else {
// file-based
fileName = destinationDatabaseName;
- destinationDatabaseName = QString::null;
+ destinationDatabaseName = TQString();
}
tristate res = openProject(fileName, destinationConnectionShortcut,
destinationDatabaseName);
@@ -4281,9 +4281,9 @@ void KexiMainWindowImpl::slotProjectImportDataTable()
//! @todo allow data appending (it is not possible now)
if (userMode())
return;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("sourceType", "file");
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", this, this, 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -4292,7 +4292,7 @@ void KexiMainWindowImpl::slotProjectImportDataTable()
}
tristate KexiMainWindowImpl::executeCustomActionForObject(KexiPart::Item* item,
- const QString& actionName)
+ const TQString& actionName)
{
if (actionName == "exportToCSV")
return exportItemAsDataTable(item);
@@ -4311,30 +4311,30 @@ tristate KexiMainWindowImpl::exportItemAsDataTable(KexiPart::Item* item)
//! @todo: check if changes to this are saved, if not: ask for saving
//! @todo: accept row changes...
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("destinationType", "file");
- args.insert("itemId", QString::number(item->identifier()));
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ args.insert("itemId", TQString::number(item->identifier()));
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
int result = dlg->exec();
delete dlg;
- return result == QDialog::Rejected ? cancelled : true;
+ return result == TQDialog::Rejected ? cancelled : true;
}
-bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const QString& titleText)
+bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const TQString& titleText)
{
return printItem(item, KexiSimplePrintingSettings::load(), titleText);
}
tristate KexiMainWindowImpl::printItem(KexiPart::Item* item)
{
- return printItem(item, QString::null);
+ return printItem(item, TQString());
}
bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const KexiSimplePrintingSettings& settings,
- const QString& titleText)
+ const TQString& titleText)
{
//! @todo: check if changes to this object's design are saved, if not: ask for saving
//! @todo: accept row changes...
@@ -4343,20 +4343,20 @@ bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const KexiSimplePrintin
return cmd.print(settings, titleText);
}
-bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item, const QString& titleText, bool reload)
+bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item, const TQString& titleText, bool reload)
{
return printPreviewForItem(item, KexiSimplePrintingSettings::load(), titleText, reload);
}
tristate KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item)
{
- return printPreviewForItem(item, QString::null,
+ return printPreviewForItem(item, TQString(),
//! @todo store cached row data?
true/*reload*/);
}
bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item,
- const KexiSimplePrintingSettings& settings, const QString& titleText, bool reload)
+ const KexiSimplePrintingSettings& settings, const TQString& titleText, bool reload)
{
//! @todo: check if changes to this object's design are saved, if not: ask for saving
//! @todo: accept row changes...
@@ -4392,8 +4392,8 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
if (!activateWindow(printingDialog))
return false;
if (action == PreviewItem || action == PrintItem) {
- QTimer::singleShot(0,printingDialog->selectedView(),
- (action == PreviewItem) ? SLOT(printPreview()) : SLOT(print()));
+ TQTimer::singleShot(0,printingDialog->selectedView(),
+ (action == PreviewItem) ? TQT_SLOT(printPreview()) : TQT_SLOT(print()));
}
return true;
}
@@ -4409,7 +4409,7 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
if (dlg) {
// accept row changes
- QWidget *prevFocusWidget = focusWidget();
+ TQWidget *prevFocusWidget = tqfocusWidget();
dlg->setFocus();
d->action_data_save_row->activate();
if (prevFocusWidget)
@@ -4423,13 +4423,13 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
saveChanges.setToolTip(i18n("Save changes"));
saveChanges.setWhatsThis(
i18n( "Pressing this button will save all recent changes made in \"%1\" object." )
- .arg(item->name()) );
+ .tqarg(item->name()) );
KGuiItem doNotSave( KStdGuiItem::no() );
doNotSave.setWhatsThis(
i18n( "Pressing this button will ignore all unsaved changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
- QString question;
+ TQString question;
if (action == PrintItem)
question = i18n("Do you want to save changes before printing?");
else if (action == PreviewItem)
@@ -4441,14 +4441,14 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
const int questionRes = KMessageBox::warningYesNoCancel( this,
"<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg)
- .arg(item->name()) + "</p><p>" + question + "</p>",
- QString::null,
+ .tqarg(item->name()) + "</p><p>" + question + "</p>",
+ TQString(),
saveChanges,
doNotSave);
if (KMessageBox::Cancel == questionRes)
return cancelled;
if (KMessageBox::Yes == questionRes) {
- tristate savingRes = saveObject( dlg, QString::null, true /*dontAsk*/ );
+ tristate savingRes = saveObject( dlg, TQString(), true /*dontAsk*/ );
if (true != savingRes)
return savingRes;
}
@@ -4460,8 +4460,8 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
KexiPart::Item* printingPartItem = d->prj->createPartItem(
printingPart, item->name() //<-- this will look like "table1 : printing" on the window list
);
- QMap<QString,QString> staticObjectArgs;
- staticObjectArgs["identifier"] = QString::number(item->identifier());
+ TQMap<TQString,TQString> staticObjectArgs;
+ staticObjectArgs["identifier"] = TQString::number(item->identifier());
if (action == PrintItem)
staticObjectArgs["action"] = "print";
else if (action == PreviewItem)
@@ -4496,16 +4496,16 @@ tristate KexiMainWindowImpl::copyItemToClipboardAsDataTable(KexiPart::Item* item
if (!item)
return false;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("destinationType", "clipboard");
- args.insert("itemId", QString::number(item->identifier()));
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ args.insert("itemId", TQString::number(item->identifier()));
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
const int result = dlg->exec();
delete dlg;
- return result == QDialog::Rejected ? cancelled : true;
+ return result == TQDialog::Rejected ? cancelled : true;
}
void KexiMainWindowImpl::slotEditPasteSpecialDataTable()
@@ -4513,9 +4513,9 @@ void KexiMainWindowImpl::slotEditPasteSpecialDataTable()
//! @todo allow data appending (it is not possible now)
if (userMode())
return;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("sourceType", "clipboard");
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", this, this, 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -4542,7 +4542,7 @@ void KexiMainWindowImpl::slotEditFind(bool next)
KexiSearchAndReplaceViewInterface* iface = d->currentViewSupportingSearchAndReplaceInterface();
if (!iface)
return;
- tristate res = iface->find(
+ tristate res = iface->tqfind(
d->findDialog()->valueToFind(), d->findDialog()->options(), next);
if (~res)
return;
@@ -4620,7 +4620,7 @@ void KexiMainWindowImpl::slotGetNewStuff()
#endif
}
-void KexiMainWindowImpl::highlightObject(const QCString& mime, const QCString& name)
+void KexiMainWindowImpl::highlightObject(const TQCString& mime, const TQCString& name)
{
slotViewNavigator();
if (!d->prj)