summaryrefslogtreecommitdiffstats
path: root/kommander/editor
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor')
-rw-r--r--kommander/editor/actiondnd.cpp10
-rw-r--r--kommander/editor/actioneditorimpl.cpp12
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp12
-rw-r--r--kommander/editor/command.cpp132
-rw-r--r--kommander/editor/connectioneditorimpl.cpp22
-rw-r--r--kommander/editor/formsettingsimpl.cpp4
-rw-r--r--kommander/editor/formwindow.cpp140
-rw-r--r--kommander/editor/hierarchyview.cpp12
-rw-r--r--kommander/editor/layout.cpp16
-rw-r--r--kommander/editor/mainwindow.cpp58
-rw-r--r--kommander/editor/mainwindowactions.cpp100
-rw-r--r--kommander/editor/metadatabase.cpp8
-rw-r--r--kommander/editor/newformimpl.cpp6
-rw-r--r--kommander/editor/pixmapchooser.cpp8
-rw-r--r--kommander/editor/propertyeditor.cpp16
-rw-r--r--kommander/editor/resource.cpp168
-rw-r--r--kommander/editor/sizehandle.cpp2
-rw-r--r--kommander/editor/tableeditorimpl.cpp2
-rw-r--r--kommander/editor/widgetfactory.cpp124
19 files changed, 426 insertions, 426 deletions
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp
index 7864b883..13bdaa4c 100644
--- a/kommander/editor/actiondnd.cpp
+++ b/kommander/editor/actiondnd.cpp
@@ -68,7 +68,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 );
}
@@ -163,7 +163,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();
@@ -181,7 +181,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();
@@ -458,7 +458,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
drag->setPixmap( a->iconSet().pixmap() );
if ( a->inherits( "QDesignerAction" ) ) {
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'" ).
@@ -704,7 +704,7 @@ QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw )
{
show();
setAcceptDrops( true );
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
itemNum = 0;
mousePressed = false;
lastIndicatorPos = TQPoint( -1, -1 );
diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp
index 72f09daf..8e54da57 100644
--- a/kommander/editor/actioneditorimpl.cpp
+++ b/kommander/editor/actioneditorimpl.cpp
@@ -86,10 +86,10 @@ void ActionEditor::deleteAction()
formWindow->actionList().removeRef( currentAction );
delete currentAction;
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction );
+ MetaDataBase::connections( formWindow, currentAction );
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 );
delete it.current();
break;
@@ -97,10 +97,10 @@ void ActionEditor::deleteAction()
formWindow->actionList().removeRef( currentAction );
delete currentAction;
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction );
+ MetaDataBase::connections( formWindow, currentAction );
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 );
delete it.current();
break;
@@ -109,7 +109,7 @@ void ActionEditor::deleteAction()
}
if ( formWindow )
- formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) );
+ formWindow->setActiveObject( formWindow->mainContainer() );
}
void ActionEditor::newAction()
@@ -257,7 +257,7 @@ void ActionEditor::updateActionIcon( TQAction *a )
void ActionEditor::connectionsClicked()
{
- ConnectionEditor editor( formWindow->mainWindow(), TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow), formWindow );
+ ConnectionEditor editor( formWindow->mainWindow(), currentAction, formWindow, formWindow );
editor.exec();
}
#include "actioneditorimpl.moc"
diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp
index 1c1b7bbe..f42acc2b 100644
--- a/kommander/editor/assoctexteditorimpl.cpp
+++ b/kommander/editor/assoctexteditorimpl.cpp
@@ -89,7 +89,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
break;
}
- doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(a_parent), "KTextEditor::Document");
+ doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document");
TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1);
view = doc->createView(editorFrame);
layout->addWidget(view, 1,1);
@@ -270,21 +270,21 @@ void AssocTextEditor::save() const
{
TQString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow,
- TQT_TQOBJECT(m_widget), m_propertyEditor, "associations", atw->associatedText(),
+ m_widget, m_propertyEditor, "associations", atw->associatedText(),
associatedText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "associations", true);
+ MetaDataBase::setPropertyChanged(m_widget, "associations", true);
}
if (atw->populationText() != populationText())
{
TQString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
- SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, TQT_TQOBJECT(m_widget),
+ SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, m_widget,
m_propertyEditor, "populationText", atw->populationText(),
populationText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "populationText", true);
+ MetaDataBase::setPropertyChanged(m_widget, "populationText", true);
}
}
@@ -305,7 +305,7 @@ TQString AssocTextEditor::populationText() const
TQStringList AssocTextEditor::buildWidgetList()
{
TQStringList widgetList;
- TQObject* thisObject = TQT_TQOBJECT(m_formWindow->mainContainer());
+ TQObject* thisObject = m_formWindow->mainContainer();
TQObjectList *objectList = thisObject->queryList();
objectList->prepend(thisObject);
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp
index 89a214b6..6612e49f 100644
--- a/kommander/editor/command.cpp
+++ b/kommander/editor/command.cpp
@@ -235,7 +235,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 );
}
@@ -244,7 +244,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 );
}
@@ -271,14 +271,14 @@ 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()->selectWidget( widget, false );
formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@@ -318,7 +318,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 );
}
@@ -326,7 +326,7 @@ void MoveCommand::execute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -339,7 +339,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 );
}
@@ -347,7 +347,7 @@ void MoveCommand::unexecute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -369,13 +369,13 @@ void DeleteCommand::execute()
TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s.utf8() );
- 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 );
}
}
@@ -395,11 +395,11 @@ void DeleteCommand::unexecute()
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s.utf8() );
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 );
}
}
@@ -553,9 +553,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
align |= WordBreak;
widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "layoutSpacing" ) {
- MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>( editor->widget() ) ), v.toInt() );
} else if ( propName == "layoutMargin" ) {
- MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>( editor->widget() ) ), v.toInt() );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -587,9 +587,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
oldSerNum = v.toPixmap().serialNumber();
widget->setProperty( propName.latin1(), v );
if ( oldSerNum != -1 && oldSerNum != widget->property( propName.latin1() ).toPixmap().serialNumber() )
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()),
+ MetaDataBase::setPixmapKey( formWindow(),
widget->property( propName.latin1() ).toPixmap().serialNumber(),
- MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) );
+ MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
if ( propName == "cursor" )
MetaDataBase::setCursor( (TQWidget*)widget, v.toCursor() );
if ( propName == "name" && widget->isWidgetType() ) {
@@ -747,8 +747,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, layoutBase->inherits( "TQSplitter" ) );
@@ -776,8 +776,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 );
}
// ------------------------------------------------------------
@@ -809,7 +809,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" );
tabPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
+ MetaDataBase::addEntry( tabPage );
}
void AddTabPageCommand::execute()
@@ -818,7 +818,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 );
}
@@ -826,7 +826,7 @@ void AddTabPageCommand::unexecute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -840,7 +840,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
page = new QDesignerWidget( formWindow(), toolBox, "tab" );
page->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(page) );
+ MetaDataBase::addEntry( page );
}
void AddToolBoxPageCommand::execute()
@@ -849,7 +849,7 @@ void AddToolBoxPageCommand::execute()
index = ( (EditorToolBox*)toolBox)->count();
toolBox->insertItem(index, page, label);
toolBox->setCurrentItem( page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -857,7 +857,7 @@ void AddToolBoxPageCommand::unexecute()
{
toolBox->removeItem( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -876,7 +876,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 );
}
@@ -885,7 +885,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 );
}
@@ -903,7 +903,7 @@ void DeleteTabPageCommand::execute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -911,7 +911,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 );
}
@@ -929,7 +929,7 @@ void DeleteToolBoxPageCommand::execute()
{
toolBox->removeItem( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -937,7 +937,7 @@ void DeleteToolBoxPageCommand::unexecute()
{
toolBox->insertItem(index, page, label);
toolBox->setCurrentItem( page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -951,7 +951,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()
@@ -961,7 +961,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 );
}
@@ -969,7 +969,7 @@ void AddWizardPageCommand::unexecute()
{
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -988,7 +988,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 );
}
@@ -997,7 +997,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 );
}
@@ -1017,7 +1017,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label );
label = oldLabel;
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
}
void RenameWizardPageCommand::unexecute()
@@ -1042,7 +1042,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 );
}
@@ -1061,7 +1061,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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1074,7 +1074,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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1095,7 +1095,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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1108,7 +1108,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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1131,7 +1131,7 @@ AddSlotCommand::AddSlotCommand( const TQString &name, FormWindow *fw, const TQCS
void AddSlotCommand::execute()
{
- MetaDataBase::addSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
+ MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1141,7 +1141,7 @@ void AddSlotCommand::execute()
void AddSlotCommand::unexecute()
{
- MetaDataBase::removeSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
+ MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1160,7 +1160,7 @@ RemoveSlotCommand::RemoveSlotCommand( const TQString &name, FormWindow *fw, cons
void RemoveSlotCommand::execute()
{
- MetaDataBase::removeSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
+ MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1170,7 +1170,7 @@ void RemoveSlotCommand::execute()
void RemoveSlotCommand::unexecute()
{
- MetaDataBase::addSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
+ MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1238,7 +1238,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 );
}
@@ -1248,7 +1248,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 );
}
@@ -1490,21 +1490,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 );
}
// ------------------------------------------------------------
@@ -1516,7 +1516,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 );
@@ -1546,7 +1546,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 )
@@ -1565,7 +1565,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 )
@@ -1749,7 +1749,7 @@ void AddMenuCommand::execute()
if ( !popup ) {
TQString n = "PopupMenu";
popup = new QDesignerPopupMenu( mainWindow );
- formWindow()->unify( TQT_TQOBJECT(popup), n, true );
+ formWindow()->unify( popup, n, true );
popup->setName( n.utf8() );
}
if ( !mainWindow->child( 0, "TQMenuBar" ) ) {
@@ -1762,7 +1762,7 @@ void AddMenuCommand::execute()
id = mainWindow->menuBar()->insertItem( name, popup );
else
id = mainWindow->menuBar()->insertItem( name, popup, id, index );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
void AddMenuCommand::unexecute()
@@ -1770,7 +1770,7 @@ void AddMenuCommand::unexecute()
if ( !popup || !menuBar )
return;
menuBar->removeItem( id );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
// ------------------------------------------------------------
@@ -1784,13 +1784,13 @@ RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesign
void RenameMenuCommand::execute()
{
menuBar->changeItem( id, newName );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
void RenameMenuCommand::unexecute()
{
menuBar->changeItem( id, oldName );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
// ------------------------------------------------------------
@@ -1805,14 +1805,14 @@ void MoveMenuCommand::execute()
{
menuBar->removeItem( menuBar->idAt( fromIdx ) );
menuBar->insertItem( text, popup, -1, toIdx );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
void MoveMenuCommand::unexecute()
{
menuBar->removeItem( menuBar->idAt( toIdx ) );
menuBar->insertItem( text, popup, -1, fromIdx );
- formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
+ formWindow()->killAccels( formWindow() );
}
// ------------------------------------------------------------
@@ -1827,7 +1827,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.utf8() );
mainWindow->addToolBar( toolBar, n );
} else {
diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp
index 05a3c2ad..05c1dc4c 100644
--- a/kommander/editor/connectioneditorimpl.cpp
+++ b/kommander/editor/connectioneditorimpl.cpp
@@ -93,9 +93,9 @@ ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* r
: ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
{
if (!rcvr || rcvr == m_formWindow)
- rcvr = TQT_TQOBJECT(m_formWindow->mainContainer());
+ rcvr = m_formWindow->mainContainer();
if (!sndr || sndr == m_formWindow)
- sndr = TQT_TQOBJECT(m_formWindow->mainContainer());
+ sndr = m_formWindow->mainContainer();
m_sender = sndr;
m_receiver = rcvr;
@@ -108,7 +108,7 @@ ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* r
!it.current()->inherits("TQLayoutWidget") &&
!it.current()->inherits("Spacer") &&
qstrcmp(it.current()->name(), "central widget") &&
- !m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) &&
+ !m_formWindow->isMainContainer(it.current()) &&
!lst.contains(it.current()->name()))
lst << it.current()->name();
}
@@ -155,12 +155,12 @@ bool ConnectionEditor::isSignalIgnored(const char *signal) const
bool ConnectionEditor::isSlotIgnored(const TQMetaData* md)
{
if (md->access != TQMetaData::Public && (md->access != TQMetaData::Protected ||
- !m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver))))
+ !m_formWindow->isMainContainer(m_receiver)))
return true;
for (int i = 0; ignore_slots[i]; i++)
if (!qstrcmp(md->name, ignore_slots[i]))
return true;
- if (!m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver)) && !qstrcmp(md->name, "close()"))
+ if (!m_formWindow->isMainContainer(m_receiver) && !qstrcmp(md->name, "close()"))
return true;
if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() &&
((TQWidget*)m_receiver)->focusPolicy() == TQWidget::NoFocus)
@@ -175,11 +175,11 @@ TQObject* ConnectionEditor::objectByName(const TQString& s) const
{
for (TQPtrDictIterator <TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return TQT_TQOBJECT(it.current());
+ return it.current();
for (TQPtrListIterator<TQAction> it(m_formWindow->actionList()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return TQT_TQOBJECT(it.current());
+ return it.current();
return 0;
}
@@ -280,7 +280,7 @@ void ConnectionEditor::senderChanged(const TQString& s)
if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), TQt::ExactMatch))
signalBox->insertItem(it.current());
if (m_sender == m_formWindow->mainContainer())
- signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow)));
+ signalBox->insertStringList(MetaDataBase::signalList(m_formWindow));
signalBox->sort();
signalBox->setCurrentItem(signalBox->firstItem());
// Update slots - some may (not) have their signal equivalents now.
@@ -336,14 +336,14 @@ void ConnectionEditor::fillConnectionsList()
{
connectionView->clear();
m_connections.clear();
- m_oldConnections = MetaDataBase::connections(TQT_TQOBJECT(m_formWindow));
+ m_oldConnections = MetaDataBase::connections(m_formWindow);
if (!m_oldConnections.isEmpty())
{
TQValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
for (; it != m_oldConnections.end(); ++it)
{
- if (m_formWindow->isMainContainer(TQT_TQOBJECT((*it).receiver)) &&
- !MetaDataBase::hasSlot(TQT_TQOBJECT(m_formWindow), MetaDataBase::normalizeSlot((*it).slot).latin1()))
+ if (m_formWindow->isMainContainer((*it).receiver) &&
+ !MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1()))
continue;
MetaDataBase::Connection conn = *it;
TDEListViewItem *i = new TDEListViewItem(connectionView, conn.sender->name(), conn.signal,
diff --git a/kommander/editor/formsettingsimpl.cpp b/kommander/editor/formsettingsimpl.cpp
index ddfa8345..b65a9718 100644
--- a/kommander/editor/formsettingsimpl.cpp
+++ b/kommander/editor/formsettingsimpl.cpp
@@ -30,7 +30,7 @@
FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
: FormSettingsBase( parent, 0, true ), formwindow( fw )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(TQT_TQOBJECT(fw));
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(fw);
editAuthor->setText(info.author);
editVersion->setText(info.version);
editLicense->setText(info.license);
@@ -46,7 +46,7 @@ void FormSettings::okClicked()
info.version = editVersion->text();
info.license = editLicense->text();
info.comment = editComment->text();
- MetaDataBase::setMetaInfo(TQT_TQOBJECT(formwindow), info);
+ MetaDataBase::setMetaInfo(formwindow, info);
formwindow->commandHistory()->setModified(true);
formwindow->setLayoutDefaultSpacing(spinSpacing->value());
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
index ec8bb247..c511fc55 100644
--- a/kommander/editor/formwindow.cpp
+++ b/kommander/editor/formwindow.cpp
@@ -129,7 +129,7 @@ FormWindow::FormWindow(FormFile *f, TQWidget *parent, const char *name)
void FormWindow::init()
{
- MetaDataBase::addEntry(TQT_TQOBJECT(this));
+ MetaDataBase::addEntry(this);
ff->setFormWindow(this);
propertyWidget = 0;
toolFixed = false;
@@ -167,7 +167,7 @@ void FormWindow::init()
TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this);
setMainContainer(w);
- propertyWidget = TQT_TQOBJECT(w);
+ propertyWidget = w;
targetContainer = 0;
hadOwnPalette = false;
@@ -178,7 +178,7 @@ void FormWindow::init()
void FormWindow::setMainWindow(MainWindow *w)
{
mainwindow = w;
- MetaDataBase::addEntry(TQT_TQOBJECT(this));
+ MetaDataBase::addEntry(this);
initSlots();
}
@@ -190,7 +190,7 @@ FormWindow::~FormWindow()
{
if (MainWindow::self->objectHierarchy()->formWindow() == this)
MainWindow::self->objectHierarchy()->setFormWindow(0, 0);
- MetaDataBase::clear(TQT_TQOBJECT(this));
+ MetaDataBase::clear(this);
if (ff)
ff->setFormWindow(0);
}
@@ -312,7 +312,7 @@ void FormWindow::insertWidget()
if (!savePixmapInline() && currTool == WidgetDatabase::idFromClassName("PixmapLabel"))
((TQLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm"));
- 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> "
@@ -332,7 +332,7 @@ void FormWindow::insertWidget()
}
TQString s = w->name();
- unify(TQT_TQOBJECT(w), s, true);
+ unify(w, s, true);
w->setName(s.utf8());
insertWidget(w);
TQRect r(currRect);
@@ -357,7 +357,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;
@@ -414,12 +414,12 @@ void FormWindow::insertWidget(TQWidget *w, bool checkName)
{
if (checkName) {
TQString s = w->name();
- unify(TQT_TQOBJECT(w), s, true);
+ unify(w, s, true);
w->setName(s.utf8());
}
- 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> "
@@ -446,7 +446,7 @@ void FormWindow::insertWidget(TQWidget *w, bool checkName)
void FormWindow::removeWidget(TQWidget *w)
{
- MetaDataBase::removeEntry(TQT_TQOBJECT(w));
+ MetaDataBase::removeEntry(w);
widgets()->take(w);
}
@@ -454,10 +454,10 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w)
{
switch (currTool) {
case POINTER_TOOL:
- if (!isMainContainer(TQT_TQOBJECT(w)) && qstrcmp(w->name(), "central widget"))
+ if (!isMainContainer(w) && qstrcmp(w->name(), "central widget"))
{ // 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() && (WidgetFactory::layoutType(w->parentWidget()) !=
@@ -500,7 +500,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
switch (currTool) {
case POINTER_TOOL:
- if (!isMainContainer(TQT_TQOBJECT(w)) && qstrcmp(w->name(), "central widget") != 0)
+ 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)
@@ -513,7 +513,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
@@ -531,7 +531,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;
@@ -542,12 +542,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() &&
@@ -563,8 +563,8 @@ 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();
@@ -581,7 +581,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
clearSelection(false);
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if (opw->isWidgetType())
repaintSelection((TQWidget*)opw);
}
@@ -597,13 +597,13 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name()));
connectStartPos = mapFromGlobal(e->globalPos());
currentConnectPos = mapFromGlobal(e->globalPos());
- connectSender = TQT_TQOBJECT(designerWidget(TQT_TQOBJECT(w)));
- connectReceiver = connectableObject(TQT_TQOBJECT(designerWidget(TQT_TQOBJECT(w))), connectReceiver);
+ connectSender = designerWidget(w);
+ connectReceiver = connectableObject(designerWidget(w), connectReceiver);
beginUnclippedPainter(false);
drawConnectLine();
break;
case ORDER_TOOL:
- if (!isMainContainer(TQT_TQOBJECT(w)))
+ if (!isMainContainer(w))
{ // press on a child widget
orderedWidgets.removeRef(w);
orderedWidgets.append(w);
@@ -629,12 +629,12 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
insertParent = WidgetFactory::containerOfWidget(mainContainer());
// default parent for new widget is the formwindow
- if (!isMainContainer(TQT_TQOBJECT(w)))
+ 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()) &&
!wid->inherits("TQLayoutWidget") && !wid->inherits("TQSplitter"))
{
@@ -659,7 +659,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
{
switch (currTool) {
case ORDER_TOOL:
- if (!isMainContainer(TQT_TQOBJECT(w)))
+ if (!isMainContainer(w))
{ // press on a child widget
orderedWidgets.clear();
orderedWidgets.append(w);
@@ -724,10 +724,10 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{ // if we actually have to move
if (!checkedSelectionsForMove)
{ // if not checked yet, check if the correct widget are selected...
- if (!isWidgetSelected(TQT_TQOBJECT(w)))
+ 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);
@@ -736,7 +736,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
// highlight the possible new parent container
TQMapConstIterator<ulong, TQPoint> it = moving.begin();
TQWidget* wa = containerAt(e->globalPos(), ((TQWidget*)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
@@ -792,17 +792,17 @@ 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))
newReceiver = wid;
if (newReceiver && (newReceiver->inherits("TQLayoutWidget")
|| newReceiver->inherits("Spacer")))
newReceiver = (TQWidget*)connectReceiver;
drawRecRect = newReceiver != connectReceiver;
currentConnectPos = mapFromGlobal(e->globalPos());
- if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver))
- || insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
- connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver));
+ if (newReceiver && (isMainContainer(newReceiver)
+ || insertedWidgets.find(newReceiver)) && !isCentralWidget(newReceiver))
+ connectReceiver = connectableObject(newReceiver, connectReceiver);
mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").arg(connectSender->name()).
arg(connectReceiver->name()));
tqApp->processEvents();
@@ -888,7 +888,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
emitSelChanged = true;
if (!wa->inherits("TQButtonGroup"))
{
- MetaDataBase::setPropertyChanged(TQT_TQOBJECT(i), "buttonGroupId", false);
+ MetaDataBase::setPropertyChanged(i, "buttonGroupId", false);
if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup"))
((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i);
}
@@ -897,13 +897,13 @@ 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;
@@ -1064,7 +1064,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;
}
@@ -1086,10 +1086,10 @@ 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);
@@ -1100,7 +1100,7 @@ void FormWindow::selectWidget(TQObject * o, bool select)
w == ((TQMainWindow *) mainContainer())->centralWidget())
{
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if (opw->isWidgetType())
repaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
@@ -1113,7 +1113,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())
@@ -1148,9 +1148,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())
@@ -1170,7 +1170,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();
}
@@ -1199,7 +1199,7 @@ void FormWindow::clearSelection(bool changePropertyDisplay)
if (changePropertyDisplay)
{
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if (opw->isWidgetType())
repaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
@@ -1292,7 +1292,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;
@@ -1350,7 +1350,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;
@@ -1385,7 +1385,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);
@@ -1411,7 +1411,7 @@ void FormWindow::deleteWidgets()
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());
@@ -1527,7 +1527,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);
}
@@ -1552,7 +1552,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;
}
@@ -1652,7 +1652,7 @@ void FormWindow::currentToolChanged()
{
case POINTER_TOOL:
if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget))
- emitShowProperties(TQT_TQOBJECT(mainContainer()));
+ emitShowProperties(mainContainer());
restoreCursors(this, this);
break;
case ORDER_TOOL:
@@ -1662,7 +1662,7 @@ void FormWindow::currentToolChanged()
orderedWidgets.clear();
showOrderIndicators();
if (mainWindow()->formWindow() == this)
- emitShowProperties(TQT_TQOBJECT(mainContainer()));
+ emitShowProperties(mainContainer());
setCursorToAll(ArrowCursor, this);
}
break;
@@ -1670,14 +1670,14 @@ void FormWindow::currentToolChanged()
mainWindow()->statusBar()->message(i18n("Drag a line to create a connection..."));
setCursorToAll(CrossCursor, this);
if (mainWindow()->formWindow() == this)
- emitShowProperties(TQT_TQOBJECT(mainContainer()));
+ emitShowProperties(mainContainer());
break;
default:
mainWindow()->statusBar()->message(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;
}
}
@@ -1743,7 +1743,7 @@ bool FormWindow::checkCustomWidgets()
{
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;
}
@@ -1849,7 +1849,7 @@ void FormWindow::checkAccels()
{
clearSelection(false);
for (wid = (*it).first(); wid; wid = (*it).next())
- selectWidget(TQT_TQOBJECT(wid), true);
+ selectWidget(wid, true);
}
return;
}
@@ -1890,7 +1890,7 @@ void FormWindow::selectAll()
{
if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
{
- selectWidget(TQT_TQOBJECT(o));
+ selectWidget(o);
}
}
delete l;
@@ -2036,7 +2036,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)
@@ -2066,7 +2066,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w)
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);
}
@@ -2116,7 +2116,7 @@ bool FormWindow::allowMove(TQWidget *w)
w = w->parentWidget();
while (w)
{
- if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) ==
+ if ((isMainContainer(w) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) ==
WidgetFactory::NoLayout)
return true;
w = w->parentWidget();
@@ -2351,7 +2351,7 @@ bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w)
{
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current(); ++it)
- if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())),
+ if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(it.current()),
w->className.utf8()))
return true;
return false;
@@ -2388,7 +2388,7 @@ bool FormWindow::isDatabaseAware() const
void FormWindow::visibilityChanged()
{
if (currTool != ORDER_TOOL)
- emitUpdateProperties(TQT_TQOBJECT(currentWidget()));
+ emitUpdateProperties(currentWidget());
else
{
updateOrderIndicators();
@@ -2407,7 +2407,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();
@@ -2460,7 +2460,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
if (selected.find(it.current()) != -1)
continue;
if (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(
- WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())))) && it.current() != mainContainer())
+ WidgetFactory::classNameOf(it.current()))) && it.current() != mainContainer())
continue;
// the rectangles of all ancestors of the container must contain the insert position
@@ -2475,8 +2475,8 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
int wd = widgetDepth(it.current());
if (wd == depth && container && (it.current()->parentWidget()->
- childrenListObject()).find(TQT_TQOBJECT(it.current())) >
- (container->parentWidget()->childrenListObject()).find(TQT_TQOBJECT(container)))
+ childrenListObject()).find(it.current()) >
+ (container->parentWidget()->childrenListObject()).find(container))
wd++;
if (wd > depth && !isChildOf(it.current(), notParentOf)) {
depth = wd;
@@ -2508,7 +2508,7 @@ void FormWindow::setMainContainer(TQWidget *w)
if (resetPropertyWidget)
{
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mContainer);
+ propertyWidget = mContainer;
if (opw && opw->isWidgetType())
repaintSelection((TQWidget*)opw);
}
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp
index 4f2ad88c..75b001b5 100644
--- a/kommander/editor/hierarchyview.cpp
+++ b/kommander/editor/hierarchyview.cpp
@@ -250,7 +250,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
if ( formWindow == w ) {
if ( deselect )
formWindow->clearSelection( false );
- formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) );
+ formWindow->emitShowProperties( formWindow );
return;
}
@@ -264,7 +264,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
else
( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
w = (TQWidget*)w->parent()->parent();
- formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else {
return;
}
@@ -273,7 +273,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
if ( deselect )
formWindow->clearSelection( false );
if ( w->isVisibleTo( formWindow ) )
- formWindow->selectWidget( TQT_TQOBJECT(w), true );
+ formWindow->selectWidget( w, true );
}
TQWidget *HierarchyList::findWidget( TQListViewItem *i )
@@ -345,7 +345,7 @@ void HierarchyList::setup()
}
#endif
if ( w )
- insertObject( TQT_TQOBJECT(w), 0 );
+ insertObject( w, 0 );
}
void HierarchyList::setOpen( TQListViewItem *i, bool b )
@@ -357,7 +357,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
bool fakeMainWindow = false;
if ( o && o->inherits( "TQMainWindow" ) ) {
- TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) {
o = cw;
fakeMainWindow = true;
@@ -454,7 +454,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;
}
diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp
index 1cedfc32..05354a84 100644
--- a/kommander/editor/layout.cpp
+++ b/kommander/editor/layout.cpp
@@ -116,7 +116,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();
@@ -187,7 +187,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() );
@@ -206,7 +206,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 && !layoutBase->inherits( "TQMainWindow" ) ) {
layoutBase->hide();
@@ -217,9 +217,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()
@@ -233,7 +233,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();
@@ -259,9 +259,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
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp
index c584e3f9..f9dbac46 100644
--- a/kommander/editor/mainwindow.cpp
+++ b/kommander/editor/mainwindow.cpp
@@ -199,7 +199,7 @@ MainWindow::MainWindow(bool asClient)
w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this, 0, false);
delete w;
- assistant = new AssistProc(TQT_TQOBJECT(this), "Internal Assistant", assistantPath());
+ assistant = new AssistProc(this, "Internal Assistant", assistantPath());
statusBar()->setSizeGripEnabled(true);
SpecialInformation::registerSpecials();
@@ -425,7 +425,7 @@ void MainWindow::runForm()
while ((editor = it.current()) != 0L)
{
++it;
- static_cast<AssocTextEditor*>(TQT_TQWIDGET(editor))->save();
+ static_cast<AssocTextEditor*>(editor)->save();
}
delete editors;
@@ -498,9 +498,9 @@ void MainWindow::showProperties(TQObject *o)
}
TQWidget *w = (TQWidget*)o;
setupHierarchyView();
- FormWindow *fw = (FormWindow*)isAFormWindowChild(TQT_TQOBJECT(w));
+ FormWindow *fw = (FormWindow*)isAFormWindowChild(w);
if (fw) {
- propertyEditor->setWidget(TQT_TQOBJECT(w), fw);
+ propertyEditor->setWidget(w, fw);
hierarchyView->setFormWindow(fw, w);
} else {
propertyEditor->setWidget(0, 0);
@@ -582,7 +582,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
TQWidget *pw = w->parentWidget();
while (pw) {
if (pw->inherits("FormWindow")) {
- ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w));
+ ((FormWindow*)pw)->emitShowProperties(w);
if (!o->inherits("QDesignerToolBar"))
return !o->inherits("TQToolButton") && !o->inherits("TQMenuBar") &&
!o->inherits("TQComboBox") && !o->inherits("QDesignerToolBarSeparator");
@@ -684,8 +684,8 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Hide:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
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:
@@ -821,7 +821,7 @@ void MainWindow::insertFormWindow(FormWindow *fw)
fw->mainContainer()->setCaption(fw->caption());
WidgetFactory::saveDefaultProperties(fw->mainContainer(),
WidgetDatabase::
- idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(fw->mainContainer()))));
+ idFromClassName(WidgetFactory::classNameOf(fw->mainContainer())));
activeWindowChanged(fw);
emit formWindowsChanged();
}
@@ -1032,7 +1032,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
commands.insert("add", id);
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))))
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
{
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
@@ -1098,48 +1098,48 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg
}
if (ok) {
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;
TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
TQString pn(i18n("Set the 'title' of '%1'").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;
TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
if (ok) {
TQString pn(i18n("Set the 'pageTitle' of '%1'").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 '%1'").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);
}
}
}
@@ -1191,9 +1191,9 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
}
}
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
if (id == commands[ "edit" ])
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
}
}
@@ -1318,7 +1318,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);
@@ -1328,7 +1328,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);
@@ -1348,14 +1348,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;
}
}
@@ -1564,9 +1564,9 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor(TQWidget* w, FormWindow*)
{
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
statusBar()->message(i18n("Edit %1...").arg(w->className()));
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
statusBar()->clear();
return true;
}
@@ -1584,12 +1584,12 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
}
if (ok) {
TQString pn(i18n("Set the 'text' of '%2'").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;
}
@@ -1599,12 +1599,12 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
text = KInputDialog::getText(i18n("Title"), i18n("New title:"), 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;
}
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index 477f065d..fff01afd 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -92,74 +92,74 @@ int forms = 0;
void MainWindow::setupEditActions()
{
- actionEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), actionCollection());
+ actionEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
actionEditUndo->setText(i18n("&Undo: Not Available"));
actionEditUndo->setToolTip(i18n("Undoes the last action"));
actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
actionEditUndo->setEnabled(false);
- actionEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), actionCollection());
+ actionEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
actionEditRedo->setText(i18n("&Redo: Not Available"));
actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
actionEditRedo->setEnabled(false);
- actionEditCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(editCut()), actionCollection());
+ actionEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
actionEditCut->setEnabled(false);
- actionEditCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection());
+ actionEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
actionEditCopy->setEnabled(false);
- actionEditPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(editPaste()), actionCollection());
+ actionEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
actionEditPaste->setEnabled(false);
- actionEditDelete = new TDEAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()),
+ actionEditDelete = new TDEAction(i18n("Delete"), Key_Delete, this, TQT_SLOT(editDelete()),
actionCollection(), "edit_delete");
actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
actionEditDelete->setEnabled(false);
- actionEditSelectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
actionEditRaise = new TDEAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
- TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
+ TDEShortcut::null(), this, TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
actionEditRaise->setEnabled(false);
actionEditLower = new TDEAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
- TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower");
+ TDEShortcut::null(), this, TQT_SLOT(editLower()), actionCollection(), "edit_lower");
actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
actionEditLower->setEnabled(false);
- actionEditFindGlobal = new TDEAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal = new TDEAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool)));
- actionEditAccels = new TDEAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()),
+ actionEditAccels = new TDEAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()),
actionCollection(), "edit_check_accel");
actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool)));
actionEditConnections = new TDEAction(i18n("Connections"), createIconSet("connecttool.xpm"),
- TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(),
+ TDEShortcut::null(), this, TQT_SLOT(editConnections()), actionCollection(),
"edit_connections");
actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool)));
actionEditFormSettings = new TDEAction(i18n("Form Settings..."), TDEShortcut::null(),
- TQT_TQOBJECT(this), TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
+ this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool)));
@@ -198,50 +198,50 @@ void MainWindow::setupEditActions()
void MainWindow::setupLayoutActions()
{
actionEditAdjustSize = new TDEAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
- CTRL + Key_J, TQT_TQOBJECT(this), TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ CTRL + Key_J, this, TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
actionEditAdjustSize->setEnabled(false);
actionEditHLayout = new TDEAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
- CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ CTRL + Key_H, this, TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
actionEditHLayout->setEnabled(false);
actionEditVLayout = new TDEAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
- CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ CTRL + Key_L, this, TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
actionEditVLayout->setEnabled(false);
actionEditGridLayout = new TDEAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
- CTRL + Key_G, TQT_TQOBJECT(this), TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ CTRL + Key_G, this, TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
actionEditGridLayout->setEnabled(false);
actionEditSplitHorizontal = new TDEAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
- TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ TDEShortcut::null(), this, TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
"edit_split_h");
actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
actionEditSplitHorizontal->setEnabled(false);
actionEditSplitVertical = new TDEAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
- TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
+ TDEShortcut::null(), this, TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
"edit_split_v");
actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
actionEditSplitVertical->setEnabled(false);
actionEditBreakLayout = new TDEAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
- CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ CTRL + Key_B, this, TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
int id = WidgetDatabase::idFromClassName("Spacer");
- TDEToggleAction *a = new TDEToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()),
+ TDEToggleAction *a = new TDEToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), TDEShortcut::null(), this, TQT_SLOT(toolSelected()),
actionCollection(), TQString::number(id).latin1());
a->setExclusiveGroup("tool");
a->setText(i18n("Add ") + WidgetDatabase::className(id));
@@ -280,21 +280,21 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
actionPointerTool = new TDEToggleAction(i18n("Pointer"), "arrow", Key_F2,
- TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
+ this, TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(POINTER_TOOL).latin1());
actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
actionPointerTool->setExclusiveGroup("tool");
actionConnectTool = new TDEToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
- Key_F3, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(CONNECT_TOOL).latin1());
actionConnectTool->setToolTip(i18n("Selects the connection tool"));
actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
actionConnectTool->setExclusiveGroup("tool");
actionOrderTool = new TDEToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
- Key_F4, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(ORDER_TOOL).latin1());
actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
@@ -344,7 +344,7 @@ void MainWindow::setupToolActions()
if (WidgetDatabase::group(i) != grp)
continue; // only widgets, i.e. not forms and temp stuff
TDEToggleAction *a = new TDEToggleAction(WidgetDatabase::className(i), TDEShortcut::null(),
- TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
+ this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
a->setExclusiveGroup("tool");
TQString atext = WidgetDatabase::className(i);
if (atext[0] == 'Q')
@@ -390,7 +390,7 @@ void MainWindow::setupToolActions()
continue;
TQString name = fi->baseName();
name = name.replace("_", " ");
- editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
m_editorTools.append(fi->filePath());
}
}
@@ -410,24 +410,24 @@ void MainWindow::setupFileActions()
fileMenu = new TQPopupMenu(this, "File");
menuBar()->insertItem(i18n("&File"), fileMenu);
- TDEAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
+ TDEAction *a = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
a->setToolTip(i18n("Creates a new dialog"));
a->setWhatsThis(whatsThisFrom("File|New"));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());
+ a = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
a->setToolTip(i18n("Opens an existing dialog"));
a->setWhatsThis(whatsThisFrom("File|Open"));
a->plug(fileTb);
a->plug(fileMenu);
- actionRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent = KStdAction::openRecent(this, TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
actionRecent->setToolTip(i18n("Opens recently open file"));
actionRecent->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(fileClose()), actionCollection());
+ a = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
a->setToolTip(i18n("Closes the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Close"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -435,20 +435,20 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection());
+ a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
a->setToolTip(i18n("Saves the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Save"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(fileSaveAs()), actionCollection());
+ a = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
a->setToolTip(i18n("Saves the current dialog with a new filename"));
a->setWhatsThis(whatsThisFrom("File|Save As"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
- a = new TDEAction(i18n("Save All"), "save_all", TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()),
+ a = new TDEAction(i18n("Save All"), "save_all", TDEShortcut::null(), this, TQT_SLOT(fileSaveAll()),
actionCollection(), "file_close_all");
a->setToolTip(i18n("Saves all open dialogs"));
a->setWhatsThis(whatsThisFrom("File|Save All"));
@@ -457,7 +457,7 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection());
+ a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
a->setWhatsThis(whatsThisFrom("File|Exit"));
a->plug(fileMenu);
@@ -470,7 +470,7 @@ void MainWindow::setupRunActions()
menuBar()->insertItem(i18n("&Run"), menu);
TDEAction* a = new TDEAction(i18n("Run Dialog"), "system-run", CTRL + Key_R,
- TQT_TQOBJECT(this), TQT_SLOT(runForm()), actionCollection(), "run");
+ this, TQT_SLOT(runForm()), actionCollection(), "run");
a->setToolTip(i18n("Executes dialog"));
a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -485,39 +485,39 @@ void MainWindow::setupWindowActions()
{
windowActionsSetup = true;
- TDEAction* actionWindowTile = new TDEAction(i18n("Tile"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()),
+ TDEAction* actionWindowTile = new TDEAction(i18n("Tile"), TDEShortcut::null(), qworkspace, TQT_SLOT(tile()),
actionCollection(), "window_tile");
actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
- TDEAction* actionWindowCascade = new TDEAction(i18n("Cascade"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()),
+ TDEAction* actionWindowCascade = new TDEAction(i18n("Cascade"), TDEShortcut::null(), qworkspace, TQT_SLOT(cascade()),
actionCollection(), "window_cascade");
actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
- TDEAction* actionWindowClose = new TDEAction(i18n("Cascade"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()),
+ TDEAction* actionWindowClose = new TDEAction(i18n("Cascade"), TDEShortcut::null(), qworkspace, TQT_SLOT(closeActiveWindow()),
actionCollection(), "window_close");
actionWindowClose->setToolTip(i18n("Closes the active window"));
actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
- TDEAction* actionWindowCloseAll = new TDEAction(i18n("Close All"), TDEShortcut::null(), TQT_TQOBJECT(qworkspace),
+ TDEAction* actionWindowCloseAll = new TDEAction(i18n("Close All"), TDEShortcut::null(), qworkspace,
TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all");
actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
- TDEAction* actionWindowNext = new TDEAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace),
+ TDEAction* actionWindowNext = new TDEAction(i18n("Next"), Key_F6, qworkspace,
TQT_SLOT(activateNextWindow()), actionCollection(), "window_next");
actionWindowNext->setToolTip(i18n("Activates the next window"));
actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
- TDEAction* actionWindowPrevious = new TDEAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace),
+ TDEAction* actionWindowPrevious = new TDEAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
windowMenu = new TDEPopupMenu(this, "Window");
menuBar()->insertItem(i18n("&Window"), windowMenu);
- connect(windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(setupWindowActions()));
+ connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions()));
actionWindowClose->plug(windowMenu);
actionWindowCloseAll->plug(windowMenu);
@@ -554,7 +554,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));
}
@@ -564,21 +564,21 @@ void MainWindow::setupWindowActions()
void MainWindow::setupSettingsActions()
{
TDEPopupMenu *settings = new TDEPopupMenu(this, "Settings");
- TDEAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection());
+ TDEAction* a = KStdAction::keyBindings(this, TQT_SLOT(editShortcuts()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change shortcuts"));
a->plug(settings);
- a = new TDEAction(i18n("Configure &Plugins..."), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()),
+ a = new TDEAction(i18n("Configure &Plugins..."), TDEShortcut::null(), this, TQT_SLOT(editPlugins()),
actionCollection(), "configure_plugins");
a->setToolTip(i18n("Opens a dialog to configure plugins"));
a->plug(settings);
- a = new TDEAction(i18n("&Configure Editor..."), TDEShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()),
+ a = new TDEAction(i18n("&Configure Editor..."), TDEShortcut::null(), this, TQT_SLOT(configureEditor()),
actionCollection(), "configure_editor");
a->setToolTip(i18n("Configure various aspects of this editor."));
a->plug(settings);
- a = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editPreferences()), actionCollection());
+ a = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change preferences"));
a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
a->plug(settings);
@@ -780,7 +780,7 @@ void MainWindow::fileCreateTemplate()
}
dia.editName->setText(i18n("NewTemplate"));
- connect(dia.buttonCreate, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(createNewTemplate()));
+ connect(dia.buttonCreate, TQT_SIGNAL(clicked()), this, TQT_SLOT(createNewTemplate()));
dia.exec();
}
@@ -883,7 +883,7 @@ void MainWindow::editPaste()
w = l.first();
if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
(!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::
- classNameOf(TQT_TQOBJECT(w)))) && w != formWindow()->mainContainer()))
+ classNameOf(w))) && w != formWindow()->mainContainer()))
w = formWindow()->mainContainer();
}
@@ -1111,7 +1111,7 @@ void MainWindow::editPreferences()
dia->checkBoxSplash->setChecked(splashScreen);
dia->editDocPath->setText(docPath);
dia->checkAutoEdit->setChecked(!databaseAutoEdit);
- connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(chooseDocPath()));
+ connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath()));
if (dia->exec() == TQDialog::Accepted)
{
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp
index ca261721..5c2d6681 100644
--- a/kommander/editor/metadatabase.cpp
+++ b/kommander/editor/metadatabase.cpp
@@ -281,8 +281,8 @@ int MetaDataBase::spacing( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( "TQMainWindow" ) )
- o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
- MetaDataBaseRecord *r = db->find( TQT_TQOBJECT(o) );
+ o = ( (TQMainWindow*)o )->centralWidget();
+ MetaDataBaseRecord *r = db->find( o );
if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -319,7 +319,7 @@ int MetaDataBase::margin( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( "TQMainWindow" ) )
- 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",
@@ -652,7 +652,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
return true;
if ( o->inherits( "FormWindow" ) ) {
- o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer());
+ o = ( (FormWindow*)o )->mainContainer();
slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
return true;
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp
index 5aeafc5d..51d80432 100644
--- a/kommander/editor/newformimpl.cpp
+++ b/kommander/editor/newformimpl.cpp
@@ -57,7 +57,7 @@ void FormItem::insert()
FormWindow *fw = 0;
FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true);
fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n.utf8());
- MetaDataBase::addEntry(TQT_TQOBJECT(fw));
+ MetaDataBase::addEntry(fw);
TQWidget *w = 0L;
if (fType == Dialog)
{
@@ -72,7 +72,7 @@ void FormItem::insert()
if (w)
{
w->setProperty("useInternalParser", true);
- MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "useInternalParser", true);
+ MetaDataBase::setPropertyChanged(w, "useInternalParser", true);
}
fw->setCaption(n);
fw->resize(600, 480);
@@ -81,7 +81,7 @@ void FormItem::insert()
// the wizard might have changed a lot, lets update everything
MainWindow::self->actioneditor()->setFormWindow(fw);
MainWindow::self->objectHierarchy()->setFormWindow(fw, fw);
- fw->killAccels(TQT_TQOBJECT(fw));
+ fw->killAccels(fw);
fw->setFocus();
}
diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp
index 7a2bd85e..c3440c3f 100644
--- a/kommander/editor/pixmapchooser.cpp
+++ b/kommander/editor/pixmapchooser.cpp
@@ -966,7 +966,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( fd.selectedFile() );
if ( fn )
*fn = fd.selectedFile();
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), fd.selectedFile() );
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() );
return pix;
}
}
@@ -987,11 +987,11 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
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( PixmapChooser::loadPixmap( "image.xpm" ) );
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() );
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
return pix;
}
}
@@ -1004,7 +1004,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
}
ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
- : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
+ : TQFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
{
fmts = TQImage::inputFormats();
}
diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index c1501abb..7f7d30d6 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -539,7 +539,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();
}
@@ -582,13 +582,13 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" )
- lin->setValidator( new AsciiValidator( TQT_TQOBJECT(lin), "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) );
else
lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\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();
} else {
@@ -762,7 +762,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() ) );
@@ -2525,7 +2525,7 @@ void PropertyList::setupProperties()
TQStringList valueSet;
bool parentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)w) ) && ( (TQWidget*)w )->parentWidget() &&
+ !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
@@ -2555,7 +2555,7 @@ void PropertyList::setupProperties()
}
unique.insert( TQString::fromLatin1( it.current() ), true );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)editor->widget()) ) ) {
+ editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -3081,9 +3081,9 @@ void PropertyList::setPropertyValue( PropertyItem *i )
else
i->setValue( TQVariant( false) );
} else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "layoutMargin" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (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" ) ) {
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index 7122abba..32b70e9d 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -195,7 +195,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
formwindow->setProject( MainWindow::self->currProject() );
#endif
formwindow->setMainWindow( mainwindow );
- MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::addEntry( formwindow );
#ifndef KOMMANDER
if (!langIface) {
@@ -355,11 +355,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.slot = n.firstChild().toText().data().utf8();
- if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) )
- MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier,
+ if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
+ MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
slot.access, slot.language, slot.returnType );
else
- MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot,
+ MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
slot.specifier, slot.access,
slot.language, slot.returnType );
}
@@ -377,11 +377,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
loadTabOrder( tabOrder );
if ( formwindow ) {
- MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes );
- MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards );
- MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals );
- MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo );
- MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro );
+ MetaDataBase::setIncludes( formwindow, metaIncludes );
+ MetaDataBase::setForwards( formwindow, metaForwards );
+ MetaDataBase::setSignalList( formwindow, metaSignals );
+ MetaDataBase::setMetaInfo( formwindow, metaInfo );
+ MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
}
@@ -391,7 +391,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
}
if ( formwindow ) {
- formwindow->killAccels( TQT_TQOBJECT(formwindow) );
+ formwindow->killAccels( formwindow );
if ( formwindow->layout() )
formwindow->layout()->activate();
if ( hadGeometry )
@@ -430,7 +430,7 @@ bool Resource::save( TQIODevice* dev )
ts << formwindow->mainContainer()->property("shebang").toString() << endl;
ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
- saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
+ saveObject( formwindow->mainContainer(), 0, ts, 0 );
if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
@@ -441,7 +441,7 @@ 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 );
@@ -474,7 +474,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 );
@@ -536,7 +536,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 )
@@ -550,7 +550,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();
}
@@ -618,7 +618,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;
@@ -633,7 +633,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;
}
@@ -645,7 +645,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;
@@ -656,7 +656,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;
@@ -664,7 +664,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;
}
@@ -674,7 +674,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;
@@ -689,12 +689,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 ( obj->inherits( "TQMainWindow" ) ) {
- saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
+ saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
}
@@ -773,7 +773,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
else if ( obj->inherits( "TQTable" ) ) {
TQTable *table = (TQTable*)obj;
int i;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
bool isDataTable = table->inherits( "TQDataTable" );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
@@ -856,11 +856,11 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
ts << makeIndent( indent ) << "<" + tagname + ">" << saveInCollection( p ) << "</" + tagname + ">" << endl;
#ifndef KOMMANDER
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;
#endif
else
- ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
<< "</" + tagname + ">" << endl;
}
@@ -872,7 +872,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;
}
#ifndef KOMMANDER
@@ -886,11 +886,11 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
{
TQPixmap pix;
pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
+ MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix;
}
TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
@@ -956,7 +956,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 );
}
@@ -1326,7 +1326,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
TQString className = e.attribute( "class", "TQWidget" );
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 )
return 0;
if ( !mainContainerSet ) {
@@ -1362,7 +1362,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) )
formwindow->insertWidget( w, pasting );
else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) )
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( w );
if (w->inherits("Dialog"))
dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
}
@@ -1375,17 +1375,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 ) {
@@ -1419,7 +1419,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
n = n.nextSibling().toElement();
}
- return TQT_TQOBJECT(w);
+ return w;
}
void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
@@ -1474,7 +1474,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" );
@@ -1499,7 +1499,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
}
@@ -1525,7 +1525,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) ) ) ) )
+ if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) )
return;
if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
@@ -1614,7 +1614,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 );
@@ -1747,11 +1747,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( obj->inherits( "TQLayout" ) ) {
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;
}
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;
}
}
@@ -1759,7 +1759,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.utf8() );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@@ -1907,7 +1907,7 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<connections>" << endl;
indent++;
- TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
@@ -1916,8 +1916,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::normalizeSlot( (*it).slot ).latin1() ) )
+ if ( formwindow->isMainContainer( (*it).receiver ) &&
+ !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) )
continue;
if ( conn.sender->inherits( "CustomWidget" ) ) {
@@ -1986,7 +1986,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.sender = 0;
TQString name = n2.firstChild().toText().data();
if ( name == "this" || toplevel->name() == name ) {
- conn.sender = TQT_TQOBJECT(toplevel);
+ conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
@@ -2004,7 +2004,7 @@ void Resource::loadConnections( const TQDomElement &e )
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || toplevel->name() == name ) {
- conn.receiver = TQT_TQOBJECT(toplevel);
+ conn.receiver = toplevel;
} else {
TQObjectList *l = toplevel->queryList( 0, name.utf8(), false );
if ( l ) {
@@ -2020,9 +2020,9 @@ 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 ) {
#ifndef KOMMANDER
@@ -2035,7 +2035,7 @@ void Resource::loadConnections( const TQDomElement &e )
TQStringList::split( ',', conn.slot ), false );
}
#else
- MetaDataBase::addConnection( formwindow ? TQT_TQOBJECT(formwindow) : TQT_TQOBJECT(toplevel),
+ MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
conn.sender, conn.signal, conn.receiver, conn.slot );
#endif
}
@@ -2052,11 +2052,11 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.slot = n.firstChild().toText().data().utf8();
- if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) )
- MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier,
+ if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
+ MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
slot.access, slot.language, slot.returnType );
else
- MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot,
+ MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
slot.specifier, slot.access,
slot.language, slot.returnType );
}
@@ -2245,7 +2245,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 = formwindow->name();
ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl;
if (!info.comment.isEmpty())
@@ -2260,8 +2260,8 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQString extensionInclude;
bool needExtensionInclude = false;
if ( !includes.isEmpty() || needExtensionInclude ) {
@@ -2282,7 +2282,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++;
@@ -2291,7 +2291,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) );
+ TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
@@ -2300,7 +2300,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</signals>" << endl;
- TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
@@ -2330,7 +2330,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
;
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()
@@ -2473,9 +2473,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();
}
@@ -2496,7 +2496,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 ( a->inherits( "QSeparatorAction" ) ) {
@@ -2505,14 +2505,14 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
+ << WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
- saveObjectProperties( TQT_TQOBJECT(w), ts, indent );
- const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ saveObjectProperties( w, ts, indent );
+ const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) )
- saveItems( TQT_TQOBJECT(w), ts, indent );
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) )
+ saveItems( w, ts, indent );
indent--;
ts << makeIndent( indent ) << "</widget>" << endl;
} else {
@@ -2534,7 +2534,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- saveObjectProperties( TQT_TQOBJECT(mw->menuBar()), ts, indent );
+ saveObjectProperties( mw->menuBar(), ts, indent );
for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) {
ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
@@ -2580,12 +2580,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();
}
@@ -2620,7 +2620,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
}
mb->insertItem( n.attribute( "text" ), popup );
} else if ( n.tagName() == "property" ) {
- setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
}
n = n.nextSibling().toElement();
}
@@ -2663,7 +2663,7 @@ void Resource::saveFormCode()
LanguageInterface::Function func;
func.name = slot.slot;
func.body = *it;
- func.comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), func.name );
+ func.comments = MetaDataBase::functionComments( formwindow, func.name );
func.returnType = slot.returnType;
funcs.append( func );
}
@@ -2716,7 +2716,7 @@ void Resource::loadFunctions( const TQDomElement &e )
}
n = n.nextSibling().toElement();
}
- MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString(), TQString() );
if ( !bodies.isEmpty() ) {
LanguageInterface *iface = langIface;
if ( !iface )
@@ -2731,7 +2731,7 @@ void Resource::loadFunctions( const TQDomElement &e )
#endif
continue;
TQString sl( (*it).slot );
- TQString comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), sl );
+ TQString comments = MetaDataBase::functionComments( formwindow, sl );
if ( !comments.isEmpty() )
code += comments + "\n";
code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ),
@@ -2812,25 +2812,25 @@ void Resource::loadExtraSource()
for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
- if ( MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1() ) )
- MetaDataBase::changeSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), (*fit).name.latin1() );
+ if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
+ MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
else
- MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType );
- MetaDataBase::setFunctionComments( TQT_TQOBJECT(formwindow), (*fit).name, (*fit).comments );
+ MetaDataBase::addSlot( formwindow, (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType );
+ MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments );
bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body );
}
- MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() );
+ MetaDataBase::setFunctionBodies( formwindow, bodies, TQString(), TQString() );
TQStringList v = MetaDataBase::variables( formwindow );
TQStringList::Iterator vit;
for ( vit = vars.begin(); vit != vars.end(); ++vit )
v << *vit;
- MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), v );
+ MetaDataBase::setVariables( formwindow, v );
TQStringList f = MetaDataBase::forwards( formwindow );
for ( vit = forwards.begin(); vit != forwards.end(); ++vit )
f << *vit;
- MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), f );
+ MetaDataBase::setForwards( formwindow, f );
TQValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) {
@@ -2845,6 +2845,6 @@ void Resource::loadExtraSource()
inc.location = "in declaration";
incls << inc;
}
- MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), incls );
+ MetaDataBase::setIncludes( formwindow, incls );
}
#endif
diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp
index 37dde0aa..4f6773dc 100644
--- a/kommander/editor/sizehandle.cpp
+++ b/kommander/editor/sizehandle.cpp
@@ -231,7 +231,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 )
diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp
index cb07cd7c..282fd49e 100644
--- a/kommander/editor/tableeditorimpl.cpp
+++ b/kommander/editor/tableeditorimpl.cpp
@@ -381,7 +381,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 ),
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index b1bf1f83..4b07bb37 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -417,7 +417,7 @@ void WidgetFactory::saveDefaultProperties( TQWidget *w, int id )
static void saveChangedProperties( TQWidget *w, int id )
{
- TQStringList l = MetaDataBase::changedProperties( TQT_TQOBJECT(w) );
+ TQStringList l = MetaDataBase::changedProperties( w );
changedProperties->insert( id, l );
}
@@ -662,7 +662,7 @@ 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(w, id);
@@ -682,7 +682,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int margin = 0;
if ( widget && !widget->inherits( "TQLayoutWidget" ) &&
- ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ||
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
@@ -701,7 +701,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
if ( !layout && widget && widget->inherits( "TQWidgetStack" ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- MetaDataBase::addEntry( TQT_TQOBJECT(widget) );
+ MetaDataBase::addEntry( widget );
if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
@@ -712,24 +712,24 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
switch ( type ) {
case HBox:
l = new TQHBoxLayout( gb->layout() );
- MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
l->setAlignment( AlignTop );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case VBox:
l = new TQVBoxLayout( gb->layout(), spacing );
- MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
l->setAlignment( AlignTop );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case Grid:
l = new QDesignerGridLayout( gb->layout() );
- MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ MetaDataBase::setMargin( gb, margin );
+ MetaDataBase::setSpacing( gb, spacing );
l->setAlignment( AlignTop );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
default:
return 0;
@@ -740,24 +740,24 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
switch ( type ) {
case HBox:
l = new TQHBoxLayout( layout );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case VBox:
l = new TQVBoxLayout( layout );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case Grid: {
l = new QDesignerGridLayout( layout );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
}
default:
@@ -768,39 +768,39 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
switch ( type ) {
case HBox:
l = new TQHBoxLayout( widget );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
if ( widget ) {
- MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case VBox:
l = new TQVBoxLayout( widget );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
if ( widget ) {
- MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
case Grid: {
l = new QDesignerGridLayout( widget );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
if ( widget ) {
- MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
+ MetaDataBase::setMargin( widget, margin );
+ MetaDataBase::setSpacing( widget, spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
}
default:
@@ -955,8 +955,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
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 == "TQLayoutWidget")
@@ -969,11 +969,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 == "TQComboBox")
@@ -989,7 +989,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (fw)
{
QDesignerWidget *dw = new QDesignerWidget(fw, parent, name);
- MetaDataBase::addEntry(TQT_TQOBJECT(dw));
+ MetaDataBase::addEntry(dw);
return dw;
}
}
@@ -1014,7 +1014,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (init && parent && parent->inherits("FormWindow"))
{
QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(TQT_TQOBJECT(dw));
+ MetaDataBase::addEntry(dw);
wiz->addPage(dw, i18n("Page"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
}
@@ -1022,9 +1022,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} 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)
@@ -1053,8 +1053,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")
{
@@ -1065,8 +1065,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")
{
@@ -1078,10 +1078,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} 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)
@@ -1095,7 +1095,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();
@@ -1156,7 +1156,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (init && parent && parent->inherits("FormWindow"))
{
QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(TQT_TQOBJECT(dw));
+ MetaDataBase::addEntry(dw);
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
@@ -1171,11 +1171,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 == "ToolBox")
@@ -1186,11 +1186,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
FormWindow *fw = find_formwindow(parent);
TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
- MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ MetaDataBase::addEntry(w);
w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 2"));
- MetaDataBase::addEntry(TQT_TQOBJECT(tw));
- MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ MetaDataBase::addEntry(tw);
+ MetaDataBase::addEntry(w);
}
return tw;
}
@@ -1249,8 +1249,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;
}
#endif
@@ -1289,7 +1289,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
TQLayout *lay = w->layout();
if ( w->inherits( "TQGroupBox" ) ) {
- TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" );
+ TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() )
lay = (TQLayout*)l->first();
delete l;
@@ -1331,7 +1331,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;
@@ -1379,7 +1379,7 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
if ( w->parentWidget() && w->parentWidget()->inherits( "TQWidgetStack" ) )
w = w->parentWidget();
while ( w ) {
- if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ||
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
w && w->parentWidget() && w->parentWidget()->inherits( "FormWindow" ) )
return w;
w = w->parentWidget();