Browse Source

Rename *OBJECT_NAME_STRING

Signed-off-by: ormorph <roma251078@mail.ru>
pull/11/head
ormorph 2 months ago
parent
commit
ae3ed3d329
73 changed files with 789 additions and 789 deletions
  1. +11
    -11
      kommander/editor/actiondnd.cpp
  2. +3
    -3
      kommander/editor/actiondnd.h
  3. +7
    -7
      kommander/editor/actioneditorimpl.cpp
  4. +2
    -2
      kommander/editor/actionlistview.cpp
  5. +15
    -15
      kommander/editor/command.cpp
  6. +1
    -1
      kommander/editor/connectioneditorimpl.cpp
  7. +31
    -31
      kommander/editor/formwindow.cpp
  8. +4
    -4
      kommander/editor/functionsimpl.cpp
  9. +23
    -23
      kommander/editor/hierarchyview.cpp
  10. +12
    -12
      kommander/editor/layout.cpp
  11. +32
    -32
      kommander/editor/mainwindow.cpp
  12. +1
    -1
      kommander/editor/mainwindowactions.cpp
  13. +2
    -2
      kommander/editor/metadatabase.cpp
  14. +1
    -1
      kommander/editor/previewwidgetimpl.cpp
  15. +22
    -22
      kommander/editor/propertyeditor.cpp
  16. +41
    -41
      kommander/editor/resource.cpp
  17. +5
    -5
      kommander/editor/tableeditorimpl.cpp
  18. +39
    -39
      kommander/editor/widgetdatabase.cpp
  19. +116
    -116
      kommander/editor/widgetfactory.cpp
  20. +12
    -12
      kommander/editor/widgetfactory.h
  21. +3
    -3
      kommander/examples/current/a1.kmdr
  22. +2
    -2
      kommander/examples/current/editor-poc.kmdr
  23. +5
    -5
      kommander/examples/current/keyvaluecombo.kmdr
  24. +2
    -2
      kommander/examples/current/kpartmwframe.kmdr
  25. +1
    -1
      kommander/examples/current/kpartpart.kmdr
  26. +1
    -1
      kommander/examples/current/passvariables.kmdr
  27. +2
    -2
      kommander/examples/current/tableselect.kmdr
  28. +1
    -1
      kommander/examples/old/execprogram.kmdr
  29. +1
    -1
      kommander/examples/old/firstform.kmdr.kmdr
  30. +2
    -2
      kommander/examples/old/form2.kmdr
  31. +1
    -1
      kommander/examples/old/form4.kmdr
  32. +2
    -2
      kommander/examples/old/form5.kmdr
  33. +2
    -2
      kommander/examples/old/newfile.kmdr
  34. +2
    -2
      kommander/examples/old/populate.kmdr
  35. +7
    -7
      kommander/examples/old/resize.kmdr
  36. +1
    -1
      kommander/examples/old/selectedwidgettext.kmdr
  37. +5
    -5
      kommander/examples/old/settings.kmdr
  38. +1
    -1
      kommander/examples/old/simplelist.kmdr
  39. +7
    -7
      kommander/examples/old/tar.kmdr
  40. +9
    -9
      kommander/examples/old/tidy.kmdr
  41. +10
    -10
      kommander/examples/old/widgetgenerator.kmdr
  42. +4
    -4
      kommander/examples/old/wizard.kmdr
  43. +1
    -1
      kommander/examples/tutorial/append.kmdr
  44. +2
    -2
      kommander/examples/tutorial/arrays.kmdr
  45. +5
    -5
      kommander/examples/tutorial/calc.kmdr
  46. +1
    -1
      kommander/examples/tutorial/dcop.kmdr
  47. +1
    -1
      kommander/examples/tutorial/dialogs.kmdr
  48. +1
    -1
      kommander/examples/tutorial/globals.kmdr
  49. +3
    -3
      kommander/examples/tutorial/initialize.kmdr
  50. +2
    -2
      kommander/examples/tutorial/loop.kmdr
  51. +1
    -1
      kommander/examples/tutorial/picview.kmdr
  52. +3
    -3
      kommander/examples/tutorial/settings.kmdr
  53. +5
    -5
      kommander/examples/tutorial/slots.kmdr
  54. +3
    -3
      kommander/examples/tutorial/strings.kmdr
  55. +2
    -2
      kommander/examples/tutorial/table.kmdr
  56. +3
    -3
      kommander/examples/tutorial/tree.kmdr
  57. +2
    -2
      kommander/examples/tutorial/widgets.kmdr
  58. +10
    -10
      kommander/executor/instance.cpp
  59. +81
    -81
      kommander/factory/kommanderfactory.cpp
  60. +6
    -6
      kommander/kmdrtools/dcoptool-oldparser.kmdr
  61. +1
    -1
      kommander/kmdrtools/examples.kmdr
  62. +3
    -3
      kommander/widget/functionlib.cpp
  63. +7
    -7
      kommander/widget/kommanderwidget.cpp
  64. +1
    -1
      kommander/widgets/closebutton.cpp
  65. +2
    -2
      lib/compatibility/tdemdi/qextmdi/kdockwidget.cpp
  66. +7
    -7
      lib/compatibility/tdemdi/qextmdi/tdemdichildfrm.cpp
  67. +5
    -5
      lib/compatibility/tdemdi/qextmdi/tdemdichildview.cpp
  68. +1
    -1
      lib/compatibility/tdemdi/qextmdi/tdemdifocuslist.cpp
  69. +2
    -2
      quanta/components/csseditor/cssselector.cpp
  70. +2
    -2
      quanta/components/framewizard/visualframeeditor.cpp
  71. +1
    -1
      quanta/components/tableeditor/tableitem.cpp
  72. +172
    -172
      quanta/quanta_uml.xmi
  73. +2
    -2
      quanta/scripts/TemplateMagic.pl

+ 11
- 11
kommander/editor/actiondnd.cpp View File

@@ -47,7 +47,7 @@ bool QDesignerAction::addTo( TQWidget *w )
if ( !widgetToInsert )
return TQAction::addTo( w );

if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQPopupMenu" ) )
return false;

widgetToInsert->reparent( w, TQPoint( 0, 0 ), false );
@@ -125,11 +125,11 @@ QSeparatorAction::QSeparatorAction( TQObject *parent )

