Replaced various '#define' with actual strings - part 6

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 61cd5b18f0)
r14.1.x
Michele Calgaro 11 months ago
parent f12db681be
commit b9186693ad
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -27,7 +27,7 @@
AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl) AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
: AdaProjectOptionsDlgBase(parent,name, fl), m_part(part) : AdaProjectOptionsDlgBase(parent,name, fl), m_part(part)
{ {
config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this));
offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");

@ -177,7 +177,7 @@ void AutoDetailsView::initActions()
TDEActionCollection * actions = new TDEActionCollection( this ); TDEActionCollection * actions = new TDEActionCollection( this );
targetOptionsAction = new AutoToolsAction( i18n( "Options..." ), "configure", 0, targetOptionsAction = new AutoToolsAction( i18n( "Options..." ), "configure", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotTargetOptions() ), actions, this, TQT_SLOT( slotTargetOptions() ), actions,
"target options" ); "target options" );
targetOptionsAction->setWhatsThis(i18n("<b>Options</b><p>Target options dialog that " targetOptionsAction->setWhatsThis(i18n("<b>Options</b><p>Target options dialog that "
"provides settings for linker flags and lists " "provides settings for linker flags and lists "
@ -188,7 +188,7 @@ void AutoDetailsView::initActions()
TQToolTip::add( m_button1, tr2i18n( "Create New File..." ) ); TQToolTip::add( m_button1, tr2i18n( "Create New File..." ) );
addNewFileAction = new AutoToolsAction( i18n( "Create New File..." ), "document-new", 0, addNewFileAction = new AutoToolsAction( i18n( "Create New File..." ), "document-new", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddNewFile() ), actions, this, TQT_SLOT( slotAddNewFile() ), actions,
"add new file" ); "add new file" );
addNewFileAction->setWhatsThis(i18n("<b>Create new file</b><p>Creates a new file and " addNewFileAction->setWhatsThis(i18n("<b>Create new file</b><p>Creates a new file and "
"adds it to a currently selected target.")); "adds it to a currently selected target."));
@ -197,7 +197,7 @@ void AutoDetailsView::initActions()
TQToolTip::add( m_button2, tr2i18n( "Add Existing Files..." ) ); TQToolTip::add( m_button2, tr2i18n( "Add Existing Files..." ) );
addExistingFileAction = new AutoToolsAction( i18n( "Add Existing Files..." ), "fileimport", 0, addExistingFileAction = new AutoToolsAction( i18n( "Add Existing Files..." ), "fileimport", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddExistingFile() ), actions, this, TQT_SLOT( slotAddExistingFile() ), actions,
"add existing file" ); "add existing file" );
addExistingFileAction->setWhatsThis(i18n("<b>Add existing files</b><p>Adds existing " addExistingFileAction->setWhatsThis(i18n("<b>Add existing files</b><p>Adds existing "
"file to a currently selected target. Header " "file to a currently selected target. Header "
@ -208,12 +208,12 @@ void AutoDetailsView::initActions()
addExistingFileAction->setEnabled( false ); addExistingFileAction->setEnabled( false );
addIconAction = new TDEAction( i18n( "Add Icon..." ), "iconadd_tdevelop", 0, addIconAction = new TDEAction( i18n( "Add Icon..." ), "iconadd_tdevelop", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddIcon() ), actions, "add icon" ); this, TQT_SLOT( slotAddIcon() ), actions, "add icon" );
addIconAction->setWhatsThis(i18n("<b>Add icon</b><p>Adds an icon to a KDEICON target.")); addIconAction->setWhatsThis(i18n("<b>Add icon</b><p>Adds an icon to a KDEICON target."));
TQToolTip::add( m_button4, tr2i18n( "Build Target")); TQToolTip::add( m_button4, tr2i18n( "Build Target"));
buildTargetAction = new AutoToolsAction( i18n( "Build Target..." ), "launch", 0, buildTargetAction = new AutoToolsAction( i18n( "Build Target..." ), "launch", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotBuildTarget() ), actions, this, TQT_SLOT( slotBuildTarget() ), actions,
"build target" ); "build target" );
buildTargetAction->setWhatsThis(i18n("<b>Build target</b><p>Constructs a series of " buildTargetAction->setWhatsThis(i18n("<b>Build target</b><p>Constructs a series of "
"make commands to build the selected target. " "make commands to build the selected target. "
@ -223,7 +223,7 @@ void AutoDetailsView::initActions()
TQToolTip::add( m_button5, tr2i18n( "Execute Target...")); TQToolTip::add( m_button5, tr2i18n( "Execute Target..."));
executeTargetAction = new AutoToolsAction( i18n( "Execute Target..." ), "application-x-executable", 0, executeTargetAction = new AutoToolsAction( i18n( "Execute Target..." ), "application-x-executable", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotExecuteTarget() ), actions, this, TQT_SLOT( slotExecuteTarget() ), actions,
"execute target" ); "execute target" );
executeTargetAction->setWhatsThis(i18n("<b>Execute target</b><p>Executes the target " executeTargetAction->setWhatsThis(i18n("<b>Execute target</b><p>Executes the target "
"and tries to build in case it is not built.")); "and tries to build in case it is not built."));
@ -231,7 +231,7 @@ void AutoDetailsView::initActions()
executeTargetAction->setEnabled( false ); executeTargetAction->setEnabled( false );
setActiveTargetAction = new TDEAction( i18n( "Make Target Active" ), "", 0, setActiveTargetAction = new TDEAction( i18n( "Make Target Active" ), "", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotSetActiveTarget() ), actions, this, TQT_SLOT( slotSetActiveTarget() ), actions,
"set active target" ); "set active target" );
setActiveTargetAction->setWhatsThis(i18n("<b>Make target active</b><p>Marks the " setActiveTargetAction->setWhatsThis(i18n("<b>Make target active</b><p>Marks the "
"currently selected target as 'active'. New " "currently selected target as 'active'. New "
@ -241,7 +241,7 @@ void AutoDetailsView::initActions()
"command builds it.")); "command builds it."));
TQToolTip::add( m_button3, tr2i18n( "Remove")); TQToolTip::add( m_button3, tr2i18n( "Remove"));
removeDetailAction = new AutoToolsAction( i18n( "Remove" ), "edit-delete", 0, TQT_TQOBJECT(this), removeDetailAction = new AutoToolsAction( i18n( "Remove" ), "edit-delete", 0, this,
TQT_SLOT( slotRemoveDetail() ), actions, TQT_SLOT( slotRemoveDetail() ), actions,
"remove detail" ); "remove detail" );
removeDetailAction->setWhatsThis(i18n("<b>Remove</b><p>Shows a list of targets " removeDetailAction->setWhatsThis(i18n("<b>Remove</b><p>Shows a list of targets "

@ -173,7 +173,7 @@ void AutoSubprojectView::initActions()
TDEActionCollection * actions = new TDEActionCollection( this ); TDEActionCollection * actions = new TDEActionCollection( this );
subProjectOptionsAction = new AutoToolsAction( i18n( "Options..." ), "configure", 0, subProjectOptionsAction = new AutoToolsAction( i18n( "Options..." ), "configure", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotSubprojectOptions() ), actions, "subproject options" ); this, TQT_SLOT( slotSubprojectOptions() ), actions, "subproject options" );
subProjectOptionsAction->setWhatsThis(i18n("<qt><b>Options</b><p>Shows subproject options dialog " subProjectOptionsAction->setWhatsThis(i18n("<qt><b>Options</b><p>Shows subproject options dialog "
"that provides settings for compiler, include paths, " "that provides settings for compiler, include paths, "
"prefixes and build order.</qt>")); "prefixes and build order.</qt>"));
@ -181,24 +181,24 @@ void AutoSubprojectView::initActions()
TQToolTip::add( m_button1, tr2i18n( "Add new subproject...")); TQToolTip::add( m_button1, tr2i18n( "Add new subproject..."));
addSubprojectAction = new AutoToolsAction( i18n( "Add new subproject..." ), "folder-new", 0, addSubprojectAction = new AutoToolsAction( i18n( "Add new subproject..." ), "folder-new", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddSubproject() ), actions, "add subproject" ); this, TQT_SLOT( slotAddSubproject() ), actions, "add subproject" );
addSubprojectAction->setWhatsThis(i18n("<qt><b>Add new subproject</b><p>Creates a new " addSubprojectAction->setWhatsThis(i18n("<qt><b>Add new subproject</b><p>Creates a new "
"subproject in currently selected subproject.</qt>")); "subproject in currently selected subproject.</qt>"));
addSubprojectAction->plug( m_button1 ); addSubprojectAction->plug( m_button1 );
removeSubprojectAction = new TDEAction( i18n( "Remove Subproject..." ), "remove_subdir", 0, removeSubprojectAction = new TDEAction( i18n( "Remove Subproject..." ), "remove_subdir", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotRemoveSubproject() ), actions, "remove subproject" ); this, TQT_SLOT( slotRemoveSubproject() ), actions, "remove subproject" );
removeSubprojectAction->setWhatsThis(i18n("<qt><b>Remove subproject</b><p>Removes the subproject. Asks if the " removeSubprojectAction->setWhatsThis(i18n("<qt><b>Remove subproject</b><p>Removes the subproject. Asks if the "
"subproject should be also removed from disk. Only subprojects " "subproject should be also removed from disk. Only subprojects "
"which do not hold other subprojects can be removed.</qt>")); "which do not hold other subprojects can be removed.</qt>"));
addExistingSubprojectAction = new TDEAction( i18n( "Add Existing Subprojects..." ), "fileimport", 0, addExistingSubprojectAction = new TDEAction( i18n( "Add Existing Subprojects..." ), "fileimport", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddExistingSubproject() ), actions, "add existing subproject" ); this, TQT_SLOT( slotAddExistingSubproject() ), actions, "add existing subproject" );
addExistingSubprojectAction->setWhatsThis(i18n("<qt><b>Add existing subprojects</b><p>Imports existing " addExistingSubprojectAction->setWhatsThis(i18n("<qt><b>Add existing subprojects</b><p>Imports existing "
"subprojects containing Makefile.am.</qt>")); "subprojects containing Makefile.am.</qt>"));
TQToolTip::add( m_button2, tr2i18n( "Add Target...")); TQToolTip::add( m_button2, tr2i18n( "Add Target..."));
addTargetAction = new AutoToolsAction( i18n( "Add Target..." ), "targetnew_tdevelop", 0, addTargetAction = new AutoToolsAction( i18n( "Add Target..." ), "targetnew_tdevelop", 0,
TQT_TQOBJECT(this), TQT_SLOT( slotAddTarget() ), actions, "add target" ); this, TQT_SLOT( slotAddTarget() ), actions, "add target" );
addTargetAction->setWhatsThis(i18n( "<qt><b>Add target</b><p>Adds a new target to " addTargetAction->setWhatsThis(i18n( "<qt><b>Add target</b><p>Adds a new target to "
"the currently selected subproject. Target can be a " "the currently selected subproject. Target can be a "
"binary program, library, script, also a collection of " "binary program, library, script, also a collection of "
@ -206,19 +206,19 @@ void AutoSubprojectView::initActions()
addTargetAction->plug( m_button2 ); addTargetAction->plug( m_button2 );
TQToolTip::add( m_button3, tr2i18n( "Add Service...")); TQToolTip::add( m_button3, tr2i18n( "Add Service..."));
addServiceAction = new AutoToolsAction( i18n( "Add Service..." ), "servicenew_tdevelop", 0, TQT_TQOBJECT(this), addServiceAction = new AutoToolsAction( i18n( "Add Service..." ), "servicenew_tdevelop", 0, this,
TQT_SLOT( slotAddService() ), actions, "add service" ); TQT_SLOT( slotAddService() ), actions, "add service" );
addServiceAction->setWhatsThis(i18n("<qt><b>Add service</b><p>Creates a .desktop file describing the service.</qt>")); addServiceAction->setWhatsThis(i18n("<qt><b>Add service</b><p>Creates a .desktop file describing the service.</qt>"));
addServiceAction->plug( m_button3 ); addServiceAction->plug( m_button3 );
TQToolTip::add( m_button4, tr2i18n( "Add Application...")); TQToolTip::add( m_button4, tr2i18n( "Add Application..."));
addApplicationAction = new AutoToolsAction( i18n( "Add Application..." ), "window-new", 0, TQT_TQOBJECT(this), addApplicationAction = new AutoToolsAction( i18n( "Add Application..." ), "window-new", 0, this,
TQT_SLOT( slotAddApplication() ), actions, "add application" ); TQT_SLOT( slotAddApplication() ), actions, "add application" );
addApplicationAction->setWhatsThis(i18n("<qt><b>Add application</b><p>Creates an application .desktop file.</qt>")); addApplicationAction->setWhatsThis(i18n("<qt><b>Add application</b><p>Creates an application .desktop file.</qt>"));
addApplicationAction->plug( m_button4 ); addApplicationAction->plug( m_button4 );
TQToolTip::add( m_button5, tr2i18n( "Build")); TQToolTip::add( m_button5, tr2i18n( "Build"));
buildSubprojectAction = new AutoToolsAction( i18n( "Build" ), "launch", 0, TQT_TQOBJECT(this), buildSubprojectAction = new AutoToolsAction( i18n( "Build" ), "launch", 0, this,
TQT_SLOT( slotBuildSubproject() ), actions, "build subproject" ); TQT_SLOT( slotBuildSubproject() ), actions, "build subproject" );
buildSubprojectAction->setWhatsThis(i18n("<qt><b>Build</b><p>Runs <b>make</b> from the directory of " buildSubprojectAction->setWhatsThis(i18n("<qt><b>Build</b><p>Runs <b>make</b> from the directory of "
"the selected subproject.<br> Environment variables and " "the selected subproject.<br> Environment variables and "
@ -226,7 +226,7 @@ void AutoSubprojectView::initActions()
"dialog, <b>Make Options</b> tab.</qt>")); "dialog, <b>Make Options</b> tab.</qt>"));
buildSubprojectAction->plug( m_button5 ); buildSubprojectAction->plug( m_button5 );
forceReeditSubprojectAction = new TDEAction( i18n( "Force Reedit" ), 0, 0, TQT_TQOBJECT(this), forceReeditSubprojectAction = new TDEAction( i18n( "Force Reedit" ), 0, 0, this,
TQT_SLOT( slotForceReeditSubproject() ), actions, "force-reedit subproject" ); TQT_SLOT( slotForceReeditSubproject() ), actions, "force-reedit subproject" );
forceReeditSubprojectAction->setWhatsThis(i18n("<qt><b>Force Reedit</b><p>Runs <b>make force-reedit</b> " forceReeditSubprojectAction->setWhatsThis(i18n("<qt><b>Force Reedit</b><p>Runs <b>make force-reedit</b> "
"from the directory of the selected subproject.<br>This " "from the directory of the selected subproject.<br>This "
@ -238,21 +238,21 @@ void AutoSubprojectView::initActions()
if (!m_part->isKDE()) if (!m_part->isKDE())
forceReeditSubprojectAction->setEnabled(false); forceReeditSubprojectAction->setEnabled(false);
cleanSubprojectAction = new TDEAction( i18n( "Clean" ), 0, 0, TQT_TQOBJECT(this), cleanSubprojectAction = new TDEAction( i18n( "Clean" ), 0, 0, this,
TQT_SLOT( slotCleanSubproject() ), actions, "clean subproject" ); TQT_SLOT( slotCleanSubproject() ), actions, "clean subproject" );
cleanSubprojectAction->setWhatsThis(i18n("<qt><b>Clean</b><p>Runs <b>make clean</b> from the directory of " cleanSubprojectAction->setWhatsThis(i18n("<qt><b>Clean</b><p>Runs <b>make clean</b> from the directory of "
"the selected subproject.<br> Environment variables and make " "the selected subproject.<br> Environment variables and make "
"arguments can be specified in the project settings dialog, " "arguments can be specified in the project settings dialog, "
"<b>Make Options</b> tab.</qt>")); "<b>Make Options</b> tab.</qt>"));
installSubprojectAction = new TDEAction( i18n( "Install" ), 0, 0, TQT_TQOBJECT(this), installSubprojectAction = new TDEAction( i18n( "Install" ), 0, 0, this,
TQT_SLOT( slotInstallSubproject() ), actions, "install subproject" ); TQT_SLOT( slotInstallSubproject() ), actions, "install subproject" );
installSubprojectAction->setWhatsThis(i18n("<qt><b>Install</b><p>Runs <b>make install</b> from the directory " installSubprojectAction->setWhatsThis(i18n("<qt><b>Install</b><p>Runs <b>make install</b> from the directory "
"of the selected subproject.<br> Environment variables and " "of the selected subproject.<br> Environment variables and "
"make arguments can be specified in the project settings " "make arguments can be specified in the project settings "
"dialog, <b>Make Options</b> tab.</qt>")); "dialog, <b>Make Options</b> tab.</qt>"));
installSuSubprojectAction = new TDEAction( i18n( "Install (as root user)" ), 0, 0, installSuSubprojectAction = new TDEAction( i18n( "Install (as root user)" ), 0, 0,
TQT_TQOBJECT(this), TQT_SLOT( slotInstallSuSubproject() ), actions, "install subproject as root" ); this, TQT_SLOT( slotInstallSuSubproject() ), actions, "install subproject as root" );
installSuSubprojectAction->setWhatsThis(i18n("<qt><b>Install as root user</b><p>Runs <b>make install</b> " installSuSubprojectAction->setWhatsThis(i18n("<qt><b>Install as root user</b><p>Runs <b>make install</b> "
"command from the directory of the selected subproject " "command from the directory of the selected subproject "
"with root privileges.<br> It is executed via tdesu " "with root privileges.<br> It is executed via tdesu "
@ -260,12 +260,12 @@ void AutoSubprojectView::initActions()
"can be specified in the project settings dialog, " "can be specified in the project settings dialog, "
"<b>Make Options</b> tab.</qt>")); "<b>Make Options</b> tab.</qt>"));
expandAction = new TDEAction( i18n( "Expand Subtree" ), 0, 0, TQT_TQOBJECT(this), expandAction = new TDEAction( i18n( "Expand Subtree" ), 0, 0, this,
TQT_SLOT(slotExpandTree()), actions, "expandAction" ); TQT_SLOT(slotExpandTree()), actions, "expandAction" );
collapseAction = new TDEAction( i18n( "Collapse Subtree" ), 0, 0, TQT_TQOBJECT(this), collapseAction = new TDEAction( i18n( "Collapse Subtree" ), 0, 0, this,
TQT_SLOT(slotCollapseTree()), actions, "collapseAction" ); TQT_SLOT(slotCollapseTree()), actions, "collapseAction" );
otherAction = new TDEAction( i18n( "Manage Custom Commands..." ), 0, 0, TQT_TQOBJECT(this), otherAction = new TDEAction( i18n( "Manage Custom Commands..." ), 0, 0, this,
TQT_SLOT( slotManageBuildCommands() ), actions, "manage custom commands" ); TQT_SLOT( slotManageBuildCommands() ), actions, "manage custom commands" );
otherAction->setWhatsThis(i18n("<qt><b>Manage custom commands</b><p>Allows to create, edit and " otherAction->setWhatsThis(i18n("<qt><b>Manage custom commands</b><p>Allows to create, edit and "
"delete custom build commands which appears in the subproject " "delete custom build commands which appears in the subproject "

@ -72,7 +72,7 @@ public:
ConfigureOptionsWidget::ConfigureOptionsWidget(AutoProjectPart *part, TQWidget *parent, const char *name) ConfigureOptionsWidget::ConfigureOptionsWidget(AutoProjectPart *part, TQWidget *parent, const char *name)
: ConfigureOptionsWidgetBase(parent, name) : ConfigureOptionsWidgetBase(parent, name)
{ {
config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this));
m_part = part; m_part = part;
env_groupBox->setColumnLayout( 1, TQt::Vertical ); env_groupBox->setColumnLayout( 1, TQt::Vertical );
@ -405,7 +405,7 @@ KDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQStrin
if (prop.isValid()) if (prop.isValid())
args = TQStringList::split(" ", prop.toString()); args = TQStringList::split(" ", prop.toString());
TQObject *obj = factory->create(TQT_TQOBJECT(this), service->name().latin1(), TQObject *obj = factory->create(this, service->name().latin1(),
"KDevCompilerOptions", args); "KDevCompilerOptions", args);
if (!obj->inherits("KDevCompilerOptions")) { if (!obj->inherits("KDevCompilerOptions")) {

@ -72,7 +72,7 @@ static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec
TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent ) TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent )
{ {
KDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) ); KDevCompilerOptions * plugin = createCompilerOptions( compiler, parent );
if ( plugin ) if ( plugin )
{ {

@ -43,7 +43,7 @@ CustomMakeConfigWidget::CustomMakeConfigWidget(CustomProjectPart* part, const TQ
defaultTarget_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/make/defaulttarget")); defaultTarget_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/make/defaulttarget"));
makeoptions_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/make/makeoptions")); makeoptions_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/make/makeoptions"));
envs_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D[^\\s]*"), TQT_TQOBJECT(this))); envs_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D[^\\s]*"), this));
m_allEnvironments = m_part->allMakeEnvironments(); m_allEnvironments = m_part->allMakeEnvironments();
m_currentEnvironment = m_part->currentMakeEnvironment(); m_currentEnvironment = m_part->currentMakeEnvironment();
env_var_group->setColumnLayout( 1, TQt::Vertical ); env_var_group->setColumnLayout( 1, TQt::Vertical );

@ -38,7 +38,7 @@ CustomOtherConfigWidget::CustomOtherConfigWidget(CustomProjectPart* part, const
defaultTarget_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/other/defaulttarget")); defaultTarget_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/other/defaulttarget"));
makeoptions_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/other/otheroptions")); makeoptions_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/other/otheroptions"));
envs_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); envs_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this));
m_allEnvironments = m_part->allMakeEnvironments(); m_allEnvironments = m_part->allMakeEnvironments();
m_currentEnvironment = m_part->currentMakeEnvironment(); m_currentEnvironment = m_part->currentMakeEnvironment();
env_var_group->setColumnLayout( 1, TQt::Vertical ); env_var_group->setColumnLayout( 1, TQt::Vertical );

@ -29,7 +29,7 @@
PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl) PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
: PascalProjectOptionsDlgBase(parent,name, fl), m_part(part) : PascalProjectOptionsDlgBase(parent,name, fl), m_part(part)
{ {
config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this));
offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");

@ -106,7 +106,7 @@ ProjectConfigurationDlg::ProjectConfigurationDlg( TQListView *_prjList, TrollPro
prjWidget = _prjWidget; prjWidget = _prjWidget;
// m_projectConfiguration = conf; // m_projectConfiguration = conf;
m_targetLibraryVersion->setValidator( new TQRegExpValidator( m_targetLibraryVersion->setValidator( new TQRegExpValidator(
TQRegExp( "\\d+(\\.\\d+)?(\\.\\d+)" ), TQT_TQOBJECT(this) ) ); TQRegExp( "\\d+(\\.\\d+)?(\\.\\d+)" ), this ) );
customVariables->setSortColumn(0); customVariables->setSortColumn(0);
customVariables->setSortOrder(TQt::Ascending); customVariables->setSortOrder(TQt::Ascending);
mocdir_url->completionObject()->setMode(KURLCompletion::DirCompletion); mocdir_url->completionObject()->setMode(KURLCompletion::DirCompletion);

@ -92,7 +92,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
const TQIconSet icon(SmallIcon("compfile")); const TQIconSet icon(SmallIcon("compfile"));
action = new TDEAction( i18n("Compile &File"), "compfile", 0, action = new TDEAction( i18n("Compile &File"), "compfile", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildOpenFile()), m_widget, TQT_SLOT(slotBuildOpenFile()),
actionCollection(),"build_compilefile" ); actionCollection(),"build_compilefile" );
action->setToolTip(i18n("Compile file")); action->setToolTip(i18n("Compile file"));
action->setWhatsThis(i18n("<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>" action->setWhatsThis(i18n("<b>Compile file</b><p>Runs <b>make filename.o</b> command from the directory where 'filename' is the name of currently opened file.<br>"
@ -101,7 +101,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8, action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildProject()), m_widget, TQT_SLOT(slotBuildProject()),
actionCollection(), "build_build_project" ); actionCollection(), "build_build_project" );
action->setToolTip(i18n("Build project")); action->setToolTip(i18n("Build project"));
action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>" action->setWhatsThis(i18n("<b>Build project</b><p>Runs <b>make</b> from the project directory.<br>"
@ -109,7 +109,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Rebuild Project"),"rebuild" , 0, action = new TDEAction( i18n("&Rebuild Project"),"rebuild" , 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildProject()), m_widget, TQT_SLOT(slotRebuildProject()),
actionCollection(),"build_rebuild_project" ); actionCollection(),"build_rebuild_project" );
action->setToolTip(i18n("Rebuild project")); action->setToolTip(i18n("Rebuild project"));
action->setWhatsThis(i18n("<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>" action->setWhatsThis(i18n("<b>Rebuild project</b><p>Runs <b>make clean</b> and then <b>make</b> from the project directory.<br>"
@ -117,7 +117,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Project"),"install" , 0, action = new TDEAction( i18n("&Install Project"),"install" , 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallProject()), m_widget, TQT_SLOT(slotInstallProject()),
actionCollection(),"build_install_project" ); actionCollection(),"build_install_project" );
action->setToolTip(i18n("Install project")); action->setToolTip(i18n("Install project"));
action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> from the project directory.<br>" action->setWhatsThis(i18n("<b>Install project</b><p>Runs <b>make install</b> from the project directory.<br>"
@ -125,7 +125,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Clean Project"), 0, action = new TDEAction( i18n("&Clean Project"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanProject()), m_widget, TQT_SLOT(slotCleanProject()),
actionCollection(), "build_clean_project" ); actionCollection(), "build_clean_project" );
action->setToolTip(i18n("Clean project")); action->setToolTip(i18n("Clean project"));
action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>" action->setWhatsThis(i18n("<b>Clean project</b><p>Runs <b>make clean</b> command from the project directory.<br>"
@ -133,7 +133,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Dist-Clean Project"), 0, action = new TDEAction( i18n("&Dist-Clean Project"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanProject()), m_widget, TQT_SLOT(slotDistCleanProject()),
actionCollection(), "build_distclean_project" ); actionCollection(), "build_distclean_project" );
action->setToolTip(i18n("Dist-Clean project")); action->setToolTip(i18n("Dist-Clean project"));
action->setWhatsThis(i18n("<b>Dist-Clean project</b><p>Runs <b>make distclean</b> command from the " action->setWhatsThis(i18n("<b>Dist-Clean project</b><p>Runs <b>make distclean</b> command from the "
@ -147,7 +147,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently selected subproject if it is an application or the program specified in project settings, <b>Run Options</b> tab.")); action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the currently selected subproject if it is an application or the program specified in project settings, <b>Run Options</b> tab."));
action = new TDEAction( i18n("&Build Subproject"), "make_tdevelop", Key_F7, action = new TDEAction( i18n("&Build Subproject"), "make_tdevelop", Key_F7,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildTarget()), m_widget, TQT_SLOT(slotBuildTarget()),
actionCollection(), "build_build_target" ); actionCollection(), "build_build_target" );
action->setToolTip(i18n("Build subproject")); action->setToolTip(i18n("Build subproject"));
action->setWhatsThis(i18n("<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. " action->setWhatsThis(i18n("<b>Build subproject</b><p>Runs <b>make</b> from the current subproject directory. "
@ -156,7 +156,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Rebuild Subproject"), "rebuild", 0, action = new TDEAction( i18n("&Rebuild Subproject"), "rebuild", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildTarget()), m_widget, TQT_SLOT(slotRebuildTarget()),
actionCollection(),"build_rebuild_target" ); actionCollection(),"build_rebuild_target" );
action->setToolTip(i18n("Rebuild subproject")); action->setToolTip(i18n("Rebuild subproject"));
action->setWhatsThis(i18n("<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. " action->setWhatsThis(i18n("<b>Rebuild subproject</b><p>Runs <b>make clean</b> and then <b>make</b> from the current subproject directory. "
@ -165,7 +165,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Subproject"), "install", 0, action = new TDEAction( i18n("&Install Subproject"), "install", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallTarget()), m_widget, TQT_SLOT(slotInstallTarget()),
actionCollection(),"build_install_target" ); actionCollection(),"build_install_target" );
action->setToolTip(i18n("Install subproject")); action->setToolTip(i18n("Install subproject"));
action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> from the current subproject directory. " action->setWhatsThis(i18n("<b>Install subproject</b><p>Runs <b>make install</b> from the current subproject directory. "
@ -174,7 +174,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Clean Subproject"), 0, action = new TDEAction( i18n("&Clean Subproject"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanTarget()), m_widget, TQT_SLOT(slotCleanTarget()),
actionCollection(), "build_clean_target" ); actionCollection(), "build_clean_target" );
action->setToolTip(i18n("Clean subproject")); action->setToolTip(i18n("Clean subproject"));
action->setWhatsThis(i18n("<b>Clean subproject</b><p>Runs <b>make clean</b> from the current subproject directory. " action->setWhatsThis(i18n("<b>Clean subproject</b><p>Runs <b>make clean</b> from the current subproject directory. "
@ -183,7 +183,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab.")); "in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Dist-Clean Subproject"), 0, action = new TDEAction( i18n("&Dist-Clean Subproject"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanTarget()), m_widget, TQT_SLOT(slotDistCleanTarget()),
actionCollection(), "build_distclean_target" ); actionCollection(), "build_distclean_target" );
action->setToolTip(i18n("Dist-Clean subproject")); action->setToolTip(i18n("Dist-Clean subproject"));
action->setWhatsThis(i18n("<b>Dist-Clean subproject</b><p>Runs <b>make distclean</b> from the current" action->setWhatsThis(i18n("<b>Dist-Clean subproject</b><p>Runs <b>make distclean</b> from the current"

@ -1301,7 +1301,7 @@ void TrollProjectWidget::slotAddFiles()
case AddFilesDialog::Link: case AddFilesDialog::Link:
{ {
// Link selected files to current subproject folder // Link selected files to current subproject folder
TDEProcess *proc = new TDEProcess( TQT_TQOBJECT(this) ); TDEProcess *proc = new TDEProcess( this );
*proc << "ln"; *proc << "ln";
*proc << "-s"; *proc << "-s";
*proc << files[ i ]; *proc << files[ i ];
@ -1642,7 +1642,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem *
case AddFilesDialog::Link: case AddFilesDialog::Link:
{ {
// Link selected files to current subproject folder // Link selected files to current subproject folder
TDEProcess *proc = new TDEProcess( TQT_TQOBJECT(this) ); TDEProcess *proc = new TDEProcess( this );
*proc << "ln"; *proc << "ln";
*proc << "-s"; *proc << "-s";
*proc << files[ i ]; *proc << files[ i ];

@ -127,7 +127,7 @@ void QDesignerAction::remove()
{ {
if ( !widgetToInsert ) if ( !widgetToInsert )
return; return;
MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE ); MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE );
widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE );
} }
@ -221,7 +221,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
insertAnchor = 0; insertAnchor = 0;
afterAnchor = TRUE; afterAnchor = TRUE;
setAcceptDrops( TRUE ); setAcceptDrops( TRUE );
MetaDataBase::addEntry( TQT_TQOBJECT(this) ); MetaDataBase::addEntry( this );
lastIndicatorPos = TQPoint( -1, -1 ); lastIndicatorPos = TQPoint( -1, -1 );
indicator = new QDesignerIndicatorWidget( this ); indicator = new QDesignerIndicatorWidget( this );
indicator->hide(); indicator->hide();
@ -239,7 +239,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock )
setAcceptDrops( TRUE ); setAcceptDrops( TRUE );
indicator = new QDesignerIndicatorWidget( this ); indicator = new QDesignerIndicatorWidget( this );
indicator->hide(); indicator->hide();
MetaDataBase::addEntry( TQT_TQOBJECT(this) ); MetaDataBase::addEntry( this );
installEventFilter( this ); installEventFilter( this );
widgetInserting = FALSE; widgetInserting = FALSE;
findFormWindow(); findFormWindow();
@ -500,7 +500,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
drag->setPixmap( a->iconSet().pixmap() ); drag->setPixmap( a->iconSet().pixmap() );
if ( ::tqt_cast<QDesignerAction*>(a) ) { if ( ::tqt_cast<QDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), FALSE );
} }
if ( !drag->drag() ) { if ( !drag->drag() ) {
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ).

@ -139,7 +139,7 @@ void ActionEditor::deleteAction()
++it; ++it;
} }
if ( formWindow ) { if ( formWindow ) {
formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); formWindow->setActiveObject( formWindow->mainContainer() );
if ( formWindow->formFile() ) if ( formWindow->formFile() )
formWindow->formFile()->setModified( TRUE ); formWindow->formFile()->setModified( TRUE );
} }
@ -305,7 +305,7 @@ void ActionEditor::updateActionIcon( TQAction *a )
void ActionEditor::connectionsClicked() void ActionEditor::connectionsClicked()
{ {
ConnectionDialog dlg( formWindow->mainWindow() ); ConnectionDialog dlg( formWindow->mainWindow() );
dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) ); dlg.setDefault( currentAction, formWindow );
dlg.addConnection(); dlg.addConnection();
dlg.exec(); dlg.exec();
} }
@ -313,9 +313,9 @@ void ActionEditor::connectionsClicked()
void ActionEditor::removeConnections( TQObject *o ) void ActionEditor::removeConnections( TQObject *o )
{ {
TQValueList<MetaDataBase::Connection> conns = TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( TQT_TQOBJECT(formWindow), o ); MetaDataBase::connections( formWindow, o );
for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin(); for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 ) it2 != conns.end(); ++it2 )
MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot ); (*it2).receiver, (*it2).slot );
} }

@ -243,7 +243,7 @@ void ResizeCommand::execute()
{ {
widget->setGeometry( newRect ); widget->setGeometry( newRect );
formWindow()->updateSelection( widget ); formWindow()->updateSelection( widget );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget ); formWindow()->updateChildSelections( widget );
} }
@ -252,7 +252,7 @@ void ResizeCommand::unexecute()
{ {
widget->setGeometry( oldRect ); widget->setGeometry( oldRect );
formWindow()->updateSelection( widget ); formWindow()->updateSelection( widget );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget ); formWindow()->updateChildSelections( widget );
} }
@ -279,15 +279,15 @@ void InsertCommand::execute()
widget->show(); widget->show();
formWindow()->widgets()->insert( widget, widget ); formWindow()->widgets()->insert( widget, widget );
formWindow()->clearSelection( FALSE ); formWindow()->clearSelection( FALSE );
formWindow()->selectWidget( TQT_TQOBJECT(widget) ); formWindow()->selectWidget( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
} }
void InsertCommand::unexecute() void InsertCommand::unexecute()
{ {
widget->hide(); widget->hide();
formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); formWindow()->selectWidget( widget, FALSE );
formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
} }
@ -326,7 +326,7 @@ void MoveCommand::execute()
w->reparent( newParent, pos, TRUE ); w->reparent( newParent, pos, TRUE );
formWindow()->raiseSelection( w ); formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w ); formWindow()->raiseChildSelections( w );
formWindow()->widgetChanged( TQT_TQOBJECT(w) ); formWindow()->widgetChanged( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
} }
@ -334,7 +334,7 @@ void MoveCommand::execute()
} }
formWindow()->updateSelection( w ); formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w ); formWindow()->updateChildSelections( w );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); formWindow()->emitUpdateProperties( w );
} }
} }
@ -347,7 +347,7 @@ void MoveCommand::unexecute()
w->reparent( oldParent, pos, TRUE ); w->reparent( oldParent, pos, TRUE );
formWindow()->raiseSelection( w ); formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w ); formWindow()->raiseChildSelections( w );
formWindow()->widgetChanged( TQT_TQOBJECT(w) ); formWindow()->widgetChanged( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
} }
@ -355,7 +355,7 @@ void MoveCommand::unexecute()
} }
formWindow()->updateSelection( w ); formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w ); formWindow()->updateChildSelections( w );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); formWindow()->emitUpdateProperties( w );
} }
} }
@ -392,13 +392,13 @@ void DeleteCommand::execute()
TQString s = w->name(); TQString s = w->name();
s.prepend( "qt_dead_widget_" ); s.prepend( "qt_dead_widget_" );
w->setName( s ); w->setName( s );
formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); formWindow()->selectWidget( w, FALSE );
formWindow()->widgets()->remove( w ); formWindow()->widgets()->remove( w );
TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns ); connections.insert( w, conns );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) { for ( ; it != conns.end(); ++it ) {
MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, MetaDataBase::removeConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot ); (*it).signal, (*it).receiver, (*it).slot );
} }
} }
@ -418,11 +418,11 @@ void DeleteCommand::unexecute()
s.remove( 0, TQString( "qt_dead_widget_" ).length() ); s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s ); w->setName( s );
formWindow()->widgets()->insert( w, w ); formWindow()->widgets()->insert( w, w );
formWindow()->selectWidget( TQT_TQOBJECT(w) ); formWindow()->selectWidget( w );
TQValueList<MetaDataBase::Connection> conns = *connections.find( w ); TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) { for ( ; it != conns.end(); ++it ) {
MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, MetaDataBase::addConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot ); (*it).signal, (*it).receiver, (*it).slot );
} }
} }
@ -457,8 +457,8 @@ void SetPropertyCommand::execute()
if ( isResetCommand ) { if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, FALSE ); MetaDataBase::setPropertyChanged( widget, propName, FALSE );
if ( WidgetFactory::resetProperty( widget, propName ) ) { if ( WidgetFactory::resetProperty( widget, propName ) ) {
if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget )
formWindow()->selectWidget( TQT_TQOBJECT(widget) ); formWindow()->selectWidget( widget );
if ( editor->widget() != widget ) if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() ); editor->setWidget( widget, formWindow() );
editor->propertyList()->setCurrentProperty( propName ); editor->propertyList()->setCurrentProperty( propName );
@ -557,7 +557,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
return; return;
if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
formWindow()->selectWidget( TQT_TQOBJECT(widget) ); formWindow()->selectWidget( widget );
if ( editor->widget() != widget && select ) if ( editor->widget() != widget && select )
editor->setWidget( widget, formWindow() ); editor->setWidget( widget, formWindow() );
if ( select ) if ( select )
@ -587,14 +587,14 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
TQVariant val = v; TQVariant val = v;
if ( val.toString() == "default" ) if ( val.toString() == "default" )
val = -1; val = -1;
MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "layoutMargin" ) { } else if ( propName == "layoutMargin" ) {
TQVariant val = v; TQVariant val = v;
if ( val.toString() == "default" ) if ( val.toString() == "default" )
val = -1; val = -1;
MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "resizeMode" ) { } else if ( propName == "resizeMode" ) {
MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v ); MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) { } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) {
@ -634,9 +634,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
oldSerNum = v.toPixmap().serialNumber(); oldSerNum = v.toPixmap().serialNumber();
widget->setProperty( propName, v ); widget->setProperty( propName, v );
if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() )
MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), MetaDataBase::setPixmapKey( formWindow(),
widget->property( propName ).toPixmap().serialNumber(), widget->property( propName ).toPixmap().serialNumber(),
MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
if ( propName == "cursor" ) { if ( propName == "cursor" ) {
MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() );
} }
@ -666,7 +666,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
} }
editor->emitWidgetChanged(); editor->emitWidgetChanged();
formWindow()->killAccels( TQT_TQOBJECT(widget) ); formWindow()->killAccels( widget );
} }
// ------------------------------------------------------------ // ------------------------------------------------------------
@ -791,8 +791,8 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), lb( layoutBase ), widgets( wl ) : Command( n, fw ), lb( layoutBase ), widgets( wl )
{ {
WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); spacing = MetaDataBase::spacing( layoutBase );
margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); margin = MetaDataBase::margin( layoutBase );
layout = 0; layout = 0;
if ( lay == WidgetFactory::HBox ) if ( lay == WidgetFactory::HBox )
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
@ -820,8 +820,8 @@ void BreakLayoutCommand::unexecute()
formWindow()->clearSelection( FALSE ); formWindow()->clearSelection( FALSE );
layout->doLayout(); layout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin );
} }
// ------------------------------------------------------------ // ------------------------------------------------------------
@ -853,7 +853,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
tabPage->hide(); tabPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); MetaDataBase::addEntry( tabPage );
} }
void AddTabPageCommand::execute() void AddTabPageCommand::execute()
@ -862,7 +862,7 @@ void AddTabPageCommand::execute()
index = ( (QDesignerTabWidget*)tabWidget )->count(); index = ( (QDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage ); tabWidget->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute()
{ {
tabWidget->removePage( tabPage ); tabWidget->removePage( tabPage );
tabPage->hide(); tabPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -889,7 +889,7 @@ void MoveTabPageCommand::execute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -898,7 +898,7 @@ void MoveTabPageCommand::unexecute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -916,7 +916,7 @@ void DeleteTabPageCommand::execute()
{ {
tabWidget->removePage( tabPage ); tabWidget->removePage( tabPage );
tabPage->hide(); tabPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -924,7 +924,7 @@ void DeleteTabPageCommand::unexecute()
{ {
tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage ); tabWidget->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
} }
@ -937,13 +937,13 @@ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWin
stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
stackPage->hide(); stackPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); MetaDataBase::addEntry( stackPage );
} }
void AddWidgetStackPageCommand::execute() void AddWidgetStackPageCommand::execute()
{ {
index = widgetStack->insertPage( stackPage, index ); index = widgetStack->insertPage( stackPage, index );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
} }
@ -951,7 +951,7 @@ void AddWidgetStackPageCommand::unexecute()
{ {
index = widgetStack->removePage( stackPage ); index = widgetStack->removePage( stackPage );
stackPage->hide(); stackPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
} }
@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute()
{ {
index = widgetStack->removePage( stackPage ); index = widgetStack->removePage( stackPage );
stackPage->hide(); stackPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage );
} }
@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute()
{ {
index = widgetStack->insertPage( stackPage, index ); index = widgetStack->insertPage( stackPage, index );
widgetStack->raiseWidget( stackPage ); widgetStack->raiseWidget( stackPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage );
} }
@ -988,7 +988,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
page->hide(); page->hide();
index = i; index = i;
show = s; show = s;
MetaDataBase::addEntry( TQT_TQOBJECT(page) ); MetaDataBase::addEntry( page );
} }
void AddWizardPageCommand::execute() void AddWizardPageCommand::execute()
@ -998,7 +998,7 @@ void AddWizardPageCommand::execute()
wizard->insertPage( page, pageLabel, index ); wizard->insertPage( page, pageLabel, index );
if ( show ) if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute()
{ {
wizard->removePage( page ); wizard->removePage( page );
page->hide(); page->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1025,7 +1025,7 @@ void DeleteWizardPageCommand::execute()
pageLabel = wizard->title( page ); pageLabel = wizard->title( page );
wizard->removePage( page ); wizard->removePage( page );
page->hide(); page->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1034,7 +1034,7 @@ void DeleteWizardPageCommand::unexecute()
wizard->insertPage( page, pageLabel, index ); wizard->insertPage( page, pageLabel, index );
if ( show ) if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label ); wizard->setTitle( page, label );
label = oldLabel; label = oldLabel;
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
} }
void RenameWizardPageCommand::unexecute() void RenameWizardPageCommand::unexecute()
@ -1079,7 +1079,7 @@ void SwapWizardPagesCommand::execute()
wizard->removePage( page2 ); wizard->removePage( page2 );
wizard->insertPage( page1, page1Label, index2 ); wizard->insertPage( page1, page1Label, index2 );
wizard->insertPage( page2, page2Label, index1 ); wizard->insertPage( page2, page2Label, index1 );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1101,7 +1101,7 @@ void MoveWizardPageCommand::execute()
TQString pageLabel = wizard->title( page ); TQString pageLabel = wizard->title( page );
wizard->removePage( page ); wizard->removePage( page );
wizard->insertPage( page, pageLabel, index2 ); wizard->insertPage( page, pageLabel, index2 );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1112,7 +1112,7 @@ void MoveWizardPageCommand::unexecute()
TQString pageLabel = wizard->title( page ); TQString pageLabel = wizard->title( page );
wizard->removePage( page ); wizard->removePage( page );
wizard->insertPage( page, pageLabel, index1 ); wizard->insertPage( page, pageLabel, index1 );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
} }
@ -1126,7 +1126,7 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw
void AddConnectionCommand::execute() void AddConnectionCommand::execute()
{ {
MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot ); connection.signal, connection.receiver, connection.slot );
if ( connection.receiver == formWindow()->mainContainer() ) if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
@ -1134,7 +1134,7 @@ void AddConnectionCommand::execute()
void AddConnectionCommand::unexecute() void AddConnectionCommand::unexecute()
{ {
MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot ); connection.signal, connection.receiver, connection.slot );
if ( connection.receiver == formWindow()->mainContainer() ) if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
@ -1150,7 +1150,7 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind
void RemoveConnectionCommand::execute() void RemoveConnectionCommand::execute()
{ {
MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot ); connection.signal, connection.receiver, connection.slot );
if ( connection.receiver == formWindow()->mainContainer() ) if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
@ -1158,7 +1158,7 @@ void RemoveConnectionCommand::execute()
void RemoveConnectionCommand::unexecute() void RemoveConnectionCommand::unexecute()
{ {
MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot ); connection.signal, connection.receiver, connection.slot );
if ( connection.receiver == formWindow()->mainContainer() ) if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co
void AddFunctionCommand::execute() void AddFunctionCommand::execute()
{ {
MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged(); formWindow()->mainWindow()->functionsChanged();
//integration (add - execute) //integration (add - execute)
@ -1195,7 +1195,7 @@ void AddFunctionCommand::execute()
void AddFunctionCommand::unexecute() void AddFunctionCommand::unexecute()
{ {
MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged(); formWindow()->mainWindow()->functionsChanged();
//integration (add - unexecute) //integration (add - unexecute)
@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name,
void ChangeFunctionAttribCommand::execute() void ChangeFunctionAttribCommand::execute()
{ {
MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess,
newType, newLang, newReturnType ); newType, newLang, newReturnType );
formWindow()->formFile()->functionNameChanged( oldName, newName ); formWindow()->formFile()->functionNameChanged( oldName, newName );
formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType );
@ -1257,7 +1257,7 @@ void ChangeFunctionAttribCommand::execute()
void ChangeFunctionAttribCommand::unexecute() void ChangeFunctionAttribCommand::unexecute()
{ {
MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess,
oldType, oldLang, oldReturnType ); oldType, oldLang, oldReturnType );
formWindow()->formFile()->functionNameChanged( newName, oldName ); formWindow()->formFile()->functionNameChanged( newName, oldName );
formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType );
@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
returnType( rt ) returnType( rt )
{ {
if ( spec.isNull() ) { if ( spec.isNull() ) {
TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw );
for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) { for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).function ) == if ( MetaDataBase::normalizeFunction( (*it).function ) ==
MetaDataBase::normalizeFunction( function ) ) { MetaDataBase::normalizeFunction( function ) ) {
@ -1308,7 +1308,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
void RemoveFunctionCommand::execute() void RemoveFunctionCommand::execute()
{ {
MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged(); formWindow()->mainWindow()->functionsChanged();
//integration (remove - execute) //integration (remove - execute)
@ -1326,9 +1326,9 @@ void RemoveFunctionCommand::execute()
void RemoveFunctionCommand::unexecute() void RemoveFunctionCommand::unexecute()
{ {
if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) if ( MetaDataBase::hasFunction( formWindow(), function ) )
return; return;
MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged(); formWindow()->mainWindow()->functionsChanged();
//integration (remove - unexecute) //integration (remove - unexecute)
@ -1354,7 +1354,7 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co
void AddVariableCommand::execute() void AddVariableCommand::execute()
{ {
MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1362,7 +1362,7 @@ void AddVariableCommand::execute()
void AddVariableCommand::unexecute() void AddVariableCommand::unexecute()
{ {
MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1374,12 +1374,12 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw,
TQValueList<MetaDataBase::Variable> lst ) TQValueList<MetaDataBase::Variable> lst )
: Command( name, fw ), newList( lst ) : Command( name, fw ), newList( lst )
{ {
oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); oldList = MetaDataBase::variables( formWindow() );
} }
void SetVariablesCommand::execute() void SetVariablesCommand::execute()
{ {
MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); MetaDataBase::setVariables( formWindow(), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1387,7 +1387,7 @@ void SetVariablesCommand::execute()
void SetVariablesCommand::unexecute() void SetVariablesCommand::unexecute()
{ {
MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); MetaDataBase::setVariables( formWindow(), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1398,7 +1398,7 @@ void SetVariablesCommand::unexecute()
RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn )
: Command( name, fw ), varName( vn ) : Command( name, fw ), varName( vn )
{ {
TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) { for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).varName == varName ) { if ( (*it).varName == varName ) {
access = (*it).varAccess; access = (*it).varAccess;
@ -1409,7 +1409,7 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *
void RemoveVariableCommand::execute() void RemoveVariableCommand::execute()
{ {
MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1417,7 +1417,7 @@ void RemoveVariableCommand::execute()
void RemoveVariableCommand::unexecute() void RemoveVariableCommand::unexecute()
{ {
MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() ) if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE ); formWindow()->formFile()->setModified( TRUE );
@ -1510,7 +1510,7 @@ void PasteCommand::execute()
{ {
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show(); w->show();
formWindow()->selectWidget( TQT_TQOBJECT(w) ); formWindow()->selectWidget( w );
formWindow()->widgets()->insert( w, w ); formWindow()->widgets()->insert( w, w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
} }
@ -1520,7 +1520,7 @@ void PasteCommand::unexecute()
{ {
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide(); w->hide();
formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); formWindow()->selectWidget( w, FALSE );
formWindow()->widgets()->remove( w ); formWindow()->widgets()->remove( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
} }
@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
: Command( n, fw ), newText( txt ), mlined( mle ) : Command( n, fw ), newText( txt ), mlined( mle )
{ {
oldText = mlined->text(); oldText = mlined->text();
wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" );
} }
void PopulateMultiLineEditCommand::execute() void PopulateMultiLineEditCommand::execute()
{ {
mlined->setText( newText ); mlined->setText( newText );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); MetaDataBase::setPropertyChanged( mlined, "text", TRUE );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); formWindow()->emitUpdateProperties( mlined );
} }
void PopulateMultiLineEditCommand::unexecute() void PopulateMultiLineEditCommand::unexecute()
{ {
mlined->setText( oldText ); mlined->setText( oldText );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); MetaDataBase::setPropertyChanged( mlined, "text", wasChanged );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); formWindow()->emitUpdateProperties( mlined );
} }
// ------------------------------------------------------------ // ------------------------------------------------------------
@ -1788,7 +1788,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T
{ {
#ifndef TQT_NO_TABLE #ifndef TQT_NO_TABLE
int i = 0; int i = 0;
TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col; PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i ); col.text = table->horizontalHeader()->label( i );
@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute()
if ( !(*cit).field.isEmpty() ) if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field ); columnFields.insert( (*cit).text, (*cit).field );
} }
MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( newRows.count() ); table->setNumRows( newRows.count() );
i = 0; i = 0;
for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute()
if ( !(*cit).field.isEmpty() ) if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field ); columnFields.insert( (*cit).text, (*cit).field );
} }
MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( oldRows.count() ); table->setNumRows( oldRows.count() );
i = 0; i = 0;
for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute()
if ( !toolBar ) { if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow ); toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar"; TQString n = "Toolbar";
formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); formWindow()->unify( toolBar, n, TRUE );
toolBar->setName( n ); toolBar->setName( n );
mainWindow->addToolBar( toolBar, n ); mainWindow->addToolBar( toolBar, n );
} else { } else {
@ -2011,7 +2011,7 @@ void AddContainerPageCommand::execute()
wiface->insertPage( wClassName, container, pageLabel, index, page ); wiface->insertPage( wClassName, container, pageLabel, index, page );
MetaDataBase::addEntry( page ); MetaDataBase::addEntry( page );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
@ -2020,7 +2020,7 @@ void AddContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) ) if ( !wiface || !wiface->supportsPages( wClassName ) )
return; return;
wiface->removePage( wClassName, container, index ); wiface->removePage( wClassName, container, index );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
@ -2054,7 +2054,7 @@ void DeleteContainerPageCommand::execute()
return; return;
wiface->removePage( wClassName, container, index ); wiface->removePage( wClassName, container, index );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
@ -2066,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute()
index = wiface->count( wClassName, container ); index = wiface->count( wClassName, container );
wiface->insertPage( wClassName, container, pageLabel, index, page ); wiface->insertPage( wClassName, container, pageLabel, index, page );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
@ -2099,7 +2099,7 @@ void RenameContainerPageCommand::execute()
if ( !wiface || !wiface->supportsPages( wClassName ) ) if ( !wiface || !wiface->supportsPages( wClassName ) )
return; return;
wiface->renamePage( wClassName, container, index, newLabel ); wiface->renamePage( wClassName, container, index, newLabel );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
@ -2108,7 +2108,7 @@ void RenameContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) ) if ( !wiface || !wiface->supportsPages( wClassName ) )
return; return;
wiface->renamePage( wClassName, container, index, oldLabel ); wiface->renamePage( wClassName, container, index, oldLabel );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view // #### show and update pages in object hierarchy view
} }
#endif // TQT_CONTAINER_CUSTOM_WIDGETS #endif // TQT_CONTAINER_CUSTOM_WIDGETS
@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute()
PopupMenuEditor *popup = item->menu(); PopupMenuEditor *popup = item->menu();
item->setMenuText( newName ); item->setMenuText( newName );
TQString legal = makeLegal( newName ); TQString legal = makeLegal( newName );
formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); formWindow()->unify( popup, legal, TRUE );
popup->setName( legal ); popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
} }
@ -2429,14 +2429,14 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
toolBoxPage->hide(); toolBoxPage->hide();
index = -1; index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); MetaDataBase::addEntry( toolBoxPage );
} }
void AddToolBoxPageCommand::execute() void AddToolBoxPageCommand::execute()
{ {
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel);
toolBox->setCurrentIndex( index ); toolBox->setCurrentIndex( index );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
} }
@ -2444,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute()
{ {
toolBox->removeItem( toolBoxPage ); toolBox->removeItem( toolBoxPage );
toolBoxPage->hide(); toolBoxPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
} }
@ -2462,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute()
{ {
toolBox->removeItem( toolBoxPage ); toolBox->removeItem( toolBoxPage );
toolBoxPage->hide(); toolBoxPage->hide();
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
} }
@ -2470,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute()
{ {
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel );
toolBox->setCurrentIndex( index ); toolBox->setCurrentIndex( index );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild(); formWindow()->mainWindow()->objectHierarchy()->rebuild();
} }

