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)
: 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'");

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

@ -173,7 +173,7 @@ void AutoSubprojectView::initActions()
TDEActionCollection * actions = new TDEActionCollection( this );
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 "
"that provides settings for compiler, include paths, "
"prefixes and build order.</qt>"));
@ -181,24 +181,24 @@ void AutoSubprojectView::initActions()
TQToolTip::add( m_button1, tr2i18n( "Add new subproject..."));
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 "
"subproject in currently selected subproject.</qt>"));
addSubprojectAction->plug( m_button1 );
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 "
"subproject should be also removed from disk. Only subprojects "
"which do not hold other subprojects can be removed.</qt>"));
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 "
"subprojects containing Makefile.am.</qt>"));
TQToolTip::add( m_button2, tr2i18n( "Add Target..."));
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 "
"the currently selected subproject. Target can be a "
"binary program, library, script, also a collection of "
@ -206,19 +206,19 @@ void AutoSubprojectView::initActions()
addTargetAction->plug( m_button2 );
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" );
addServiceAction->setWhatsThis(i18n("<qt><b>Add service</b><p>Creates a .desktop file describing the service.</qt>"));
addServiceAction->plug( m_button3 );
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" );
addApplicationAction->setWhatsThis(i18n("<qt><b>Add application</b><p>Creates an application .desktop file.</qt>"));
addApplicationAction->plug( m_button4 );
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" );
buildSubprojectAction->setWhatsThis(i18n("<qt><b>Build</b><p>Runs <b>make</b> from the directory of "
"the selected subproject.<br> Environment variables and "
@ -226,7 +226,7 @@ void AutoSubprojectView::initActions()
"dialog, <b>Make Options</b> tab.</qt>"));
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" );
forceReeditSubprojectAction->setWhatsThis(i18n("<qt><b>Force Reedit</b><p>Runs <b>make force-reedit</b> "
"from the directory of the selected subproject.<br>This "
@ -238,21 +238,21 @@ void AutoSubprojectView::initActions()
if (!m_part->isKDE())
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" );
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 "
"arguments can be specified in the project settings dialog, "
"<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" );
installSubprojectAction->setWhatsThis(i18n("<qt><b>Install</b><p>Runs <b>make install</b> from the directory "
"of the selected subproject.<br> Environment variables and "
"make arguments can be specified in the project settings "
"dialog, <b>Make Options</b> tab.</qt>"));
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> "
"command from the directory of the selected subproject "
"with root privileges.<br> It is executed via tdesu "
@ -260,12 +260,12 @@ void AutoSubprojectView::initActions()
"can be specified in the project settings dialog, "
"<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" );
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" );
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" );
otherAction->setWhatsThis(i18n("<qt><b>Manage custom commands</b><p>Allows to create, edit and "
"delete custom build commands which appears in the subproject "

@ -72,7 +72,7 @@ public:
ConfigureOptionsWidget::ConfigureOptionsWidget(AutoProjectPart *part, TQWidget *parent, const char *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;
env_groupBox->setColumnLayout( 1, TQt::Vertical );
@ -405,7 +405,7 @@ KDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQStrin
if (prop.isValid())
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);
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 )
{
KDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) );
KDevCompilerOptions * plugin = createCompilerOptions( compiler, parent );
if ( plugin )
{

@ -43,7 +43,7 @@ CustomMakeConfigWidget::CustomMakeConfigWidget(CustomProjectPart* part, const TQ
defaultTarget_edit->setText(DomUtil::readEntry(m_dom, m_configGroup + "/make/defaulttarget"));
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_currentEnvironment = m_part->currentMakeEnvironment();
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"));
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_currentEnvironment = m_part->currentMakeEnvironment();
env_var_group->setColumnLayout( 1, TQt::Vertical );

@ -29,7 +29,7 @@
PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl)
: 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'");

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

@ -92,7 +92,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
const TQIconSet icon(SmallIcon("compfile"));
action = new TDEAction( i18n("Compile &File"), "compfile", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotBuildOpenFile()),
m_widget, TQT_SLOT(slotBuildOpenFile()),
actionCollection(),"build_compilefile" );
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>"
@ -101,7 +101,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
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" );
action->setToolTip(i18n("Build project"));
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."));
action = new TDEAction( i18n("&Rebuild Project"),"rebuild" , 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildProject()),
m_widget, TQT_SLOT(slotRebuildProject()),
actionCollection(),"build_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>"
@ -117,7 +117,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Project"),"install" , 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallProject()),
m_widget, TQT_SLOT(slotInstallProject()),
actionCollection(),"build_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>"
@ -125,7 +125,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Clean Project"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanProject()),
m_widget, TQT_SLOT(slotCleanProject()),
actionCollection(), "build_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>"
@ -133,7 +133,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Dist-Clean Project"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanProject()),
m_widget, TQT_SLOT(slotDistCleanProject()),
actionCollection(), "build_distclean_project" );
action->setToolTip(i18n("Dist-Clean project"));
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 = 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" );
action->setToolTip(i18n("Build subproject"));
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."));
action = new TDEAction( i18n("&Rebuild Subproject"), "rebuild", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotRebuildTarget()),
m_widget, TQT_SLOT(slotRebuildTarget()),
actionCollection(),"build_rebuild_target" );
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. "
@ -165,7 +165,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS
"in the project settings dialog, <b>Make Options</b> tab."));
action = new TDEAction( i18n("&Install Subproject"), "install", 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotInstallTarget()),
m_widget, TQT_SLOT(slotInstallTarget()),
actionCollection(),"build_install_target" );
action->setToolTip(i18n("Install subproject"));
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."));
action = new TDEAction( i18n("&Clean Subproject"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotCleanTarget()),
m_widget, TQT_SLOT(slotCleanTarget()),
actionCollection(), "build_clean_target" );
action->setToolTip(i18n("Clean subproject"));
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."));
action = new TDEAction( i18n("&Dist-Clean Subproject"), 0,
TQT_TQOBJECT(m_widget), TQT_SLOT(slotDistCleanTarget()),
m_widget, TQT_SLOT(slotDistCleanTarget()),
actionCollection(), "build_distclean_target" );
action->setToolTip(i18n("Dist-Clean subproject"));
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:
{
// Link selected files to current subproject folder
TDEProcess *proc = new TDEProcess( TQT_TQOBJECT(this) );
TDEProcess *proc = new TDEProcess( this );
*proc << "ln";
*proc << "-s";
*proc << files[ i ];
@ -1642,7 +1642,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem *
case AddFilesDialog::Link:
{
// Link selected files to current subproject folder
TDEProcess *proc = new TDEProcess( TQT_TQOBJECT(this) );
TDEProcess *proc = new TDEProcess( this );
*proc << "ln";
*proc << "-s";
*proc << files[ i ];

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

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

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

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

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

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

@ -61,7 +61,7 @@ void DatabaseConnectionEditor::accept()
void DatabaseConnectionEditor::init()
{
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->comboDriver->setEnabled( FALSE );
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );

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

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

@ -57,7 +57,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
id = 0;
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 ) {
TQListViewItem *i = new TQListViewItem( functionListView );
@ -86,7 +86,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
id++;
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" ) );
else
i->setText( 5, i18n( "No" ) );
@ -96,7 +96,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
}
boxProperties->setEnabled( FALSE );
functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) );
functionName->setValidator( new AsciiValidator( TRUE, functionName ) );
if ( functionListView->firstChild() )
functionListView->setCurrentItem( functionListView->firstChild() );
@ -131,7 +131,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
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() );
TQPtrList<Command> commands;
TQValueList<MetaDataBase::Function>::Iterator fit;
@ -291,7 +291,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
if ( i->text( 4 ) == "slot" ) {
i->setText( 0, "newSlot()" );
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) )
if ( MetaDataBase::isSlotUsed( formWindow, "newSlot()" ) )
i->setText( 5, i18n( "Yes" ) );
else
i->setText( 5, i18n( "No" ) );
@ -398,7 +398,7 @@ void EditFunctions::currentTextChanged( const TQString &txt )
functionListView->currentItem()->setText( 0, txt );
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" ) );
else
functionListView->currentItem()->setText( 5, i18n( "No" ) );
@ -441,7 +441,7 @@ void EditFunctions::currentTypeChanged( const TQString &type )
lastType = type;
functionListView->currentItem()->setText( 4, type );
if ( type == "slot" ) {
if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow),
if ( MetaDataBase::isSlotUsed( formWindow,
MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) )
functionListView->currentItem()->setText( 5, i18n( "Yes" ) );
else
@ -515,7 +515,7 @@ void EditFunctions::displaySlots( bool justSlots )
i->setText( 4, (*it).type );
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" ) );
else
i->setText( 5, i18n( "No" ) );

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

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

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

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

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

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