bool QSeparatorAction::addTo( TQWidget *w )
{
if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) {
if ( w->inherits( "TQToolBar" ) ) {
TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
return true;
} else if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
} else if ( w->inherits( "TQPopupMenu" ) ) {
idx = ( (TQPopupMenu*)w )->count();
( (TQPopupMenu*)w )->insertSeparator( idx );
return true;
@@ -139,10 +139,10 @@ bool QSeparatorAction::addTo( TQWidget *w )

bool QSeparatorAction::removeFrom( TQWidget *w )
{
if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) {
if ( w->inherits( "TQToolBar" ) ) {
delete wid;
return true;
} else if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
} else if ( w->inherits( "TQPopupMenu" ) ) {
( (TQPopupMenu*)w )->removeItemAt( idx );
return true;
}
@@ -202,7 +202,7 @@ void QDesignerToolBar::addAction( TQAction *a )
{
actionList.append( a );
connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
if ( a->inherits( "TQActionGroup" ) ) {
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
} else if ( a->inherits( "QSeparatorAction" ) ) {
@@ -222,7 +222,7 @@ static void fixObject( TQObject *&o )

bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) )
if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) )
return TQToolBar::eventFilter( o, e );

if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress &&
@@ -450,7 +450,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
TQApplication::sendPostedEvents();
adjustSize();

TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) :
TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) :
a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new TQStoredDrag( type, this );
TQString s = TQString::number( (long)a ); // #### huha, that is evil
@@ -560,7 +560,7 @@ void QDesignerToolBar::reInsert()
clear();
for ( a = actionList.first(); a; a = actionList.next() ) {
a->addTo( this );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
if ( a->inherits( "TQActionGroup" ) ) {
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
if ( ( (QDesignerActionGroup*)a )->widget() )
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
@@ -691,7 +691,7 @@ void QDesignerToolBar::installEventFilters( TQWidget *w )
{
if ( !w )
return;
TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
TQObjectList *l = w->queryList( "TQWidget" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( this );
delete l;
@@ -1074,7 +1074,7 @@ void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();

TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) :
TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) :
a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new TQStoredDrag( type, this );
TQString s = TQString::number( (long)a ); // #### huha, that is evil


+ 3
- 3
kommander/editor/actiondnd.h View File

@@ -41,7 +41,7 @@ class QDesignerActionGroup : public TQActionGroup

public:
QDesignerActionGroup( TQObject *parent )
: TQActionGroup( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}
: TQActionGroup( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}

TQWidget *widget() const { return wid; }
TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); }
@@ -72,9 +72,9 @@ class QDesignerAction : public TQAction

public:
QDesignerAction( TQObject *parent )
: TQAction( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
: TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
QDesignerAction( TQWidget *w, TQObject *parent )
: TQAction( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
: TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}

TQWidget *widget() const { return wid; }
int index() const { return idx; }


+ 7
- 7
kommander/editor/actioneditorimpl.cpp View File

@@ -117,7 +117,7 @@ void ActionEditor::newAction()
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
!actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
!actionParent->actionGroup()->inherits( "TQActionGroup" ) )
actionParent = (ActionItem*)actionParent->parent();
}

@@ -149,7 +149,7 @@ void ActionEditor::newActionGroup()
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
!actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
!actionParent->actionGroup()->inherits( "TQActionGroup" ) )
actionParent = (ActionItem*)actionParent->parent();
}

@@ -186,18 +186,18 @@ void ActionEditor::setFormWindow( FormWindow *fw )
formWindow = fw;
if ( !formWindow ||
!formWindow->mainContainer() ||
!formWindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
!formWindow->mainContainer()->inherits( "TQMainWindow" ) ) {
setEnabled( false );
} else {
setEnabled( true );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
if ( a->parent() && a->parent()->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( a->parent() && a->parent()->inherits( "TQAction" ) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
i->setPixmap( 0, a->iconSet().pixmap() );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
if ( a->inherits( "TQActionGroup" ) ) {
insertChildActions( i );
}
}
@@ -219,14 +219,14 @@ void ActionEditor::insertChildActions( ActionItem *i )
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
TQAction *a = (TQAction*)o;
ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
i->setOpen( true );
i2->setText( 0, a->name() );
i2->setPixmap( 0, a->iconSet().pixmap() );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
if ( a->inherits( "TQActionGroup" ) )
insertChildActions( i2 );
}
}


+ 2
- 2
kommander/editor/actionlistview.cpp View File