@ -81,7 +81,7 @@ void ConnectionDialog::init()
} }
TQValueList<MetaDataBase::Connection> conns = TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); MetaDataBase::connections( MainWindow::self->formWindow() );
for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) { it != conns.end(); ++it ) {
ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver,
@ -147,7 +147,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject
connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ),
this, TQT_SLOT( updateEditSlotsButton() ) ); this, TQT_SLOT( updateEditSlotsButton() ) );
ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row ); ConnectionContainer *c = new ConnectionContainer( this, se, si, re, sl, row );
connections.append( c ); connections.append( c );
connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ), connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ),
this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) ); this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) );
@ -188,7 +188,7 @@ void ConnectionDialog::updateConnectionState( ConnectionContainer *c )
void ConnectionDialog::okClicked() void ConnectionDialog::okClicked()
{ {
TQValueList<MetaDataBase::Connection> oldConnections = TQValueList<MetaDataBase::Connection> oldConnections =
MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); MetaDataBase::connections( MainWindow::self->formWindow() );
TQPtrList<Command> newConnectionCmds; TQPtrList<Command> newConnectionCmds;
TQPtrList<Command> oldConnectionCmds; TQPtrList<Command> oldConnectionCmds;
for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) {
@ -215,7 +215,7 @@ void ConnectionDialog::okClicked()
TQValueList<MetaDataBase::Connection> conns = TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); MetaDataBase::connections( MainWindow::self->formWindow() );
for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) { it != conns.end(); ++it ) {
RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot " RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot "

@ -354,7 +354,7 @@ void SignalItem::senderChanged( TQObject *sender )
} }
if ( sender == formWindow->mainContainer() ) { if ( sender == formWindow->mainContainer() ) {
TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); TQStringList extra = MetaDataBase::signalList( formWindow );
if ( !extra.isEmpty() ) if ( !extra.isEmpty() )
lst += extra; lst += extra;
} }
@ -417,7 +417,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const
return TRUE; return TRUE;
} }
if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { if ( !formWindow->isMainContainer( lastReceiver ) ) {
if ( qstrcmp( slot, "close()" ) == 0 ) if ( qstrcmp( slot, "close()" ) == 0 )
return TRUE; return TRUE;
} }
@ -448,7 +448,7 @@ void SlotItem::updateSlotList()
// accept only public slots. For the form window, also accept protected slots // accept only public slots. For the form window, also accept protected slots
const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE );
if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) || if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) ||
(formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) && (formWindow->isMainContainer( lastReceiver ) &&
lastReceiver->metaObject()->slot(i, TRUE)->access == lastReceiver->metaObject()->slot(i, TRUE)->access ==
TQMetaData::Protected) ) && TQMetaData::Protected) ) &&
!ignoreSlot( md->name ) && !ignoreSlot( md->name ) &&
@ -460,8 +460,8 @@ void SlotItem::updateSlotList()
LanguageInterface *iface = LanguageInterface *iface =
MetaDataBase::languageInterface( formWindow->project()->language() ); MetaDataBase::languageInterface( formWindow->project()->language() );
if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) { if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) {
if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { if ( formWindow->isMainContainer( lastReceiver ) ) {
TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow );
if ( !moreSlots.isEmpty() ) { if ( !moreSlots.isEmpty() ) {
for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin(); for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin();
it != moreSlots.end(); ++it ) { it != moreSlots.end(); ++it ) {

@ -73,10 +73,10 @@ CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
sizeVer->setEnabled( FALSE ); sizeVer->setEnabled( FALSE );
checkContainer->setEnabled( FALSE ); checkContainer->setEnabled( FALSE );
localGlobalCombo->setEnabled( FALSE ); localGlobalCombo->setEnabled( FALSE );
editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) ); editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) );
editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) );
editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) );
editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) ); editProperty->setValidator( new AsciiValidator( editSignal ) );
editSignal->setEnabled( FALSE ); editSignal->setEnabled( FALSE );
buttonRemoveSignal->setEnabled( FALSE ); buttonRemoveSignal->setEnabled( FALSE );