@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name )
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->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 );
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->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 );
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->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 );
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->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 );
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->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 );
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->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 );
#ifdef TQ_WS_MAC
TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 );
connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) );
TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
connect( macDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) );
#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->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 );
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->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 );
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->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 );
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->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) ) );
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->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) ) );
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->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) ) );
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->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) ) );
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->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) ) );
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->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" );
tb->setCloseMode( TQDockWindow::Undocked );
@ -240,7 +240,7 @@ void MainWindow::setupEditActions()
#endif
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 );
actionEditUndo->addTo( menu );
actionEditRedo->addTo( menu );
@ -269,26 +269,26 @@ void MainWindow::setupEditActions()
void MainWindow::setupSearchActions()
{
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 );
connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) );
i18n( "&Find..." ), CTRL + Key_F, this, 0 );
connect( actionSearchFind, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchFind() ) );
actionSearchFind->setEnabled( FALSE );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 );
connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) );
i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchIncremetalFindMenu() ) );
actionSearchIncremetal->setEnabled( FALSE );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 );
connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) );
i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
connect( actionSearchReplace, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchReplace() ) );
actionSearchReplace->setEnabled( FALSE );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 );
connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) );
i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchGotoLine() ) );
actionSearchGotoLine->setEnabled( FALSE );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
@ -320,56 +320,56 @@ void MainWindow::setupLayoutActions()
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
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"),
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->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 );
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->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 );
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->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 );
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->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 );
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->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 );
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->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 );
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->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 );
int id = WidgetDatabase::idFromClassName( "Spacer" );
@ -487,7 +487,7 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"),
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 "
"custom widgets") );
actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom"
@ -602,10 +602,10 @@ void MainWindow::setupToolActions()
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 "
"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();
a->addTo( mmenu );
resetTool();
@ -625,7 +625,7 @@ void MainWindow::setupFileActions()
DesignerAction *a = 0;
if ( !singleProject ) {
DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 );
DesignerAction *a = new DesignerAction( this, 0 );
a->setText( i18n( "New" ) );
a->setToolTip( i18n( "New dialog or file" ) );
a->setMenuText( i18n( "&New..." ) );
@ -633,7 +633,7 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_N );
a->setStatusTip( i18n( "Creates a new project, form or source file." ) );
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( fileMenu );
actionNewFile = a;
@ -653,15 +653,15 @@ void MainWindow::setupFileActions()
newForm->setIconSet( createIconSet("designer_form.png") );
newForm->setAccel( CTRL + Key_N );
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->setMenuText( i18n( "&File..." ) );
newFile->setIconSet( createIconSet("designer_filenew.png") );
newFile->setAccel( ALT + Key_N );
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;
a->addTo( tb );
@ -670,14 +670,14 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
}
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
a->setText( i18n( "Open" ) );
a->setMenuText( i18n( "&Open..." ) );
a->setIconSet( createIconSet("designer_fileopen.png") );
a->setAccel( CTRL + Key_O );
a->setStatusTip( i18n( "Opens an existing project, form or source file ") );
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 ) {
a->addTo( tb );
a->addTo( fileMenu );
@ -685,20 +685,20 @@ void MainWindow::setupFileActions()
}
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
actionFileClose = a;
a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) );
a->setStatusTip( i18n( "Closes the current project or document" ) );
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) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
}
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
actionFileSave = a;
a->setText( i18n( "Save" ) );
a->setMenuText( i18n( "&Save" ) );
@ -706,41 +706,41 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_S );
a->setStatusTip( i18n( "Saves the current project or document" ) );
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) ) );
a->addTo( tb );
a->addTo( fileMenu );
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
actionFileSaveAs = a;
a->setText( i18n( "Save As" ) );
a->setMenuText( i18n( "Save &As..." ) );
a->setStatusTip( i18n( "Saves the current form with a new filename" ) );
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) ) );
if ( !singleProject )
a->addTo( fileMenu );
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
actionFileSaveAll = a;
a->setText( i18n( "Save All" ) );
a->setMenuText( i18n( "Sa&ve All" ) );
a->setStatusTip( i18n( "Saves all open documents" ) );
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) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
}
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
a->setText( i18n( "Create Template" ) );
a->setMenuText( i18n( "Create &Template..." ) );
a->setStatusTip( i18n( "Creates a new 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 )
a->addTo( fileMenu );
@ -767,7 +767,7 @@ void MainWindow::setupFileActions()
if ( !singleProject )
fileMenu->insertSeparator();
a = new DesignerAction( TQT_TQOBJECT(this), 0 );
a = new DesignerAction( this, 0 );
actionFileExit = a;
if ( !singleProjectMode() ) {
a->setText( i18n( "Exit" ) );
@ -778,7 +778,7 @@ void MainWindow::setupFileActions()
a->setText( 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 );
}
@ -792,8 +792,8 @@ void MainWindow::setupProjectActions()
ag->setMenuText( i18n( "Active Project" ) );
ag->setExclusive( TRUE );
ag->setUsesDropDown( TRUE );
connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(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_SLOT( projectSelected( TQAction * ) ) );
connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SIGNAL( projectChanged() ) );
DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE );
eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE );
projects.insert( a, eProject );
@ -805,31 +805,31 @@ void MainWindow::setupProjectActions()
if ( !singleProject )
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;
a->setStatusTip( i18n("Adds a file to the current project") );
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 );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( projectMenu );
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->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 );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu );
#ifndef TQT_NO_SQL
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->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 );
//connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
if ( !singleProject )
@ -837,10 +837,10 @@ void MainWindow::setupProjectActions()
#endif
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->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 );
connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu );
@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions()
layoutMenu = menu;
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;
a->setAccel( CTRL + Key_T );
a->setStatusTip( i18n("Opens a preview") );
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) ) );
a->addTo( menu );
menu->insertSeparator();
TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) );
connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) );
TQSignalMapper *mapper = new TQSignalMapper( this );
connect( mapper, TQT_SIGNAL(mapped(const TQString&)), this, TQT_SLOT(previewForm(const TQString&)) );
TQStringList styles = TQStyleFactory::keys();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
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." );
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->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>"
"<p>Use the preview to test the design and "
@ -902,31 +902,31 @@ void MainWindow::setupWindowActions()
if ( !windowActionsSetup ) {
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->setWhatsThis( whatsThisFrom( "Window|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->setWhatsThis( whatsThisFrom( "Window|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->setWhatsThis( whatsThisFrom( "Window|Close" ) );
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->setWhatsThis( whatsThisFrom( "Window|Close All" ) );
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->setWhatsThis( whatsThisFrom( "Window|Next" ) );
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->setWhatsThis( whatsThisFrom( "Window|Previous" ) );
connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) );
@ -971,7 +971,7 @@ void MainWindow::setupWindowActions()
else
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->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) );
}
@ -979,31 +979,31 @@ void MainWindow::setupWindowActions()
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->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->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->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->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 ),
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->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" );
tb->setCloseMode( TQDockWindow::Undocked );
@ -1044,13 +1044,13 @@ void MainWindow::fileNewDialog()
currentProject->setModified( TRUE );
workspace()->update();
fw->setProject( currentProject );
MetaDataBase::addEntry( TQT_TQOBJECT(fw) );
MetaDataBase::addEntry( fw );
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w );
fw->setCaption( n );
fw->resize( 600, 480 );
insertFormWindow( fw );
fw->killAccels( TQT_TQOBJECT(fw) );
fw->killAccels( fw );
fw->project()->setModified( TRUE );
fw->setFocus();
fw->setSavePixmapInProject( TRUE );
@ -1542,7 +1542,7 @@ void MainWindow::editPaste()
if ( l.count() == 1 ) {
w = l.first();
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();
}
@ -1761,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor()
}
if ( !editor )
editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang );
editor = createSourceEditor( formWindow(), formWindow()->project(), lang );
return editor;
}

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

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

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

