summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/kdevdesigner_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/kdevdesigner_part.cpp')
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp
index 56ea2d07..135751e8 100644
--- a/kdevdesigner/designer/kdevdesigner_part.cpp
+++ b/kdevdesigner/designer/kdevdesigner_part.cpp
@@ -29,26 +29,26 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtoolbar.h>
-#include <qmenubar.h>
-#include <qptrlist.h>
-#include <qstatusbar.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtoolbar.h>
+#include <tqmenubar.h>
+#include <tqptrlist.h>
+#include <tqstatusbar.h>
#include "mainwindow.h"
#include "designeraction.h"
#include "formwindow.h"
-KDevDesignerPart::KDevDesignerPart( QWidget *parentWidget, const char *// widgetName
+KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widgetName
,
- QObject *parent, const char *name, const QStringList &args )
+ TQObject *parent, const char *name, const TQStringList &args )
: KInterfaceDesigner::Designer(parent, name)
{
setInstance( KDevDesignerPartFactory::instance() );
m_widget = new MainWindow( this, true );
- m_widget->reparent(parentWidget, QPoint(0,0));
+ m_widget->reparent(parentWidget, TQPoint(0,0));
setupDesignerWindow();
setWidget(m_widget);
@@ -62,7 +62,7 @@ KDevDesignerPart::KDevDesignerPart( QWidget *parentWidget, const char *// widget
setReadWrite(true);
setModified(false);
- connect(m_widget, SIGNAL(formModified(bool )), this, SLOT(formModified(bool)));
+ connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool)));
}
void KDevDesignerPart::setupDesignerWindow()
@@ -74,61 +74,61 @@ void KDevDesignerPart::setupDesignerWindow()
m_widget->statusBar()->hide();
}
-static QIconSet createPartIconSet( const QString &name )
+static TQIconSet createPartIconSet( const TQString &name )
{
- QIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
- QString prefix = "designer_";
+ TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) );
+ TQString prefix = "designer_";
int right = name.length() - prefix.length();
ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ),
- QIconSet::Small, QIconSet::Disabled );
+ TQIconSet::Small, TQIconSet::Disabled );
return ic;
}
void KDevDesignerPart::setupActions( )
{
KAction *action;
- action = KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- action = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- action = KStdAction::close(this, SLOT(fileClose()), actionCollection());
+ action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
stateSync(action, m_widget->actionFileClose);
- action = KStdAction::save(this, SLOT(save()), actionCollection());
+ action = KStdAction::save(this, TQT_SLOT(save()), actionCollection());
stateSync(action, m_widget->actionFileSave);
- action = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+ action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
stateSync(action, m_widget->actionFileSaveAs);
- action = new KAction(i18n("Save Al&l"), 0, this, SLOT(fileSaveAs()), actionCollection(), "file_saveall");
+ action = new KAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall");
stateSync(action, m_widget->actionFileSaveAll);
- new KAction(i18n("Create &Template..."), 0, this, SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
+ new KAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
- action = KStdAction::undo(this, SLOT(editUndo()), actionCollection());
+ action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
stateSync(action, m_widget->actionEditUndo);
- action = KStdAction::redo(this, SLOT(editRedo()), actionCollection());
+ action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
stateSync(action, m_widget->actionEditRedo);
- action = KStdAction::cut(this, SLOT(editCut()), actionCollection());
+ action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
stateSync(action, m_widget->actionEditCut);
- action = KStdAction::copy(this, SLOT(editCopy()), actionCollection());
+ action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
stateSync(action, m_widget->actionEditCopy);
- action = KStdAction::paste(this, SLOT(editPaste()), actionCollection());
+ action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
stateSync(action, m_widget->actionEditPaste);
- action = new KAction(i18n("&Delete"), Key_Delete, this, SLOT(editDelete()), actionCollection(), "edit_delete");
+ action = new KAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete");
stateSync(action, m_widget->actionEditDelete);
- action = KStdAction::selectAll(this, SLOT(editSelectAll()), actionCollection());
+ action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
stateSync(action, m_widget->actionEditSelectAll);
- action = new KAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, SLOT(editAccels()), actionCollection(), "edit_accels");
+ action = new KAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels");
stateSync(action, m_widget->actionEditAccels);
- action = new KAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, SLOT(editFunctions()), actionCollection(), "edit_functions");
+ action = new KAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions");
stateSync(action, m_widget->actionEditFunctions);
- action = new KAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, SLOT(editConnections()), actionCollection(), "edit_connections");
+ action = new KAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections");
stateSync(action, m_widget->actionEditConnections);
- action = new KAction(i18n("&Form Settings..."), 0, this, SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
+ action = new KAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
stateSync(action, m_widget->actionEditFormSettings);
- action = new KAction(i18n("&Add File..."), 0, this, SLOT(projectAddFile()), actionCollection(), "project_addfile");
+ action = new KAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile");
stateSync(action, m_widget->actionProjectAddFile);
- action = new KAction(i18n("&Image Collection..."), 0, this, SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
+ action = new KAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
stateSync(action, m_widget->actionEditPixmapCollection);
- action = new KAction(i18n("&Database Connections..."), 0, this, SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
+ action = new KAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
stateSync(action, m_widget->actionEditDatabaseConnections);
- action = new KAction(i18n("&Designer Project Settings..."), 0, this, SLOT(projectSettings()), actionCollection(), "project_settings");
+ action = new KAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings");
stateSync(action, m_widget->actionEditProjectSettings);
KRadioAction *toggle;
@@ -141,34 +141,34 @@ void KDevDesignerPart::setupActions( )
setupToolsAction(toggle, m_widget->actionOrderTool);
toggle = new KRadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy");
setupToolsAction(toggle, m_widget->actionBuddyTool);
- new KAction(i18n("Configure Toolbox..."), 0, this, SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
- new KAction(i18n("Edit &Custom Widgets..."), 0, this, SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
+ new KAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
+ new KAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
- action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
+ action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
stateSync(action, m_widget->actionEditAdjustSize);
- action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, SLOT(layoutHLayout()), actionCollection(), "layout_h");
+ action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h");
stateSync(action, m_widget->actionEditHLayout);
- action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, SLOT(layoutVLayout()), actionCollection(), "layout_v");
+ action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v");
stateSync(action, m_widget->actionEditVLayout);
- action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
+ action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
stateSync(action, m_widget->actionEditGridLayout);
- action = new KAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
+ action = new KAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
stateSync(action, m_widget->actionEditSplitHorizontal);
- action = new KAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
+ action = new KAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
stateSync(action, m_widget->actionEditSplitVertical);
- action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, SLOT(layoutBreak()), actionCollection(), "layout_break");
+ action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break");
stateSync(action, m_widget->actionEditBreakLayout);
toggle = new KRadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer");
setupToolsAction(toggle, m_widget->actionInsertSpacer);
- action = new KAction(i18n("Preview &Form"), CTRL + Key_T, this, SLOT(windowPreview()), actionCollection(), "window_preview");
+ action = new KAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview");
stateSync(action, m_widget->actionPreview);
- action = new KAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, SLOT(windowNext()), actionCollection(), "window_next");
+ action = new KAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next");
stateSync(action, m_widget->actionWindowNext);
- action = new KAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, SLOT(windowPrev()), actionCollection(), "window_prev");
+ action = new KAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev");
stateSync(action, m_widget->actionWindowPrevious);
- action = KStdAction::preferences(this, SLOT(editPreferences()), actionCollection());
+ action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
action->setText(i18n("Configure &KDevDesigner..."));
stateSync(action, m_widget->actionEditPreferences);
}
@@ -209,7 +209,7 @@ bool KDevDesignerPart::saveFile()
return true;
}
-void KDevDesignerPart::stateSync( KAction * kaction, QAction * qaction )
+void KDevDesignerPart::stateSync( KAction * kaction, TQAction * qaction )
{
if (!qaction)
return;
@@ -217,18 +217,18 @@ void KDevDesignerPart::stateSync( KAction * kaction, QAction * qaction )
DesignerAction *ac = dynamic_cast<DesignerAction*>(qaction);
if (!ac)
return;
- connect(ac, SIGNAL(actionEnabled(bool )), kaction, SLOT(setEnabled(bool )));
+ connect(ac, TQT_SIGNAL(actionEnabled(bool )), kaction, TQT_SLOT(setEnabled(bool )));
}
-void KDevDesignerPart::setupToolsAction( KRadioAction * toggle, QAction * action )
+void KDevDesignerPart::setupToolsAction( KRadioAction * toggle, TQAction * action )
{
if (!action)
return;
toggle->setGroup("tools");
toggle->setExclusiveGroup("tools");
- connect(action, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
- connect(toggle, SIGNAL(toggled(bool)), this, SLOT(setToggleActionOn(bool)));
+ connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
+ connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool)));
toggle->setChecked(action->isOn());
m_actionMap[action] = toggle;
m_actionMap2[toggle] = action;
@@ -256,15 +256,15 @@ KDevDesignerPartFactory::~KDevDesignerPartFactory()
s_instance = 0L;
}
-KParts::Part* KDevDesignerPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )
+KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args )
{
// Create an instance of our Part
KDevDesignerPart* obj = new KDevDesignerPart( parentWidget, widgetName, parent, name, args );
// See if we are to be read-write or not
- if (QCString(classname) == "KParts::ReadOnlyPart")
+ if (TQCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
@@ -457,7 +457,7 @@ void KDevDesignerPart::windowPrev( )
m_widget->actionWindowPrevious->activate();
}
-void KDevDesignerPart::statusMessage( const QString & msg )
+void KDevDesignerPart::statusMessage( const TQString & msg )
{
emit setStatusBarText(msg);
}
@@ -466,7 +466,7 @@ void KDevDesignerPart::setToggleActionChecked( bool b)
{
if (!sender())
return;
- const QAction *action = dynamic_cast<const QAction*>(sender());
+ const TQAction *action = dynamic_cast<const TQAction*>(sender());
if (!action)
return;
if (b)
@@ -491,16 +491,16 @@ void KDevDesignerPart::setToggleActionOn( bool b )
const KRadioAction *action = dynamic_cast<const KRadioAction *>(sender());
if (!action)
return;
-// kdDebug() << (b?QString("toggle"):QString("untoggle")) << " action: " << action->text() << endl;
- QAction *qaction = m_actionMap2[action];
+// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl;
+ TQAction *qaction = m_actionMap2[action];
if (!qaction)
return;
- disconnect(qaction, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
+ disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
qaction->setOn(b);
- connect(qaction, SIGNAL(toggled(bool )), this, SLOT(setToggleActionChecked(bool )));
+ connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
}
-void KDevDesignerPart::openProject( const QString & // projectFile
+void KDevDesignerPart::openProject( const TQString & // projectFile
)
{
//TODO: implement
@@ -512,19 +512,19 @@ KInterfaceDesigner::DesignerType KDevDesignerPart::designerType( )
return KInterfaceDesigner::QtDesigner;
}
-void KDevDesignerPart::emitAddedFunction( const QString & form, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl;
emit addedFunction(designerType(), form, func);
}
-void KDevDesignerPart::emitRemovedFunction( const QString & form, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl;
emit removedFunction(designerType(), form, func);
}
-void KDevDesignerPart::emitEditedFunction( const QString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func )
+void KDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func )
{
kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << form
<< ", old function: " << oldFunc.function
@@ -534,7 +534,7 @@ void KDevDesignerPart::emitEditedFunction( const QString & form, KInterfaceDesig
emit editedFunction(designerType(), form, oldFunc, func);
}
-void KDevDesignerPart::emitEditFunction(const QString &formName, const QString &functionName)
+void KDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName)
{
kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << formName
<< ", function: " << functionName << endl;
@@ -547,12 +547,12 @@ void KDevDesignerPart::formModified(bool b)
setModified(b);
}
-void KDevDesignerPart::emitEditSource(const QString &formName)
+void KDevDesignerPart::emitEditSource(const TQString &formName)
{
emit editSource(designerType(), formName);
}
-void KDevDesignerPart::emitNewStatus(const QString &formName, int status)
+void KDevDesignerPart::emitNewStatus(const TQString &formName, int status)
{
emit newStatus(formName, status);
}