@ -61,7 +61,7 @@ void DatabaseConnectionEditor::accept()
void DatabaseConnectionEditor::init() void DatabaseConnectionEditor::init()
{ {
connectionWidget->editName->setEnabled( FALSE ); connectionWidget->editName->setEnabled( FALSE );
connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
connectionWidget->editName->setText( conn->name() ); connectionWidget->editName->setText( conn->name() );
connectionWidget->comboDriver->setEnabled( FALSE ); connectionWidget->comboDriver->setEnabled( FALSE );
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );

@ -63,7 +63,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa
listConnections->insertItem( conn->name() ); listConnections->insertItem( conn->name() );
connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() );
#endif #endif
connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
enableAll( FALSE ); enableAll( FALSE );
} }

@ -146,7 +146,7 @@ bool DesignerInterfaceImpl::singleProjectMode() const
void DesignerInterfaceImpl::showError( TQWidget *widget, void DesignerInterfaceImpl::showError( TQWidget *widget,
int line, const TQString &message ) int line, const TQString &message )
{ {
mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message ); mainWindow->showErrorMessage( widget, line, message );
} }
void DesignerInterfaceImpl::runFinished() void DesignerInterfaceImpl::runFinished()
@ -156,12 +156,12 @@ void DesignerInterfaceImpl::runFinished()
void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line ) void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line )
{ {
mainWindow->showStackFrame( TQT_TQOBJECT(w), line ); mainWindow->showStackFrame( w, line );
} }
void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line ) void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line )
{ {
mainWindow->showDebugStep( TQT_TQOBJECT(w), line ); mainWindow->showDebugStep( w, line );
} }
void DesignerInterfaceImpl::runProjectPrecondition() void DesignerInterfaceImpl::runProjectPrecondition()
@ -335,7 +335,7 @@ void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps
for ( TQPtrListIterator<FormFile> forms = project->formFiles(); for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) { forms.current(); ++forms ) {
if ( forms.current()->formWindow() ) if ( forms.current()->formWindow() )
bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) ); bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) );
} }
} }
@ -360,7 +360,7 @@ void DesignerProjectImpl::clearAllBreakpoints() const
for ( TQPtrListIterator<FormFile> forms = project->formFiles(); for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) { forms.current(); ++forms ) {
if ( forms.current()->formWindow() ) if ( forms.current()->formWindow() )
MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty ); MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty );
MainWindow::self->resetBreakPoints(); MainWindow::self->resetBreakPoints();
} }
} }
@ -535,7 +535,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString
pixCollection->addPixmap( pix, force ); pixCollection->addPixmap( pix, force );
FormWindow *fw = MainWindow::self->formWindow(); FormWindow *fw = MainWindow::self->formWindow();
if ( fw ) if ( fw )
MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name ); MetaDataBase::setPixmapKey( fw, p.serialNumber(), name );
} }
TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const
@ -586,7 +586,7 @@ TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *paren
{ {
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
formWindow->insertWidget( w, TRUE ); formWindow->insertWidget( w, TRUE );
formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) ); formWindow->killAccels( formWindow->mainContainer() );
return w; return w;
} }
@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout()
void DesignerFormWindowImpl::selectWidget( TQWidget * w ) void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{ {
formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); formWindow->selectWidget( w, TRUE );
} }
void DesignerFormWindowImpl::selectAll() void DesignerFormWindowImpl::selectAll()
@ -755,14 +755,14 @@ void DesignerFormWindowImpl::preview() const
void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot )
{ {
MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot ); MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot );
} }
void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier, void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier,
const TQString &access, const TQString &type, const TQString &access, const TQString &type,
const TQString &language, const TQString &returnType ) const TQString &language, const TQString &returnType )
{ {
MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType ); MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType );
formWindow->mainWindow()->functionsChanged(); formWindow->mainWindow()->functionsChanged();
} }
@ -804,7 +804,7 @@ void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString,
TQStringList DesignerFormWindowImpl::implementationIncludes() const TQStringList DesignerFormWindowImpl::implementationIncludes() const
{ {
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
TQStringList lst; TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it; MetaDataBase::Include inc = *it;
@ -825,7 +825,7 @@ TQStringList DesignerFormWindowImpl::implementationIncludes() const
TQStringList DesignerFormWindowImpl::declarationIncludes() const TQStringList DesignerFormWindowImpl::declarationIncludes() const
{ {
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
TQStringList lst; TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it; MetaDataBase::Include inc = *it;
@ -846,7 +846,7 @@ TQStringList DesignerFormWindowImpl::declarationIncludes() const
void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst ) void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst )
{ {
TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
TQValueList<MetaDataBase::Include> includes; TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it; MetaDataBase::Include inc = *it;
@ -882,13 +882,13 @@ void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst
includes << inc; includes << inc;
} }
} }
MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); MetaDataBase::setIncludes( formWindow, includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
} }
void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
{ {
TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
TQValueList<MetaDataBase::Include> includes; TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it; MetaDataBase::Include inc = *it;
@ -924,29 +924,29 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
includes << inc; includes << inc;
} }
} }
MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); MetaDataBase::setIncludes( formWindow, includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
} }
TQStringList DesignerFormWindowImpl::forwardDeclarations() const TQStringList DesignerFormWindowImpl::forwardDeclarations() const
{ {
return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) ); return MetaDataBase::forwards( formWindow );
} }
void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst ) void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst )
{ {
MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst ); MetaDataBase::setForwards( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
} }
TQStringList DesignerFormWindowImpl::signalList() const TQStringList DesignerFormWindowImpl::signalList() const
{ {
return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); return MetaDataBase::signalList( formWindow );
} }
void DesignerFormWindowImpl::setSignalList( const TQStringList &lst ) void DesignerFormWindowImpl::setSignalList( const TQStringList &lst )
{ {
MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst ); MetaDataBase::setSignalList( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
} }
@ -963,16 +963,16 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
TQString n = name; TQString n = name;
formWindow->unify( TQT_TQOBJECT(popup), n, TRUE ); formWindow->unify( popup, n, TRUE );
popup->setName( n ); popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb ) { if ( !mb ) {
mb = new MenuBarEditor( formWindow, mw ); mb = new MenuBarEditor( formWindow, mw );
mb->setName( "MenuBar" ); mb->setName( "MenuBar" );
MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); MetaDataBase::addEntry( mb );
} }
mb->insertItem( text, popup ); mb->insertItem( text, popup );
MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); MetaDataBase::addEntry( popup );
} }
void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
@ -1009,7 +1009,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new QDesignerToolBar( mw ); TQToolBar *tb = new QDesignerToolBar( mw );
TQString n = name; TQString n = name;
formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); formWindow->unify( tb, n, TRUE );
tb->setName( n ); tb->setName( n );
mw->addToolBar( tb, text ); mw->addToolBar( tb, text );
} }

@ -57,7 +57,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
id = 0; id = 0;
functList.clear(); functList.clear();
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw );
for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
TQListViewItem *i = new TQListViewItem( functionListView ); TQListViewItem *i = new TQListViewItem( functionListView );
@ -86,7 +86,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
id++; id++;
if ( (*it).type == "slot" ) { if ( (*it).type == "slot" ) {
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).function ).latin1() ) )
i->setText( 5, i18n( "Yes" ) ); i->setText( 5, i18n( "Yes" ) );
else else
i->setText( 5, i18n( "No" ) ); i->setText( 5, i18n( "No" ) );
@ -96,7 +96,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
} }
boxProperties->setEnabled( FALSE ); boxProperties->setEnabled( FALSE );
functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); functionName->setValidator( new AsciiValidator( TRUE, functionName ) );
if ( functionListView->firstChild() ) if ( functionListView->firstChild() )
functionListView->setCurrentItem( functionListView->firstChild() ); functionListView->setCurrentItem( functionListView->firstChild() );
@ -131,7 +131,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
void EditFunctions::okClicked() void EditFunctions::okClicked()
{ {
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() );
TQPtrList<Command> commands; TQPtrList<Command> commands;
TQValueList<MetaDataBase::Function>::Iterator fit; TQValueList<MetaDataBase::Function>::Iterator fit;
@ -291,7 +291,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
if ( i->text( 4 ) == "slot" ) { if ( i->text( 4 ) == "slot" ) {
i->setText( 0, "newSlot()" ); i->setText( 0, "newSlot()" );
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) if ( MetaDataBase::isSlotUsed( formWindow, "newSlot()" ) )
i->setText( 5, i18n( "Yes" ) ); i->setText( 5, i18n( "Yes" ) );
else else
i->setText( 5, i18n( "No" ) ); i->setText( 5, i18n( "No" ) );
@ -398,7 +398,7 @@ void EditFunctions::currentTextChanged( const TQString &txt )
functionListView->currentItem()->setText( 0, txt ); functionListView->currentItem()->setText( 0, txt );
if ( functionListView->currentItem()->text( 4 ) == "slot" ) { if ( functionListView->currentItem()->text( 4 ) == "slot" ) {
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) )
functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); functionListView->currentItem()->setText( 5, i18n( "Yes" ) );
else else
functionListView->currentItem()->setText( 5, i18n( "No" ) ); functionListView->currentItem()->setText( 5, i18n( "No" ) );
@ -441,7 +441,7 @@ void EditFunctions::currentTypeChanged( const TQString &type )
lastType = type; lastType = type;
functionListView->currentItem()->setText( 4, type ); functionListView->currentItem()->setText( 4, type );
if ( type == "slot" ) { if ( type == "slot" ) {
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), if ( MetaDataBase::isSlotUsed( formWindow,
MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) )
functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); functionListView->currentItem()->setText( 5, i18n( "Yes" ) );
else else
@ -515,7 +515,7 @@ void EditFunctions::displaySlots( bool justSlots )
i->setText( 4, (*it).type ); i->setText( 4, (*it).type );
if ( (*it).type == "slot" ) { if ( (*it).type == "slot" ) {
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) )
i->setText( 5, i18n( "Yes" ) ); i->setText( 5, i18n( "Yes" ) );
else else
i->setText( 5, i18n( "No" ) ); i->setText( 5, i18n( "No" ) );

@ -83,7 +83,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name
FormFile::~FormFile() FormFile::~FormFile()
{ {
pro->removeFormFile( this ); pro->removeFormFile( this );
if ( TQT_TQOBJECT(formWindow()) ) if ( formWindow() )
formWindow()->setFormFile( 0 ); formWindow()->setFormFile( 0 );
} }
@ -170,7 +170,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
if ( ed ) if ( ed )
ed->save(); ed->save();
if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { if ( formWindow() && isModified( WFormWindow ) ) {
if ( withMsgBox ) { if ( withMsgBox ) {
if ( !formWindow()->checkCustomWidgets() ) if ( !formWindow()->checkCustomWidgets() )
return FALSE; return FALSE;
@ -221,7 +221,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
} }
} }
if ( TQT_TQOBJECT(formWindow()) ) { if ( formWindow() ) {
Resource resource( MainWindow::self ); Resource resource( MainWindow::self );
resource.setWidget( formWindow() ); resource.setWidget( formWindow() );
bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow );
@ -247,7 +247,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
bool FormFile::saveAs( bool ignoreModified ) bool FormFile::saveAs( bool ignoreModified )
{ {
TQString f = pro->makeAbsolute( fileName() ); TQString f = pro->makeAbsolute( fileName() );
if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { if ( fileNameTemp && formWindow() ) {
f = TQString( formWindow()->name() ).lower(); f = TQString( formWindow()->name() ).lower();
f.replace( "::", "_" ); f.replace( "::", "_" );
f = pro->makeAbsolute( f + ".ui" ); f = pro->makeAbsolute( f + ".ui" );
@ -293,7 +293,7 @@ bool FormFile::saveAs( bool ignoreModified )
} }
pro->setModified( TRUE ); pro->setModified( TRUE );
timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); timeStamp.setFileName( pro->makeAbsolute( codeFile() ) );
if ( ed && TQT_TQOBJECT(formWindow()) ) if ( ed && formWindow() )
ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) );
setModified( TRUE ); setModified( TRUE );
if ( pro->isDummy() ) if ( pro->isDummy() )
@ -307,7 +307,7 @@ bool FormFile::close()
editor()->save(); editor()->save();
editor()->close(); editor()->close();
} }
if ( TQT_TQOBJECT(formWindow()) ) if ( formWindow() )
return formWindow()->close(); return formWindow()->close();
return TRUE; return TRUE;
} }
@ -372,7 +372,7 @@ bool FormFile::isModified( int who )
bool FormFile::isFormWindowModified() const bool FormFile::isFormWindowModified() const
{ {
if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) if ( !formWindow() || !formWindow()->commandHistory() )
return FALSE; return FALSE;
return formWindow()->commandHistory()->isModified(); return formWindow()->commandHistory()->isModified();
} }
@ -389,7 +389,7 @@ void FormFile::setFormWindowModified( bool m )
bool b = isFormWindowModified(); bool b = isFormWindowModified();
if ( m == b ) if ( m == b )
return; return;
if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) if ( !formWindow() || !formWindow()->commandHistory() )
return; return;
formWindow()->commandHistory()->setModified( m ); formWindow()->commandHistory()->setModified( m );
emit somethingChanged( this ); emit somethingChanged( this );
@ -411,13 +411,13 @@ void FormFile::showFormWindow()
{ {
if ( !MainWindow::self ) if ( !MainWindow::self )
return; return;
if ( TQT_TQOBJECT(formWindow()) ) { if ( formWindow() ) {
if ( ( formWindow()->hasFocus() || if ( ( formWindow()->hasFocus() ||
MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) && MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) &&
MainWindow::self->propertyeditor()->formWindow() != formWindow() ) { MainWindow::self->propertyeditor()->formWindow() != formWindow() ) {
MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); MainWindow::self->propertyeditor()->setWidget( formWindow()->currentWidget(), formWindow() );
MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), MainWindow::self->objectHierarchy()->setFormWindow( formWindow(),
TQT_TQOBJECT(formWindow()->currentWidget()) ); formWindow()->currentWidget() );
} }
formWindow()->setFocus(); formWindow()->setFocus();
return; return;
@ -519,14 +519,14 @@ void FormFile::setCodeFileState( UihState s )
void FormFile::createFormCode() void FormFile::createFormCode()
{ {
if ( !TQT_TQOBJECT(formWindow()) ) if ( !formWindow() )
return; return;
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( !iface ) if ( !iface )
return; return;
if ( pro->isCpp() ) if ( pro->isCpp() )
cod = codeComment(); cod = codeComment();
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() );
for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
cod += (!cod.isEmpty() ? "\n\n" : "") + cod += (!cod.isEmpty() ? "\n\n" : "") +
iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function),
@ -573,14 +573,14 @@ void FormFile::setCodeEdited( bool b )
void FormFile::parseCode( const TQString &txt, bool allowModify ) void FormFile::parseCode( const TQString &txt, bool allowModify )
{ {
if ( !TQT_TQOBJECT(formWindow()) ) if ( !formWindow() )
return; return;
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( !iface ) if ( !iface )
return; return;
TQValueList<LanguageInterface::Function> functions; TQValueList<LanguageInterface::Function> functions;
TQValueList<MetaDataBase::Function> newFunctions, oldFunctions; TQValueList<MetaDataBase::Function> newFunctions, oldFunctions;
oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); oldFunctions = MetaDataBase::functionList( formWindow() );
iface->functions( txt, &functions ); iface->functions( txt, &functions );
TQMap<TQString, TQString> funcs; TQMap<TQString, TQString> funcs;
for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin(); for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin();
@ -634,7 +634,7 @@ void FormFile::parseCode( const TQString &txt, bool allowModify )
if ( allowModify && oldFunctions.count() > 0 ) if ( allowModify && oldFunctions.count() > 0 )
setFormWindowModified( TRUE ); setFormWindowModified( TRUE );
MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); MetaDataBase::setFunctionList( formWindow(), newFunctions );
} }
void FormFile::syncCode() void FormFile::syncCode()
@ -704,7 +704,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
if ( !hasFunc ) { if ( !hasFunc ) {
if ( !codeEdited && !timeStamp.isUpToDate() ) if ( !codeEdited && !timeStamp.isUpToDate() )
loadCode(); loadCode();
MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() );
TQString cn; TQString cn;
if ( mi.classNameChanged ) if ( mi.classNameChanged )
cn = mi.className; cn = mi.className;
@ -802,7 +802,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o
TQString FormFile::formName() const TQString FormFile::formName() const
{ {
FormFile* that = (FormFile*) this; FormFile* that = (FormFile*) this;
if ( TQT_TQOBJECT(formWindow()) ) { if ( formWindow() ) {
that->cachedFormName = formWindow()->name(); that->cachedFormName = formWindow()->name();
return cachedFormName; return cachedFormName;
} }

@ -44,7 +44,7 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
: FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) : FormSettingsBase( parent, 0, TRUE ), formwindow( fw )
{ {
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) ); MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
if ( info.classNameChanged && !info.className.isEmpty() ) if ( info.classNameChanged && !info.className.isEmpty() )
editClassName->setText( info.className ); editClassName->setText( info.className );
else else
@ -52,8 +52,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
editComment->setText( info.comment ); editComment->setText( info.comment );
editAuthor->setText( info.author ); editAuthor->setText( info.author );
editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) ); editClassName->setValidator( new AsciiValidator( TQString( ":" ), editClassName ) );
editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) ); editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) );
if ( formwindow->savePixmapInline() ) if ( formwindow->savePixmapInline() )
radioPixmapInline->setChecked( TRUE ); radioPixmapInline->setChecked( TRUE );
@ -65,8 +65,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); radioProjectImageFile->setEnabled( !fw->project()->isDummy() );
spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); spinSpacing->setValue( formwindow->layoutDefaultSpacing() );
spinMargin->setValue( formwindow->layoutDefaultMargin() ); spinMargin->setValue( formwindow->layoutDefaultMargin() );
editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), editSpacingFunction ) );
editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), editMarginFunction ) );
checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() );
editSpacingFunction->setText( formwindow->spacingFunction() ); editSpacingFunction->setText( formwindow->spacingFunction() );
editMarginFunction->setText( formwindow->marginFunction() ); editMarginFunction->setText( formwindow->marginFunction() );
@ -79,17 +79,17 @@ void FormSettings::okClicked()
info.classNameChanged = info.className != TQString( formwindow->name() ); info.classNameChanged = info.className != TQString( formwindow->name() );
info.comment = editComment->text(); info.comment = editComment->text();
info.author = editAuthor->text(); info.author = editAuthor->text();
MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info ); MetaDataBase::setMetaInfo( formwindow, info );
formwindow->commandHistory()->setModified( TRUE ); formwindow->commandHistory()->setModified( TRUE );
if ( formwindow->savePixmapInline() ) { if ( formwindow->savePixmapInline() ) {
MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); MetaDataBase::clearPixmapArguments( formwindow );
MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); MetaDataBase::clearPixmapKeys( formwindow );
} else if ( formwindow->savePixmapInProject() ) { } else if ( formwindow->savePixmapInProject() ) {
MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); MetaDataBase::clearPixmapArguments( formwindow );
} else { } else {
MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); MetaDataBase::clearPixmapKeys( formwindow );
} }
if ( radioPixmapInline->isChecked() ) { if ( radioPixmapInline->isChecked() ) {

@ -156,7 +156,7 @@ void FormWindow::init()
setWFlags(getWFlags() & TQt::WStyle_Maximize); setWFlags(getWFlags() & TQt::WStyle_Maximize);
fake = qstrcmp( name(), "qt_fakewindow" ) == 0; fake = qstrcmp( name(), "qt_fakewindow" ) == 0;
MetaDataBase::addEntry( TQT_TQOBJECT(this) ); MetaDataBase::addEntry( this );
ff->setFormWindow( this ); ff->setFormWindow( this );
iface = 0; iface = 0;
proj = 0; proj = 0;
@ -200,7 +200,7 @@ void FormWindow::init()
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this ); TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this );
setMainContainer( w ); setMainContainer( w );
propertyWidget = TQT_TQOBJECT(w); propertyWidget = w;
targetContainer = 0; targetContainer = 0;
hadOwnPalette = FALSE; hadOwnPalette = FALSE;
@ -212,7 +212,7 @@ void FormWindow::init()
void FormWindow::setMainWindow( MainWindow *w ) void FormWindow::setMainWindow( MainWindow *w )
{ {
mainwindow = w; mainwindow = w;
MetaDataBase::addEntry( TQT_TQOBJECT(this) ); MetaDataBase::addEntry( this );
initSlots(); initSlots();
} }
@ -236,7 +236,7 @@ FormWindow::~FormWindow()
if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this )
MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 );
MetaDataBase::clear( TQT_TQOBJECT(this) ); MetaDataBase::clear( this );
if ( ff ) if ( ff )
ff->setFormWindow( 0 ); ff->setFormWindow( 0 );
delete iface; delete iface;
@ -375,7 +375,7 @@ void FormWindow::insertWidget()
pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() ); pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() );
( (TQLabel*)w )->setPixmap( pix ); ( (TQLabel*)w )->setPixmap( pix );
} }
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) { if ( WidgetDatabase::isCustomWidget( id ) ) {
TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
@ -393,7 +393,7 @@ void FormWindow::insertWidget()
} }
TQString s = w->name(); TQString s = w->name();
unify( TQT_TQOBJECT(w), s, TRUE ); unify( w, s, TRUE );
w->setName( s ); w->setName( s );
insertWidget( w ); insertWidget( w );
TQRect r( currRect ); TQRect r( currRect );
@ -429,7 +429,7 @@ void FormWindow::insertWidget()
const TQObjectList l = insertParent->childrenListObject(); const TQObjectList l = insertParent->childrenListObject();
TQObjectListIt it( l ); TQObjectListIt it( l );
TQWidgetList lst; TQWidgetList lst;
if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
for ( ; it.current(); ) { for ( ; it.current(); ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
@ -497,12 +497,12 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
return; return;
if ( checkName ) { if ( checkName ) {
TQString s = w->name(); TQString s = w->name();
unify( TQT_TQOBJECT(w), s, TRUE ); unify( w, s, TRUE );
w->setName( s ); w->setName( s );
} }
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) );
if ( WidgetDatabase::isCustomWidget( id ) ) { if ( WidgetDatabase::isCustomWidget( id ) ) {
TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
@ -526,7 +526,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
void FormWindow::removeWidget( TQWidget *w ) void FormWindow::removeWidget( TQWidget *w )
{ {
MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); MetaDataBase::removeEntry( w );
widgets()->take( w ); widgets()->take( w );
} }
@ -535,9 +535,9 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
CHECK_MAINWINDOW; CHECK_MAINWINDOW;
switch ( currTool ) { switch ( currTool ) {
case POINTER_TOOL: { case POINTER_TOOL: {
if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
raiseChildSelections( w ); // raise selections and select widget raiseChildSelections( w ); // raise selections and select widget
selectWidget( TQT_TQOBJECT(w) ); selectWidget( w );
// if widget is laid out, find the first non-laid out super-widget // if widget is laid out, find the first non-laid out super-widget
TQWidget *realWidget = w; // but store the original one TQWidget *realWidget = w; // but store the original one
while ( w->parentWidget() && while ( w->parentWidget() &&
@ -576,7 +576,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
switch ( currTool ) { switch ( currTool ) {
case POINTER_TOOL: case POINTER_TOOL:
if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
// if the clicked widget is not in a layout, raise it // if the clicked widget is not in a layout, raise it
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise(); w->raise();
@ -587,7 +587,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
break; break;
} }
bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); bool sel = isWidgetSelected( w );
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed...
if ( !sel ) { // ...and widget no selectted: unselect all if ( !sel ) { // ...and widget no selectted: unselect all
clearSelection( FALSE ); clearSelection( FALSE );
@ -600,7 +600,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !o->isWidgetType() ) if ( !o->isWidgetType() )
continue; continue;
if ( insertedWidgets.find( (TQWidget*)o ) ) if ( insertedWidgets.find( (TQWidget*)o ) )
selectWidget( TQT_TQOBJECT(o), FALSE ); selectWidget( o, FALSE );
} }
setPropertyShowingBlocked( FALSE ); setPropertyShowingBlocked( FALSE );
delete l; delete l;
@ -610,12 +610,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
} }
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget
selectWidget( TQT_TQOBJECT(w), FALSE ); selectWidget( w, FALSE );
break; break;
} }
raiseChildSelections( w ); // raise selections and select widget raiseChildSelections( w ); // raise selections and select widget
selectWidget( TQT_TQOBJECT(w) ); selectWidget( w );
// if widget is laid out, find the first non-laid out super-widget // if widget is laid out, find the first non-laid out super-widget
while ( w->parentWidget() && while ( w->parentWidget() &&
@ -629,7 +629,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
origPressPos = oldPressPos; origPressPos = oldPressPos;
checkedSelectionsForMove = FALSE; checkedSelectionsForMove = FALSE;
moving.clear(); moving.clear();
if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) {
targetContainer = w->parentWidget(); targetContainer = w->parentWidget();
hadOwnPalette = w->parentWidget()->ownPalette(); hadOwnPalette = w->parentWidget()->ownPalette();
restorePalette = w->parentWidget()->palette(); restorePalette = w->parentWidget()->palette();
@ -641,7 +641,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
clearSelection( FALSE ); clearSelection( FALSE );
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
} }
@ -667,13 +667,13 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
saveBackground(); saveBackground();
startPos = mapFromGlobal( e->globalPos() ); startPos = mapFromGlobal( e->globalPos() );
currentPos = startPos; currentPos = startPos;
startWidget = designerWidget( TQT_TQOBJECT(w) ); startWidget = designerWidget( w );
endWidget = startWidget; endWidget = startWidget;
beginUnclippedPainter( FALSE ); beginUnclippedPainter( FALSE );
drawConnectionLine(); drawConnectionLine();
break; break;
case ORDER_TOOL: case ORDER_TOOL:
if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.removeRef( w ); orderedWidgets.removeRef( w );
orderedWidgets.append( w ); orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@ -693,10 +693,10 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
default: // any insert widget tool default: // any insert widget tool
if ( e->button() == TQt::LeftButton ) { if ( e->button() == TQt::LeftButton ) {
insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow
if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent
TQWidget *wid = w; TQWidget *wid = w;
for (;;) { for (;;) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) );
if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) &&
!::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) { !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) {
insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it
@ -719,7 +719,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
CHECK_MAINWINDOW; CHECK_MAINWINDOW;
switch ( currTool ) { switch ( currTool ) {
case ORDER_TOOL: case ORDER_TOOL:
if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.clear(); orderedWidgets.clear();
orderedWidgets.append( w ); orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@ -736,7 +736,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
updateOrderIndicators(); updateOrderIndicators();
} }
default: default:
if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && if ( !WidgetFactory::isPassiveInteractor( w ) &&
( isMainContainer( w ) || w == this ) ) ( isMainContainer( w ) || w == this ) )
mainWindow()->editSource(); mainWindow()->editSource();
break; break;
@ -799,9 +799,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move
if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected...
if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time
setPropertyShowingBlocked( TRUE ); setPropertyShowingBlocked( TRUE );
selectWidget( TQT_TQOBJECT(w) ); selectWidget( w );
setPropertyShowingBlocked( FALSE ); setPropertyShowingBlocked( FALSE );
} }
checkSelectionsForMove( w ); checkSelectionsForMove( w );
@ -810,7 +810,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
// check whether we would have to reparent the selection and highlight the possible new parent container // check whether we would have to reparent the selection and highlight the possible new parent container
TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin(); TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin();
TQWidget* wa = containerAt( e->globalPos(), it.key() ); TQWidget* wa = containerAt( e->globalPos(), it.key() );
if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) {
wa = WidgetFactory::containerOfWidget( wa ); wa = WidgetFactory::containerOfWidget( wa );
// ok, looks like we moved onto a container // ok, looks like we moved onto a container
@ -862,14 +862,14 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
restoreConnectionLine(); restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE ); wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid ) if ( wid )
wid = designerWidget( TQT_TQOBJECT(wid) ); wid = designerWidget( wid );
if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
newendWidget = wid; newendWidget = wid;
if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget; newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget; drawRecRect = newendWidget != endWidget;
if ( newendWidget && if ( newendWidget &&
( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) ( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget; endWidget = newendWidget;
mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ).
arg( endWidget->name() ) ); arg( endWidget->name() ) );
@ -886,7 +886,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
restoreConnectionLine(); restoreConnectionLine();
wid = tqApp->widgetAt( e->globalPos(), TRUE ); wid = tqApp->widgetAt( e->globalPos(), TRUE );
if ( wid ) if ( wid )
wid = designerWidget( TQT_TQOBJECT(wid) ); wid = designerWidget( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
newendWidget = wid; newendWidget = wid;
else else
@ -896,7 +896,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
drawRecRect = newendWidget != endWidget; drawRecRect = newendWidget != endWidget;
if ( !newendWidget ) if ( !newendWidget )
endWidget = newendWidget; endWidget = newendWidget;
else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget; endWidget = newendWidget;
if ( endWidget ) if ( endWidget )
mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ).
@ -981,7 +981,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) ) if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
emitSelChanged = TRUE; emitSelChanged = TRUE;
if ( !::tqt_cast<TQButtonGroup*>(wa) ) { if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) ) if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) )
( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
} }
@ -990,12 +990,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
i->reparent( wa, pos, TRUE ); i->reparent( wa, pos, TRUE );
raiseSelection( i ); raiseSelection( i );
raiseChildSelections( i ); raiseChildSelections( i );
widgetChanged( TQT_TQOBJECT(i) ); widgetChanged( i );
mainWindow()->objectHierarchy()->widgetRemoved( i ); mainWindow()->objectHierarchy()->widgetRemoved( i );
mainWindow()->objectHierarchy()->widgetInserted( i ); mainWindow()->objectHierarchy()->widgetInserted( i );
} }
if ( emitSelChanged ) { if ( emitSelChanged ) {
emit showProperties( TQT_TQOBJECT(wa) ); emit showProperties( wa );
emit showProperties( propertyWidget ); emit showProperties( propertyWidget );
} }
newParent = wa; newParent = wa;
@ -1045,13 +1045,13 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( oldBuddy.isNull() ) if ( oldBuddy.isNull() )
oldBuddy = ""; oldBuddy = "";
SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ),
this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), this, startWidget, mainWindow()->propertyeditor(),
"buddy", startWidget->property( "buddy" ), "buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(), endWidget->name(), endWidget->name(),
oldBuddy ); oldBuddy );
commandHistory()->addCommand( cmd, TRUE ); commandHistory()->addCommand( cmd, TRUE );
cmd->execute(); cmd->execute();
emitUpdateProperties( TQT_TQOBJECT(startWidget) ); emitUpdateProperties( startWidget );
} }
} }
if ( !toolFixed ) if ( !toolFixed )
@ -1163,7 +1163,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
TQObjectList *l = queryList( "TQWidget" ); TQObjectList *l = queryList( "TQWidget" );
if ( !l ) if ( !l )
return; return;
if ( l->find( TQT_TQOBJECT(w) ) != -1 ) if ( l->find( w ) != -1 )
e->accept(); e->accept();
delete l; delete l;
} }
@ -1185,9 +1185,9 @@ void FormWindow::selectWidget( TQObject *o, bool select )
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( isMainContainer( TQT_TQOBJECT(w) ) ) { if ( isMainContainer( w ) ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget ); emitShowProperties( propertyWidget );
@ -1196,7 +1196,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget ); emitShowProperties( propertyWidget );
@ -1208,7 +1208,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
if ( select ) { if ( select ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(w); propertyWidget = w;
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() ) if ( !isPropertyShowingBlocked() )
@ -1238,9 +1238,9 @@ void FormWindow::selectWidget( TQObject *o, bool select )
s->setWidget( 0 ); s->setWidget( 0 );
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
if ( !usedSelections.isEmpty() ) if ( !usedSelections.isEmpty() )
propertyWidget = TQT_TQOBJECT(TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget()); propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
else else
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() ) if ( !isPropertyShowingBlocked() )
@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w )
{ {
WidgetSelection *s = usedSelections.find( w ); WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) ) if ( !w->isVisibleTo( this ) )
selectWidget( TQT_TQOBJECT(w), FALSE ); selectWidget( w, FALSE );
else if ( s ) else if ( s )
s->updateGeometry(); s->updateGeometry();
} }
@ -1288,7 +1288,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay )
usedSelections.clear(); usedSelections.clear();
if ( changePropertyDisplay ) { if ( changePropertyDisplay ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget ); emitShowProperties( propertyWidget );
@ -1374,7 +1374,7 @@ void FormWindow::selectWidgets()
p = mapFromGlobal( p ); p = mapFromGlobal( p );
TQRect r( p, ( (TQWidget*)o )->size() ); TQRect r( p, ( (TQWidget*)o )->size() );
if ( r.intersects( currRect ) && !r.contains( currRect ) ) if ( r.intersects( currRect ) && !r.contains( currRect ) )
selectWidget( TQT_TQOBJECT(o) ); selectWidget( o );
} }
} }
delete l; delete l;
@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w )
TQPtrDictIterator<WidgetSelection> it( usedSelections ); TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) if ( l->findRef( it.current()->widget() ) != -1 )
it.current()->show(); it.current()->show();
} }
delete l; delete l;
@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w )
if ( it.current()->widget() == mainContainer() ) if ( it.current()->widget() == mainContainer() )
continue; continue;
++it; ++it;
if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { if ( l->find( sel->widget() ) == -1 ) {
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
sel->setWidget( 0 ); sel->setWidget( 0 );
} else { } else {
@ -1483,7 +1483,7 @@ void FormWindow::deleteWidgets()
TQPtrDictIterator<WidgetSelection> it( usedSelections ); TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
TQWidget *tb = 0; TQWidget *tb = 0;
if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) )
widgets.append( it.current()->widget() ); widgets.append( it.current()->widget() );
else else
( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() );
@ -1591,7 +1591,7 @@ void FormWindow::focusOutEvent( TQFocusEvent * )
{ {
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mainContainer()); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
} }
@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const
if ( !o || !o->isWidgetType() ) if ( !o || !o->isWidgetType() )
return 0; return 0;
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) )
w = (TQWidget*)w->parent(); w = (TQWidget*)w->parent();
return w; return w;
} }
@ -1735,7 +1735,7 @@ void FormWindow::currentToolChanged()
switch ( currTool ) { switch ( currTool ) {
case POINTER_TOOL: case POINTER_TOOL:
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) )
emitShowProperties( TQT_TQOBJECT(mainContainer()) ); emitShowProperties( mainContainer() );
restoreCursors( this, this ); restoreCursors( this, this );
break; break;
case ORDER_TOOL: case ORDER_TOOL:
@ -1744,7 +1744,7 @@ void FormWindow::currentToolChanged()
orderedWidgets.clear(); orderedWidgets.clear();
showOrderIndicators(); showOrderIndicators();
if ( mainWindow()->formWindow() == this ) if ( mainWindow()->formWindow() == this )
emitShowProperties( TQT_TQOBJECT(mainContainer()) ); emitShowProperties( mainContainer() );
setCursorToAll( ArrowCursor, this ); setCursorToAll( ArrowCursor, this );
} }
break; break;
@ -1756,13 +1756,13 @@ void FormWindow::currentToolChanged()
mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") );
setCursorToAll( CrossCursor, this ); setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this ) if ( mainWindow()->formWindow() == this )
emitShowProperties( TQT_TQOBJECT(mainContainer()) ); emitShowProperties( mainContainer() );
break; break;
default: default:
mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) );
setCursorToAll( CrossCursor, this ); setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this ) if ( mainWindow()->formWindow() == this )
emitShowProperties( TQT_TQOBJECT(mainContainer()) ); emitShowProperties( mainContainer() );
break; break;
} }
} }
@ -1824,7 +1824,7 @@ bool FormWindow::checkCustomWidgets()
TQPtrDictIterator<TQWidget> it( insertedWidgets ); TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) { if ( it.current()->isA( "CustomWidget" ) ) {
TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); TQString className = WidgetFactory::classNameOf( it.current() );
if ( !MetaDataBase::hasCustomWidget( className ) ) if ( !MetaDataBase::hasCustomWidget( className ) )
missingCustomWidgets << className; missingCustomWidgets << className;
} }
@ -1941,7 +1941,7 @@ void FormWindow::checkAccels()
case 0: // select case 0: // select
clearSelection( FALSE ); clearSelection( FALSE );
for ( wid = (*it).first(); wid; wid = (*it).next() ) for ( wid = (*it).first(); wid; wid = (*it).next() )
selectWidget( TQT_TQOBJECT(wid), TRUE ); selectWidget( wid, TRUE );
return; return;
case 1: // cancel case 1: // cancel
return; return;
@ -1983,7 +1983,7 @@ void FormWindow::selectAll()
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( ( (TQWidget*)o )->isVisibleTo( this ) && if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) { insertedWidgets[ (void*)o ] ) {
selectWidget( TQT_TQOBJECT(o) ); selectWidget( o );
} }
} }
delete l; delete l;
@ -2126,7 +2126,7 @@ void FormWindow::breakLayout( TQWidget *w )
if ( !w || w == this ) if ( !w || w == this )
break; break;
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
Command *cmd = breakLayoutCommand( w ); Command *cmd = breakLayoutCommand( w );
if ( cmd ) if ( cmd )
commands.insert( 0, cmd ); commands.insert( 0, cmd );
@ -2155,7 +2155,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w )
TQWidgetList widgets; TQWidgetList widgets;
for ( TQObject *o = l.first(); o; o = l.next() ) { for ( TQObject *o = l.first(); o; o = l.next() ) {
if ( o->isWidgetType() && if ( o->isWidgetType() &&
!mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && !mainWindow()->isAToolBarChild( o ) &&
( (TQWidget*)o )->isVisibleTo( this ) && ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets.find( (TQWidget*)o ) ) insertedWidgets.find( (TQWidget*)o ) )
widgets.append( (TQWidget*)o ); widgets.append( (TQWidget*)o );
@ -2204,7 +2204,7 @@ bool FormWindow::allowMove( TQWidget *w )
{ {
w = w->parentWidget(); w = w->parentWidget();
while ( w ) { while ( w ) {
if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
return TRUE; return TRUE;
w = w->parentWidget(); w = w->parentWidget();
} }
@ -2221,7 +2221,7 @@ void FormWindow::editConnections()
ConnectionDialog dlg( mainwindow ); ConnectionDialog dlg( mainwindow );
mainWindow()->statusMessage( i18n( "Edit connections...") ); mainWindow()->statusMessage( i18n( "Edit connections...") );
dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); dlg.addConnection( startWidget, endWidget, TQString(), TQString() );
TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) );
dlg.exec(); dlg.exec();
} }
@ -2435,7 +2435,7 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
TQPtrDictIterator<TQWidget> it( insertedWidgets ); TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) { if ( it.current()->isA( "CustomWidget" ) ) {
if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
return TRUE; return TRUE;
} }
} }
@ -2473,7 +2473,7 @@ bool FormWindow::isDatabaseAware() const
void FormWindow::visibilityChanged() void FormWindow::visibilityChanged()
{ {
if ( currTool != ORDER_TOOL ) { if ( currTool != ORDER_TOOL ) {
emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); emitUpdateProperties( currentWidget() );
} else { } else {
updateOrderIndicators(); updateOrderIndicators();
repositionOrderIndicators(); repositionOrderIndicators();
@ -2491,7 +2491,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const
{ {
TQPoint p = pos; TQPoint p = pos;
const TQWidget* i = w; const TQWidget* i = w;
while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) { while ( i && !i->isTopLevel() && !isMainContainer( const_cast<TQWidget*>(i) ) ) {
p = i->mapToParent( p ); p = i->mapToParent( p );
i = i->parentWidget(); i = i->parentWidget();
} }
@ -2538,7 +2538,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
continue; continue;
if ( selected.find( it.current() ) != -1 ) if ( selected.find( it.current() ) != -1 )
continue; continue;
if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( it.current() ) ) ) &&
it.current() != mainContainer() ) it.current() != mainContainer() )
continue; continue;
@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
int wd = widgetDepth( it.current() ); int wd = widgetDepth( it.current() );
if ( wd == depth && container ) { if ( wd == depth && container ) {
if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > if ( ( it.current()->parentWidget()->childrenListObject() ).find( it.current() ) >
( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) ( container->parentWidget()->childrenListObject() ).find( container ) )
wd++; wd++;
} }
if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) {
@ -2586,24 +2586,24 @@ void FormWindow::setMainContainer( TQWidget *w )
l->addWidget( w ); l->addWidget( w );
if ( resetPropertyWidget ) { if ( resetPropertyWidget ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = TQT_TQOBJECT(mContainer); propertyWidget = mContainer;
if ( opw && opw->isWidgetType() ) if ( opw && opw->isWidgetType() )
repaintSelection( (TQWidget*)opw ); repaintSelection( (TQWidget*)opw );
} }
if ( project() ) { if ( project() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() );
if ( iface && !project()->isCpp() && !isFake() ) { if ( iface && !project()->isCpp() && !isFake() ) {
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) if ( !MetaDataBase::hasFunction( this, "init()" ) )
MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", MetaDataBase::addFunction( this, "init()", "", "private", "function",
project()->language(), "void" ); project()->language(), "void" );
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) if ( !MetaDataBase::hasFunction( this, "destroy()" ) )
MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", MetaDataBase::addFunction( this, "destroy()", "", "private", "function",
project()->language(), "void" ); project()->language(), "void" );
if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) if ( !MetaDataBase::hasConnection( this, mainContainer(), "shown()", mainContainer(), "init" ) )
MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); MetaDataBase::addConnection( this, mainContainer(), "shown()", mainContainer(), "init" );
if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) if ( !MetaDataBase::hasConnection( this, mainContainer(), "destroyed()", mainContainer(), "destroy" ) )
MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", MetaDataBase::addConnection( this, mainContainer(), "destroyed()",
TQT_TQOBJECT(mainContainer()), "destroy" ); mainContainer(), "destroy" );
} }
} }
} }