@ -174,31 +174,31 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( dlg.selectedURL().path() );
if ( fn )
*fn = dlg.selectedURL().path();
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() );
MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() );
return pix;
}
} else if ( fw && fw->savePixmapInProject() ) {
PixmapCollectionEditor dia( parent, 0, TRUE );
dia.setProject( fw->project() );
dia.setChooserMode( TRUE );
dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
if ( dia.exec() == TQDialog::Accepted ) {
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;
}
} else {
PixmapFunction dia( parent, 0, TRUE );
TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
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();
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix;
// 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() );
MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() );
MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
return pix;
}
}
@ -211,7 +211,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
}
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();
}

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

@ -555,7 +555,7 @@ void PropertyItem::setFocus( TQWidget *w )
{
if ( !tqApp->focusWidget() ||
listview->propertyEditor()->formWindow() &&
( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) &&
( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) &&
!tqApp->focusWidget()->inherits( "Editor" ) ) )
w->setFocus();
}
@ -598,7 +598,7 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) {
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() )
lin->setEnabled( FALSE );
} else {
@ -606,7 +606,7 @@ TQLineEdit *PropertyTextItem::lined()
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\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 ) {
lin->hide();
@ -781,7 +781,7 @@ TQLineEdit *PropertyDoubleItem::lined()
if ( lin )
return lin;
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() ),
this, TQT_SLOT( setValue() ) );
@ -2026,13 +2026,13 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 0 )
item->setValue( TQStringList( lst[ 0 ] ) );
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 ] ) );
if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
item->setCurrentItem( lst[ 0 ] );
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 ] );
else
item->setCurrentItem( 0 );
@ -2044,7 +2044,7 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 1 )
item->setValue( TQStringList( lst[ 1 ] ) );
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 )
item->setValue( fakeLst[ 1 ] );
}
@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren()
if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
item->setCurrentItem( lst[ 1 ] );
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 )
item->setCurrentItem( fakeLst[ 1 ] );
else
@ -3043,7 +3043,7 @@ void PropertyList::setupProperties()
TQStringList valueSet;
bool parentHasLayout =
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;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
@ -3074,7 +3074,7 @@ void PropertyList::setupProperties()
}
unique.insert( TQString::fromLatin1( it.current() ), TRUE );
if ( editor->widget()->isWidgetType() &&
editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) {
editor->formWindow()->isMainContainer( editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@ -3712,11 +3712,11 @@ void PropertyList::setPropertyValue( PropertyItem *i )
else
i->setValue( TQVariant( false ) );
} 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" ) {
( (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" ) {
( (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" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@ -3966,7 +3966,7 @@ void EventList::setup()
it.current(), TQString(), TQString() );
eventItem->setOpen( TRUE );
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;
for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
cit != conns.end(); ++cit ) {
@ -4042,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
} else if ( res == DEL_ITEM && i->parent() ) {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = TQT_TQOBJECT(formWindow->mainContainer());
conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 );
delete i;
@ -4076,7 +4076,7 @@ void EventList::renamed( TQListViewItem *i )
} else {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = TQT_TQOBJECT(formWindow->mainContainer());
conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 );
AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ),

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

@ -236,7 +236,7 @@ void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
formWindow,
widget, origGeom,
widget->geometry() ) );
formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) );
formWindow->emitUpdateProperties( widget );
}
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();
editor = iFace->editor( MainWindow::self->areEditorsReadOnly(),
this, MainWindow::self->designerInterface() );
iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) );
iFace->onBreakPointChange( MainWindow::self, TQT_SLOT( breakPointsChanged() ) );
resize( 600, 400 );
setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) );
}
@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p )
if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else
iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) );
iFace->setContext( formWindow()->mainContainer() );
} else {
iFace->setContext( 0 );
}
@ -235,7 +235,7 @@ void SourceEditor::resetContext()
if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else
iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) );
iFace->setContext( formWindow()->mainContainer() );
} else {
iFace->setContext( 0 );
}

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