@@ -37,7 +37,7 @@ ActionListView::ActionListView( TQWidget *parent, const char *name )
ActionItem::ActionItem( TQListView *lv, TQAction *ac )
: TQListViewItem( lv ), a( 0 ), g( 0 )
{
if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
if ( ac->inherits( "TQActionGroup" ) )
g = (QDesignerActionGroup*)ac;
else
a = (QDesignerAction*)ac;
@@ -47,7 +47,7 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac )
ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
: TQListViewItem( i ), a( 0 ), g( 0 )
{
if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
if ( ac->inherits( "TQActionGroup" ) )
g = (QDesignerActionGroup*)ac;
else
a = (QDesignerAction*)ac;


+ 15
- 15
kommander/editor/command.cpp View File

@@ -597,14 +597,14 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() );
}
if ( propName == "name" && widget->inherits( TQACTION_OBJECT_NAME_STRING ) &&
if ( propName == "name" && widget->inherits( "TQAction" ) &&
formWindow()->mainContainer() &&
formWindow()->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) {
formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)widget );
}
if ( propName == "iconSet" && widget->inherits( TQACTION_OBJECT_NAME_STRING ) &&
if ( propName == "iconSet" && widget->inherits( "TQAction" ) &&
formWindow()->mainContainer() &&
formWindow()->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) {
formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)widget );
}
if ( propName == "caption" ) {
@@ -751,9 +751,9 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) );
layout = 0;
if ( lay == WidgetFactory::HBox )
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) );
else if ( lay == WidgetFactory::VBox )
layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) );
else if ( lay == WidgetFactory::Grid )
layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false );
}
@@ -1605,7 +1605,7 @@ void AddActionToToolBarCommand::execute()
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
toolBar->appendAction( action );
else
@@ -1620,7 +1620,7 @@ void AddActionToToolBarCommand::execute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
// ### fix it for nested actiongroups
if ( o->inherits( "QDesignerAction" ) ) {
@@ -1650,7 +1650,7 @@ void AddActionToToolBarCommand::unexecute()
toolBar->removeAction( action );
action->removeFrom( toolBar );
TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar );
} else {
TQObjectList clo = action->childrenListObject();
@@ -1659,7 +1659,7 @@ void AddActionToToolBarCommand::unexecute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( toolBar );
@@ -1680,7 +1680,7 @@ AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow

void AddActionToPopupCommand::execute()
{
if ( action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
if ( action->inherits( "TQActionGroup" ) ) {
if ( ( (TQActionGroup*)action )->usesDropDown() ) {
action->addTo( popup );
popup->insertAction( index, action );
@@ -1693,7 +1693,7 @@ void AddActionToPopupCommand::execute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
QDesignerAction *ac = (QDesignerAction*)o;
popup->insertAction( index + (i++), ac );
@@ -1717,7 +1717,7 @@ void AddActionToPopupCommand::unexecute()
action->removeFrom( popup );
popup->removeAction( action );
TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( popup );
} else {
TQObjectList clo = action->childrenListObject();
@@ -1726,7 +1726,7 @@ void AddActionToPopupCommand::unexecute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( popup );
@@ -1752,7 +1752,7 @@ void AddMenuCommand::execute()
formWindow()->unify( TQT_TQOBJECT(popup), n, true );
popup->setName( n );
}
if ( !mainWindow->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) ) {
if ( !mainWindow->child( 0, "TQMenuBar" ) ) {
menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow );
menuBar->setName( "menubar" );
} else {


+ 1
- 1
kommander/editor/connectioneditorimpl.cpp View File

@@ -105,7 +105,7 @@ ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* r
for (TQPtrDictIterator<TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
{
if (it.current()->isVisibleTo(this) &&
!it.current()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) &&
!it.current()->inherits("TQLayoutWidget") &&
!it.current()->inherits("Spacer") &&
qstrcmp(it.current()->name(), "central widget") &&
!m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) &&


+ 31
- 31
kommander/editor/formwindow.cpp View File

@@ -165,7 +165,7 @@ void FormWindow::init()
this, TQT_SLOT(modificationChanged(bool)));
buffer = 0;

TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQFRAME_OBJECT_NAME_STRING), this);
TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this);
setMainContainer(w);
propertyWidget = TQT_TQOBJECT(w);
targetContainer = 0;
@@ -297,7 +297,7 @@ void FormWindow::insertWidget()
bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2);
Qt::Orientation orient =Qt::Horizontal;
TQString n = WidgetDatabase::className(currTool);
if (useSizeHint && (n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING)) {
if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) {
TQPopupMenu m(mainWindow());
m.insertItem(i18n("&Horizontal"));
int ver = m.insertItem(i18n("&Vertical"));
@@ -463,7 +463,7 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w)
while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
WidgetFactory::NoLayout || !insertedWidgets.find(w)))
w = w->parentWidget();
if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) &&
if (mainContainer()->inherits("TQMainWindow") &&
((TQMainWindow*)mainContainer())->centralWidget() == realWidget)
{
e->accept();
@@ -524,7 +524,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
// unselect its childs
if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout)
{
TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = w->queryList("TQWidget");
setPropertyShowingBlocked(true);
for (TQObject *o = l->first(); o; o = l->next())
{
@@ -636,7 +636,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(wid)));
if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) &&
!wid->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !wid->inherits(TQSPLITTER_OBJECT_NAME_STRING))
!wid->inherits("TQLayoutWidget") && !wid->inherits("TQSplitter"))
{
insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it
break;
@@ -795,7 +795,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
wid = designerWidget(TQT_TQOBJECT(wid));
if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.find(wid)) && wid->isVisibleTo(this))
newReceiver = wid;
if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING)
if (newReceiver && (newReceiver->inherits("TQLayoutWidget")
|| newReceiver->inherits("Spacer")))
newReceiver = (TQWidget*)connectReceiver;
drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver);
@@ -881,15 +881,15 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
for (TQMap < ulong, TQPoint >::Iterator it = moving.begin(); it != moving.end(); ++it)
{
TQWidget *i = (TQWidget *) it.key();
if (!emitSelChanged && i->inherits(TQBUTTON_OBJECT_NAME_STRING))
if (!emitSelChanged && i->inherits("TQButton"))
{
if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING) ||
wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup") ||
wa->inherits("TQButtonGroup"))
emitSelChanged = true;
if (!wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
if (!wa->inherits("TQButtonGroup"))
{
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(i), "buttonGroupId", false);
if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup"))
((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i);
}
}
@@ -1061,7 +1061,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w)
}
if (!e->isAccepted())
{
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = queryList("TQWidget");
if (!l)
return;
if (l->find(TQT_TQOBJECT(w)) != -1)
@@ -1096,7 +1096,7 @@ void FormWindow::selectWidget(TQObject * o, bool select)
return;
}