@ -252,7 +252,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( formWindow == o ) { if ( formWindow == o ) {
if ( deselect ) if ( deselect )
formWindow->clearSelection( FALSE ); formWindow->clearSelection( FALSE );
formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); formWindow->emitShowProperties( formWindow );
return 0; return 0;
} }
if ( o->isWidgetType() ) { if ( o->isWidgetType() ) {
@ -261,20 +261,20 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) { if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) {
if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) { if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
((TQTabWidget*)w->parent()->parent())->showPage( w ); ((TQTabWidget*)w->parent()->parent())->showPage( w );
o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); o = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) { } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) {
((QDesignerWizard*)w->parent()->parent())-> ((QDesignerWizard*)w->parent()->parent())->
setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); o = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else { } else {
( (TQWidgetStack*)w->parent() )->raiseWidget( w ); ( (TQWidgetStack*)w->parent() )->raiseWidget( w );
if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
( (QDesignerWidgetStack*)w->parent() )->updateButtons(); ( (QDesignerWidgetStack*)w->parent() )->updateButtons();
} }
} else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) { } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( TQT_TQOBJECT(w) ); formWindow->setActiveObject( w );
} else if ( ::tqt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else { } else {
@ -303,7 +303,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i )
if ( !w->parentWidget() || if ( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise(); w->raise();
formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); formWindow->selectWidget( w, TRUE );
} }
} }
@ -314,7 +314,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
return; return;
if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) {
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); formWindow->selectWidget( w, TRUE );
} }
} }
@ -388,7 +388,7 @@ void HierarchyList::setup()
if ( !widgetStacks ) if ( !widgetStacks )
widgetStacks = new TQPtrList<TQWidgetStack>; widgetStacks = new TQPtrList<TQWidgetStack>;
if ( w ) if ( w )
insertObject( TQT_TQOBJECT(w), 0 ); insertObject( w, 0 );
widgetStacks->clear(); widgetStacks->clear();
} }
@ -403,7 +403,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
return; return;
bool fakeMainWindow = FALSE; bool fakeMainWindow = FALSE;
if ( ::tqt_cast<TQMainWindow*>(o) ) { if ( ::tqt_cast<TQMainWindow*>(o) ) {
TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) { if ( cw ) {
o = cw; o = cw;
fakeMainWindow = TRUE; fakeMainWindow = TRUE;
@ -510,7 +510,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
continue; continue;
TQToolBox *tb = (TQToolBox*)it.current()->parent(); TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i ) for ( int i = tb->count() - 1; i >= 0; --i )
insertObject( TQT_TQOBJECT(tb->item( i )), item ); insertObject( tb->item( i ), item );
} }
continue; continue;
} }
@ -544,7 +544,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( TQT_TQOBJECT(da->widget()), item ); insertObject( da->widget(), item );
} else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) { } else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) {
insertObject( a, item ); insertObject( a, item );
} }
@ -558,7 +558,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( TQT_TQOBJECT(da->widget()), item ); insertObject( da->widget(), item );
} else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) { } else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) {
insertObject( obj, item ); insertObject( obj, item );
} }
@ -569,7 +569,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
MenuBarEditorItem *md = mb->item( i ); MenuBarEditorItem *md = mb->item( i );
if ( !md || !md->menu() ) if ( !md || !md->menu() )
continue; continue;
insertObject( TQT_TQOBJECT(md->menu()), item ); insertObject( md->menu(), item );
} }
} }
} }
@ -762,7 +762,7 @@ void FormDefinitionView::setupVariables()
itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ),
TQString(), TQString() ); TQString(), TQString() );
TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() ); TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
if ( !varList.isEmpty() && itemVar ) { if ( !varList.isEmpty() && itemVar ) {
for (;;) { for (;;) {
@ -852,7 +852,7 @@ void FormDefinitionView::refresh()
itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ),
TQString(), TQString() ); TQString(), TQString() );
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() ); TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
if ( !functionList.isEmpty() && itemFunct ) { if ( !functionList.isEmpty() && itemFunct ) {
for (;;) { for (;;) {
@ -1197,7 +1197,7 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i )
varName = varName.simplifyWhiteSpace(); varName = varName.simplifyWhiteSpace();
if ( varName[(int)varName.length() - 1] != ';' ) if ( varName[(int)varName.length() - 1] != ';' )
varName += ";"; varName += ";";
if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { if ( MetaDataBase::hasVariable( formWindow, varName ) ) {
TQMessageBox::information( this, i18n( "Edit Variables" ), TQMessageBox::information( this, i18n( "Edit Variables" ),
i18n( "This variable has already been declared." ) ); i18n( "This variable has already been declared." ) );
} else { } else {
@ -1268,7 +1268,7 @@ HierarchyView::HierarchyView( TQWidget *parent )
ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); ClassBrowser cb( ciface->createClassBrowser( this ), ciface );
addTab( cb.lv, i18n( "Class Declarations" ) ); addTab( cb.lv, i18n( "Class Declarations" ) );
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); ciface->onClick( this, TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb ); classBrowsers->insert( *it, cb );
setTabEnabled( cb.lv, FALSE ); setTabEnabled( cb.lv, FALSE );
} }
@ -1307,7 +1307,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
if ( fw == formwindow ) { if ( fw == formwindow ) {
if ( fw ) { if ( fw ) {
if ( !fake ) if ( !fake )
listview->setCurrent( TQT_TQOBJECT(o) ); listview->setCurrent( o );
else else
listview->clear(); listview->clear();
if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) if ( MainWindow::self->qWorkspace()->activeWindow() == fw )
@ -1330,7 +1330,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
fView->setFormWindow( fw ); fView->setFormWindow( fw );
if ( !fake ) { if ( !fake ) {
listview->setup(); listview->setup();
listview->setCurrent( TQT_TQOBJECT(o) ); listview->setCurrent( o );
} }
fView->setup(); fView->setup();
@ -1367,8 +1367,8 @@ void HierarchyView::showClassesTimeout()
if ( !se->object() ) if ( !se->object() )
return; return;
if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { if ( se->formWindow() && se->formWindow()->project()->isCpp() ) {
setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); setFormWindow( se->formWindow(), se->formWindow()->currentWidget() );
MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), MainWindow::self->propertyeditor()->setWidget( se->formWindow()->currentWidget(),
se->formWindow() ); se->formWindow() );
return; return;
} }
@ -1447,7 +1447,7 @@ void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
TQWidget *w2 = w; TQWidget *w2 = w;
if ( ::tqt_cast<TQMainWindow*>(w) ) if ( ::tqt_cast<TQMainWindow*>(w) )
w2 = ( (TQMainWindow*)w )->centralWidget(); w2 = ( (TQMainWindow*)w )->centralWidget();
listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); listview->changeNameOf( w2, w->name() );
} }
@ -1455,7 +1455,7 @@ void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& in
{ {
#ifndef TQT_NO_SQL #ifndef TQT_NO_SQL
TQString i = info.join( "." ); TQString i = info.join( "." );
listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); listview->changeDatabaseOf( w, i );
#endif #endif
} }

@ -124,7 +124,7 @@ void Layout::setup()
// we leave here. // we leave here.
if ( !lastList || ( lastList->count() < 2 && if ( !lastList || ( lastList->count() < 2 &&
( !layoutBase || ( !layoutBase ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() ) ) layoutBase != formWindow->mainContainer() ) )
) ) { ) ) {
widgets.clear(); widgets.clear();
@ -195,7 +195,7 @@ void Layout::finishLayout( bool needMove, TQLayout *layout )
layoutBase->show(); layoutBase->show();
layout->activate(); layout->activate();
formWindow->insertWidget( layoutBase ); formWindow->insertWidget( layoutBase );
formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); formWindow->selectWidget( layoutBase );
TQString n = layoutBase->name(); TQString n = layoutBase->name();
if ( n.find( "qt_dead_widget_" ) != -1 ) { if ( n.find( "qt_dead_widget_" ) != -1 ) {
n.remove( 0, TQString( "qt_dead_widget_" ).length() ); n.remove( 0, TQString( "qt_dead_widget_" ).length() );
@ -214,7 +214,7 @@ void Layout::undoLayout()
it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() ); it.key()->resize( ( *it ).size() );
} }
formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); formWindow->selectWidget( layoutBase, FALSE );
WidgetFactory::deleteLayout( layoutBase ); WidgetFactory::deleteLayout( layoutBase );
if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) { if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide(); layoutBase->hide();
@ -225,9 +225,9 @@ void Layout::undoLayout()
layoutBase->setGeometry( oldGeometry ); layoutBase->setGeometry( oldGeometry );
} }
if ( widgets.first() ) if ( widgets.first() )
formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); formWindow->selectWidget( widgets.first() );
else else
formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); formWindow->selectWidget( formWindow );
} }
void Layout::breakLayout() void Layout::breakLayout()
@ -241,7 +241,7 @@ void Layout::breakLayout()
WidgetFactory::deleteLayout( layoutBase ); WidgetFactory::deleteLayout( layoutBase );
bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 || bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 ||
qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() ); layoutBase != formWindow->mainContainer() );
bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0;
bool add = geometries.isEmpty(); bool add = geometries.isEmpty();
@ -267,9 +267,9 @@ void Layout::breakLayout()
parent = layoutBase; parent = layoutBase;
} }
if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) )
formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); formWindow->selectWidget( widgets.first() );
else else
formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); formWindow->selectWidget( formWindow );
} }
class HorizontalLayoutList : public TQWidgetList class HorizontalLayoutList : public TQWidgetList