@ -59,7 +59,7 @@ KDevDesigner::KDevDesigner()
// our hands on it
TQStringList args;
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));
if (m_part)
@ -99,16 +99,16 @@ void KDevDesigner::load(const KURL& url)
void KDevDesigner::setupActions()
{
/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/
/* KStdAction::openNew(this, TQT_SLOT(fileNew()), 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_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection());
m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection());
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection());
KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
}
void KDevDesigner::saveProperties(TDEConfig* /*config*/)

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

@ -212,7 +212,7 @@ CreatePCSDialog::CreatePCSDialog( CppSupportPart* part, TQWidget* parent, const
KService::Ptr ptr = *it;
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 )
{
new PCSListViewItem( ptr, importer, importerListView );

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

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

@ -41,7 +41,7 @@ void KDevShellWidget::activate( )
KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart");
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;
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?
TQRegExpValidator *appname_edit_validator;
appname_edit_validator = new TQRegExpValidator (appname_regexp,
TQT_TQOBJECT(appname_edit),
appname_edit,
"AppNameValidator");
appname_edit->setValidator(appname_edit_validator);

@ -71,28 +71,28 @@ ClassViewWidget::ClassViewWidget( ClassViewPart * part )
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_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_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_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_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_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_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();
config->setGroup( "General" );

@ -229,7 +229,7 @@ void DiffWidget::loadExtPart( const TQString& partName )
if ( !extService )
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() )
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),
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());
proc_man = new TDEProcess( TQT_TQOBJECT(this) );
proc_info = new TDEProcess( TQT_TQOBJECT(this) );
proc_man = new TDEProcess( this );
proc_info = new TDEProcess( this );
connect( proc_man, TQT_SIGNAL(processExited( TDEProcess* )),
this, TQT_SLOT(procManExited( TDEProcess* )) );

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