if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) &&
if (mainContainer()->inherits("TQMainWindow") &&
w == ((TQMainWindow *) mainContainer())->centralWidget())
{
TQObject *opw = propertyWidget;
@@ -1281,7 +1281,7 @@ void FormWindow::endRectDraw()

void FormWindow::selectWidgets()
{
TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = mainContainer()->queryList("TQWidget");
if (l)
{
for (TQObject * o = l->first(); o; o = l->next())
@@ -1340,7 +1340,7 @@ void FormWindow::redo()

void FormWindow::raiseChildSelections(TQWidget * w)
{
TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = w->queryList("TQWidget");
if (!l || !l->first())
{
delete l;
@@ -1358,7 +1358,7 @@ void FormWindow::raiseChildSelections(TQWidget * w)

void FormWindow::updateChildSelections(TQWidget * w)
{
TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = w->queryList("TQWidget");
if (l)
{
for (TQObject * o = l->first(); o; o = l->next())
@@ -1374,7 +1374,7 @@ void FormWindow::checkSelectionsForMove(TQWidget * w)
{
checkedSelectionsForMove = true;

TQObjectList *l = w->parentWidget()->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false);
TQObjectList *l = w->parentWidget()->queryList("TQWidget", 0, false, false);
moving.clear();
if (l)
{
@@ -1686,7 +1686,7 @@ void FormWindow::showOrderIndicators()
{
hideOrderIndicators();
orderIndicators.setAutoDelete(true);
TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = mainContainer()->queryList("TQWidget");
stackedWidgets = MetaDataBase::tabOrder(this);
if (l)
{
@@ -1811,7 +1811,7 @@ static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &acc
void FormWindow::checkAccels()
{
TQMap < TQChar, TQWidgetList > accels;
TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = mainContainer()->queryList("TQWidget");
if (l)
{
for (TQObject * o = l->first(); o; o = l->next())
@@ -1883,7 +1883,7 @@ void FormWindow::selectAll()
{
checkedSelectionsForMove = false;
blockSignals(true);
TQObjectList *l = mainContainer()->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = mainContainer()->queryList("TQWidget");
if (l)
{
for (TQObject * o = l->first(); o; o = l->next())
@@ -2041,7 +2041,7 @@ void FormWindow::breakLayout(TQWidget * w)
Command *cmd = breakLayoutCommand(w);
if (cmd)
commands.insert(0, cmd);
if (!w->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !w->inherits(TQSPLITTER_OBJECT_NAME_STRING))
if (!w->inherits("TQLayoutWidget") && !w->inherits("TQSplitter"))
break;
}
w = w->parentWidget();
@@ -2093,7 +2093,7 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const
w = WidgetFactory::containerOfWidget(w);
if (!w)
return false;
TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = w->queryList("TQWidget");
if (!l || !l->first())
{
delete l;
@@ -2291,7 +2291,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt)
TQAction *a = 0;
for (a = actions.first(); a; a = actions.next())
{
TQObjectList *l = a->queryList(TQACTION_OBJECT_NAME_STRING);
TQObjectList *l = a->queryList("TQAction");
al.append(a);
for (TQObject *ao = l->first(); ao; ao = l->next())
al.append((TQAction*)ao);
@@ -2310,11 +2310,11 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt)
}
}

if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
if (mainContainer()->inherits("TQMainWindow"))
{
if (!found)
{
TQObjectList *l = mainContainer()->queryList(TQDOCKWINDOW_OBJECT_NAME_STRING, 0, true);
TQObjectList *l = mainContainer()->queryList("TQDockWindow", 0, true);
for (TQObject *o = l->first(); o; o = l->next())
if (o != w && !qstrcmp(o->name(), s.latin1()))
{
@@ -2361,7 +2361,7 @@ bool FormWindow::isDatabaseWidgetUsed() const
{
#ifndef TQT_NO_SQL
TQStringList dbClasses;
dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here
dbClasses << "TQDataTable"; // add more here
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current(); ++it)
{
@@ -2451,9 +2451,9 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
}

for (; it.current(); ++it) {
if (it.current()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING))
if (it.current()->inherits("TQLayoutWidget"))
continue;
if (it.current()->inherits(TQSPLITTER_OBJECT_NAME_STRING))
if (it.current()->inherits("TQSplitter"))
continue;
if (!it.current()->isVisibleTo(this))
continue;
@@ -2546,7 +2546,7 @@ TQAction *FormWindow::findAction(const TQString &name)
{
if (TQString(a->name()) == name)
return a;
TQAction *ac = (TQAction*)a->child(name.latin1(), TQACTION_OBJECT_NAME_STRING);
TQAction *ac = (TQAction*)a->child(name.latin1(), "TQAction");
if (ac)
return ac;
}
@@ -2555,7 +2555,7 @@ TQAction *FormWindow::findAction(const TQString &name)

void FormWindow::killAccels(TQObject *top)
{
TQObjectList *l = top->queryList(TQACCEL_OBJECT_NAME_STRING);
TQObjectList *l = top->queryList("TQAccel");
if (!l)
return;
for (TQObject *o = l->first(); o; o = l->next())
@@ -2565,7 +2565,7 @@ void FormWindow::killAccels(TQObject *top)

bool FormWindow::isCentralWidget(TQObject *w) const
{
if (!mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
if (!mainContainer()->inherits("TQMainWindow"))
return false;
return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(((TQMainWindow*)mainContainer())->centralWidget());
}


+ 4
- 4
kommander/editor/functionsimpl.cpp View File

@@ -279,7 +279,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
if (type == TQSTRING_OBJECT_NAME_STRING)
if (type == "TQString")
{
quotes[i]->setShown(i < argsCount);
}
@@ -336,7 +336,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
if (m_function.argumentType(i) == TQSTRING_OBJECT_NAME_STRING)
if (m_function.argumentType(i) == "TQString")
{
quotes[i]->setShown(i < argsCount);
}
@@ -362,8 +362,8 @@ TQString FunctionsDialog::params()
TQString s = edits[i]->text();
if (!s.isEmpty() || i < m_function.minArg())
{
if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == TQSTRING_OBJECT_NAME_STRING)
|| (slotsShown && labels[i]->text().startsWith(TQSTRING_OBJECT_NAME_STRING)) ) )
if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "TQString")
|| (slotsShown && labels[i]->text().startsWith("TQString")) ) )
s = '"' + s + '"';
pars.append(s);
}


+ 23
- 23
kommander/editor/hierarchyview.cpp View File

@@ -255,11 +255,11 @@ void HierarchyList::objectClicked( TQListViewItem *i )
}

if ( !formWindow->widgets()->find( w ) ) {
if ( w->parent() && w->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
if ( w->parent() && w->parent()->inherits( "TQWidgetStack" ) &&
w->parent()->parent() &&
( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
w->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) {
if ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
( w->parent()->parent()->inherits( "TQTabWidget" ) ||
w->parent()->parent()->inherits( "TQWizard" ) ) ) {
if ( w->parent()->parent()->inherits( "TQTabWidget" ) )
( (TQTabWidget*)w->parent()->parent() )->showPage( w );
else
( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
@@ -356,7 +356,7 @@ void HierarchyList::setOpen( TQListViewItem *i, bool b )
void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
bool fakeMainWindow = false;
if ( o && o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
if ( o && o->inherits( "TQMainWindow" ) ) {
TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
if ( cw ) {
o = cw;
@@ -365,7 +365,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
}
TQListViewItem *item = 0;
TQString className = WidgetFactory::classNameOf( o );
if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) {
if ( o->inherits( "TQLayoutWidget" ) ) {
switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
@@ -387,11 +387,11 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
#endif

TQString name = o->name();
if ( o->parent() && o->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
if ( o->parent() && o->parent()->inherits( "TQWidgetStack" ) &&
o->parent()->parent() ) {
if ( o->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
if ( o->parent()->parent()->inherits( "TQTabWidget" ) )
name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
else if ( o->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
else if ( o->parent()->parent()->inherits( "TQWizard" ) )
name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
}

@@ -403,7 +403,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )

if ( fakeMainWindow ) {
name = o->parent()->name();
className = TQMAINWINDOW_OBJECT_NAME_STRING;
className = "TQMainWindow";
}

if ( !parent )
@@ -412,7 +412,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
item = new HierarchyItem( HierarchyItem::Widget, parent, name, className, dbInfo );
if ( !parent )
item->setPixmap( 0, PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
else if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
else if ( o->inherits( "TQLayoutWidget") )
item->setPixmap( 0, PixmapChooser::loadPixmap( "layout.xpm", PixmapChooser::Small ) );
else
item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
@@ -429,16 +429,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
if ( it.current()->parent() &&
( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) &&
it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
( it.current()->parent()->inherits( "TQTabWidget" ) ||
it.current()->parent()->inherits( "TQWizard" ) ) &&
it.current()->inherits( "TQWidgetStack" ) ) {
TQObject *obj = it.current();
TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false );
TQObjectList *l2 = obj->queryList( "TQWidget", 0, true, false );
QDesignerTabWidget *tw = 0;
QDesignerWizard *dw = 0;
if ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
if ( it.current()->parent()->inherits( "TQTabWidget" ) )
tw = (QDesignerTabWidget*)it.current()->parent();
if ( it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
if ( it.current()->parent()->inherits( "TQWizard" ) )
dw = (QDesignerWizard*)it.current()->parent();
TQWidgetStack *stack = (TQWidgetStack*)obj;
for ( obj = l2->last(); obj; obj = l2->prev() ) {
@@ -495,7 +495,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
return;

if ( w->isVisibleTo( formWindow ) ) {
if ( !w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
if ( !w->inherits( "TQTabWidget" ) && !w->inherits( "TQWizard" ) ) {
if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p );
@@ -514,13 +514,13 @@ void HierarchyList::addTabPage()
TQWidget *w = current();
if ( !w )
return;
if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( w->inherits( "TQTabWidget" ) ) {
TQTabWidget *tw = (TQTabWidget*)w;
AddTabPageCommand *cmd = new AddTabPageCommand( i18n("Add Page to %1" ).arg( tw->name() ), formWindow,
tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
} else if ( w->inherits( "TQWizard" ) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow,
wiz, "Page" );
@@ -534,7 +534,7 @@ void HierarchyList::removeTabPage()
TQWidget *w = current();
if ( !w )
return;
if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( w->inherits( "TQTabWidget" ) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
@@ -544,7 +544,7 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
} else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
} else if ( w->inherits( "TQWizard" ) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
@@ -677,7 +677,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & )
void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
{
TQWidget *w2 = w;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQMainWindow" ) )
w2 = ( (TQMainWindow*)w )->centralWidget();
listview->changeNameOf( w2, w->name() );
}


+ 12
- 12
kommander/editor/layout.cpp View File

@@ -159,13 +159,13 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
needMove = !layoutBase;
needReparent = needMove || layoutBase->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING );
needReparent = needMove || layoutBase->inherits( "TQLayoutWidget" ) || layoutBase->inherits( "TQSplitter" );
if ( !layoutBase ) {
if ( !useSplitter )
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ),
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ),
WidgetFactory::containerOfWidget( parent ) );
else
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ),
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ),
WidgetFactory::containerOfWidget( parent ) );
} else {
WidgetFactory::deleteLayout( layoutBase );
@@ -208,7 +208,7 @@ void Layout::undoLayout()
}
formWindow->selectWidget( TQT_TQOBJECT(layoutBase), false );
WidgetFactory::deleteLayout( layoutBase );
if ( parent != layoutBase && !layoutBase->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
if ( parent != layoutBase && !layoutBase->inherits( "TQMainWindow" ) ) {
layoutBase->hide();
TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
@@ -231,11 +231,11 @@ void Layout::breakLayout()
rects.insert( w, w->geometry() );
}
WidgetFactory::deleteLayout( layoutBase );
bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 ||
bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 ||
qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT( layoutBase )) ) ) &&
layoutBase != formWindow->mainContainer() );
bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0;
bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0;
bool add = geometries.isEmpty();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent )
@@ -313,13 +313,13 @@ void HorizontalLayout::doLayout()
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else
layout->addWidget( w );
if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQLayoutWidget" ) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}

if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
if ( layoutBase->inherits( "TQSplitter" ) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );

finishLayout( needMove, layout );
@@ -377,13 +377,13 @@ void VerticalLayout::doLayout()
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else
layout->addWidget( w );
if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQLayoutWidget" ) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}

if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
if ( layoutBase->inherits( "TQSplitter" ) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );

finishLayout( needMove, layout );
@@ -749,7 +749,7 @@ void GridLayout::doLayout()
} else {
layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
}
if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQLayoutWidget" ) )
( (TQLayoutWidget*)w )->updateSizePolicy();
w->show();
} else {


+ 32
- 32
kommander/editor/mainwindow.cpp View File

@@ -179,16 +179,16 @@ MainWindow::MainWindow(bool asClient)
readConfig();

// hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties)
TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQWIDGET_OBJECT_NAME_STRING), this, 0, false);
TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQWidget"), this, 0, false);
delete w;
w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), this, 0, false);

delete w;
w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQLABEL_OBJECT_NAME_STRING), this, 0, false);
w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQLabel"), this, 0, false);
delete w;
w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQTABWIDGET_OBJECT_NAME_STRING), this, 0, false);
w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQTabWidget"), this, 0, false);
delete w;
w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQFRAME_OBJECT_NAME_STRING), this, 0, false);
w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this, 0, false);
delete w;

assistant = new AssistProc(TQT_TQOBJECT(this), "Internal Assistant", assistantPath());
@@ -630,28 +630,28 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
break;
if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") ||
o->inherits("QDesignerToolBar") ||
(o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) &&
(o->inherits("TQComboBox") || o->inherits("TQToolButton") || o->inherits("QDesignerToolBarSeparator")) &&
o->parent() && o->parent()->inherits("QDesignerToolBar"))) {
TQWidget *w = (TQWidget*)o;
if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator"))
if (w->inherits("TQToolButton") || w->inherits("TQComboBox") || w->inherits("QDesignerToolBarSeparator"))
w = w->parentWidget();
TQWidget *pw = w->parentWidget();
while (pw) {
if (pw->inherits("FormWindow")) {
((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w));
if (!o->inherits("QDesignerToolBar"))
return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) &&
!o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator");
return !o->inherits("TQToolButton") && !o->inherits("TQMenuBar") &&
!o->inherits("TQComboBox") && !o->inherits("QDesignerToolBarSeparator");
}
pw = pw->parentWidget();
}
}
if (o && (o->inherits("QDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING))
if (o && (o->inherits("QDesignerToolBar") || o->inherits("TQDockWindowHandle"))
&& e->type() == TQEvent::ContextMenu)
break;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
break;
if (o && o->inherits(TQSIZEGRIP_OBJECT_NAME_STRING))
if (o && o->inherits("TQSizeGrip"))
break;
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
@@ -677,7 +677,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
lastPressWidget = 0;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
break;
if (o && o->inherits(TQSIZEGRIP_OBJECT_NAME_STRING))
if (o && o->inherits("TQSizeGrip"))
break;
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
@@ -694,10 +694,10 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
w = isAFormWindowChild(o);
if (lastPressWidget != (TQWidget*)o && w &&
!o->inherits("SizeHandle") && !o->inherits("OrderIndicator") &&
!o->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) &&
!o->inherits(TQSIZEGRIP_OBJECT_NAME_STRING))
!o->inherits("TQPopupMenu") && !o->inherits("TQMenuBar") &&
!o->inherits("TQSizeGrip"))
return true;
if (o && o->inherits(TQSIZEGRIP_OBJECT_NAME_STRING))
if (o && o->inherits("TQSizeGrip"))
break;
if (lastPressWidget != (TQWidget*)o ||
(!w || o->inherits("SizeHandle") || o->inherits("OrderIndicator")))
@@ -718,8 +718,8 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
break;
case TQEvent::MouseButtonDblClick:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) {
if (o && o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && ((TQToolButton*)o)->isOn() &&
o->parent() && o->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && formWindow())
if (o && o->inherits("TQToolButton") && ((TQToolButton*)o)->isOn() &&
o->parent() && o->parent()->inherits("TQToolBar") && formWindow())
formWindow()->setToolFixed();
break;
}
@@ -808,7 +808,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)

TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const
{
if (o->parent() && o->parent()->inherits(TQWIZARD_OBJECT_NAME_STRING) && !o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
if (o->parent() && o->parent()->inherits("TQWizard") && !o->inherits("TQPushButton"))
return 0;
while (o) {
if (o->inherits("FormWindow"))
@@ -1013,18 +1013,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge
void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int> &props, TQWidget *w)
{
const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
if (text && qstrcmp(text->type(), "TQString") != 0)
text = 0;
const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
if (title && qstrcmp(title->type(), "TQString") != 0)
title = 0;
const TQMetaProperty* pagetitle =
w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
if (pagetitle && qstrcmp(pagetitle->type(), "TQString") != 0)
pagetitle = 0;
const TQMetaProperty* pixmap =
w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true);
if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0)
if (pixmap && qstrcmp(pixmap->type(), "TQPixmap") != 0)
pixmap = 0;

if (text && text->designable(w) ||
@@ -1038,7 +1038,7 @@ void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int>
ids << (id = rmbWidgets->insertItem(i18n("Choose Pixmap..."), -1, 0));
props.insert("pixmap", id);
}
if (text && text->designable(w) && !w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)) {
if (text && text->designable(w) && !w->inherits("TQTextEdit")) {
ids << (id = rmbWidgets->insertItem(i18n("Edit Text..."), -1, 0));
props.insert("text", id);
}
@@ -1068,7 +1068,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
commands.insert("assoc", id);
}