@ -271,7 +271,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE );
actionEditor->parentWidget()->hide(); actionEditor->parentWidget()->hide();
assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); assistant = new TQAssistantClient( assistantPath(), this );
statusBar()->setSizeGripEnabled( TRUE ); statusBar()->setSizeGripEnabled( TRUE );
set_splash_status( "Initialization Done." ); set_splash_status( "Initialization Done." );
@ -577,7 +577,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
TQStringList databases; TQStringList databases;
TQPtrDictIterator<TQWidget> wit( *fw->widgets() ); TQPtrDictIterator<TQWidget> wit( *fw->widgets() );
while ( wit.current() ) { while ( wit.current() ) {
TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList();
if ( !lst.isEmpty() ) if ( !lst.isEmpty() )
databases << lst [ 0 ]; databases << lst [ 0 ];
++wit; ++wit;
@ -724,7 +724,7 @@ void MainWindow::previewForm( const TQString & style )
if ( !w ) if ( !w )
return; return;
w->insertChild( TQT_TQOBJECT(st) ); w->insertChild( st );
w->show(); w->show();
} }
@ -881,14 +881,14 @@ void MainWindow::showProperties( TQObject *o )
if ( !o->isWidgetType() ) { if ( !o->isWidgetType() ) {
propertyEditor->setWidget( o, lastActiveFormWindow ); propertyEditor->setWidget( o, lastActiveFormWindow );
if ( lastActiveFormWindow ) if ( lastActiveFormWindow )
hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() );
else else
hierarchyView->setFormWindow( 0, 0 ); hierarchyView->setFormWindow( 0, 0 );
return; return;
} }
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
setupHierarchyView(); setupHierarchyView();
FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); FormWindow *fw = (FormWindow*)isAFormWindowChild( w );
if ( fw ) { if ( fw ) {
if ( fw->numSelectedWidgets() > 1 ) { if ( fw->numSelectedWidgets() > 1 ) {
TQWidgetList wl = fw->selectedWidgets(); TQWidgetList wl = fw->selectedWidgets();
@ -898,9 +898,9 @@ void MainWindow::showProperties( TQObject *o )
} }
propertyEditor->setWidget( new PropertyObject( wl ), fw ); propertyEditor->setWidget( new PropertyObject( wl ), fw );
} else { } else {
propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); propertyEditor->setWidget( w, fw );
} }
hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); hierarchyView->setFormWindow( fw, w );
} else { } else {
propertyEditor->setWidget( 0, 0 ); propertyEditor->setWidget( 0, 0 );
hierarchyView->setFormWindow( 0, 0 ); hierarchyView->setFormWindow( 0, 0 );
@ -1000,7 +1000,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
TQWidget *pw = w->parentWidget(); TQWidget *pw = w->parentWidget();
while ( pw ) { while ( pw ) {
if ( ::tqt_cast<FormWindow*>(pw) ) { if ( ::tqt_cast<FormWindow*>(pw) ) {
( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); ( (FormWindow*)pw )->emitShowProperties( w );
if ( !::tqt_cast<QDesignerToolBar*>(o) ) if ( !::tqt_cast<QDesignerToolBar*>(o) )
return ( !::tqt_cast<TQToolButton*>(o) && return ( !::tqt_cast<TQToolButton*>(o) &&
!::tqt_cast<MenuBarEditor*>(o) && !::tqt_cast<MenuBarEditor*>(o) &&
@ -1129,8 +1129,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
::tqt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::tqt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) if ( ( (FormWindow*)w )->isWidgetSelected( o ) )
( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); ( (FormWindow*)w )->selectWidget( o, FALSE );
break; break;
case TQEvent::Enter: case TQEvent::Enter:
case TQEvent::Leave: case TQEvent::Leave:
@ -1156,7 +1156,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) {
if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { if ( lastActiveFormWindow && lastActiveFormWindow->project() ) {
TQStringList lst = TQStringList lst =
MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList();
lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] );
} }
} }
@ -1305,9 +1305,9 @@ void MainWindow::insertFormWindow( FormWindow *fw )
if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) )
fw->setCaption( fw->name() ); fw->setCaption( fw->name() );
fw->mainContainer()->setCaption( fw->caption() ); fw->mainContainer()->setCaption( fw->caption() );
WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), WidgetFactory::saveDefaultProperties( fw->mainContainer(),
WidgetDatabase:: WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) );
activeWindowChanged( fw ); activeWindowChanged( fw );
emit formWindowsChanged(); emit formWindowsChanged();
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
@ -1594,7 +1594,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w )
{ {
WidgetInterface *iface = 0; WidgetInterface *iface = 0;
widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface );
if ( !iface ) if ( !iface )
return 0; return 0;
TQWidgetContainerInterfacePrivate *iface2 = 0; TQWidgetContainerInterfacePrivate *iface2 = 0;
@ -1646,19 +1646,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS #ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase:: } else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) {
ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) );
commands.insert( "remove", id ); commands.insert( "remove", id );
} }
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id ); commands.insert( "add", id );
if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) {
ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) );
commands.insert( "rename", id ); commands.insert( "rename", id );
} }
@ -1669,7 +1669,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
} }
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) );
@ -1733,21 +1733,21 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
if ( ok ) { if ( ok ) {
if ( oldDoWrap != doWrap ) { if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ), "wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() ); TQVariant( doWrap ), TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
} }
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ), "text", w->property( "text" ),
text, TQString(), TQString() ); text, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); MetaDataBase::setPropertyChanged( w, "text", TRUE );
} }
} else if ( id == props[ "title" ] ) { } else if ( id == props[ "title" ] ) {
bool ok = FALSE; bool ok = FALSE;
@ -1755,12 +1755,12 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
TQLineEdit::Normal, w->property("title").toString(), &ok, this ); TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) { if ( ok ) {
TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ), "title", w->property( "title" ),
title, TQString(), TQString() ); title, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); MetaDataBase::setPropertyChanged( w, "title", TRUE );
} }
} else if ( id == props[ "pagetitle" ] ) { } else if ( id == props[ "pagetitle" ] ) {
bool ok = FALSE; bool ok = FALSE;
@ -1768,25 +1768,25 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this );
if ( ok ) { if ( ok ) {
TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pageTitle", "pageTitle",
w->property( "pageTitle" ), w->property( "pageTitle" ),
text, TQString(), TQString() ); text, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE );
} }
} else if ( id == props[ "pixmap" ] ) { } else if ( id == props[ "pixmap" ] ) {
TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap();
TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix );
if ( !pix.isNull() ) { if ( !pix.isNull() ) {
TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pixmap", w->property( "pixmap" ), "pixmap", w->property( "pixmap" ),
pix, TQString(), TQString() ); pix, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); MetaDataBase::setPropertyChanged( w, "pixmap", TRUE );
} }
} }
} }
@ -1853,27 +1853,27 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
int currentPage = w->property( "currentPage" ).toInt(); int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = SetPropertyCommand *cmd =
new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage, "currentPage", currentPage,
currentPage + 1, TQString(), TQString() ); currentPage + 1, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); MetaDataBase::setPropertyChanged( w, "currentPage", TRUE );
} else if ( id == commands[ "prevpage" ] ) { } else if ( id == commands[ "prevpage" ] ) {
int currentPage = w->property( "currentPage" ).toInt(); int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = SetPropertyCommand *cmd =
new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage, "currentPage", currentPage,
currentPage -1, TQString(), TQString() ); currentPage -1, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); MetaDataBase::setPropertyChanged( w, "currentPage", TRUE );
} }
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS #ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase:: } else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddContainerPageCommand *cmd = AddContainerPageCommand *cmd =
new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ),
@ -1883,7 +1883,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "remove" ] ) { } else if ( id == commands[ "remove" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) { if ( iface ) {
TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w ); int index = iface->currentIndex( wClassName, w );
DeleteContainerPageCommand *cmd = DeleteContainerPageCommand *cmd =
new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ).
@ -1899,7 +1899,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) { if ( iface ) {
bool ok = FALSE; bool ok = FALSE;
TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w ); int index = iface->currentIndex( wClassName, w );
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, TQLineEdit::Normal,
@ -1924,10 +1924,10 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} }
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( id == commands[ "edit" ] ) if ( id == commands[ "edit" ] )
WidgetFactory::editWidget( WidgetDatabase:: WidgetFactory::editWidget( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() );
} }
} }
@ -2052,7 +2052,7 @@ void MainWindow::selectionChanged()
breakLayout = laidout > 0; breakLayout = laidout > 0;
} else if ( selectedWidgets == 1 ) { } else if ( selectedWidgets == 1 ) {
TQWidget *w = widgets.first(); TQWidget *w = widgets.first();
bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
w == formWindow()->mainContainer(); w == formWindow()->mainContainer();
actionEditAdjustSize->setEnabled( !w->parentWidget() || actionEditAdjustSize->setEnabled( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout );
@ -2062,7 +2062,7 @@ void MainWindow::selectionChanged()
actionEditVLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE );
actionEditGridLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE );
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
breakLayout = TRUE; breakLayout = TRUE;
} else { } else {
actionEditBreakLayout->setEnabled( FALSE ); actionEditBreakLayout->setEnabled( FALSE );
@ -2082,14 +2082,14 @@ void MainWindow::selectionChanged()
layoutChilds = TRUE; layoutChilds = TRUE;
} }
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
breakLayout = TRUE; breakLayout = TRUE;
} }
} else { } else {
actionEditHLayout->setEnabled( FALSE ); actionEditHLayout->setEnabled( FALSE );
actionEditVLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE );
actionEditGridLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE );
actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
breakLayout = TRUE; breakLayout = TRUE;
} }
} }
@ -2557,15 +2557,15 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
{ {
if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) {
TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); TQString defSignal = WidgetFactory::defaultSignal( w );
if ( defSignal.isEmpty() ) { if ( defSignal.isEmpty() ) {
editSource(); editSource();
} else { } else {
TQString s = TQString( w->name() ) + "_" + defSignal; TQString s = TQString( w->name() ) + "_" + defSignal;
LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() );
if ( iface ) { if ( iface ) {
TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); TQStrList sigs = iface->signalNames( w );
TQString fullSignal; TQString fullSignal;
for ( int i = 0; i < (int)sigs.count(); ++i ) { for ( int i = 0; i < (int)sigs.count(); ++i ) {
TQString sig = sigs.at( i ); TQString sig = sigs.at( i );
@ -2581,14 +2581,14 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
fullSignal.remove( (int)fullSignal.length() - 1, 1 ); fullSignal.remove( (int)fullSignal.length() - 1, 1 );
fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() );
s += "(" + fullSignal + ")"; s += "(" + fullSignal + ")";
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) if ( !MetaDataBase::hasFunction( f, s.latin1() ) )
MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot",
f->project()->language(), "void" ); f->project()->language(), "void" );
s = s.left( s.find( '(' ) ).latin1(); s = s.left( s.find( '(' ) ).latin1();
if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) {
MetaDataBase::Connection conn; MetaDataBase::Connection conn;
conn.sender = TQT_TQOBJECT(w); conn.sender = w;
conn.receiver = TQT_TQOBJECT(f->mainContainer()); conn.receiver = f->mainContainer();
conn.signal = signl; conn.signal = signl;
conn.slot = s; conn.slot = s;
AddConnectionCommand *cmd = AddConnectionCommand *cmd =
@ -2604,9 +2604,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
return TRUE; return TRUE;
} }
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); statusMessage( i18n( "Edit %1..." ).arg( w->className() ) );
WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ),
this, w, formWindow() ); this, w, formWindow() );
statusBar()->clear(); statusBar()->clear();
return TRUE; return TRUE;
@ -2636,21 +2636,21 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
if ( ok ) { if ( ok ) {
if ( oldDoWrap != doWrap ) { if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ), "wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() ); TQVariant( doWrap ), TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
} }
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ), "text", w->property( "text" ),
text, TQString(), TQString() ); text, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); MetaDataBase::setPropertyChanged( w, "text", TRUE );
} }
return TRUE; return TRUE;
} }
@ -2660,17 +2660,17 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) { if ( ok ) {
TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ), "title", w->property( "title" ),
text, TQString(), TQString() ); text, TQString(), TQString() );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); MetaDataBase::setPropertyChanged( w, "title", TRUE );
} }
return TRUE; return TRUE;
} }
if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) if ( !WidgetFactory::isPassiveInteractor( w ) )
editSource(); editSource();
return TRUE; return TRUE;
@ -2920,7 +2920,7 @@ void MainWindow::setupActionManager()
continue; continue;
iface->connectTo( desInterface ); iface->connectTo( desInterface );
TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); TQAction *a = iface->create( *ait, this );
if ( !a ) if ( !a )
continue; continue;
@ -2974,7 +2974,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource )
} }
} }
createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource );
} }
void MainWindow::setupRecentlyFilesMenu() void MainWindow::setupRecentlyFilesMenu()
@ -3233,7 +3233,7 @@ void MainWindow::updateFunctionList()
return; return;
TQValueList<LanguageInterface::Connection> conns; TQValueList<LanguageInterface::Connection> conns;
iface->connections( se->text(), &conns ); iface->connections( se->text(), &conns );
MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); MetaDataBase::setupConnections( se->formWindow(), conns );
propertyEditor->eventList()->setup(); propertyEditor->eventList()->setup();
} }
} }
@ -3444,10 +3444,10 @@ TQObject *MainWindow::findRealObject( TQObject *o )
TQWidgetList windows = qWorkspace()->windowList(); TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
return TQT_TQOBJECT(w); return w;
else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
return TQT_TQOBJECT(w); return w;
else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
( (SourceEditor*)w )->sourceFile() == o ) ( (SourceEditor*)w )->sourceFile() == o )
return o; return o;

