diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/formeditor/test/kfd_part.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor/test/kfd_part.cpp')
-rw-r--r-- | kexi/formeditor/test/kfd_part.cpp | 288 |
1 files changed, 144 insertions, 144 deletions
diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp index 48832be8..bc481594 100644 --- a/kexi/formeditor/test/kfd_part.cpp +++ b/kexi/formeditor/test/kfd_part.cpp @@ -17,13 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#include <qworkspace.h> -#include <qdockarea.h> -#include <qdockwindow.h> -#include <qhbox.h> -#include <qpainter.h> -#include <qevent.h> -#include <qobjectlist.h> +#include <tqworkspace.h> +#include <tqdockarea.h> +#include <tqdockwindow.h> +#include <tqhbox.h> +#include <tqpainter.h> +#include <tqevent.h> +#include <tqobjectlist.h> #include <kdeversion.h> #include <kaction.h> @@ -98,11 +98,11 @@ KFDFactory::~KFDFactory() } KParts::Part* -KFDFactory::createPartObject( QWidget *parentWidget, const char *, QObject *, const char *name, - const char *classname, const QStringList &args) +KFDFactory::createPartObject( TQWidget *tqparentWidget, const char *, TQObject *, const char *name, + const char *classname, const TQStringList &args) { bool readOnly = (classname == "KParts::ReadOnlyPart"); - KFormDesignerPart *part = new KFormDesignerPart(parentWidget, name, readOnly, args); + KFormDesignerPart *part = new KFormDesignerPart(tqparentWidget, name, readOnly, args); return part; } @@ -123,8 +123,8 @@ KFDFactory::aboutData() KFormDesigner::WidgetLibrary* KFormDesignerPart::static_formsLibrary = 0L; -KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool readOnly, const QStringList &args) -: KParts::ReadWritePart(parent, name), m_count(0) +KFormDesignerPart::KFormDesignerPart(TQWidget *tqparent, const char *name, bool readOnly, const TQStringList &args) +: KParts::ReadWritePart(tqparent, name), m_count(0) { setInstance(KFDFactory::instance()); instance()->iconLoader()->addAppDir("kexi"); @@ -138,28 +138,28 @@ KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool rea setUniqueFormMode(false); m_inShell = (!args.grep("shell").isEmpty()); - QHBox *container = new QHBox(parent, "kfd_container_widget"); + TQHBox *container = new TQHBox(tqparent, "kfd_container_widget"); - m_workspace = new QWorkspace(container, "kfd_workspace"); + m_workspace = new TQWorkspace(container, "kfd_workspace"); m_workspace->show(); - QStringList supportedFactoryGroups; + TQStringList supportedFactoryGroups; /* @todo add configuration for supported factory groups */ static_formsLibrary = KFormDesigner::FormManager::createWidgetLibrary( new KFDPart_FormManager(this, 0, "kfd_manager"), supportedFactoryGroups ); if(!readOnly) { - QDockArea *dockArea = new QDockArea(Vertical, QDockArea::Reverse, container, "kfd_part_dockarea"); + TQDockArea *dockArea = new TQDockAreaQt::Vertical, TQDockArea::Reverse, container, "kfd_part_dockarea"); - QDockWindow *dockTree = new QDockWindow(dockArea); + TQDockWindow *dockTree = new TQDockWindow(dockArea); KFormDesigner::ObjectTreeView *view = new KFormDesigner::ObjectTreeView(dockTree); dockTree->setWidget(view); dockTree->setCaption(i18n("Objects")); dockTree->setResizeEnabled(true); dockTree->setFixedExtentWidth(256); - QDockWindow *dockEditor = new QDockWindow(dockArea); + TQDockWindow *dockEditor = new TQDockWindow(dockArea); m_editor = new KoProperty::Editor(dockEditor); dockEditor->setWidget(m_editor); dockEditor->setCaption(i18n("Properties")); @@ -172,19 +172,19 @@ KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool rea setModified(false); // action stuff -// connect(m_manager, SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool))); -// connect(m_manager, SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*))); -// connect(m_manager, SIGNAL(noFormSelected()), SLOT(slotNoFormSelected())); - connect(KFormDesigner::FormManager::self(), SIGNAL(undoEnabled(bool, const QString&)), SLOT(setUndoEnabled(bool, const QString&))); - connect(KFormDesigner::FormManager::self(), SIGNAL(redoEnabled(bool, const QString&)), SLOT(setRedoEnabled(bool, const QString&))); - connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form*, bool)), this, SLOT(slotFormModified(KFormDesigner::Form*, bool))); +// connect(m_manager, TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool))); +// connect(m_manager, TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*))); +// connect(m_manager, TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected())); + connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), TQT_SLOT(setUndoEnabled(bool, const TQString&))); + connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), TQT_SLOT(setRedoEnabled(bool, const TQString&))); + connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form*, bool)), this, TQT_SLOT(slotFormModified(KFormDesigner::Form*, bool))); } container->show(); setWidget(container); - connect(m_workspace, SIGNAL(windowActivated(QWidget*)), KFormDesigner::FormManager::self(), SLOT(windowChanged(QWidget*))); - connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const QCString&)), - this, SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const QCString&))); + connect(m_workspace, TQT_SIGNAL(windowActivated(TQWidget*)), KFormDesigner::FormManager::self(), TQT_SLOT(windowChanged(TQWidget*))); + connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const TQCString&)), + this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const TQCString&))); // slotNoFormSelected(); KFormDesigner::FormManager::self()->emitNoFormSelected(); @@ -202,58 +202,58 @@ KFormDesigner::WidgetLibrary* KFormDesignerPart::formsLibrary() void KFormDesignerPart::setupActions() { - KStdAction::open(this, SLOT(open()), actionCollection()); - KStdAction::openNew(this, SLOT(createBlankForm()), actionCollection()); - KStdAction::save(this, SLOT(save()), actionCollection()); - KStdAction::saveAs(this, SLOT(saveAs()), actionCollection()); - KStdAction::cut(KFormDesigner::FormManager::self(), SLOT(cutWidget()), actionCollection()); - KStdAction::copy(KFormDesigner::FormManager::self(), SLOT(copyWidget()), actionCollection()); - KStdAction::paste(KFormDesigner::FormManager::self(), SLOT(pasteWidget()), actionCollection()); - KStdAction::undo(KFormDesigner::FormManager::self(), SLOT(undo()), actionCollection()); - KStdAction::redo(KFormDesigner::FormManager::self(), SLOT(redo()), actionCollection()); - KStdAction::selectAll(KFormDesigner::FormManager::self(), SLOT(selectAll()), actionCollection()); - new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()), actionCollection(), "clear_contents"); - new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(deleteWidget()), actionCollection(), "edit_delete"); - new KAction(i18n("Preview Form"), "filequickprint", CTRL+Key_T, this, SLOT(slotPreviewForm()), actionCollection(), "preview_form"); - new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editTabOrder()), actionCollection(), "taborder"); - new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection"); - new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editConnections()), actionCollection(), "form_connections"); - - KActionMenu *layoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "layout_menu"); - layoutMenu->insert(new KAction(i18n("&Horizontally"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHBox()), actionCollection(), "layout_hbox")); - layoutMenu->insert(new KAction(i18n("&Vertically"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVBox()), actionCollection(), "layout_vbox")); - layoutMenu->insert(new KAction(i18n("In &Grid"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutGrid()), actionCollection(), "layout_grid")); - layoutMenu->insert(new KAction(i18n("By &Rows"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHFlow()), actionCollection(), "layout_hflow")); - layoutMenu->insert(new KAction(i18n("By &Columns"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVFlow()), actionCollection(), "layout_vflow")); - layoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter")); - layoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter")); - new KAction(i18n("&Ungroup Widgets"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(breakLayout()), actionCollection(), "break_layout"); + KStdAction::open(this, TQT_SLOT(open()), actionCollection()); + KStdAction::openNew(this, TQT_SLOT(createBlankForm()), actionCollection()); + KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); + KStdAction::cut(KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()), actionCollection()); + KStdAction::copy(KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()), actionCollection()); + KStdAction::paste(KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()), actionCollection()); + KStdAction::undo(KFormDesigner::FormManager::self(), TQT_SLOT(undo()), actionCollection()); + KStdAction::redo(KFormDesigner::FormManager::self(), TQT_SLOT(redo()), actionCollection()); + KStdAction::selectAll(KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()), actionCollection()); + new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()), actionCollection(), "clear_contents"); + new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()), actionCollection(), "edit_delete"); + new KAction(i18n("Preview Form"), "filequickprint", CTRL+Key_T, this, TQT_SLOT(slotPreviewForm()), actionCollection(), "preview_form"); + new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()), actionCollection(), "taborder"); + new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection"); + new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editConnections()), actionCollection(), "form_connections"); + + KActionMenu *tqlayoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "tqlayout_menu"); + tqlayoutMenu->insert(new KAction(i18n("&Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox")); + tqlayoutMenu->insert(new KAction(i18n("&Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox")); + tqlayoutMenu->insert(new KAction(i18n("In &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid")); + tqlayoutMenu->insert(new KAction(i18n("By &Rows"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHFlow()), actionCollection(), "tqlayout_hflow")); + tqlayoutMenu->insert(new KAction(i18n("By &Columns"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVFlow()), actionCollection(), "tqlayout_vflow")); + tqlayoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter")); + tqlayoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter")); + new KAction(i18n("&Ungroup Widgets"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout"); /* - new KAction(i18n("Lay Out Widgets &Horizontally"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHBox()), actionCollection(), "layout_hbox"); - new KAction(i18n("Lay Out Widgets &Vertically"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVBox()), actionCollection(), "layout_vbox"); - new KAction(i18n("Lay Out Widgets in &Grid"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutGrid()), actionCollection(), "layout_grid"); - new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter"); - new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter"); - new KAction(i18n("&Break Layout"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(breakLayout()), actionCollection(), "break_layout"); + new KAction(i18n("Lay Out Widgets &Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox"); + new KAction(i18n("Lay Out Widgets &Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox"); + new KAction(i18n("Lay Out Widgets in &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid"); + new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter"); + new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter"); + new KAction(i18n("&Break Layout"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout"); */ - new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()), actionCollection(), "format_raise"); - new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()), actionCollection(), "format_lower"); + new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()), actionCollection(), "format_raise"); + new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()), actionCollection(), "format_lower"); KActionMenu *alignMenu = new KActionMenu(i18n("Align Widgets' Positions"), "aopos2grid", actionCollection(), "align_menu"); - alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") ); - alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") ); - alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") ); - alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") ); - alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") ); + alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") ); + alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") ); + alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") ); + alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") ); + alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") ); KActionMenu *sizeMenu = new KActionMenu(i18n("Adjust Widgets' Sizes"), "aogrid", actionCollection(), "adjust_size_menu"); - sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") ); - sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") ); - sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") ); - sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") ); - sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") ); - sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") ); + sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") ); + sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") ); + sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") ); + sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") ); + sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") ); + sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") ); if(m_inShell) setXMLFile("kformdesigner_part_shell.rc"); @@ -277,7 +277,7 @@ KFormDesignerPart::createBlankForm() && KFormDesigner::FormManager::self()->activeForm()->filename().isNull()) return; // active form is already a blank one - QString n = i18n("Form") + QString::number(++m_count); + TQString n = i18n("Form") + TQString::number(++m_count); Form *form = new Form(formsLibrary(), n.latin1(), false/*!designMode, we need to set it early enough*/); FormWidgetBase *w = new FormWidgetBase(this, m_workspace, n.latin1()); @@ -296,7 +296,7 @@ void KFormDesignerPart::open() { m_openingFile = true; - KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"), m_workspace->topLevelWidget()); + KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->tqtopLevelWidget()); if(!url.isEmpty()) ReadWritePart::openURL(url); m_openingFile = false; @@ -331,8 +331,8 @@ KFormDesignerPart::saveFile() void KFormDesignerPart::saveAs() { - KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"), - m_workspace->topLevelWidget()); + KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), + m_workspace->tqtopLevelWidget()); if(url.isEmpty()) return; else @@ -342,9 +342,9 @@ KFormDesignerPart::saveAs() bool KFormDesignerPart::closeForm(Form *form) { - int res = KMessageBox::questionYesNoCancel( m_workspace->topLevelWidget(), + int res = KMessageBox::questionYesNoCancel( m_workspace->tqtopLevelWidget(), i18n( "The form \"%1\" has been modified.\n" - "Do you want to save your changes or discard them?" ).arg( form->objectTree()->name() ), + "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ), i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() ); if(res == KMessageBox::Yes) @@ -356,8 +356,8 @@ KFormDesignerPart::closeForm(Form *form) bool KFormDesignerPart::closeForms() { - QWidgetList list = m_workspace->windowList(QWorkspace::CreationOrder); - for(QWidget *w = list.first(); w; w = list.next()) + TQWidgetList list = m_workspace->windowList(TQWorkspace::CreationOrder); + for(TQWidget *w = list.first(); w; w = list.next()) if(w->close() == false) return false; @@ -423,7 +423,7 @@ KFormDesignerPart::slotWidgetSelected(Form *form, bool multiple) ENABLE_ACTION("format_raise", true); ENABLE_ACTION("format_lower", true); - // If the widgets selected is a container, we enable layout actions + // If the widgets selected is a container, we enable tqlayout actions bool containerSelected = false; if(!multiple) { @@ -433,15 +433,15 @@ KFormDesignerPart::slotWidgetSelected(Form *form, bool multiple) } const bool twoSelected = form->selectedWidgets()->count()==2; // Layout actions - ENABLE_ACTION("layout_menu", multiple || containerSelected); - ENABLE_ACTION("layout_hbox", multiple || containerSelected); - ENABLE_ACTION("layout_vbox", multiple || containerSelected); - ENABLE_ACTION("layout_grid", multiple || containerSelected); - ENABLE_ACTION("layout_hsplitter", twoSelected); - ENABLE_ACTION("layout_vsplitter", twoSelected); + ENABLE_ACTION("tqlayout_menu", multiple || containerSelected); + ENABLE_ACTION("tqlayout_hbox", multiple || containerSelected); + ENABLE_ACTION("tqlayout_vbox", multiple || containerSelected); + ENABLE_ACTION("tqlayout_grid", multiple || containerSelected); + ENABLE_ACTION("tqlayout_hsplitter", twoSelected); + ENABLE_ACTION("tqlayout_vsplitter", twoSelected); KFormDesigner::Container *container = KFormDesigner::FormManager::self()->activeForm()->activeContainer(); - ENABLE_ACTION("break_layout", (container->layoutType() != KFormDesigner::Container::NoLayout)); + ENABLE_ACTION("break_layout", (container->tqlayoutType() != KFormDesigner::Container::NoLayout)); } void @@ -451,16 +451,16 @@ KFormDesignerPart::slotFormWidgetSelected(Form *form) enableFormActions(); const bool twoSelected = form->selectedWidgets()->count()==2; - const bool hasChildren = !form->objectTree()->children()->isEmpty(); + const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty(); // Layout actions - ENABLE_ACTION("layout_menu", hasChildren); - ENABLE_ACTION("layout_hbox", hasChildren); - ENABLE_ACTION("layout_vbox", hasChildren); - ENABLE_ACTION("layout_grid", hasChildren); - ENABLE_ACTION("layout_hsplitter", twoSelected); - ENABLE_ACTION("layout_vsplitter", twoSelected); - ENABLE_ACTION("break_layout", (form->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout)); + ENABLE_ACTION("tqlayout_menu", hasChildren); + ENABLE_ACTION("tqlayout_hbox", hasChildren); + ENABLE_ACTION("tqlayout_vbox", hasChildren); + ENABLE_ACTION("tqlayout_grid", hasChildren); + ENABLE_ACTION("tqlayout_hsplitter", twoSelected); + ENABLE_ACTION("tqlayout_vsplitter", twoSelected); + ENABLE_ACTION("break_layout", (form->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout)); } void @@ -523,18 +523,18 @@ KFormDesignerPart::disableWidgetActions() ENABLE_ACTION("format_raise", false); ENABLE_ACTION("format_lower", false); - ENABLE_ACTION("layout_menu", false); - ENABLE_ACTION("layout_hbox", false); - ENABLE_ACTION("layout_vbox", false); - ENABLE_ACTION("layout_grid", false); - ENABLE_ACTION("layout_hsplitter", false); - ENABLE_ACTION("layout_vsplitter", false); + ENABLE_ACTION("tqlayout_menu", false); + ENABLE_ACTION("tqlayout_hbox", false); + ENABLE_ACTION("tqlayout_vbox", false); + ENABLE_ACTION("tqlayout_grid", false); + ENABLE_ACTION("tqlayout_hsplitter", false); + ENABLE_ACTION("tqlayout_vsplitter", false); ENABLE_ACTION("break_layout", false); } #endif void -KFormDesignerPart::setUndoEnabled(bool enabled, const QString &text) +KFormDesignerPart::setUndoEnabled(bool enabled, const TQString &text) { KAction *undoAction = actionCollection()->action("edit_undo"); if(undoAction) @@ -545,7 +545,7 @@ KFormDesignerPart::setUndoEnabled(bool enabled, const QString &text) } void -KFormDesignerPart::setRedoEnabled(bool enabled, const QString &text) +KFormDesignerPart::setRedoEnabled(bool enabled, const TQString &text) { KAction *redoAction = actionCollection()->action("edit_redo"); if(redoAction) @@ -558,40 +558,40 @@ KFormDesignerPart::setRedoEnabled(bool enabled, const QString &text) ////// FormWidgetBase : helper widget to draw rects on top of widgets -//repaint all children widgets -static void repaintAll(QWidget *w) +//tqrepaint all tqchildren widgets +static void tqrepaintAll(TQWidget *w) { - w->repaint(); - QObjectList *list = w->queryList("QWidget"); - QObjectListIt it(*list); - for (QObject *obj; (obj=it.current()); ++it ) { - static_cast<QWidget*>(obj)->repaint(); + w->tqrepaint(); + TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectListIt it(*list); + for (TQObject *obj; (obj=it.current()); ++it ) { + static_cast<TQWidget*>(obj)->tqrepaint(); } delete list; } void -FormWidgetBase::drawRects(const QValueList<QRect> &list, int type) +FormWidgetBase::drawRects(const TQValueList<TQRect> &list, int type) { - QPainter p; + TQPainter p; p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); if (prev_rect.isValid()) { //redraw prev. selection's rectangle - p.drawPixmap( QPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, QRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4)); + p.drawPixmap( TQPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, TQRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4)); } - p.setBrush(QBrush::NoBrush); + p.setBrush(TQBrush::NoBrush); if(type == 1) // selection rect - p.setPen(QPen(white, 1, Qt::DotLine)); + p.setPen(TQPen(white, 1, TQt::DotLine)); else if(type == 2) // insert rect - p.setPen(QPen(white, 2)); + p.setPen(TQPen(white, 2)); p.setRasterOp(XorROP); - prev_rect = QRect(); - QValueList<QRect>::ConstIterator endIt = list.constEnd(); - for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) { + prev_rect = TQRect(); + TQValueList<TQRect>::ConstIterator endIt = list.constEnd(); + for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) { p.drawRect(*it); prev_rect = prev_rect.unite(*it); } @@ -602,9 +602,9 @@ FormWidgetBase::drawRects(const QValueList<QRect> &list, int type) } void -FormWidgetBase::drawRect(const QRect& r, int type) +FormWidgetBase::drawRect(const TQRect& r, int type) { - QValueList<QRect> l; + TQValueList<TQRect> l; l.append(r); drawRects(l, type); } @@ -612,58 +612,58 @@ FormWidgetBase::drawRect(const QRect& r, int type) void FormWidgetBase::initBuffer() { - repaintAll(this); + tqrepaintAll(this); buffer.resize( width(), height() ); - buffer = QPixmap::grabWindow( winId() ); - prev_rect = QRect(); + buffer = TQPixmap::grabWindow( winId() ); + prev_rect = TQRect(); } void FormWidgetBase::clearForm() { - QPainter p; + TQPainter p; p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); //redraw entire form surface - p.drawPixmap( QPoint(0,0), buffer, QRect(0,0,buffer.width(), buffer.height()) ); + p.drawPixmap( TQPoint(0,0), buffer, TQRect(0,0,buffer.width(), buffer.height()) ); if (!unclipped) clearWFlags( WPaintUnclipped ); p.end(); - repaintAll(this); + tqrepaintAll(this); } void -FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point) +FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point) { - QPoint fromPoint, toPoint; - if(from && from->parentWidget() && (from != this)) - fromPoint = from->parentWidget()->mapTo(this, from->pos()); - if(to && to->parentWidget() && (to != this)) - toPoint = to->parentWidget()->mapTo(this, to->pos()); + TQPoint fromPoint, toPoint; + if(from && from->tqparentWidget() && (from != this)) + fromPoint = from->tqparentWidget()->mapTo(this, from->pos()); + if(to && to->tqparentWidget() && (to != this)) + toPoint = to->tqparentWidget()->mapTo(this, to->pos()); - QPainter p; + TQPainter p; p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); if (prev_rect.isValid()) { //redraw prev. selection's rectangle - p.drawPixmap( QPoint(prev_rect.x(), prev_rect.y()), buffer, QRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height())); + p.drawPixmap( TQPoint(prev_rect.x(), prev_rect.y()), buffer, TQRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height())); } - p.setPen( QPen(Qt::red, 2) ); + p.setPen( TQPen(TQt::red, 2) ); if(to) { - QPixmap pix1 = QPixmap::grabWidget(from); - QPixmap pix2 = QPixmap::grabWidget(to); + TQPixmap pix1 = TQPixmap::grabWidget(from); + TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); + p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); @@ -680,7 +680,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5); if((to == this) || (from == this)) - prev_rect = QRect(0, 0, buffer.width(), buffer.height()); + prev_rect = TQRect(0, 0, buffer.width(), buffer.height()); else if(to) { prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) ); @@ -689,7 +689,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ; } else - prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10); + prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10); if (!unclipped) clearWFlags( WPaintUnclipped ); @@ -697,7 +697,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po } void -FormWidgetBase::closeEvent(QCloseEvent *ev) +FormWidgetBase::closeEvent(TQCloseEvent *ev) { Form *form = KFormDesigner::FormManager::self()->formForWidget(this); if(!form || !form->isModified() || !form->objectTree()) // == preview form @@ -713,7 +713,7 @@ FormWidgetBase::closeEvent(QCloseEvent *ev) } void KFormDesignerPart::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, - const QCString& propertyToSelect) + const TQCString& propertyToSelect) { if (m_editor) { if (propertyToSelect.isEmpty() && forceReload) |