@ -22,5 +22,5 @@
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()
{
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
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->setIconSize( 16 );
toolbar->setEnableContextMenu( false );

@ -179,12 +179,12 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part)
this, TQT_SLOT(slotContextMenu(TDEListView*, TQListViewItem*, const TQPoint&)) );
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->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(),
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_part = part;

@ -63,7 +63,7 @@ FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl()
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);
files_combo = new KComboBox(true, this);
files_label->setBuddy(TQT_TQWIDGET(files_combo->focusProxy()));
files_label->setBuddy(files_combo->focusProxy());
files_combo->insertStrList(filepatterns);
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");
exclude_combo = new KComboBox(true, this);
exclude_label->setBuddy(TQT_TQWIDGET(files_combo->focusProxy()));
exclude_label->setBuddy(files_combo->focusProxy());
if (exclude_list.count()) {
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"));
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");
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 = 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");
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."));

@ -178,7 +178,7 @@ MakeWidget::MakeWidget(MakeViewPart *part)
dirstack.setAutoDelete(true);
childproc = new TDEProcess(TQT_TQOBJECT(this));
childproc = new TDEProcess(this);
procLineMaker = new ProcessLineMaker( childproc );
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);
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,
TQT_TQOBJECT(this), TQT_SLOT(clearAccel()), TQT_TQOBJECT(this));
this, TQT_SLOT(clearAccel()), this);
TDEConfig *config = kapp->config();
config->setGroup("UI");