@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name )
void MainWindow::setupEditActions() void MainWindow::setupEditActions()
{ {
actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 );
actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) );
actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); connect( actionEditUndo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editUndo() ) );
actionEditUndo->setEnabled( FALSE ); actionEditUndo->setEnabled( FALSE );
actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 );
actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") );
actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) );
connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); connect( actionEditRedo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRedo() ) );
actionEditRedo->setEnabled( FALSE ); actionEditRedo->setEnabled( FALSE );
actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 );
actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) );
actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) );
connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); connect( actionEditCut, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCut() ) );
actionEditCut->setEnabled( FALSE ); actionEditCut->setEnabled( FALSE );
actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 );
actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) );
actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) );
connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); connect( actionEditCopy, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCopy() ) );
actionEditCopy->setEnabled( FALSE ); actionEditCopy->setEnabled( FALSE );
actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 );
actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) );
actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) );
connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); connect( actionEditPaste, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPaste() ) );
actionEditPaste->setEnabled( FALSE ); actionEditPaste->setEnabled( FALSE );
actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 );
actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) );
actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) );
connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); connect( actionEditDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) );
actionEditDelete->setEnabled( FALSE ); actionEditDelete->setEnabled( FALSE );
#ifdef TQ_WS_MAC #ifdef TQ_WS_MAC
TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); connect( macDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) );
#endif #endif
actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 );
actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) );
actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); connect( actionEditSelectAll, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSelectAll() ) );
actionEditSelectAll->setEnabled( TRUE ); actionEditSelectAll->setEnabled( TRUE );
actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 );
actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) );
actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) );
connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); connect( actionEditRaise, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRaise() ) );
actionEditRaise->setEnabled( FALSE ); actionEditRaise->setEnabled( FALSE );
actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 );
actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) );
actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) );
connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); connect( actionEditLower, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLower() ) );
actionEditLower->setEnabled( FALSE ); actionEditLower->setEnabled( FALSE );
actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(),
i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") );
actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) );
connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); connect( actionEditAccels, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAccels() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"),
i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "S&lots..." ), 0, this, 0 );
actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") );
actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) );
connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); connect( actionEditFunctions, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFunctions() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"),
i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "Co&nnections..." ), 0, this, 0 );
actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") );
actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) );
connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); connect( actionEditConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editConnections() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(),
i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); i18n( "&Source..." ), CTRL + Key_E, this, 0 );
actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") );
actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) );
connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); connect( actionEditSource, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSource() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(),
i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "&Form Settings..." ), 0, this, 0 );
actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") );
actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) );
connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); connect( actionEditFormSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFormSettings() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(),
i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "Preferences..." ), 0, this, 0 );
actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") );
actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) );
connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); connect( actionEditPreferences, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPreferences() ) );
/* TQToolBar *tb = new TQToolBar( this, "Edit" ); /* TQToolBar *tb = new TQToolBar( this, "Edit" );
tb->setCloseMode( TQDockWindow::Undocked ); tb->setCloseMode( TQDockWindow::Undocked );
@ -240,7 +240,7 @@ void MainWindow::setupEditActions()
#endif #endif
TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); TQPopupMenu *menu = new TQPopupMenu( this, "Edit" );
connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); connect( menu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( updateEditorUndoRedo() ) );
menubar->insertItem( i18n( "&Edit" ), menu ); menubar->insertItem( i18n( "&Edit" ), menu );
actionEditUndo->addTo( menu ); actionEditUndo->addTo( menu );
actionEditRedo->addTo( menu ); actionEditRedo->addTo( menu );
@ -269,26 +269,26 @@ void MainWindow::setupEditActions()
void MainWindow::setupSearchActions() void MainWindow::setupSearchActions()
{ {
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); i18n( "&Find..." ), CTRL + Key_F, this, 0 );
connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); connect( actionSearchFind, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchFind() ) );
actionSearchFind->setEnabled( FALSE ); actionSearchFind->setEnabled( FALSE );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchIncremetalFindMenu() ) );
actionSearchIncremetal->setEnabled( FALSE ); actionSearchIncremetal->setEnabled( FALSE );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); connect( actionSearchReplace, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchReplace() ) );
actionSearchReplace->setEnabled( FALSE ); actionSearchReplace->setEnabled( FALSE );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchGotoLine() ) );
actionSearchGotoLine->setEnabled( FALSE ); actionSearchGotoLine->setEnabled( FALSE );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
@ -320,56 +320,56 @@ void MainWindow::setupLayoutActions()
if ( !actionGroupTools ) { if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this ); actionGroupTools = new TQActionGroup( this );
actionGroupTools->setExclusive( TRUE ); actionGroupTools->setExclusive( TRUE );
connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), this, TQT_SLOT( toolSelected(TQAction*) ) );
} }
actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"),
i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 );
actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") );
actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAdjustSize() ) );
actionEditAdjustSize->setEnabled( FALSE ); actionEditAdjustSize->setEnabled( FALSE );
actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 );
actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") );
actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) );
connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); connect( actionEditHLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontal() ) );
actionEditHLayout->setEnabled( FALSE ); actionEditHLayout->setEnabled( FALSE );
actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 );
actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") );
actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) );
connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); connect( actionEditVLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVertical() ) );
actionEditVLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE );
actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"),
i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 );
actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") );
actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); connect( actionEditGridLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutGrid() ) );
actionEditGridLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE );
actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
i18n( "Lay Out Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 );
actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") );
actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) );
connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontalSplit() ) );
actionEditSplitHorizontal->setEnabled( FALSE ); actionEditSplitHorizontal->setEnabled( FALSE );
actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
i18n( "Lay Out Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 );
actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") );
actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) );
connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVerticalSplit() ) );
actionEditSplitVertical->setEnabled( FALSE ); actionEditSplitVertical->setEnabled( FALSE );
actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); i18n( "&Break Layout" ), CTRL + Key_B, this, 0 );
actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") );
actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editBreakLayout() ) );
actionEditBreakLayout->setEnabled( FALSE ); actionEditBreakLayout->setEnabled( FALSE );
int id = WidgetDatabase::idFromClassName( "Spacer" ); int id = WidgetDatabase::idFromClassName( "Spacer" );
@ -487,7 +487,7 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"),
createIconSet( "designer_customwidget.png" ), createIconSet( "designer_customwidget.png" ),
i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); i18n("Edit &Custom Widgets..."), 0, this, 0 );
actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change "
"custom widgets") ); "custom widgets") );
actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom"
@ -602,10 +602,10 @@ void MainWindow::setupToolActions()
customWidgetToolBar2 = tb2; customWidgetToolBar2 = tb2;
} }
TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this );
a->setStatusTip( i18n( "Opens a dialog to configure the common " a->setStatusTip( i18n( "Opens a dialog to configure the common "
"widgets page of the toolbox") ); "widgets page of the toolbox") );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( toolsConfigure() ) );
mmenu->insertSeparator(); mmenu->insertSeparator();
a->addTo( mmenu ); a->addTo( mmenu );
resetTool(); resetTool();
@ -625,7 +625,7 @@ void MainWindow::setupFileActions()
DesignerAction *a = 0; DesignerAction *a = 0;
if ( !singleProject ) { if ( !singleProject ) {
DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); DesignerAction *a = new DesignerAction( this, 0 );
a->setText( i18n( "New" ) ); a->setText( i18n( "New" ) );
a->setToolTip( i18n( "New dialog or file" ) ); a->setToolTip( i18n( "New dialog or file" ) );
a->setMenuText( i18n( "&New..." ) ); a->setMenuText( i18n( "&New..." ) );
@ -633,7 +633,7 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_N ); a->setAccel( CTRL + Key_N );
a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); a->setStatusTip( i18n( "Creates a new project, form or source file." ) );
a->setWhatsThis( whatsThisFrom( "File|New" ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNew() ) );
a->addTo( tb ); a->addTo( tb );
a->addTo( fileMenu ); a->addTo( fileMenu );
actionNewFile = a; actionNewFile = a;
@ -653,15 +653,15 @@ void MainWindow::setupFileActions()
newForm->setIconSet( createIconSet("designer_form.png") ); newForm->setIconSet( createIconSet("designer_form.png") );
newForm->setAccel( CTRL + Key_N ); newForm->setAccel( CTRL + Key_N );
newForm->setStatusTip( i18n( "Creates a new dialog." ) ); newForm->setStatusTip( i18n( "Creates a new dialog." ) );
connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); connect( newForm, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewDialog() ) );
DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); DesignerAction *newFile = new DesignerAction( a, 0 );
newFile->setText( i18n( "New File" ) ); newFile->setText( i18n( "New File" ) );
newFile->setMenuText( i18n( "&File..." ) ); newFile->setMenuText( i18n( "&File..." ) );
newFile->setIconSet( createIconSet("designer_filenew.png") ); newFile->setIconSet( createIconSet("designer_filenew.png") );
newFile->setAccel( ALT + Key_N ); newFile->setAccel( ALT + Key_N );
newFile->setStatusTip( i18n( "Creates a new file." ) ); newFile->setStatusTip( i18n( "Creates a new file." ) );
connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); connect( newFile, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewFile() ) );
actionNewFile = newFile; actionNewFile = newFile;
a->addTo( tb ); a->addTo( tb );
@ -670,14 +670,14 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator(); fileMenu->insertSeparator();
} }
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
a->setText( i18n( "Open" ) ); a->setText( i18n( "Open" ) );
a->setMenuText( i18n( "&Open..." ) ); a->setMenuText( i18n( "&Open..." ) );
a->setIconSet( createIconSet("designer_fileopen.png") ); a->setIconSet( createIconSet("designer_fileopen.png") );
a->setAccel( CTRL + Key_O ); a->setAccel( CTRL + Key_O );
a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); a->setStatusTip( i18n( "Opens an existing project, form or source file ") );
a->setWhatsThis( whatsThisFrom( "File|Open" ) ); a->setWhatsThis( whatsThisFrom( "File|Open" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileOpen() ) );
if ( !singleProject ) { if ( !singleProject ) {
a->addTo( tb ); a->addTo( tb );
a->addTo( fileMenu ); a->addTo( fileMenu );
@ -685,20 +685,20 @@ void MainWindow::setupFileActions()
} }
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
actionFileClose = a; actionFileClose = a;
a->setText( i18n( "Close" ) ); a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) ); a->setMenuText( i18n( "&Close" ) );
a->setStatusTip( i18n( "Closes the current project or document" ) ); a->setStatusTip( i18n( "Closes the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Close" ) ); a->setWhatsThis(whatsThisFrom( "File|Close" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileClose() ) );
connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) { if ( !singleProject ) {
a->addTo( fileMenu ); a->addTo( fileMenu );
fileMenu->insertSeparator(); fileMenu->insertSeparator();
} }
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
actionFileSave = a; actionFileSave = a;
a->setText( i18n( "Save" ) ); a->setText( i18n( "Save" ) );
a->setMenuText( i18n( "&Save" ) ); a->setMenuText( i18n( "&Save" ) );
@ -706,41 +706,41 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_S ); a->setAccel( CTRL + Key_S );
a->setStatusTip( i18n( "Saves the current project or document" ) ); a->setStatusTip( i18n( "Saves the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Save" ) ); a->setWhatsThis(whatsThisFrom( "File|Save" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSave() ) );
connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
a->addTo( tb ); a->addTo( tb );
a->addTo( fileMenu ); a->addTo( fileMenu );
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
actionFileSaveAs = a; actionFileSaveAs = a;
a->setText( i18n( "Save As" ) ); a->setText( i18n( "Save As" ) );
a->setMenuText( i18n( "Save &As..." ) ); a->setMenuText( i18n( "Save &As..." ) );
a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); a->setStatusTip( i18n( "Saves the current form with a new filename" ) );
a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); a->setWhatsThis( whatsThisFrom( "File|Save As" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAs() ) );
connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) if ( !singleProject )
a->addTo( fileMenu ); a->addTo( fileMenu );
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
actionFileSaveAll = a; actionFileSaveAll = a;
a->setText( i18n( "Save All" ) ); a->setText( i18n( "Save All" ) );
a->setMenuText( i18n( "Sa&ve All" ) ); a->setMenuText( i18n( "Sa&ve All" ) );
a->setStatusTip( i18n( "Saves all open documents" ) ); a->setStatusTip( i18n( "Saves all open documents" ) );
a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); a->setWhatsThis( whatsThisFrom( "File|Save All" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAll() ) );
connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) { if ( !singleProject ) {
a->addTo( fileMenu ); a->addTo( fileMenu );
fileMenu->insertSeparator(); fileMenu->insertSeparator();
} }
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
a->setText( i18n( "Create Template" ) ); a->setText( i18n( "Create Template" ) );
a->setMenuText( i18n( "Create &Template..." ) ); a->setMenuText( i18n( "Create &Template..." ) );
a->setStatusTip( i18n( "Creates a new template" ) ); a->setStatusTip( i18n( "Creates a new template" ) );
a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); a->setWhatsThis( whatsThisFrom( "File|Create Template" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileCreateTemplate() ) );
if ( !singleProject ) if ( !singleProject )
a->addTo( fileMenu ); a->addTo( fileMenu );
@ -767,7 +767,7 @@ void MainWindow::setupFileActions()
if ( !singleProject ) if ( !singleProject )
fileMenu->insertSeparator(); fileMenu->insertSeparator();
a = new DesignerAction( TQT_TQOBJECT(this), 0 ); a = new DesignerAction( this, 0 );
actionFileExit = a; actionFileExit = a;
if ( !singleProjectMode() ) { if ( !singleProjectMode() ) {
a->setText( i18n( "Exit" ) ); a->setText( i18n( "Exit" ) );
@ -778,7 +778,7 @@ void MainWindow::setupFileActions()
a->setText( i18n( "Close" ) ); a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) ); a->setMenuText( i18n( "&Close" ) );
} }
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileQuit() ) );
a->addTo( fileMenu ); a->addTo( fileMenu );
} }
@ -792,8 +792,8 @@ void MainWindow::setupProjectActions()
ag->setMenuText( i18n( "Active Project" ) ); ag->setMenuText( i18n( "Active Project" ) );
ag->setExclusive( TRUE ); ag->setExclusive( TRUE );
ag->setUsesDropDown( TRUE ); ag->setUsesDropDown( TRUE );
connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SLOT( projectSelected( TQAction * ) ) );
connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SIGNAL( projectChanged() ) );
DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE ); DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE );
eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE ); eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE );
projects.insert( a, eProject ); projects.insert( a, eProject );
@ -805,31 +805,31 @@ void MainWindow::setupProjectActions()
if ( !singleProject ) if ( !singleProject )
projectMenu->insertSeparator(); projectMenu->insertSeparator();
a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 );
actionProjectAddFile = a; actionProjectAddFile = a;
a->setStatusTip( i18n("Adds a file to the current project") ); a->setStatusTip( i18n("Adds a file to the current project") );
a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( projectInsertFile() ) );
a->setEnabled( FALSE ); a->setEnabled( FALSE );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) if ( !singleProject )
a->addTo( projectMenu ); a->addTo( projectMenu );
actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(),
i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "&Image Collection..." ), 0, this, 0 );
actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") );
actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPixmapCollection() ) );
actionEditPixmapCollection->setEnabled( FALSE ); actionEditPixmapCollection->setEnabled( FALSE );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu ); actionEditPixmapCollection->addTo( projectMenu );
#ifndef TQT_NO_SQL #ifndef TQT_NO_SQL
actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(),
i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "&Database Connections..." ), 0, this, 0 );
actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") );
actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDatabaseConnections() ) );
//actionEditDatabaseConnections->setEnabled( FALSE ); //actionEditDatabaseConnections->setEnabled( FALSE );
//connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject ) if ( !singleProject )
@ -837,10 +837,10 @@ void MainWindow::setupProjectActions()
#endif #endif
actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(),
i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); i18n( "&Project Settings..." ), 0, this, 0 );
actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") );
actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editProjectSettings() ) );
actionEditProjectSettings->setEnabled( FALSE ); actionEditProjectSettings->setEnabled( FALSE );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu ); actionEditProjectSettings->addTo( projectMenu );
@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions()
layoutMenu = menu; layoutMenu = menu;
menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 );
a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 );
actionPreview = a; actionPreview = a;
a->setAccel( CTRL + Key_T ); a->setAccel( CTRL + Key_T );
a->setStatusTip( i18n("Opens a preview") ); a->setStatusTip( i18n("Opens a preview") );
a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) );
connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( previewForm() ) );
connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
a->addTo( menu ); a->addTo( menu );
menu->insertSeparator(); menu->insertSeparator();
TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); TQSignalMapper *mapper = new TQSignalMapper( this );
connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); connect( mapper, TQT_SIGNAL(mapped(const TQString&)), this, TQT_SLOT(previewForm(const TQString&)) );
TQStringList styles = TQStyleFactory::keys(); TQStringList styles = TQStyleFactory::keys();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
TQString info; TQString info;
@ -884,7 +884,7 @@ void MainWindow::setupPreviewActions()
info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." );
a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(),
i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 );
a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) );
a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>" a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>"
"<p>Use the preview to test the design and " "<p>Use the preview to test the design and "
@ -902,31 +902,31 @@ void MainWindow::setupWindowActions()
if ( !windowActionsSetup ) { if ( !windowActionsSetup ) {
windowActionsSetup = TRUE; windowActionsSetup = TRUE;
*/ */
actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this );
actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") );
actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) );
connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) );
actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this );
actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") );
actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) );
connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) );
actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this );
actionWindowClose->setStatusTip( i18n( "Closes the active window") ); actionWindowClose->setStatusTip( i18n( "Closes the active window") );
actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) );
connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) );
actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this );
actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") );
actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) );
connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) );
actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this );
actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); actionWindowNext->setStatusTip( i18n( "Activates the next window" ) );
actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) );
connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) );
actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this );
actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) );
actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) );
connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) );
@ -971,7 +971,7 @@ void MainWindow::setupWindowActions()
else else
itemText += w->caption(); itemText += w->caption();
int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); int id = windowMenu->insertItem( itemText, this, TQT_SLOT( windowsMenuActivated( int ) ) );
windowMenu->setItemParameter( id, i ); windowMenu->setItemParameter( id, i );
windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) );
} }
@ -979,31 +979,31 @@ void MainWindow::setupWindowActions()
void MainWindow::setupHelpActions() void MainWindow::setupHelpActions()
{ {
actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 );
actionHelpContents->setStatusTip( i18n("Opens the online help") ); actionHelpContents->setStatusTip( i18n("Opens the online help") );
actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) );
connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); connect( actionHelpContents, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpContents() ) );
actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 );
actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") );
actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) );
connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); connect( actionHelpManual, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpManual() ) );
actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 );
actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") );
actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) );
connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); connect( actionHelpAbout, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAbout() ) );
actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, this, 0 );
actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") );
actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) );
connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAboutTQt() ) );
actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ),
i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); i18n("What's This?"), SHIFT + Key_F1, this, 0 );
actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") );
actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) );
connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), this, TQT_SLOT( whatsThis() ) );
/* TQToolBar *tb = new TQToolBar( this, "Help" ); /* TQToolBar *tb = new TQToolBar( this, "Help" );
tb->setCloseMode( TQDockWindow::Undocked ); tb->setCloseMode( TQDockWindow::Undocked );
@ -1044,13 +1044,13 @@ void MainWindow::fileNewDialog()
currentProject->setModified( TRUE ); currentProject->setModified( TRUE );
workspace()->update(); workspace()->update();
fw->setProject( currentProject ); fw->setProject( currentProject );
MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); MetaDataBase::addEntry( fw );
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w ); fw->setMainContainer( w );
fw->setCaption( n ); fw->setCaption( n );
fw->resize( 600, 480 ); fw->resize( 600, 480 );
insertFormWindow( fw ); insertFormWindow( fw );
fw->killAccels( TQT_TQOBJECT(fw) ); fw->killAccels( fw );
fw->project()->setModified( TRUE ); fw->project()->setModified( TRUE );
fw->setFocus(); fw->setFocus();
fw->setSavePixmapInProject( TRUE ); fw->setSavePixmapInProject( TRUE );
@ -1542,7 +1542,7 @@ void MainWindow::editPaste()
if ( l.count() == 1 ) { if ( l.count() == 1 ) {
w = l.first(); w = l.first();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) &&
w != formWindow()->mainContainer() ) ) w != formWindow()->mainContainer() ) )
w = formWindow()->mainContainer(); w = formWindow()->mainContainer();
} }
@ -1761,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor()
} }
if ( !editor ) if ( !editor )
editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); editor = createSourceEditor( formWindow(), formWindow()->project(), lang );
return editor; return editor;
} }

@ -322,7 +322,7 @@ int MetaDataBase::spacing( TQObject *o )
return -1; return -1;
setupDataBase(); setupDataBase();
if ( ::tqt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@ -353,7 +353,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
TQWidget *widget = (TQWidget*)o; TQWidget *widget = (TQWidget*)o;
if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
isInnerLayout = FALSE; isInnerLayout = FALSE;
@ -379,7 +379,7 @@ int MetaDataBase::margin( TQObject *o )
return -1; return -1;
setupDataBase(); setupDataBase();
if ( ::tqt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@ -410,7 +410,7 @@ TQString MetaDataBase::resizeMode( TQObject *o )
return TQString(); return TQString();
setupDataBase(); setupDataBase();
if ( ::tqt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@ -514,8 +514,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
sender = formfile->project()->objectForFakeFormFile( formfile ); sender = formfile->project()->objectForFakeFormFile( formfile );
if ( !sender && senderName == "this" ) if ( !sender && senderName == "this" )
sender = formfile->formWindow() ? sender = formfile->formWindow() ?
TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : formfile->formWindow()->mainContainer() :
TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); formfile->project()->objectForFakeFormFile( formfile );
if ( !sender ) if ( !sender )
continue; continue;
MetaDataBase::addConnection( formfile->formWindow() ? MetaDataBase::addConnection( formfile->formWindow() ?
@ -524,8 +524,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
sender, sender,
(*cit).signal.latin1(), (*cit).signal.latin1(),
formfile->formWindow() ? formfile->formWindow() ?
TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : formfile->formWindow()->mainContainer() :
TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), formfile->project()->objectForFakeFormFile( formfile ),
(*cit).slot.latin1(), (*cit).slot.latin1(),
FALSE ); FALSE );
} }
@ -680,7 +680,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
return TRUE; return TRUE;
if ( ::tqt_cast<FormWindow*>(o) ) { if ( ::tqt_cast<FormWindow*>(o) ) {
o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); o = ( (FormWindow*)o )->mainContainer();
slotList = o->metaObject()->slotNames( TRUE ); slotList = o->metaObject()->slotNames( TRUE );
if ( slotList.find( slot ) != -1 ) if ( slotList.find( slot ) != -1 )
return TRUE; return TRUE;
@ -910,7 +910,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
return TRUE; return TRUE;
if ( ::tqt_cast<FormWindow*>(o) ) { if ( ::tqt_cast<FormWindow*>(o) ) {
o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); o = ( (FormWindow*)o )->mainContainer();
functionList = o->metaObject()->slotNames( TRUE ); functionList = o->metaObject()->slotNames( TRUE );
if ( functionList.find( function ) != -1 ) if ( functionList.find( function ) != -1 )
return TRUE; return TRUE;

@ -286,13 +286,13 @@ void MultiLineEditor::applyClicked()
SetPropertyCommand *propcmd; SetPropertyCommand *propcmd;
if ( doWrap ) if ( doWrap )
propcmd = new SetPropertyCommand( pn, formwindow, propcmd = new SetPropertyCommand( pn, formwindow,
TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), mlined, MainWindow::self->propertyeditor(),
"wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), "wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
TQVariant( 1 ), "WidgetWidth", oldWrapString ); TQVariant( 1 ), "WidgetWidth", oldWrapString );
else else
propcmd = new SetPropertyCommand( pn, formwindow, propcmd = new SetPropertyCommand( pn, formwindow,
TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), mlined, MainWindow::self->propertyeditor(),
"wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), "wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
TQVariant( 0 ), "NoWrap", oldWrapString ); TQVariant( 0 ), "NoWrap", oldWrapString );
propcmd->execute(); propcmd->execute();

@ -77,7 +77,7 @@ void FormItem::insert( Project *pro )
FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
fw->setProject( pro ); fw->setProject( pro );
MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); MetaDataBase::addEntry( fw );
if ( fType == Widget ) { if ( fType == Widget ) {
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ),
fw, n.latin1() ); fw, n.latin1() );
@ -109,10 +109,10 @@ void FormItem::insert( Project *pro )
// the wizard might have changed a lot, lets update everything // the wizard might have changed a lot, lets update everything
MainWindow::self->actioneditor()->setFormWindow( fw ); MainWindow::self->actioneditor()->setFormWindow( fw );
MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); MainWindow::self->objectHierarchy()->setFormWindow( fw, fw );
MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); MainWindow::self->objectHierarchy()->formDefinitionView()->refresh();
MainWindow::self->objectHierarchy()->rebuild(); MainWindow::self->objectHierarchy()->rebuild();
fw->killAccels( TQT_TQOBJECT(fw) ); fw->killAccels( fw );
fw->project()->setModified( TRUE ); fw->project()->setModified( TRUE );
fw->setFocus(); fw->setFocus();
if ( !pro->isDummy() ) { if ( !pro->isDummy() ) {

@ -174,31 +174,31 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( dlg.selectedURL().path() ); TQPixmap pix( dlg.selectedURL().path() );
if ( fn ) if ( fn )
*fn = dlg.selectedURL().path(); *fn = dlg.selectedURL().path();
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() );
return pix; return pix;
} }
} else if ( fw && fw->savePixmapInProject() ) { } else if ( fw && fw->savePixmapInProject() ) {
PixmapCollectionEditor dia( parent, 0, TRUE ); PixmapCollectionEditor dia( parent, 0, TRUE );
dia.setProject( fw->project() ); dia.setProject( fw->project() );
dia.setChooserMode( TRUE ); dia.setChooserMode( TRUE );
dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
if ( dia.exec() == TQDialog::Accepted ) { if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() );
return pix; return pix;
} }
} else { } else {
PixmapFunction dia( parent, 0, TRUE ); PixmapFunction dia( parent, 0, TRUE );
TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
dia.editArguments->setFocus(); dia.editArguments->setFocus();
if ( dia.exec() == TQDialog::Accepted ) { if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix; TQPixmap pix;
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() ); pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() );
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
return pix; return pix;
} }
} }
@ -211,7 +211,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
} }
ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
: TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) : TQFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) )
{ {
fmts = TQImage::inputFormats(); fmts = TQImage::inputFormats();
} }

@ -151,9 +151,9 @@ void PopupMenuEditorItem::init()
if ( m && !isSeparator() ) { if ( m && !isSeparator() ) {
s = new PopupMenuEditor( m->formWindow(), m ); s = new PopupMenuEditor( m->formWindow(), m );
TQString n = "PopupMenuEditor"; TQString n = "PopupMenuEditor";
m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE ); m->formWindow()->unify( s, n, TRUE );
s->setName( n ); s->setName( n );
MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::addEntry( s );
} }
} }
} }
@ -226,7 +226,7 @@ bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
return FALSE; return FALSE;
if ( event->type() == TQEvent::ChildInserted ) { if ( event->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = ( TQChildEvent * ) event; TQChildEvent * ce = ( TQChildEvent * ) event;
TQObject * c = TQT_TQOBJECT(ce->child()); TQObject * c = ce->child();
TQAction * action = ::tqt_cast<TQAction*>( c ); TQAction * action = ::tqt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates if ( s->find( action ) != -1 ) // avoid duplicates
return FALSE; return FALSE;

@ -555,7 +555,7 @@ void PropertyItem::setFocus( TQWidget *w )
{ {
if ( !tqApp->focusWidget() || if ( !tqApp->focusWidget() ||
listview->propertyEditor()->formWindow() && listview->propertyEditor()->formWindow() &&
( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) &&
!tqApp->focusWidget()->inherits( "Editor" ) ) ) !tqApp->focusWidget()->inherits( "Editor" ) ) )
w->setFocus(); w->setFocus();
} }
@ -598,7 +598,7 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) { if ( asciiOnly ) {
if ( PropertyItem::name() == "name" ) { if ( PropertyItem::name() == "name" ) {
lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) );
if ( listview->propertyEditor()->formWindow()->isFake() ) if ( listview->propertyEditor()->formWindow()->isFake() )
lin->setEnabled( FALSE ); lin->setEnabled( FALSE );
} else { } else {
@ -606,7 +606,7 @@ TQLineEdit *PropertyTextItem::lined()
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
"\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); "\xbd\xbe\xbf"), lin, "ascii_validator" ) );
} }
} if ( !hasMultiLines ) { } if ( !hasMultiLines ) {
lin->hide(); lin->hide();
@ -781,7 +781,7 @@ TQLineEdit *PropertyDoubleItem::lined()
if ( lin ) if ( lin )
return lin; return lin;
lin = new TQLineEdit( listview->viewport() ); lin = new TQLineEdit( listview->viewport() );
lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
connect( lin, TQT_SIGNAL( returnPressed() ), connect( lin, TQT_SIGNAL( returnPressed() ),
this, TQT_SLOT( setValue() ) ); this, TQT_SLOT( setValue() ) );
@ -2026,13 +2026,13 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 0 ) else if ( lst.count() > 0 )
item->setValue( TQStringList( lst[ 0 ] ) ); item->setValue( TQStringList( lst[ 0 ] ) );
else if ( withField ) else if ( withField )
item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] ) ); "database" ).toStringList()[ 0 ] ) );
if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
item->setCurrentItem( lst[ 0 ] ); item->setCurrentItem( lst[ 0 ] );
else if ( !isChanged() && withField ) else if ( !isChanged() && withField )
item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), item->setCurrentItem( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] ); "database" ).toStringList()[ 0 ] );
else else
item->setCurrentItem( 0 ); item->setCurrentItem( 0 );
@ -2044,7 +2044,7 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 1 ) else if ( lst.count() > 1 )
item->setValue( TQStringList( lst[ 1 ] ) ); item->setValue( TQStringList( lst[ 1 ] ) );
else if ( withField ) { else if ( withField ) {
TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 ) if ( fakeLst.count() > 1 )
item->setValue( fakeLst[ 1 ] ); item->setValue( fakeLst[ 1 ] );
} }
@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren()
if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
item->setCurrentItem( lst[ 1 ] ); item->setCurrentItem( lst[ 1 ] );
else if ( !isChanged() && withField ) { else if ( !isChanged() && withField ) {
TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 ) if ( fakeLst.count() > 1 )
item->setCurrentItem( fakeLst[ 1 ] ); item->setCurrentItem( fakeLst[ 1 ] );
else else
@ -3043,7 +3043,7 @@ void PropertyList::setupProperties()
TQStringList valueSet; TQStringList valueSet;
bool parentHasLayout = bool parentHasLayout =
w->isWidgetType() && w->isWidgetType() &&
!editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && !editor->formWindow()->isMainContainer( w ) && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p = const TQMetaProperty* p =
@ -3074,7 +3074,7 @@ void PropertyList::setupProperties()
} }
unique.insert( TQString::fromLatin1( it.current() ), TRUE ); unique.insert( TQString::fromLatin1( it.current() ), TRUE );
if ( editor->widget()->isWidgetType() && if ( editor->widget()->isWidgetType() &&
editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { editor->formWindow()->isMainContainer( editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 ) if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue; continue;
} else { // hide some toplevel-only stuff } else { // hide some toplevel-only stuff
@ -3712,11 +3712,11 @@ void PropertyList::setPropertyValue( PropertyItem *i )
else else
i->setValue( TQVariant( false ) ); i->setValue( TQVariant( false ) );
} else if ( i->name() == "layoutSpacing" ) { } else if ( i->name() == "layoutSpacing" ) {
( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ));
} else if ( i->name() == "layoutMargin" ) { } else if ( i->name() == "layoutMargin" ) {
( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ));
} else if ( i->name() == "resizeMode" ) { } else if ( i->name() == "resizeMode" ) {
( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ) );
} else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) { } else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@ -3966,7 +3966,7 @@ void EventList::setup()
it.current(), TQString(), TQString() ); it.current(), TQString(), TQString() );
eventItem->setOpen( TRUE ); eventItem->setOpen( TRUE );
TQValueList<MetaDataBase::Connection> conns = TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0; HierarchyItem *item = 0;
for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
cit != conns.end(); ++cit ) { cit != conns.end(); ++cit ) {
@ -4042,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
} else if ( res == DEL_ITEM && i->parent() ) { } else if ( res == DEL_ITEM && i->parent() ) {
MetaDataBase::Connection conn; MetaDataBase::Connection conn;
conn.sender = editor->widget(); conn.sender = editor->widget();
conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 ); conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 ); conn.slot = i->text( 0 );
delete i; delete i;
@ -4076,7 +4076,7 @@ void EventList::renamed( TQListViewItem *i )
} else { } else {
MetaDataBase::Connection conn; MetaDataBase::Connection conn;
conn.sender = editor->widget(); conn.sender = editor->widget();
conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 ); conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 ); conn.slot = i->text( 0 );
AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ),

@ -38,7 +38,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
v.resize( objects.count() ); v.resize( objects.count() );
v.setAutoDelete( TRUE ); v.setAutoDelete( TRUE );
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { for ( TQObject *o = objects.first(); o; o = objects.next() ) {
const TQMetaObject *m = o->metaObject(); const TQMetaObject *m = o->metaObject();
TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>; TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>;
while ( m ) { while ( m ) {
@ -74,7 +74,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
bool PropertyObject::setProperty( const char *name, const TQVariant& value ) bool PropertyObject::setProperty( const char *name, const TQVariant& value )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
o->setProperty( name, value ); o->setProperty( name, value );
return TRUE; return TRUE;
@ -87,13 +87,13 @@ TQVariant PropertyObject::property( const char *name ) const
void PropertyObject::mdPropertyChanged( const TQString &property, bool changed ) void PropertyObject::mdPropertyChanged( const TQString &property, bool changed )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyChanged( o, property, changed ); MetaDataBase::setPropertyChanged( o, property, changed );
} }
bool PropertyObject::mdIsPropertyChanged( const TQString &property ) bool PropertyObject::mdIsPropertyChanged( const TQString &property )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( MetaDataBase::isPropertyChanged( o, property ) ) if ( MetaDataBase::isPropertyChanged( o, property ) )
return TRUE; return TRUE;
} }
@ -102,29 +102,29 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property )
void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyComment( o, property, comment ); MetaDataBase::setPropertyComment( o, property, comment );
} }
TQString PropertyObject::mdPropertyComment( const TQString &property ) TQString PropertyObject::mdPropertyComment( const TQString &property )
{ {
return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property ); return MetaDataBase::propertyComment( objects.first(), property );
} }
void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value ) void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setFakeProperty( o, property, value ); MetaDataBase::setFakeProperty( o, property, value );
} }
TQVariant PropertyObject::mdFakeProperty( const TQString &property ) TQVariant PropertyObject::mdFakeProperty( const TQString &property )
{ {
return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property ); return MetaDataBase::fakeProperty( objects.first(), property );
} }
void PropertyObject::mdSetCursor( const TQCursor &c ) void PropertyObject::mdSetCursor( const TQCursor &c )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( o->isWidgetType() ) if ( o->isWidgetType() )
MetaDataBase::setCursor( (TQWidget*)o, c ); MetaDataBase::setCursor( (TQWidget*)o, c );
} }
@ -137,22 +137,22 @@ TQCursor PropertyObject::mdCursor()
void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg ) void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPixmapKey( o, pixmap, arg ); MetaDataBase::setPixmapKey( o, pixmap, arg );
} }
TQString PropertyObject::mdPixmapKey( int pixmap ) TQString PropertyObject::mdPixmapKey( int pixmap )
{ {
return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap ); return MetaDataBase::pixmapKey( objects.first(), pixmap );
} }
void PropertyObject::mdSetExportMacro( const TQString &macro ) void PropertyObject::mdSetExportMacro( const TQString &macro )
{ {
for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setExportMacro( o, macro ); MetaDataBase::setExportMacro( o, macro );
} }
TQString PropertyObject::mdExportMacro() TQString PropertyObject::mdExportMacro()
{ {
return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) ); return MetaDataBase::exportMacro( objects.first() );
} }

@ -347,7 +347,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setProject( MainWindow::self->currProject() ); formwindow->setProject( MainWindow::self->currProject() );
if ( mainwindow ) if ( mainwindow )
formwindow->setMainWindow( mainwindow ); formwindow->setMainWindow( mainwindow );
MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); MetaDataBase::addEntry( formwindow );
if ( !langIface ) { if ( !langIface ) {
TQString lang = "TQt Script"; TQString lang = "TQt Script";
@ -569,11 +569,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void"; function.returnType = "void";
function.type = "slot"; function.type = "slot";
function.function = n.firstChild().toText().data(); function.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, "slot", function.language, function.returnType ); function.access, "slot", function.language, function.returnType );
else else
MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
function.specifier, function.access, function.specifier, function.access,
"slot", function.language, "slot", function.language,
function.returnType ); function.returnType );
@ -597,12 +597,12 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( function.returnType.isEmpty() ) if ( function.returnType.isEmpty() )
function.returnType = "void"; function.returnType = "void";
function.function = n.firstChild().toText().data(); function.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, function.type, function.language, function.access, function.type, function.language,
function.returnType ); function.returnType );
else else
MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
function.specifier, function.access, function.specifier, function.access,
function.type, function.language, function.returnType ); function.type, function.language, function.returnType );
} }
@ -623,13 +623,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadTabOrder( tabOrder ); loadTabOrder( tabOrder );
if ( formwindow ) { if ( formwindow ) {
MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); MetaDataBase::setIncludes( formwindow, metaIncludes );
MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); MetaDataBase::setForwards( formwindow, metaForwards );
MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); MetaDataBase::setVariables( formwindow, metaVariables );
MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); MetaDataBase::setSignalList( formwindow, metaSignals );
metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() );
MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); MetaDataBase::setMetaInfo( formwindow, metaInfo );
MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
} }
loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions );
@ -638,7 +638,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
mainwindow->insertFormWindow( formwindow ); mainwindow->insertFormWindow( formwindow );
if ( formwindow ) { if ( formwindow ) {
formwindow->killAccels( TQT_TQOBJECT(formwindow) ); formwindow->killAccels( formwindow );
if ( formwindow->layout() ) if ( formwindow->layout() )
formwindow->layout()->activate(); formwindow->layout()->activate();
if ( hadGeometry ) if ( hadGeometry )
@ -719,7 +719,7 @@ bool Resource::save( TQIODevice* dev )
ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl; ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 ); saveMetaInfoBefore( ts, 0 );
saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); saveObject( formwindow->mainContainer(), 0, ts, 0 );
if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
@ -730,8 +730,8 @@ bool Resource::save( TQIODevice* dev )
saveActions( formwindow->actionList(), ts, 0 ); saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() ) if ( !images.isEmpty() )
saveImageCollection( ts, 0 ); saveImageCollection( ts, 0 );
if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || if ( !MetaDataBase::connections( formwindow ).isEmpty() ||
!MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) !MetaDataBase::slotList( formwindow ).isEmpty() )
saveConnections( ts, 0 ); saveConnections( ts, 0 );
saveTabOrder( ts, 0 ); saveTabOrder( ts, 0 );
saveMetaInfoAfter( ts, 0 ); saveMetaInfoAfter( ts, 0 );
@ -765,7 +765,7 @@ TQString Resource::copy()
p = p->parentWidget(); p = p->parentWidget();
} }
if ( save ) if ( save )
saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); saveObject( w, 0, ts, 0 );
} }
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 ); saveCustomWidgets( ts, 0 );
@ -823,7 +823,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
y = TQMAX( 0, parent->height() - w->height() ); y = TQMAX( 0, parent->height() - w->height() );
if ( x != w->x() || y != w->y() ) if ( x != w->x() || y != w->y() )
w->move( x, y ); w->move( x, y );
formwindow->selectWidget( TQT_TQOBJECT(w) ); formwindow->selectWidget( w );
} else if ( firstWidget.tagName() == "spacer" ) { } else if ( firstWidget.tagName() == "spacer" ) {
TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal ); TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal );
if ( !w ) if ( !w )
@ -837,7 +837,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
y = TQMAX( 0, parent->height() - w->height() ); y = TQMAX( 0, parent->height() - w->height() );
if ( x != w->x() || y != w->y() ) if ( x != w->x() || y != w->y() )
w->move( x, y ); w->move( x, y );
formwindow->selectWidget( TQT_TQOBJECT(w) ); formwindow->selectWidget( w );
} }
firstWidget = firstWidget.nextSibling().toElement(); firstWidget = firstWidget.nextSibling().toElement();
} }
@ -864,7 +864,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
inc.implDecl = "in implementation"; inc.implDecl = "in implementation";
inc.header = WidgetDatabase::includeFile( classID ); inc.header = WidgetDatabase::includeFile( classID );
bool found = false; bool found = false;
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQValueList<MetaDataBase::Include>::Iterator it; TQValueList<MetaDataBase::Include>::Iterator it;
for ( it = includes.begin(); it != includes.end(); ++it ) { for ( it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include currInc = *it; MetaDataBase::Include currInc = *it;
@ -878,7 +878,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
{ {
includes << inc; includes << inc;
} }
MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), includes ); MetaDataBase::setIncludes( formwindow, includes );
} }
if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) ) if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
@ -926,7 +926,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->widget( t->identifier() ); TQWidget *w = ws->widget( t->identifier() );
if ( !w ) if ( !w )
continue; continue;
if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 )
continue; // we don't know this widget continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent; ++indent;
@ -941,7 +941,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl; ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl;
indent--; indent--;
ts << makeIndent( indent ) << "</attribute>" << endl; ts << makeIndent( indent ) << "</attribute>" << endl;
saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); saveChildrenOf( w, ts, indent );
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
@ -951,7 +951,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->page( i ); TQWidget *w = ws->page( i );
if ( !w ) if ( !w )
continue; continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent; ++indent;
@ -965,7 +965,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl; ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl;
indent--; indent--;
ts << makeIndent( indent ) << "</attribute>" << endl; ts << makeIndent( indent ) << "</attribute>" << endl;
saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); saveChildrenOf( w, ts, indent );
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
@ -975,7 +975,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = tb->item( i ); TQWidget *w = tb->item( i );
if ( !w ) if ( !w )
continue; continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent; ++indent;
@ -986,7 +986,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl; ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++; indent++;
saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
indent--; indent--;
ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl; ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@ -994,7 +994,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl; ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl;
indent--; indent--;
ts << makeIndent( indent ) << "</attribute>" << endl; ts << makeIndent( indent ) << "</attribute>" << endl;
saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); saveChildrenOf( w, ts, indent );
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
@ -1004,7 +1004,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = wiz->page( i ); TQWidget *w = wiz->page( i );
if ( !w ) if ( !w )
continue; continue;
if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent; ++indent;
@ -1019,12 +1019,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl; ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl;
indent--; indent--;
ts << makeIndent( indent ) << "</attribute>" << endl; ts << makeIndent( indent ) << "</attribute>" << endl;
saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); saveChildrenOf( w, ts, indent );
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
} else if ( ::tqt_cast<TQMainWindow*>(obj) ) { } else if ( ::tqt_cast<TQMainWindow*>(obj) ) {
saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else { } else {
bool saved = FALSE; bool saved = FALSE;
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS #ifdef TQT_CONTAINER_CUSTOM_WIDGETS
@ -1042,10 +1042,10 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
int i = 0; int i = 0;
for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase:: if ( WidgetDatabase::
idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
continue; // we don't know this widget continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"" ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << WidgetFactory::classNameOf( w )
<< "\">" << endl; << "\">" << endl;
++indent; ++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl; ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@ -1071,7 +1071,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) { if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\"" ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << WidgetFactory::classNameOf( w )
<< "\">" << endl; << "\">" << endl;
++indent; ++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl; ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@ -1229,7 +1229,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
else if ( ::tqt_cast<TQTable*>(obj) ) { else if ( ::tqt_cast<TQTable*>(obj) ) {
TQTable *table = (TQTable*)obj; TQTable *table = (TQTable*)obj;
int i; int i;
TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
# ifndef TQT_NO_SQL # ifndef TQT_NO_SQL
bool isDataTable = ::tqt_cast<TQDataTable*>(table); bool isDataTable = ::tqt_cast<TQDataTable*>(table);
# else # else
@ -1319,10 +1319,10 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
if ( formwindow && formwindow->savePixmapInline() ) if ( formwindow && formwindow->savePixmapInline() )
ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl; ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl;
else if ( formwindow && formwindow->savePixmapInProject() ) else if ( formwindow && formwindow->savePixmapInProject() )
ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
<< "</" << tagname << ">" << endl; << "</" << tagname << ">" << endl;
else else
ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
<< "</" << tagname << ">" << endl; << "</" << tagname << ">" << endl;
} }
@ -1334,7 +1334,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
TQImage img = loadFromCollection( arg ); TQImage img = loadFromCollection( arg );
TQPixmap pix; TQPixmap pix;
pix.convertFromImage( img ); pix.convertFromImage( img );
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix; return pix;
} else if ( formwindow && formwindow->savePixmapInProject() ) { } else if ( formwindow && formwindow->savePixmapInProject() ) {
TQPixmap pix; TQPixmap pix;
@ -1346,13 +1346,13 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
pix.convertFromImage( pix.convertToImage() ); pix.convertFromImage( pix.convertToImage() );
} }
MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix; return pix;
} }
TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() );
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( pix.convertToImage() ); pix.convertFromImage( pix.convertToImage() );
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix; return pix;
} }
@ -1420,7 +1420,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
// save properties of layout // save properties of layout
if ( lay != WidgetFactory::NoLayout ) if ( lay != WidgetFactory::NoLayout )
saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); saveObjectProperties( layout, ts, indent );
} }
@ -1452,12 +1452,12 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
} }
} }
} else if ( ::tqt_cast<TQLayout*>(w) ) { } else if ( ::tqt_cast<TQLayout*>(w) ) {
if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 )
changed << "spacing"; changed << "spacing";
if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 )
changed << "margin"; changed << "margin";
if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) != "Auto"
&& !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ).isEmpty() )
changed << "resizeMode"; changed << "resizeMode";
} }
@ -1569,7 +1569,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
switch ( t ) { switch ( t ) {
case TQVariant::String: case TQVariant::String:
if ( name == "resizeMode" ) { if ( name == "resizeMode" ) {
TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
if ( !resmod.isNull() && resmod != "Auto" ) { if ( !resmod.isNull() && resmod != "Auto" ) {
ts << makeIndent( indent ) << "<enum>"; ts << makeIndent( indent ) << "<enum>";
ts << resmod; ts << resmod;
@ -1592,9 +1592,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
if ( ::tqt_cast<TQLayout*>(w) ) { if ( ::tqt_cast<TQLayout*>(w) ) {
num = -1; num = -1;
if ( name == "spacing" ) if ( name == "spacing" )
num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
else if ( name == "margin" ) else if ( name == "margin" )
num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
if ( num != -1 ) if ( num != -1 )
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl; ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
} else { } else {
@ -1824,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
// ### TODO loading for custom container widgets without pages // ### TODO loading for custom container widgets without pages
#endif #endif
if ( !className.isNull() ) { if ( !className.isNull() ) {
obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE );
if ( !obj ) { if ( !obj ) {
TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n" i18n( "Error loading %1.\n"
@ -1881,7 +1881,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
|| isPlugin || isPlugin
#endif #endif
) ) ) )
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
} }
} }
@ -1895,17 +1895,17 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
createObject( n, w, layout ); createObject( n, w, layout );
} else if ( n.tagName() == "hbox" ) { } else if ( n.tagName() == "hbox" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
continue; continue;
} else if ( n.tagName() == "grid" ) { } else if ( n.tagName() == "grid" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
continue; continue;
} else if ( n.tagName() == "vbox" ) { } else if ( n.tagName() == "vbox" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
continue; continue;
} else if ( n.tagName() == "property" && obj ) { } else if ( n.tagName() == "property" && obj ) {
@ -1968,7 +1968,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( w->isWidgetType() ) if ( w->isWidgetType() )
widgets.insert( w->name(), w ); widgets.insert( w->name(), w );
return TQT_TQOBJECT(w); return w;
} }
void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
@ -2023,7 +2023,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
bool hasPixmap = FALSE; bool hasPixmap = FALSE;
TQString txt; TQString txt;
TQString field; TQString field;
TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "property" ) { if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" ); TQString attrib = n.attribute( "name" );
@ -2048,7 +2048,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
h->setLabel( i, txt ); h->setLabel( i, txt );
if ( !isRow && !field.isEmpty() ) if ( !isRow && !field.isEmpty() )
fieldMap.insert( txt, field ); fieldMap.insert( txt, field );
MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); MetaDataBase::setColumnFields( table, fieldMap );
} }
#endif #endif
} }
@ -2074,7 +2074,7 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo
void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{ {
if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) )
return; return;
if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) { if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) {
@ -2164,7 +2164,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
spacer->setInteraciveMode( FALSE ); spacer->setInteraciveMode( FALSE );
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "property" ) if ( n.tagName() == "property" )
setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement(); n = n.nextSibling().toElement();
} }
spacer->setInteraciveMode( TRUE ); spacer->setInteraciveMode( TRUE );
@ -2229,7 +2229,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) { if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v ); MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) { if ( obj->isWidgetType() ) {
if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { if ( prop == "database" && obj != toplevel ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 ) if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] ); dbControls.insert( obj->name(), lst[ 2 ] );
@ -2283,8 +2283,8 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
} }
if ( prop == "icon" ) { if ( prop == "icon" ) {
formwindow->setIcon( v.toPixmap() ); formwindow->setIcon( v.toPixmap() );
TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() );
MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), MetaDataBase::setPixmapKey( formwindow,
formwindow->icon()->serialNumber(), pmk ); formwindow->icon()->serialNumber(), pmk );
} }
@ -2302,13 +2302,13 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( ::tqt_cast<TQLayout*>(obj) ) { if ( ::tqt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) { if ( prop == "spacing" ) {
MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() );
return; return;
} else if ( prop == "margin" ) { } else if ( prop == "margin" ) {
MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() );
return; return;
} else if ( e.tagName() == "enum" && prop == "resizeMode" ) { } else if ( e.tagName() == "enum" && prop == "resizeMode" ) {
MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toString() );
return; return;
} }
} }
@ -2316,7 +2316,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) { if ( prop == "name" ) {
if ( pasting ) { if ( pasting ) {
TQString s = v.toString(); TQString s = v.toString();
formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); formwindow->unify( obj, s, TRUE );
obj->setName( s ); obj->setName( s );
return; return;
} else if ( formwindow && obj == formwindow->mainContainer() ) { } else if ( formwindow && obj == formwindow->mainContainer() ) {
@ -2485,7 +2485,7 @@ TQImage Resource::loadFromCollection( const TQString &name )
void Resource::saveConnections( TQTextStream &ts, int indent ) void Resource::saveConnections( TQTextStream &ts, int indent )
{ {
TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
if ( connections.isEmpty() ) if ( connections.isEmpty() )
return; return;
ts << makeIndent( indent ) << "<connections>" << endl; ts << makeIndent( indent ) << "<connections>" << endl;
@ -2498,8 +2498,8 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue; continue;
if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && if ( formwindow->isMainContainer( (*it).receiver ) &&
!MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
continue; continue;
if ( conn.sender->inherits( "CustomWidget" ) ) { if ( conn.sender->inherits( "CustomWidget" ) ) {
@ -2542,7 +2542,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.sender = 0; conn.sender = 0;
TQString name = n2.firstChild().toText().data(); TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.sender = TQT_TQOBJECT(toplevel); conn.sender = toplevel;
} else { } else {
if ( name == "this" ) if ( name == "this" )
name = toplevel->name(); name = toplevel->name();
@ -2562,7 +2562,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.receiver = 0; conn.receiver = 0;
TQString name = n2.firstChild().toText().data(); TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.receiver = TQT_TQOBJECT(toplevel); conn.receiver = toplevel;
} else { } else {
TQObjectList *l = toplevel->queryList( 0, name, FALSE ); TQObjectList *l = toplevel->queryList( 0, name, FALSE );
if ( l ) { if ( l ) {
@ -2581,13 +2581,13 @@ void Resource::loadConnections( const TQDomElement &e )
} }
if ( formwindow ) { if ( formwindow ) {
if ( conn.sender == formwindow ) if ( conn.sender == formwindow )
conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); conn.sender = formwindow->mainContainer();
if ( conn.receiver == formwindow ) if ( conn.receiver == formwindow )
conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); conn.receiver = formwindow->mainContainer();
} }
if ( conn.sender && conn.receiver ) { if ( conn.sender && conn.receiver ) {
if ( lang == "C++" ) { if ( lang == "C++" ) {
MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
conn.sender, conn.signal, conn.receiver, conn.slot ); conn.sender, conn.signal, conn.receiver, conn.slot );
} }
} }
@ -2604,11 +2604,11 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() ) if ( slot.returnType.isEmpty() )
slot.returnType = "void"; slot.returnType = "void";
slot.function = n.firstChild().toText().data(); slot.function = n.firstChild().toText().data();
if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) )
MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType ); slot.access, "slot", slot.language, slot.returnType );
else else
MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, MetaDataBase::changeFunctionAttributes( formwindow, slot.function, slot.function,
slot.specifier, slot.access, slot.specifier, slot.access,
"slot", slot.language, slot.returnType ); "slot", slot.language, slot.returnType );
} }
@ -2798,7 +2798,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{ {
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
TQString cn; TQString cn;
if ( info.classNameChanged && !info.className.isEmpty() ) if ( info.classNameChanged && !info.className.isEmpty() )
cn = info.className; cn = info.className;
@ -2813,9 +2813,9 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{ {
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
if ( !langIface || formwindow->project()->isCpp() ) { if ( !langIface || formwindow->project()->isCpp() ) {
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQString extensionInclude; TQString extensionInclude;
bool needExtensionInclude = FALSE; bool needExtensionInclude = FALSE;
if ( langIface && if ( langIface &&
@ -2842,7 +2842,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl; ts << makeIndent( indent ) << "</includes>" << endl;
} }
TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); TQStringList forwards = MetaDataBase::forwards( formwindow );
if ( !forwards.isEmpty() ) { if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl; ts << makeIndent( indent ) << "<forwards>" << endl;
indent++; indent++;
@ -2851,7 +2851,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--; indent--;
ts << makeIndent( indent ) << "</forwards>" << endl; ts << makeIndent( indent ) << "</forwards>" << endl;
} }
TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow );
if ( !varLst.isEmpty() ) { if ( !varLst.isEmpty() ) {
ts << makeIndent( indent ) << "<variables>" << endl; ts << makeIndent( indent ) << "<variables>" << endl;
indent++; indent++;
@ -2867,7 +2867,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--; indent--;
ts << makeIndent( indent ) << "</variables>" << endl; ts << makeIndent( indent ) << "</variables>" << endl;
} }
TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) { if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl; ts << makeIndent( indent ) << "<signals>" << endl;
indent++; indent++;
@ -2877,7 +2877,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</signals>" << endl; ts << makeIndent( indent ) << "</signals>" << endl;
} }
TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) { if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl; ts << makeIndent( indent ) << "<slots>" << endl;
indent++; indent++;
@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl; ts << makeIndent( indent ) << "</slots>" << endl;
} }
TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
if ( !functionList.isEmpty() ) { if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl; ts << makeIndent( indent ) << "<functions>" << endl;
indent++; indent++;
@ -2930,7 +2930,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "<pixmapinproject/>" << endl; ts << makeIndent( indent ) << "<pixmapinproject/>" << endl;
else else
ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl; ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl;
if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() )
ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl; ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
if ( formwindow ) { if ( formwindow ) {
ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing() ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
@ -3085,9 +3085,9 @@ void Resource::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "action" ) { if ( n.tagName() == "action" ) {
loadChildAction( TQT_TQOBJECT(formwindow), n ); loadChildAction( formwindow, n );
} else if ( n.tagName() == "actiongroup" ) { } else if ( n.tagName() == "actiongroup" ) {
loadChildAction( TQT_TQOBJECT(formwindow), n ); loadChildAction( formwindow, n );
} }
n = n.nextSibling().toElement(); n = n.nextSibling().toElement();
} }
@ -3108,7 +3108,7 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
continue; continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl; ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++; indent++;
saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); saveObjectProperties( tb, ts, indent );
TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions(); TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::tqt_cast<QSeparatorAction*>(a) ) { if ( ::tqt_cast<QSeparatorAction*>(a) ) {
@ -3117,14 +3117,14 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
if ( ::tqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) { if ( ::tqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
TQWidget *w = ( (QDesignerAction*)a )->widget(); TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\"" ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl; << WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++; indent++;
const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) ) if ( w->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className ); usedCustomWidgets << TQString( className );
if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) )
saveItems( TQT_TQOBJECT(w), ts, indent ); saveItems( w, ts, indent );
saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); saveObjectProperties( w, ts, indent );
indent--; indent--;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} else { } else {
@ -3147,8 +3147,8 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return; return;
ts << makeIndent( indent ) << "<menubar>" << endl; ts << makeIndent( indent ) << "<menubar>" << endl;
indent++; indent++;
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove
saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); saveObjectProperties( mb, ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) { for ( int i = 0; i < (int)mb->count(); ++i ) {
MenuBarEditorItem *m = mb->item( i ); MenuBarEditorItem *m = mb->item( i );
@ -3217,12 +3217,12 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a ); tb->addAction( a );
} else if ( n2.tagName() == "widget" ) { } else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb ); TQWidget *w = (TQWidget*)createObject( n2, tb );
QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); QDesignerAction *a = new QDesignerAction( w, tb );
a->addTo( tb ); a->addTo( tb );
tb->addAction( a ); tb->addAction( a );
tb->installEventFilters( w ); tb->installEventFilters( w );
} else if ( n2.tagName() == "property" ) { } else if ( n2.tagName() == "property" ) {
setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
} }
n2 = n2.nextSibling().toElement(); n2 = n2.nextSibling().toElement();
} }
@ -3236,16 +3236,16 @@ void Resource::loadMenuBar( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer();
MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); MenuBarEditor *mb = new MenuBarEditor( formwindow, mw );
MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); MetaDataBase::addEntry( mb );
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "item" ) { if ( n.tagName() == "item" ) {
PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw );
loadPopupMenu( popup, n ); loadPopupMenu( popup, n );
popup->setName( n.attribute( "name" ) ); popup->setName( n.attribute( "name" ) );
mb->insertItem( n.attribute( "text" ), popup ); mb->insertItem( n.attribute( "text" ), popup );
MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); MetaDataBase::addEntry( popup );
} else if ( n.tagName() == "property" ) { } else if ( n.tagName() == "property" ) {
setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) { } else if ( n.tagName() == "separator" ) {
mb->insertSeparator(); mb->insertSeparator();
} }
@ -3255,7 +3255,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
{ {
MetaDataBase::addEntry( TQT_TQOBJECT(p) ); MetaDataBase::addEntry( p );
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQAction *a = 0; TQAction *a = 0;
while ( !n.isNull() ) { while ( !n.isNull() ) {

@ -236,7 +236,7 @@ void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
formWindow, formWindow,
widget, origGeom, widget, origGeom,
widget->geometry() ) ); widget->geometry() ) );
formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) ); formWindow->emitUpdateProperties( widget );
} }
void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height ) void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height )

@ -47,7 +47,7 @@ SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageIn
lIface->addRef(); lIface->addRef();
editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), editor = iFace->editor( MainWindow::self->areEditorsReadOnly(),
this, MainWindow::self->designerInterface() ); this, MainWindow::self->designerInterface() );
iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); iFace->onBreakPointChange( MainWindow::self, TQT_SLOT( breakPointsChanged() ) );
resize( 600, 400 ); resize( 600, 400 );
setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) );
} }
@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p )
if ( formWindow()->isFake() ) if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else else
iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); iFace->setContext( formWindow()->mainContainer() );
} else { } else {
iFace->setContext( 0 ); iFace->setContext( 0 );
} }
@ -235,7 +235,7 @@ void SourceEditor::resetContext()
if ( formWindow()->isFake() ) if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else else
iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); iFace->setContext( formWindow()->mainContainer() );
} else { } else {
iFace->setContext( 0 ); iFace->setContext( 0 );
} }

@ -77,7 +77,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
} }
if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) { if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) {
TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
TQStringList fields; TQStringList fields;
fields << "<no field>"; fields << "<no field>";
@ -412,7 +412,7 @@ void TableEditor::readFromTable()
#ifndef TQT_NO_TABLE #ifndef TQT_NO_TABLE
TQHeader *cols = editTable->horizontalHeader(); TQHeader *cols = editTable->horizontalHeader();
table->setNumCols( cols->count() ); table->setNumCols( cols->count() );
TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) ); TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable );
for ( int i = 0; i < cols->count(); ++i ) { for ( int i = 0; i < cols->count(); ++i ) {
if ( editTable->horizontalHeader()->iconSet( i ) ) { if ( editTable->horizontalHeader()->iconSet( i ) ) {
table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ), table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),

@ -44,7 +44,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent )
: VariableDialogBase( parent ), formWindow( fw ) : VariableDialogBase( parent ), formWindow( fw )
{ {
varView->setSorting( -1 ); varView->setSorting( -1 );
TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow );
TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin(); TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
for ( ; it != varLst.end(); ++it ) { for ( ; it != varLst.end(); ++it ) {
TQListViewItem *i = new TQListViewItem( varView ); TQListViewItem *i = new TQListViewItem( varView );

@ -543,12 +543,12 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );
if ( !w ) if ( !w )
return 0; return 0;
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
if ( !defaultProperties->contains( id ) ) if ( !defaultProperties->contains( id ) )
saveDefaultProperties( TQT_TQOBJECT(w), id ); saveDefaultProperties( w, id );
if ( !changedProperties->contains( id ) ) if ( !changedProperties->contains( id ) )
saveChangedProperties( TQT_TQOBJECT(w), id ); saveChangedProperties( w, id );
return w; return w;
} }
@ -562,11 +562,11 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int spacing = MainWindow::self->currentLayoutDefaultSpacing(); int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0; int margin = 0;
int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); int metaspacing = MetaDataBase::spacing( widget );
int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); int metamargin = MetaDataBase::margin( widget );
if ( ::tqt_cast<TQLayoutWidget*>(widget) && if ( ::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
margin = MainWindow::self->currentLayoutDefaultMargin(); margin = MainWindow::self->currentLayoutDefaultMargin();
@ -585,7 +585,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
if ( !layout && ::tqt_cast<TQToolBox*>(widget) ) if ( !layout && ::tqt_cast<TQToolBox*>(widget) )
widget = ((TQToolBox*)widget)->currentItem(); widget = ((TQToolBox*)widget)->currentItem();
MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); MetaDataBase::addEntry( widget );
TQLayout *l = 0; TQLayout *l = 0;
int align = 0; int align = 0;
@ -609,8 +609,8 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
return 0; return 0;
} }
align = TQt::AlignTop; align = TQt::AlignTop;
MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); MetaDataBase::setMargin( gb, metamargin );
MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); MetaDataBase::setSpacing( gb, metaspacing );
} else { } else {
if ( layout ) { if ( layout ) {
switch ( type ) { switch ( type ) {
@ -626,7 +626,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
default: default:
return 0; return 0;
} }
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
l->setSpacing( spacing ); l->setSpacing( spacing );
l->setMargin( margin ); l->setMargin( margin );
} else { } else {
@ -643,10 +643,10 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
default: default:
return 0; return 0;
} }
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
if ( widget ) { if ( widget ) {
MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); MetaDataBase::setMargin( widget, metamargin );
MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); MetaDataBase::setSpacing( widget, metaspacing );
} else { } else {
l->setMargin( margin ); l->setMargin( margin );
l->setSpacing( spacing ); l->setSpacing( spacing );
@ -654,7 +654,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
} }
} }
l->setAlignment( align ); l->setAlignment( align );
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
return l; return l;
} }
@ -790,8 +790,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
QDesignerLabel *l = new QDesignerLabel( parent, name ); QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) { if ( init ) {
l->setText( TQString::fromLatin1( name ) ); l->setText( TQString::fromLatin1( name ) );
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); MetaDataBase::setPropertyChanged( l, "text", TRUE );
} }
return l; return l;
} else if ( className == "PixmapLabel" ) { } else if ( className == "PixmapLabel" ) {
@ -799,9 +799,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( init ) { if ( init ) {
l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) );
l->setScaledContents( TRUE ); l->setScaledContents( TRUE );
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); MetaDataBase::setPropertyChanged( l, "pixmap", TRUE );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE );
} }
return l; return l;
} else if ( className == "TQLayoutWidget" ) } else if ( className == "TQLayoutWidget" )
@ -812,11 +812,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
FormWindow *fw = find_formwindow( parent ); FormWindow *fw = find_formwindow( parent );
TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 1") ); tw->addTab( w, i18n("Tab 1") );
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 2") ); tw->addTab( w, i18n("Tab 2") );
MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); MetaDataBase::addEntry( tw );
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
} }
return tw; return tw;
} else if ( className == "TQWidgetStack" ) { } else if ( className == "TQWidgetStack" ) {
@ -825,8 +825,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
FormWindow *fw = find_formwindow( parent ); FormWindow *fw = find_formwindow( parent );
TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" );
ws->insertPage( w ); ws->insertPage( w );
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); MetaDataBase::addEntry( ws );
} }
return ws; return ws;
} else if ( className == "TQComboBox" ) { } else if ( className == "TQComboBox" ) {
@ -842,7 +842,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
FormWindow *fw = find_formwindow( parent ); FormWindow *fw = find_formwindow( parent );
if ( fw ) { if ( fw ) {
QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); QDesignerWidget *dw = new QDesignerWidget( fw, parent, name );
MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); MetaDataBase::addEntry( dw );
return dw; return dw;
} }
} }
@ -862,16 +862,16 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
if ( init && ::tqt_cast<FormWindow*>(parent) ) { if ( init && ::tqt_cast<FormWindow*>(parent) ) {
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); MetaDataBase::addEntry( dw );
wiz->addPage( dw, i18n( "Page" ) ); wiz->addPage( dw, i18n( "Page" ) );
TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) );
} }
return wiz; return wiz;
} else if ( className == "Spacer" ) { } else if ( className == "Spacer" ) {
Spacer *s = new Spacer( parent, name ); Spacer *s = new Spacer( parent, name );
MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); MetaDataBase::setPropertyChanged( s, "sizeType", TRUE );
if ( !r ) if ( !r )
return s; return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@ -899,8 +899,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
s->setOrientation( orient ); s->setOrientation( orient );
else if ( r->width() > r->height() ) else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal ); s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
return s; return s;
} else if ( className == "TQScrollBar" ) { } else if ( className == "TQScrollBar" ) {
TQScrollBar *s = new TQScrollBar( parent, name ); TQScrollBar *s = new TQScrollBar( parent, name );
@ -910,8 +910,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
s->setOrientation( orient ); s->setOrientation( orient );
else if ( r->width() > r->height() ) else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal ); s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::addEntry( s );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
return s; return s;
} else if ( className == "TQFrame" ) { } else if ( className == "TQFrame" ) {
if ( !init ) if ( !init )
@ -921,10 +921,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return f; return f;
} else if ( className == "Line" ) { } else if ( className == "Line" ) {
Line *l = new Line( parent, name ); Line *l = new Line( parent, name );
MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::addEntry( l );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); MetaDataBase::setPropertyChanged( l, "orientation", TRUE );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE );
MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); MetaDataBase::setPropertyChanged( l, "frameShape", TRUE );
if ( !r ) if ( !r )
return l; return l;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@ -937,7 +937,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
mw->setDockEnabled( TQt::DockMinimized, FALSE ); mw->setDockEnabled( TQt::DockMinimized, FALSE );
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" );
mw->setDockMenuEnabled( FALSE ); mw->setDockMenuEnabled( FALSE );
MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); MetaDataBase::addEntry( dw );
mw->setCentralWidget( dw ); mw->setCentralWidget( dw );
(void)mw->statusBar(); (void)mw->statusBar();
dw->show(); dw->show();
@ -950,11 +950,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) :
new TQWidget( tb, "page1" ); new TQWidget( tb, "page1" );
tb->addItem( w, i18n("Page 1") ); tb->addItem( w, i18n("Page 1") );
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" );
tb->addItem( w, i18n("Page 2") ); tb->addItem( w, i18n("Page 2") );
MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); MetaDataBase::addEntry( tb );
MetaDataBase::addEntry( TQT_TQOBJECT(w) ); MetaDataBase::addEntry( w );
return tb; return tb;
} }
#ifndef TQT_NO_SQL #ifndef TQT_NO_SQL
@ -1021,7 +1021,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
TQLayout *lay = w->layout(); TQLayout *lay = w->layout();
if ( ::tqt_cast<TQGroupBox*>(w) ) { if ( ::tqt_cast<TQGroupBox*>(w) ) {
TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" ); TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() ) if ( l && l->first() )
lay = (TQLayout*)l->first(); lay = (TQLayout*)l->first();
delete l; delete l;
@ -1063,7 +1063,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
{ {
TQObject *o = TQT_TQOBJECT(layout); TQObject *o = layout;
while ( o ) { while ( o ) {
if ( o->isWidgetType() ) if ( o->isWidgetType() )
return (TQWidget*)o; return (TQWidget*)o;
@ -1132,7 +1132,7 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
return w->parentWidget()->parentWidget()->parentWidget(); return w->parentWidget()->parentWidget()->parentWidget();
while ( w ) { while ( w ) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) );
if ( WidgetDatabase::isContainer( id ) || if ( WidgetDatabase::isContainer( id ) ||
w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) w && ::tqt_cast<FormWindow*>(w->parentWidget()) )
return w; return w;

@ -59,7 +59,7 @@ KDevDesigner::KDevDesigner()
// our hands on it // our hands on it
TQStringList args; TQStringList args;
args.append("in shell"); args.append("in shell");
m_part = static_cast<KParts::ReadWritePart *>(factory->create(TQT_TQOBJECT(this), m_part = static_cast<KParts::ReadWritePart *>(factory->create(this,
"kdevdesigner_part", "KParts::ReadWritePart", args)); "kdevdesigner_part", "KParts::ReadWritePart", args));
if (m_part) if (m_part)
@ -99,16 +99,16 @@ void KDevDesigner::load(const KURL& url)
void KDevDesigner::setupActions() void KDevDesigner::setupActions()
{ {
/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); /* KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());*/
KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
} }
void KDevDesigner::saveProperties(TDEConfig* /*config*/) void KDevDesigner::saveProperties(TDEConfig* /*config*/)