if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
if (w->inherits("TQTabWidget")) {
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
if (((QDesignerTabWidget*)w)->count() > 1) {
@@ -1078,7 +1078,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
commands.insert("add", id);
}
if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) {
if (w->inherits("TQToolBox")) {
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
if (((TQToolBox*)w)->count() > 1) {
@@ -1113,7 +1113,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
commands.insert("assoc", id);
}

if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) {
if (fw->mainContainer()->inherits("TQWizard")) {
if (ids.isEmpty())
ids << rmbFormWindow->insertSeparator(0);

@@ -1131,7 +1131,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
ids << (id = rmbFormWindow->insertItem(i18n("Edit Pages..."), -1, 0));
commands.insert("edit", id);

} else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) {
} else if (fw->mainContainer()->inherits("TQMainWindow")) {
if (ids.isEmpty())
ids << rmbFormWindow->insertSeparator(0);
ids << (id = rmbFormWindow->insertItem(i18n("Add Menu Item"), -1, 0));
@@ -1146,7 +1146,7 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg
if (id == props[ "text" ]) {
bool ok = false;
TQString text;
if (w->inherits(TQTEXTVIEW_OBJECT_NAME_STRING) || w->inherits(TQLABEL_OBJECT_NAME_STRING)) {
if (w->inherits("TQTextView") || w->inherits("TQLabel")) {
text = TextEditor::getText(this, w->property("text").toString());
ok = !text.isEmpty();
} else {
@@ -1211,7 +1211,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
editor->show();
}

if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
if (w->inherits("TQTabWidget")) {
TQTabWidget *tw = (TQTabWidget*)w;
if (id == commands[ "add" ]) {
AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
@@ -1229,7 +1229,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
}
}
}
if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) {
if (w->inherits("TQToolBox")) {
TQToolBox *tw = (TQToolBox*)w;
if (id == commands[ "add" ]) {
AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
@@ -1264,7 +1264,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
}


if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) {
if (fw->mainContainer()->inherits("TQWizard")) {
TQWizard *wiz = (TQWizard*)fw->mainContainer();
if (id == commands[ "add" ]) {
AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(),
@@ -1297,7 +1297,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
cmd->execute();
}
}
} else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) {
} else if (fw->mainContainer()->inherits("TQMainWindow")) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if (id == commands[ "add_toolbar" ]) {
AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw);
@@ -1632,7 +1632,7 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
if (text && text->designable(w)) {
bool ok = false;
TQString text;
if (w->inherits(TQTEXTVIEW_OBJECT_NAME_STRING) || w->inherits(TQLABEL_OBJECT_NAME_STRING)) {
if (w->inherits("TQTextView") || w->inherits("TQLabel")) {
text = TextEditor::getText(this, w->property("text").toString());
ok = !text.isEmpty();
} else {


+ 1
- 1
kommander/editor/mainwindowactions.cpp View File

@@ -785,7 +785,7 @@ void MainWindow::fileCreateTemplate()
for (i = 0; i < WidgetDatabase::count(); ++i)
{
if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
WidgetDatabase::className(i) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::widgetGroup(i) != "Temp")
WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
{
dia.listClass->insertItem(WidgetDatabase::className(i));
}


+ 2
- 2
kommander/editor/metadatabase.cpp View File

@@ -280,7 +280,7 @@ int MetaDataBase::spacing( TQObject *o )
if ( !o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
if ( o->inherits( "TQMainWindow" ) )
o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
MetaDataBaseRecord *r = db->find( TQT_TQOBJECT(o) );
if ( !r || !o->isWidgetType() ) {
@@ -318,7 +318,7 @@ int MetaDataBase::margin( TQObject *o )
if ( !o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
if ( o->inherits( "TQMainWindow" ) )
o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {


+ 1
- 1
kommander/editor/previewwidgetimpl.cpp View File

@@ -25,7 +25,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
: PreviewWidgetBase( parent, name )
{
// install event filter on child widgets
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
TQObjectList *l = queryList("TQWidget");
TQObjectListIt it(*l);
TQObject * obj;
while ((obj = it.current()) != 0) {


+ 22
- 22
kommander/editor/propertyeditor.cpp View File

@@ -842,7 +842,7 @@ TQDateEdit *PropertyDateItem::lined()
if ( lin )
return lin;
lin = new TQDateEdit( listview->viewport() );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -919,7 +919,7 @@ TQTimeEdit *PropertyTimeItem::lined()
lin = new TQTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -994,7 +994,7 @@ TQDateTimeEdit *PropertyDateTimeItem::lined()
lin = new TQDateTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -1163,7 +1163,7 @@ TQSpinBox *PropertyIntItem::spinBox()
spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() );
spinBx->hide();
spinBx->installEventFilter( listview );
TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
@@ -1256,7 +1256,7 @@ TQComboBox *PropertyListItem::combo()
this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
if ( editable ) {
TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
TQObjectList *ol = comb->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
@@ -2194,7 +2194,7 @@ void PropertyPaletteItem::getPalette()
return;
bool ok = false;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
if ( w->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQScrollView" ) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(TQT_NON_COMMERCIAL)
@@ -2500,7 +2500,7 @@ static TQVariant::Type type_to_variant( const TQString &s )
#ifndef TQT_NO_SQL
static bool parent_is_data_aware( TQObject *o )
{
if ( !o->inherits( TQWIDGET_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQWidget" ) )
return false;
TQWidget *w = (TQWidget*)o;
TQWidget *p = w->parentWidget();
@@ -2575,7 +2575,7 @@ void PropertyList::setupProperties()
continue;
if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || w->inherits( "Spacer" ) ) {
if ( w->inherits( "TQLayoutWidget" ) || w->inherits( "Spacer" ) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -2618,7 +2618,7 @@ void PropertyList::setupProperties()
continue;
}
}
if ( w->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
if ( w->inherits( "TQActionGroup" ) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -2635,7 +2635,7 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() ||
!editor->widget()->parent() ||
!editor->widget()->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
!editor->widget()->parent()->inherits( "TQButtonGroup" ) )
continue;
}

@@ -2654,7 +2654,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( true, false );
if ( !editor->widget()->inherits( TQMULTILINEEDIT_OBJECT_NAME_STRING ) ) {
if ( !editor->widget()->inherits( "TQMultiLineEdit" ) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -2665,7 +2665,7 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQGroupBox" ) )
item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@@ -2702,7 +2702,7 @@ void PropertyList::setupProperties()
}
}

if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
if ( !w->inherits( "TQSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyIntItem( this, item, 0, "layoutSpacing", true );
setPropertyValue( item );
@@ -2713,7 +2713,7 @@ void PropertyList::setupProperties()
}


if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
if ( !w->inherits( "Spacer" ) && !w->inherits( "TQLayoutWidget" ) && !w->inherits( "TQAction" ) &&
!w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
@@ -2726,15 +2726,15 @@ void PropertyList::setupProperties()
}

#ifndef TQT_NO_SQL
if ( !editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) &&
!editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && parent_is_data_aware( editor->widget() ) ) {
if ( !editor->widget()->inherits( "TQDataTable" ) && !editor->widget()->inherits( "TQDataBrowser" ) &&
!editor->widget()->inherits( "TQDataView" ) && parent_is_data_aware( editor->widget() ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
item->setChanged( true, false );
}

if ( editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) ) {
if ( editor->widget()->inherits( "TQDataTable" ) || editor->widget()->inherits( "TQDataBrowser" ) || editor->widget()->inherits( "TQDataView" ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -2780,7 +2780,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
switch ( t ) {
case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, true,
editor->widget()->inherits( TQLABEL_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQTEXTVIEW_OBJECT_NAME_STRING ) );
editor->widget()->inherits( "TQLabel" ) || editor->widget()->inherits( "TQTextView" ) );
break;
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
@@ -2928,8 +2928,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return true;
} else if ( ( !o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ||
( o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
} else if ( ( !o->inherits( "TQLineEdit" ) ||
( o->inherits( "TQLineEdit" ) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
@@ -2939,12 +2939,12 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
( ke->key() == Key_Minus ||
ke->key() == Key_Left ) )
i->setOpen( false );
} else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
} else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( "TQComboBox" ) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 );
return true;
}
} else if ( e->type() == TQEvent::FocusOut && o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && editor->formWindow() ) {
} else if ( e->type() == TQEvent::FocusOut && o->inherits( "TQLineEdit" ) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
TQMouseEvent *me;


+ 41
- 41
kommander/editor/resource.cpp View File

@@ -440,13 +440,13 @@ bool Resource::save( TQIODevice* dev )
ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
if ( formwindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
if ( formwindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
@@ -615,9 +615,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
return;
}

if ( obj->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( obj->inherits( "TQTabWidget" ) ) {
TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQObjectList* tmpl = tw->queryList( "TQWidgetStack" );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
@@ -678,7 +678,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "</widget>" << endl;
}
}
else if ( obj->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
else if ( obj->inherits( "TQWizard" ) ) {
TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
TQWidget *w = wiz->page( i );
if ( !w )
@@ -702,7 +702,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
} else if ( obj->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
} else if ( obj->inherits( "TQMainWindow" ) ) {
saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
@@ -714,9 +714,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea

void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{
if ( obj->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || obj->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
if ( obj->inherits( "TQListBox" ) || obj->inherits( "TQComboBox" ) ) {
TQListBox *lb = 0;
if ( obj->inherits( TQLISTBOX_OBJECT_NAME_STRING ) )
if ( obj->inherits( "TQListBox" ) )
lb = (TQListBox*)obj;
else
lb = ( (TQComboBox*)obj )->listBox();
@@ -734,7 +734,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
} else if ( obj->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) {
} else if ( obj->inherits( "TQIconView" ) ) {
TQIconView *iv = (TQIconView*)obj;

TQIconViewItem *i = iv->firstItem();
@@ -750,7 +750,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
} else if ( obj->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) {
} else if ( obj->inherits( "TQListView" ) ) {
TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
@@ -779,11 +779,11 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
saveItem( lv->firstChild(), ts, indent - 1 );
}
#ifndef TQT_NO_TABLE
else if ( obj->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
else if ( obj->inherits( "TQTable" ) ) {
TQTable *table = (TQTable*)obj;
int i;
TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
bool isDataTable = table->inherits( TQDATATABLE_OBJECT_NAME_STRING );
bool isDataTable = table->inherits( "TQDataTable" );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
table->horizontalHeader()->label( i ).toInt() != i + 1 ||
@@ -798,7 +798,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
if ( table->horizontalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
if ( table->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !columnFields.isEmpty() ) {
if ( table->inherits( "TQDataTable" ) && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
@@ -937,7 +937,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
// if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
TQLayout *layout = 0;
QDesignerGridLayout* grid = 0;
if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) &&
if ( !obj->inherits( "TQSplitter" ) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
@@ -989,7 +989,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
if ( !changed.contains( "geometry" ) )
changed << "geometry";
}
} else if ( w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) { // #### should be cleaner (RS)
} else if ( w->inherits( "TQLayout" ) ) { // #### should be cleaner (RS)
changed << "margin" << "spacing";
}

@@ -1017,7 +1017,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
property( w->metaObject()->findProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
if ( w->inherits( "TQLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
if ( w->inherits( "QDesignerMenuBar" ) &&
@@ -1106,7 +1106,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
break;
case TQVariant::Int:
num = value.toInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) )) );
else if ( name == "margin" )
@@ -1124,7 +1124,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
break;
case TQVariant::UInt:
unum = value.toUInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) )) );
else if ( name == "margin" )
@@ -1332,7 +1332,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( colspan < 1 )
colspan = 1;

TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
TQString className = e.attribute( "class", "TQWidget" );

if ( !className.isNull() ) {
obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false ));
@@ -1344,7 +1344,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
mainContainerSet = true;
}
w = (TQWidget*)obj;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
if ( w->inherits( "TQMainWindow" ) )
w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch ( WidgetFactory::layoutType( layout ) ) {
@@ -1368,9 +1368,9 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
layout = 0;

if ( w && formwindow ) {
if ( !parent || ( !parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) )
formwindow->insertWidget( w, pasting );
else if ( parent && ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) || parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) )
MetaDataBase::addEntry( TQT_TQOBJECT(w) );
if (w->inherits("Dialog"))
dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
@@ -1402,14 +1402,14 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( parent->inherits( "TQTabWidget" ) ) {
if ( attrib == "title" )
( (TQTabWidget*)parent )->insertTab( w, v.toString() );
} else
if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
if ( parent->inherits( "TQToolBox" ) ) {
if ( attrib == "label" )
( (TQToolBox*)parent )->addItem( w, v.toString() );
} else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
} else if ( parent->inherits( "TQWizard" ) ) {
if ( attrib == "title" )
( (TQWizard*)parent )->addPage( w, v.toString() );
}
@@ -1436,7 +1436,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !widget )
return;

if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) && e.tagName() == "column" ) {
if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) {
TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
@@ -1470,7 +1470,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
lv->header()->setResizeEnabled( resizeable, i );
}
#ifndef TQT_NO_TABLE
else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
else if ( widget->inherits( "TQTable" ) ) {
TQTable *table = (TQTable*)widget;
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
@@ -1537,14 +1537,14 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) )
return;

if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) )
if ( widget->inherits( "TQListBox" ) )
lb = (TQListBox*)widget;
else
lb = ( (TQComboBox*)widget)->listBox();
@@ -1553,7 +1553,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else {
new TQListBoxText( lb, txt );
}
} else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) {
} else if ( widget->inherits( "TQIconView" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = false;
@@ -1562,7 +1562,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt

TQIconView *iv = (TQIconView*)widget;
new TQIconViewItem( iv, txt, pix );
} else if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) {
} else if ( widget->inherits( "TQListView" ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
TQValueList<TQPixmap> pixmaps;
@@ -1630,7 +1630,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
if ( layout->inherits( "TQBoxLayout" ) )
( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else
( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
@@ -1646,7 +1646,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
{
const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );

if ( !obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {// no layouts in metadatabase... (RS)
if ( !obj->inherits( "TQLayout" ) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -1754,7 +1754,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
}

if ( obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( obj->inherits( "TQLayout" ) ) {
if ( prop == "spacing" ) {
MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) )), v.toInt() );
return;
@@ -1955,7 +1955,7 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
TQString lang = formwindow->project()->language();
LanguageInterface *iface = langIface;
if ( iface && MetaDataBase::hasEvents( lang ) ) {
TQObjectList *l = formwindow->queryList( TQWIDGET_OBJECT_NAME_STRING );
TQObjectList *l = formwindow->queryList( "TQWidget" );
l->append( formwindow );
TQPtrList<TQAction> lst = formwindow->actionList();
for ( TQAction *a = lst.first(); a; a = lst.next() )
@@ -2374,10 +2374,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
while ( it.current() ) {
TQObject *o = it.current();
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !o->inherits( "TQAction" ) )
continue;
TQAction *ac = (TQAction*)o;
bool isGroup = ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING );
bool isGroup = ac->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2406,7 +2406,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) {
TQAction *a = it.current();
bool isGroup = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING );
bool isGroup = a->inherits( "TQActionGroup" );
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2450,7 +2450,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !parent->inherits( "TQAction" ) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
a = new QDesignerActionGroup( parent );
@@ -2472,7 +2472,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
if ( !parent->inherits( "TQAction" ) )
formwindow->actionList().append( a );
}
}
@@ -2539,7 +2539,7 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )

void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
{
if ( !mw->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) )
if ( !mw->child( 0, "TQMenuBar" ) )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;


+ 5
- 5
kommander/editor/tableeditorimpl.cpp View File

@@ -33,14 +33,14 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelColumnPixmap->setText( "" );
labelRowPixmap->setText( "" );

if ( !editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
if ( !editTable->inherits( "TQDataTable" ) ) {
labelFields->hide();
comboFields->hide();
labelTable->hide();
labelTableValue->hide();
}
#ifndef TQT_NO_SQL
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
if ( editTable->inherits( "TQDataTable" ) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
// rows_tab->hide();
@@ -48,7 +48,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
TabWidget->setTabEnabled( rows_tab, false );
}

if ( formWindow->project() && editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
if ( formWindow->project() && editTable->inherits( "TQDataTable" ) ) {
TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
TQStringList fields;
@@ -131,7 +131,7 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
editColumnText->blockSignals( false );

#ifndef TQT_NO_TABLE
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
if ( editTable->inherits( "TQDataTable" ) ) {
TQString s = *fieldMap.find( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
@@ -215,7 +215,7 @@ void TableEditor::newColumnClicked()
TQListBoxItem *item = listColumns->item( listColumns->count() - 1 );
listColumns->setCurrentItem( item );
listColumns->setSelected( item, true );
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
if ( editTable->inherits( "TQDataTable" ) ) {
comboFields->setFocus();
} else {
editColumnText->setFocus();


+ 39
- 39
kommander/editor/widgetdatabase.cpp View File

@@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id )
/* Designer widgets */
r = new WidgetDatabaseRecord;
r->iconName = "pushbutton.xpm";
r->name = TQPUSHBUTTON_OBJECT_NAME_STRING;
r->name = "TQPushButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Push Button");
append(r);

r = new WidgetDatabaseRecord;
r->iconName = "toolbutton.xpm";
r->name = TQTOOLBUTTON_OBJECT_NAME_STRING;
r->name = "TQToolButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Tool Button");
append(r);

r = new WidgetDatabaseRecord;
r->iconName = "radiobutton.xpm";
r->name = TQRADIOBUTTON_OBJECT_NAME_STRING;
r->name = "TQRadioButton";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Radio Button");
append(r);

r = new WidgetDatabaseRecord;
r->iconName = "checkbox.xpm";
r->name = TQCHECKBOX_OBJECT_NAME_STRING;
r->name = "TQCheckBox";
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Check Box");
append(r);

r = new WidgetDatabaseRecord;
r->iconName = "groupbox.xpm";
r->name = TQGROUPBOX_OBJECT_NAME_STRING;
r->name = "TQGroupBox";
r->group = widgetGroup("Containers");
r->toolTip = i18n("Group Box");
r->isContainer = true;
@@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id )

r = new WidgetDatabaseRecord;
r->iconName = "buttongroup.xpm";
r->name = TQBUTTONGROUP_OBJECT_NAME_STRING;
r->name = "TQButtonGroup";