@ -85,9 +85,9 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position)
m_widgetStack = new TQWidgetStack(this);
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_moveToDockRight = new TDEAction( i18n("Move to right dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockRight()), TQT_TQOBJECT(this) );
m_moveToDockBottom = new TDEAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), 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, this, TQT_SLOT(moveToDockRight()), this );
m_moveToDockBottom = new TDEAction( i18n("Move to bottom dock"), 0, this, TQT_SLOT(moveToDockBottom()), this );
setVisible(m_visible);
@ -375,7 +375,7 @@ void DDockWindow::selectPrevWidget()
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();

@ -295,7 +295,7 @@ DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view)
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))
{

@ -61,11 +61,11 @@ SimpleMainWindow::SimpleMainWindow(TQWidget* parent, const char *name)
:DMainWindow(parent, name)
{
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_leftDock, TQT_SIGNAL(hidden()), TQT_TQOBJECT(this), TQT_SLOT(raiseEditor()));
connect(m_rightDock, 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()), this, TQT_SLOT(raiseEditor()));
connect(m_rightDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor()));
}
SimpleMainWindow::~ SimpleMainWindow( )
@ -97,7 +97,7 @@ void SimpleMainWindow::init()
if (help_menu)
{
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 );
@ -116,19 +116,19 @@ void SimpleMainWindow::init()
i18n("Could Not Find Plugins") );
}
connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), TQT_TQOBJECT(this), TQT_SLOT(slotCoreInitialized()));
connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), TQT_TQOBJECT(this), TQT_SLOT(projectOpened()));
connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), TQT_TQOBJECT(this), TQT_SLOT(projectClosed()));
connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), this, TQT_SLOT(slotCoreInitialized()));
connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()));
connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()));
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 *)),
TQT_TQOBJECT(this), TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * )));
this, TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * )));
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(),
TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)),
TQT_TQOBJECT(this), TQT_SLOT(documentChangedState(const KURL&, DocumentState)));
this, TQT_SLOT(documentChangedState(const KURL&, DocumentState)));
loadSettings();
}
@ -414,64 +414,64 @@ void SimpleMainWindow::createFramework()
PartController::createInstance( this );
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()
{
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->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor."));
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" );
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_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_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_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_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_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_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,
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,
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");
m_mainWindowShare->createActions();
connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoNextWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoPreviousWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoFirstWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), TQT_TQOBJECT(this), TQT_SLOT(gotoLastWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), this, TQT_SLOT(gotoNextWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), this, TQT_SLOT(gotoPreviousWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), this, TQT_SLOT(gotoFirstWindow()));
connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), this, TQT_SLOT(gotoLastWindow()));
}
void SimpleMainWindow::raiseEditor()
@ -598,7 +598,7 @@ void SimpleMainWindow::closeTab()
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)
return;
@ -644,7 +644,7 @@ void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p)
++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);
}
@ -679,7 +679,7 @@ void SimpleMainWindow::configureToolbars()
{
saveMainWindowSettings(TDEGlobal::config(), "SimpleMainWindow");
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();
}
@ -704,7 +704,7 @@ bool SimpleMainWindow::queryExit()
void SimpleMainWindow::setupWindowMenu()
{
// 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)
{
@ -718,8 +718,8 @@ void SimpleMainWindow::setupWindowMenu()
actionCollection()->action("file_close_all")->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(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(fillWindowMenu()));
TQObject::connect(m_windowMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(openURL(int)));
TQObject::connect(m_windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillWindowMenu()));
}
void SimpleMainWindow::openURL(int w)

@ -222,7 +222,7 @@ void DiffWidget::loadExtPart( const TQString& partName )
if ( !extService )
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() )
return;

@ -103,7 +103,7 @@ void CommitDialog::setDepotFiles( const TQStringList& lst )
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& )),
this, TQT_SLOT(getFilesFinished( const TQString&, const TQString& )) );
}

Loading…
Cancel
Save