@ -356,10 +356,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
continue; continue;
if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) if ( cit.key()->inherits( "QDesignerDataBrowser2" ) )
( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); cit.key(), *(*cit).dbControls );
else if ( cit.key()->inherits( "QDesignerDataView2" ) ) else if ( cit.key()->inherits( "QDesignerDataView2" ) )
( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table,
TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); cit.key(), *(*cit).dbControls );
} }
for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin();
@ -787,7 +787,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
TQListView *listView = 0; TQListView *listView = 0;
if ( parent != 0 && parent->inherits("TQListView") ) if ( parent != 0 && parent->inherits("TQListView") )
parent = TQT_TQOBJECT((TQListView *) parent); parent = (TQListView *) parent;
TQListViewItem *item = 0; TQListViewItem *item = 0;
if ( listView != 0 ) { if ( listView != 0 ) {
if ( parentItem == 0 ) { if ( parentItem == 0 ) {
@ -946,22 +946,22 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
} else { } else {
layout = createLayout( parentWidget, parentLayout, type ); layout = createLayout( parentWidget, parentLayout, type );
} }
obj = TQT_TQOBJECT(layout); obj = layout;
} else if ( className == "TQMenuBar" ) { } else if ( className == "TQMenuBar" ) {
unpackCString( strings, in, className ); unpackCString( strings, in, className );
widget = ((TQMainWindow *) parent)->menuBar(); widget = ((TQMainWindow *) parent)->menuBar();
obj = TQT_TQOBJECT(widget); obj = widget;
} else if ( className == "TQToolBar" ) { } else if ( className == "TQToolBar" ) {
TQ_UINT8 dock; TQ_UINT8 dock;
in >> dock; in >> dock;
unpackCString( strings, in, className ); unpackCString( strings, in, className );
widget = new TQToolBar( TQString(), (TQMainWindow *) parent, widget = new TQToolBar( TQString(), (TQMainWindow *) parent,
(TQt::Dock) dock ); (TQt::Dock) dock );
obj = TQT_TQOBJECT(widget); obj = widget;
} else if ( className == "TQWidget" ) { } else if ( className == "TQWidget" ) {
unpackCString( strings, in, className ); unpackCString( strings, in, className );
widget = createWidget( className, parentWidget, 0 ); widget = createWidget( className, parentWidget, 0 );
obj = TQT_TQOBJECT(widget); obj = widget;
} }
if ( widget != 0 ) if ( widget != 0 )
@ -1208,7 +1208,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
switch ( blockType ) { switch ( blockType ) {
case Block_Actions: case Block_Actions:
inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); inputObject( objects, numObjects, strings, in, toplevel, toplevel );
break; break;
case Block_Buddies: case Block_Buddies:
{ {
@ -1300,7 +1300,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
} }
break; break;
case Block_Menubar: case Block_Menubar:
inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), inputObject( objects, numObjects, strings, in, toplevel, toplevel,
"TQMenuBar" ); "TQMenuBar" );
break; break;
case Block_Slots: case Block_Slots:
@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
case Block_Toolbars: case Block_Toolbars:
do { do {
inputObject( objects, numObjects, strings, in, toplevel, inputObject( objects, numObjects, strings, in, toplevel,
TQT_TQOBJECT(toplevel), "TQToolBar" ); toplevel, "TQToolBar" );
} while ( !END_OF_BLOCK() ); } while ( !END_OF_BLOCK() );
break; break;
case Block_Variables: case Block_Variables:
@ -1344,7 +1344,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
break; break;
case Block_Widget: case Block_Widget:
toplevel = (TQWidget *) toplevel = (TQWidget *)
inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), inputObject( objects, numObjects, strings, in, toplevel, parent,
"TQWidget" ); "TQWidget" );
if ( toplevel != 0 ) if ( toplevel != 0 )
toplevel->setName( name ); toplevel->setName( name );
@ -1597,7 +1597,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
// hide layout widgets // hide layout widgets
w = parent; w = parent;
} else { } else {
obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); obj = TQWidgetFactory::createWidget( className, parent, 0 );
if ( !obj ) if ( !obj )
return 0; return 0;
w = (TQWidget*)obj; w = (TQWidget*)obj;
@ -1647,7 +1647,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget );
else else
layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
@ -1659,7 +1659,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget );
else else
layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
@ -1671,7 +1671,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget );
else else
layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget );
obj = TQT_TQOBJECT(layout); obj = layout;
n = n.firstChild().toElement(); n = n.firstChild().toElement();
if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) )
( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row,
@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( n2.tagName() == "sender" ) { if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data(); TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.sender = TQT_TQOBJECT(toplevel); conn.sender = toplevel;
} else { } else {
if ( name == "this" ) if ( name == "this" )
name = toplevel->name(); name = toplevel->name();
@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
} else if ( n2.tagName() == "receiver" ) { } else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data(); TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.receiver = TQT_TQOBJECT(toplevel); conn.receiver = toplevel;
} else { } else {
TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
if ( l ) { if ( l ) {
@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
TQObject *sender = 0, *receiver = 0; TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
sender = TQT_TQOBJECT(toplevel); sender = toplevel;
} else { } else {
if ( !l || !l->first() ) { if ( !l || !l->first() ) {
delete l; delete l;
@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
sender = findAction( conn.sender->name() ); sender = findAction( conn.sender->name() );
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
receiver = TQT_TQOBJECT(toplevel); receiver = toplevel;
} else { } else {
l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); l = toplevel->queryList( 0, conn.receiver->name(), FALSE );
if ( !l || !l->first() ) { if ( !l || !l->first() ) {
@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "action" ) { if ( n.tagName() == "action" ) {
loadChildAction( TQT_TQOBJECT(toplevel), n ); loadChildAction( toplevel, n );
} else if ( n.tagName() == "actiongroup" ) { } else if ( n.tagName() == "actiongroup" ) {
loadChildAction( TQT_TQOBJECT(toplevel), n ); loadChildAction( toplevel, n );
} }
n = n.nextSibling().toElement(); n = n.nextSibling().toElement();
} }
@ -2478,7 +2478,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
} else if ( n2.tagName() == "widget" ) { } else if ( n2.tagName() == "widget" ) {
(void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) );
} else if ( n2.tagName() == "property" ) { } else if ( n2.tagName() == "property" ) {
setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
} }
n2 = n2.nextSibling().toElement(); n2 = n2.nextSibling().toElement();
} }
@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e )
popup->setName( n.attribute( "name" ).ascii() ); popup->setName( n.attribute( "name" ).ascii() );
mb->insertItem( translate( n.attribute( "text" ) ), popup ); mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) { } else if ( n.tagName() == "property" ) {
setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) { } else if ( n.tagName() == "separator" ) {
mb->insertSeparator(); mb->insertSeparator();
} }

@ -212,7 +212,7 @@ CreatePCSDialog::CreatePCSDialog( CppSupportPart* part, TQWidget* parent, const
KService::Ptr ptr = *it; KService::Ptr ptr = *it;
int error = 0; int error = 0;
KDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService<KDevPCSImporter>( ptr, TQT_TQOBJECT(this), ptr->name().latin1(), TQStringList(), &error ); KDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService<KDevPCSImporter>( ptr, this, ptr->name().latin1(), TQStringList(), &error );
if ( importer ) if ( importer )
{ {
new PCSListViewItem( ptr, importer, importerListView ); new PCSListViewItem( ptr, importer, importerListView );

@ -270,7 +270,7 @@ DbgToolBar::DbgToolBar(DebuggerPart* part,
docker_(0), docker_(0),
dockWindow_(new KSystemTray(parent)) dockWindow_(new KSystemTray(parent))
{ {
winModule_ = new KWinModule(TQT_TQOBJECT(this)); winModule_ = new KWinModule(this);
docker_ = new DbgDocker(parent, this, BarIcon("dbgnext")); docker_ = new DbgDocker(parent, this, BarIcon("dbgnext"));
connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver())); connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver()));

@ -269,7 +269,7 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
docker_(0), docker_(0),
dockWindow_(new KSystemTray(parent)) dockWindow_(new KSystemTray(parent))
{ {
winModule_ = new KWinModule(TQT_TQOBJECT(this)); winModule_ = new KWinModule(this);
docker_ = new DbgDocker(parent, this, BarIcon("dbgnext")); docker_ = new DbgDocker(parent, this, BarIcon("dbgnext"));
connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver())); connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver()));

@ -41,7 +41,7 @@ void KDevShellWidget::activate( )
KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart");
if ( !factory ) return; if ( !factory ) return;
m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); m_konsolePart = (KParts::ReadOnlyPart *) factory->create( this, "libkonsolepart", "KParts::ReadOnlyPart" );
if ( !m_konsolePart ) return; if ( !m_konsolePart ) return;
connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) );

@ -304,7 +304,7 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, TQWidget *parent, const ch
// How about names like "__" or "123" for project name? Are they legal? // How about names like "__" or "123" for project name? Are they legal?
TQRegExpValidator *appname_edit_validator; TQRegExpValidator *appname_edit_validator;
appname_edit_validator = new TQRegExpValidator (appname_regexp, appname_edit_validator = new TQRegExpValidator (appname_regexp,
TQT_TQOBJECT(appname_edit), appname_edit,
"AppNameValidator"); "AppNameValidator");
appname_edit->setValidator(appname_edit_validator); appname_edit->setValidator(appname_edit_validator);

@ -71,28 +71,28 @@ ClassViewWidget::ClassViewWidget( ClassViewPart * part )
m_actionViewMode->setItems( lst ); m_actionViewMode->setItems( lst );
m_actionViewMode->setWhatsThis(i18n("<b>View mode</b><p>Class browser items can be grouped by directories, listed in a plain or java like view.")); m_actionViewMode->setWhatsThis(i18n("<b>View mode</b><p>Class browser items can be grouped by directories, listed in a plain or java like view."));
m_actionNewClass = new TDEAction( i18n("New Class..."), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotNewClass()), m_actionNewClass = new TDEAction( i18n("New Class..."), TDEShortcut(), this, TQT_SLOT(slotNewClass()),
m_part->actionCollection(), "classview_new_class" ); m_part->actionCollection(), "classview_new_class" );
m_actionNewClass->setWhatsThis(i18n("<b>New class</b><p>Calls the <b>New Class</b> wizard.")); m_actionNewClass->setWhatsThis(i18n("<b>New class</b><p>Calls the <b>New Class</b> wizard."));
m_actionCreateAccessMethods = new TDEAction( i18n("Create get/set Methods"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" ); m_actionCreateAccessMethods = new TDEAction( i18n("Create get/set Methods"), TDEShortcut(), this, TQT_SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" );
m_actionAddMethod = new TDEAction( i18n("Add Method..."), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotAddMethod()), m_actionAddMethod = new TDEAction( i18n("Add Method..."), TDEShortcut(), this, TQT_SLOT(slotAddMethod()),
m_part->actionCollection(), "classview_add_method" ); m_part->actionCollection(), "classview_add_method" );
m_actionAddMethod->setWhatsThis(i18n("<b>Add method</b><p>Calls the <b>New Method</b> wizard.")); m_actionAddMethod->setWhatsThis(i18n("<b>Add method</b><p>Calls the <b>New Method</b> wizard."));
m_actionAddAttribute = new TDEAction( i18n("Add Attribute..."), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotAddAttribute()), m_actionAddAttribute = new TDEAction( i18n("Add Attribute..."), TDEShortcut(), this, TQT_SLOT(slotAddAttribute()),
m_part->actionCollection(), "classview_add_attribute" ); m_part->actionCollection(), "classview_add_attribute" );
m_actionAddAttribute->setWhatsThis(i18n("<b>Add attribute</b><p>Calls the <b>New Attribute</b> wizard.")); m_actionAddAttribute->setWhatsThis(i18n("<b>Add attribute</b><p>Calls the <b>New Attribute</b> wizard."));
m_actionOpenDeclaration = new TDEAction( i18n("Open Declaration"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotOpenDeclaration()), m_actionOpenDeclaration = new TDEAction( i18n("Open Declaration"), TDEShortcut(), this, TQT_SLOT(slotOpenDeclaration()),
m_part->actionCollection(), "classview_open_declaration" ); m_part->actionCollection(), "classview_open_declaration" );
m_actionOpenDeclaration->setWhatsThis(i18n("<b>Open declaration</b><p>Opens a file where the selected item is declared and jumps to the declaration line.")); m_actionOpenDeclaration->setWhatsThis(i18n("<b>Open declaration</b><p>Opens a file where the selected item is declared and jumps to the declaration line."));
m_actionOpenImplementation = new TDEAction( i18n("Open Implementation"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotOpenImplementation()), m_actionOpenImplementation = new TDEAction( i18n("Open Implementation"), TDEShortcut(), this, TQT_SLOT(slotOpenImplementation()),
m_part->actionCollection(), "classview_open_implementation" ); m_part->actionCollection(), "classview_open_implementation" );
m_actionOpenImplementation->setWhatsThis(i18n("<b>Open implementation</b><p>Opens a file where the selected item is defined (implemented) and jumps to the definition line.")); m_actionOpenImplementation->setWhatsThis(i18n("<b>Open implementation</b><p>Opens a file where the selected item is defined (implemented) and jumps to the definition line."));
m_actionFollowEditor = new TDEToggleAction( i18n("Follow Editor"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" ); m_actionFollowEditor = new TDEToggleAction( i18n("Follow Editor"), TDEShortcut(), this, TQT_SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" );
TDEConfig* config = m_part->instance()->config(); TDEConfig* config = m_part->instance()->config();
config->setGroup( "General" ); config->setGroup( "General" );

@ -229,7 +229,7 @@ void DiffWidget::loadExtPart( const TQString& partName )
if ( !extService ) if ( !extService )
return; return;
extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, TQT_TQOBJECT(this), 0 ); extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, this, 0 );
if ( !extPart || !extPart->widget() ) if ( !extPart || !extPart->widget() )
return; return;

@ -46,10 +46,10 @@ FindDocumentation::FindDocumentation(DocumentationWidget* parent, const char* na
man_item(0), info_item(0), index_item(0), google_item(0), contents_item(0), man_item(0), info_item(0), index_item(0), google_item(0), contents_item(0),
last_item(0), m_widget(parent) last_item(0), m_widget(parent)
{ {
TQWidget* tmp = TQT_TQWIDGET(TQApplication::desktop()); TQWidget* tmp = TQApplication::desktop();
setGeometry(tmp->width()/2 - width()/2, tmp->height()/2 - height()/2, width(), height()); setGeometry(tmp->width()/2 - width()/2, tmp->height()/2 - height()/2, width(), height());
proc_man = new TDEProcess( TQT_TQOBJECT(this) ); proc_man = new TDEProcess( this );
proc_info = new TDEProcess( TQT_TQOBJECT(this) ); proc_info = new TDEProcess( this );
connect( proc_man, TQT_SIGNAL(processExited( TDEProcess* )), connect( proc_man, TQT_SIGNAL(processExited( TDEProcess* )),
this, TQT_SLOT(procManExited( TDEProcess* )) ); this, TQT_SLOT(procManExited( TDEProcess* )) );

@ -44,7 +44,7 @@ public:
void init(); void init();
virtual void setEnabled(bool b); virtual void setEnabled(bool b);
virtual TQObject *qobject() { return TQT_TQOBJECT(this); } virtual TQObject *qobject() { return this; }
virtual bool getState() const { return state; } virtual bool getState() const { return state; }
signals: signals:
@ -73,7 +73,7 @@ public:
void init(); void init();
virtual void setEnabled(bool); virtual void setEnabled(bool);
TQObject *qobject() { return TQT_TQOBJECT(this); } TQObject *qobject() { return this; }
signals: signals:
void changed(); void changed();
@ -109,7 +109,7 @@ public:
void init(); void init();
void addValue(const char *s); void addValue(const char *s);
void setEnabled(bool); void setEnabled(bool);
TQObject *qobject() { return TQT_TQOBJECT(this); } TQObject *qobject() { return this; }
signals: signals:
void changed(); void changed();
@ -149,7 +149,7 @@ public:
void init(); void init();
void setEnabled(bool); void setEnabled(bool);
TQObject *qobject() { return TQT_TQOBJECT(this); } TQObject *qobject() { return this; }
signals: signals:
void changed(); void changed();

@ -22,5 +22,5 @@
void FCTemplateEditBase::init() void FCTemplateEditBase::init()
{ {
templatename_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), TQT_TQOBJECT(this))); templatename_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), this));
} }

@ -22,5 +22,5 @@
void FCTypeEditBase::init() void FCTypeEditBase::init()
{ {
typeext_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), TQT_TQOBJECT(this))); typeext_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), this));
} }

@ -186,7 +186,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
// tdeaction for the dir sync method // tdeaction for the dir sync method
acSyncDir = new TDEAction( i18n("Current Document Directory"), "dirsynch", 0, acSyncDir = new TDEAction( i18n("Current Document Directory"), "dirsynch", 0,
TQT_TQOBJECT(this), TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" ); this, TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" );
toolbar->setIconText( TDEToolBar::IconOnly ); toolbar->setIconText( TDEToolBar::IconOnly );
toolbar->setIconSize( 16 ); toolbar->setIconSize( 16 );
toolbar->setEnableContextMenu( false ); toolbar->setEnableContextMenu( false );

@ -179,12 +179,12 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part)
this, TQT_SLOT(slotContextMenu(TDEListView*, TQListViewItem*, const TQPoint&)) ); this, TQT_SLOT(slotContextMenu(TDEListView*, TQListViewItem*, const TQPoint&)) );
m_actionToggleShowNonProjectFiles = new TDEToggleAction( i18n("Show Non Project Files"), TDEShortcut(), m_actionToggleShowNonProjectFiles = new TDEToggleAction( i18n("Show Non Project Files"), TDEShortcut(),
TQT_TQOBJECT(this), TQT_SLOT(slotToggleShowNonProjectFiles()), TQT_TQOBJECT(this), "actiontoggleshowshownonprojectfiles" ); this, TQT_SLOT(slotToggleShowNonProjectFiles()), this, "actiontoggleshowshownonprojectfiles" );
m_actionToggleShowNonProjectFiles->setCheckedState(i18n("Hide Non Project Files")); m_actionToggleShowNonProjectFiles->setCheckedState(i18n("Hide Non Project Files"));
m_actionToggleShowNonProjectFiles->setWhatsThis(i18n("<b>Show non project files</b><p>Shows files that do not belong to a project in a file tree.")); m_actionToggleShowNonProjectFiles->setWhatsThis(i18n("<b>Show non project files</b><p>Shows files that do not belong to a project in a file tree."));
m_actionToggleDisplayLocation = new TDEToggleAction( i18n("Display Location Column"), TDEShortcut(), m_actionToggleDisplayLocation = new TDEToggleAction( i18n("Display Location Column"), TDEShortcut(),
TQT_TQOBJECT(this), TQT_SLOT(slotToggleDisplayLocation()), TQT_TQOBJECT(this), "actiontoggleshowlocation" ); this, TQT_SLOT(slotToggleDisplayLocation()), this, "actiontoggleshowlocation" );
m_actionToggleDisplayLocation->setWhatsThis(i18n("<b>Display the Location Column</b><p>Displays a column with the location of the files.")); m_actionToggleDisplayLocation->setWhatsThis(i18n("<b>Display the Location Column</b><p>Displays a column with the location of the files."));
m_part = part; m_part = part;

@ -63,7 +63,7 @@ FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl()
FileTreeWidget *FileTreeViewWidgetImpl::fileTree() const FileTreeWidget *FileTreeViewWidgetImpl::fileTree() const
{ {
return static_cast<FileTreeWidget *>( TQT_TQWIDGET(parent()) ); return static_cast<FileTreeWidget *>( parent() );
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

@ -173,7 +173,7 @@ GrepDialog::GrepDialog( GrepViewPart * part, TQWidget *parent, const char *name
layout->addWidget(files_label, 5, 0, AlignRight | AlignVCenter); layout->addWidget(files_label, 5, 0, AlignRight | AlignVCenter);
files_combo = new KComboBox(true, this); files_combo = new KComboBox(true, this);
files_label->setBuddy(TQT_TQWIDGET(files_combo->focusProxy())); files_label->setBuddy(files_combo->focusProxy());
files_combo->insertStrList(filepatterns); files_combo->insertStrList(filepatterns);
layout->addWidget(files_combo, 5, 1); layout->addWidget(files_combo, 5, 1);
@ -182,7 +182,7 @@ GrepDialog::GrepDialog( GrepViewPart * part, TQWidget *parent, const char *name
TQStringList exclude_list = config->readListEntry("exclude_patterns"); TQStringList exclude_list = config->readListEntry("exclude_patterns");
exclude_combo = new KComboBox(true, this); exclude_combo = new KComboBox(true, this);
exclude_label->setBuddy(TQT_TQWIDGET(files_combo->focusProxy())); exclude_label->setBuddy(files_combo->focusProxy());
if (exclude_list.count()) { if (exclude_list.count()) {
exclude_combo->insertStringList(exclude_list); exclude_combo->insertStringList(exclude_list);
} }

@ -52,11 +52,11 @@ MakeViewPart::MakeViewPart(TQObject *parent, const char *name, const TQStringLis
mainWindow()->embedOutputView(m_widget, i18n("Messages"), i18n("Compiler output messages")); mainWindow()->embedOutputView(m_widget, i18n("Messages"), i18n("Compiler output messages"));
TDEAction *action; TDEAction *action;
action = new TDEAction( i18n("&Next Error"), Key_F4, TQT_TQOBJECT(m_widget), TQT_SLOT(nextError()), action = new TDEAction( i18n("&Next Error"), Key_F4, m_widget, TQT_SLOT(nextError()),
actionCollection(), "view_next_error"); actionCollection(), "view_next_error");
action->setToolTip( i18n("Go to the next error") ); action->setToolTip( i18n("Go to the next error") );
action->setWhatsThis(i18n("<b>Next error</b><p>Switches to the file and line where the next error was reported from.")); action->setWhatsThis(i18n("<b>Next error</b><p>Switches to the file and line where the next error was reported from."));
action = new TDEAction( i18n("&Previous Error"), SHIFT+Key_F4, TQT_TQOBJECT(m_widget), TQT_SLOT(prevError()), action = new TDEAction( i18n("&Previous Error"), SHIFT+Key_F4, m_widget, TQT_SLOT(prevError()),
actionCollection(), "view_previous_error"); actionCollection(), "view_previous_error");
action->setToolTip( i18n("Go to the previous error") ); action->setToolTip( i18n("Go to the previous error") );
action->setWhatsThis(i18n("<b>Previous error</b><p>Switches to the file and line where the previous error was reported from.")); action->setWhatsThis(i18n("<b>Previous error</b><p>Switches to the file and line where the previous error was reported from."));

@ -178,7 +178,7 @@ MakeWidget::MakeWidget(MakeViewPart *part)
dirstack.setAutoDelete(true); dirstack.setAutoDelete(true);
childproc = new TDEProcess(TQT_TQOBJECT(this)); childproc = new TDEProcess(this);
procLineMaker = new ProcessLineMaker( childproc ); procLineMaker = new ProcessLineMaker( childproc );
connect( procLineMaker, TQT_SIGNAL(receivedStdoutLine(const TQCString&)), connect( procLineMaker, TQT_SIGNAL(receivedStdoutLine(const TQCString&)),

@ -56,9 +56,9 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon,
TQToolTip::add(this, m_realText); TQToolTip::add(this, m_realText);
m_assignAccelAction = new TDEAction(i18n("Assign Accelerator..."), 0, m_assignAccelAction = new TDEAction(i18n("Assign Accelerator..."), 0,
TQT_TQOBJECT(this), TQT_SLOT(assignAccel()), TQT_TQOBJECT(this)); this, TQT_SLOT(assignAccel()), this);
m_clearAccelAction = new TDEAction(i18n("Clear Accelerator"), 0, m_clearAccelAction = new TDEAction(i18n("Clear Accelerator"), 0,
TQT_TQOBJECT(this), TQT_SLOT(clearAccel()), TQT_TQOBJECT(this)); this, TQT_SLOT(clearAccel()), this);
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("UI"); config->setGroup("UI");

@ -85,9 +85,9 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position)
m_widgetStack = new TQWidgetStack(this); m_widgetStack = new TQWidgetStack(this);
m_internalLayout->addWidget(m_widgetStack); m_internalLayout->addWidget(m_widgetStack);
m_moveToDockLeft = new TDEAction( i18n("Move to left dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockLeft()), TQT_TQOBJECT(this) ); m_moveToDockLeft = new TDEAction( i18n("Move to left dock"), 0, this, TQT_SLOT(moveToDockLeft()), this );
m_moveToDockRight = new TDEAction( i18n("Move to right dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockRight()), TQT_TQOBJECT(this) ); m_moveToDockRight = new TDEAction( i18n("Move to right dock"), 0, this, TQT_SLOT(moveToDockRight()), this );
m_moveToDockBottom = new TDEAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), TQT_TQOBJECT(this) ); m_moveToDockBottom = new TDEAction( i18n("Move to bottom dock"), 0, this, TQT_SLOT(moveToDockBottom()), this );
setVisible(m_visible); setVisible(m_visible);
@ -375,7 +375,7 @@ void DDockWindow::selectPrevWidget()
void DDockWindow::contextMenu(TQPopupMenu * menu) void DDockWindow::contextMenu(TQPopupMenu * menu)
{ {
m_lastContextMenuButton = static_cast<Ideal::Button*>( TQT_TQWIDGET(const_cast<TQObject*>( sender() )) ); m_lastContextMenuButton = static_cast<Ideal::Button*>( const_cast<TQObject*>( sender() ) );
menu->insertSeparator(); menu->insertSeparator();

@ -295,7 +295,7 @@ DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view)
void DMainWindow::widgetDestroyed() void DMainWindow::widgetDestroyed()
{ {
TQWidget *w = TQT_TQWIDGET(const_cast<TQObject*>(sender())); TQWidget *w = static_cast<TQWidget*>(const_cast<TQObject*>(sender()));
if (m_docks.contains(w)) if (m_docks.contains(w))
{ {

@ -61,11 +61,11 @@ SimpleMainWindow::SimpleMainWindow(TQWidget* parent, const char *name)
:DMainWindow(parent, name) :DMainWindow(parent, name)
{ {
resize(800, 600); // starts tdevelop at 800x600 the first time resize(800, 600); // starts tdevelop at 800x600 the first time
m_mainWindowShare = new MainWindowShare(TQT_TQOBJECT(this)); m_mainWindowShare = new MainWindowShare(this);
connect(m_bottomDock, TQT_SIGNAL(hidden()), TQT_TQOBJECT(this), TQT_SLOT(raiseEditor())); connect(m_bottomDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor()));
connect(m_leftDock, TQT_SIGNAL(hidden()), TQT_TQOBJECT(this), TQT_SLOT(raiseEditor())); connect(m_leftDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor()));
connect(m_rightDock, TQT_SIGNAL(hidden()), TQT_TQOBJECT(this), TQT_SLOT(raiseEditor())); connect(m_rightDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor()));
} }
SimpleMainWindow::~ SimpleMainWindow( ) SimpleMainWindow::~ SimpleMainWindow( )
@ -97,7 +97,7 @@ void SimpleMainWindow::init()
if (help_menu) if (help_menu)
{ {
help_menu->insertItem(SmallIconSet("contents"), i18n("TDevelop &Programming Handbook"), help_menu->insertItem(SmallIconSet("contents"), i18n("TDevelop &Programming Handbook"),
TQT_TQOBJECT(this), TQT_SLOT(slotProgrammingHandbook()), 0, -1, 1); this, TQT_SLOT(slotProgrammingHandbook()), 0, -1, 1);
} }
menuBar()->setEnabled( false ); menuBar()->setEnabled( false );
@ -116,19 +116,19 @@ void SimpleMainWindow::init()
i18n("Could Not Find Plugins") ); i18n("Could Not Find Plugins") );
} }
connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), TQT_TQOBJECT(this), TQT_SLOT(slotCoreInitialized())); connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), this, TQT_SLOT(slotCoreInitialized()));
connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), TQT_TQOBJECT(this), TQT_SLOT(projectOpened())); connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()));
connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), TQT_TQOBJECT(this), TQT_SLOT(projectClosed())); connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()));
connect(Core::getInstance(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), connect(Core::getInstance(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)));
connect(PartController::getInstance(), TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart *)), connect(PartController::getInstance(), TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart *)),
TQT_TQOBJECT(this), TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * ))); this, TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * )));
connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)),
TQT_TQOBJECT(this), TQT_SLOT(activePartChanged(KParts::Part*))); this, TQT_SLOT(activePartChanged(KParts::Part*)));
connect(PartController::getInstance(), connect(PartController::getInstance(),
TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)), TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)),
TQT_TQOBJECT(this), TQT_SLOT(documentChangedState(const KURL&, DocumentState))); this, TQT_SLOT(documentChangedState(const KURL&, DocumentState)));
loadSettings(); loadSettings();
} }
@ -414,64 +414,64 @@ void SimpleMainWindow::createFramework()
PartController::createInstance( this ); PartController::createInstance( this );
connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)),
TQT_TQOBJECT(this), TQT_SLOT(createGUI(KParts::Part*))); this, TQT_SLOT(createGUI(KParts::Part*)));
} }
void SimpleMainWindow::createActions() void SimpleMainWindow::createActions()
{ {
m_raiseEditor = new TDEAction(i18n("Raise &Editor"), ALT+Key_C, m_raiseEditor = new TDEAction(i18n("Raise &Editor"), ALT+Key_C,
TQT_TQOBJECT(this), TQT_SLOT(raiseEditor()), actionCollection(), "raise_editor"); this, TQT_SLOT(raiseEditor()), actionCollection(), "raise_editor");
m_raiseEditor->setToolTip(i18n("Raise editor")); m_raiseEditor->setToolTip(i18n("Raise editor"));
m_raiseEditor->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor.")); m_raiseEditor->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor."));
m_lowerAllDocks = new TDEAction(i18n("Lower All Docks"), CTRL+SHIFT+Key_C, m_lowerAllDocks = new TDEAction(i18n("Lower All Docks"), CTRL+SHIFT+Key_C,
TQT_TQOBJECT(this), TQT_SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks"); this, TQT_SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks");
new TDEAction(i18n("Switch to next TabWidget"), 0, TQT_TQOBJECT(this), new TDEAction(i18n("Switch to next TabWidget"), 0, this,
TQT_SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" ); TQT_SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" );
m_splitHor = new TDEAction(i18n("Split &Horizontal"), CTRL+SHIFT+Key_T, m_splitHor = new TDEAction(i18n("Split &Horizontal"), CTRL+SHIFT+Key_T,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h"); this, TQT_SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h");
m_splitHor->setIcon("view_top_bottom"); m_splitHor->setIcon("view_top_bottom");
m_splitVer = new TDEAction(i18n("Split &Vertical"), CTRL+SHIFT+Key_L, m_splitVer = new TDEAction(i18n("Split &Vertical"), CTRL+SHIFT+Key_L,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitVerticalBase()), actionCollection(), "split_v"); this, TQT_SLOT(slotSplitVerticalBase()), actionCollection(), "split_v");
m_splitVer->setIcon("view_left_right"); m_splitVer->setIcon("view_left_right");
m_splitHor1 = new TDEAction(i18n("Split &Horizontal"), 0, m_splitHor1 = new TDEAction(i18n("Split &Horizontal"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h1"); this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h1");
m_splitHor1->setIcon("view_top_bottom"); m_splitHor1->setIcon("view_top_bottom");
m_splitVer1 = new TDEAction(i18n("Split &Vertical"), 0, m_splitVer1 = new TDEAction(i18n("Split &Vertical"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v1"); this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v1");
m_splitVer1->setIcon("view_left_right"); m_splitVer1->setIcon("view_left_right");
m_splitHor2 = new TDEAction(i18n("Split &Horizontal and Open"), 0, m_splitHor2 = new TDEAction(i18n("Split &Horizontal and Open"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h2"); this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h2");
m_splitHor2->setIcon("view_top_bottom"); m_splitHor2->setIcon("view_top_bottom");
m_splitVer2 = new TDEAction(i18n("Split &Vertical and Open"), 0, m_splitVer2 = new TDEAction(i18n("Split &Vertical and Open"), 0,
TQT_TQOBJECT(this), TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v2"); this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v2");
m_splitVer2->setIcon("view_left_right"); m_splitVer2->setIcon("view_left_right");
m_raiseLeftDock = new TDEAction(i18n("Switch Left Dock"), CTRL+SHIFT+ALT+Key_L, m_raiseLeftDock = new TDEAction(i18n("Switch Left Dock"), CTRL+SHIFT+ALT+Key_L,
TQT_TQOBJECT(this), TQT_SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock"); this, TQT_SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock");
m_raiseRightDock = new TDEAction(i18n("Switch Right Dock"), CTRL+SHIFT+ALT+Key_R, m_raiseRightDock = new TDEAction(i18n("Switch Right Dock"), CTRL+SHIFT+ALT+Key_R,
TQT_TQOBJECT(this), TQT_SLOT(raiseRightDock()), actionCollection(), "switch_right_dock"); this, TQT_SLOT(raiseRightDock()), actionCollection(), "switch_right_dock");
m_raiseBottomDock = new TDEAction(i18n("Switch Bottom Dock"), CTRL+SHIFT+ALT+Key_B, m_raiseBottomDock = new TDEAction(i18n("Switch Bottom Dock"), CTRL+SHIFT+ALT+Key_B,
TQT_TQOBJECT(this), TQT_SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock"); this, TQT_SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock");
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configureToolbars()), KStdAction::configureToolbars(this, TQT_SLOT(configureToolbars()),
actionCollection(), "set_configure_toolbars"); actionCollection(), "set_configure_toolbars");
m_mainWindowShare->createActions(); m_mainWindowShare->createActions();
connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoNextWindow())); connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), this, TQT_SLOT(gotoNextWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoPreviousWindow())); connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), this, TQT_SLOT(gotoPreviousWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoFirstWindow())); connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), this, TQT_SLOT(gotoFirstWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoLastWindow())); connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), this, TQT_SLOT(gotoLastWindow()));
} }
void SimpleMainWindow::raiseEditor() void SimpleMainWindow::raiseEditor()
@ -598,7 +598,7 @@ void SimpleMainWindow::closeTab()
void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p) void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p)
{ {
DTabWidget *tabWidget = static_cast<DTabWidget*>(TQT_TQWIDGET(const_cast<TQObject*>(sender()))); DTabWidget *tabWidget = static_cast<DTabWidget*>(const_cast<TQObject*>(sender()));
if (!tabWidget) if (!tabWidget)
return; return;
@ -644,7 +644,7 @@ void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p)
++it; ++it;
} }
connect(&tabMenu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(tabContextActivated(int))); connect(&tabMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(tabContextActivated(int)));
tabMenu.exec(p); tabMenu.exec(p);
} }
@ -679,7 +679,7 @@ void SimpleMainWindow::configureToolbars()
{ {
saveMainWindowSettings(TDEGlobal::config(), "SimpleMainWindow"); saveMainWindowSettings(TDEGlobal::config(), "SimpleMainWindow");
KEditToolbar dlg(factory()); KEditToolbar dlg(factory());
connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig())); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
dlg.exec(); dlg.exec();
} }
@ -704,7 +704,7 @@ bool SimpleMainWindow::queryExit()
void SimpleMainWindow::setupWindowMenu() void SimpleMainWindow::setupWindowMenu()
{ {
// get the xmlgui created one instead // get the xmlgui created one instead
m_windowMenu = static_cast<TQPopupMenu*>(TQT_TQWIDGET(main()->child("window", "TDEPopupMenu"))); m_windowMenu = static_cast<TQPopupMenu*>(main()->child("window", "TDEPopupMenu"));
if (!m_windowMenu) if (!m_windowMenu)
{ {
@ -718,8 +718,8 @@ void SimpleMainWindow::setupWindowMenu()
actionCollection()->action("file_close_all")->plug(m_windowMenu); actionCollection()->action("file_close_all")->plug(m_windowMenu);
actionCollection()->action("file_closeother")->plug(m_windowMenu); actionCollection()->action("file_closeother")->plug(m_windowMenu);
TQObject::connect(m_windowMenu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(openURL(int))); TQObject::connect(m_windowMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(openURL(int)));
TQObject::connect(m_windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(fillWindowMenu())); TQObject::connect(m_windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillWindowMenu()));
} }
void SimpleMainWindow::openURL(int w) void SimpleMainWindow::openURL(int w)

@ -222,7 +222,7 @@ void DiffWidget::loadExtPart( const TQString& partName )
if ( !extService ) if ( !extService )
return; return;
extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, TQT_TQOBJECT(this), 0 ); extPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>( extService, this, 0, this, 0 );
if ( !extPart || !extPart->widget() ) if ( !extPart || !extPart->widget() )
return; return;

@ -103,7 +103,7 @@ void CommitDialog::setDepotFiles( const TQStringList& lst )
args << (*it); args << (*it);
} }
ExecCommand* cmd = new ExecCommand( "p4", args, TQString(), TQStringList(), TQT_TQOBJECT(this) ); ExecCommand* cmd = new ExecCommand( "p4", args, TQString(), TQStringList(), this );
connect( cmd, TQT_SIGNAL(finished( const TQString&, const TQString& )), connect( cmd, TQT_SIGNAL(finished( const TQString&, const TQString& )),
this, TQT_SLOT(getFilesFinished( const TQString&, const TQString& )) ); this, TQT_SLOT(getFilesFinished( const TQString&, const TQString& )) );
} }

Loading…
Cancel
Save