summaryrefslogtreecommitdiffstats
path: root/kommander/editor/propertyeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/propertyeditor.cpp')
-rw-r--r--kommander/editor/propertyeditor.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index ed5e68d5..aeeaecb1 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -842,7 +842,7 @@ QDateEdit *PropertyDateItem::lined()
if ( lin )
return lin;
lin = new QDateEdit( listview->viewport() );
- TQObjectList *l = lin->queryList( "TQLineEdit" );
+ TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -919,7 +919,7 @@ QTimeEdit *PropertyTimeItem::lined()
lin = new QTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
this, TQT_SLOT( setValue() ) );
- TQObjectList *l = lin->queryList( "TQLineEdit" );
+ TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -994,7 +994,7 @@ QDateTimeEdit *PropertyDateTimeItem::lined()
lin = new QDateTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
this, TQT_SLOT( setValue() ) );
- TQObjectList *l = lin->queryList( "TQLineEdit" );
+ TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
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" );
+ TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
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" );
+ TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
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" ) )
+ if ( w->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL)
@@ -2500,7 +2500,7 @@ static TQVariant::Type type_to_variant( const TQString &s )
#ifndef QT_NO_SQL
static bool parent_is_data_aware( TQObject *o )
{
- if ( !o->inherits( "TQWidget" ) )
+ if ( !o->inherits( TQWIDGET_OBJECT_NAME_STRING ) )
return false;
TQWidget *w = (TQWidget*)o;
TQWidget *p = w->parentWidget();
@@ -2618,7 +2618,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( w->inherits( "TQActionGroup" ) ) {
+ if ( w->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
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 Q_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() ||
!editor->widget()->parent() ||
- !editor->widget()->parent()->inherits( "TQButtonGroup" ) )
+ !editor->widget()->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
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" ) ) {
+ if ( !editor->widget()->inherits( TQMULTILINEEDIT_OBJECT_NAME_STRING ) ) {
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" ) )
+ if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) )
item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@@ -2702,7 +2702,7 @@ void PropertyList::setupProperties()
}
}
- if ( !w->inherits( "TQSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
+ if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !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( "QLayoutWidget" ) && !w->inherits( "TQAction" ) &&
+ if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
!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 QT_NO_SQL
- if ( !editor->widget()->inherits( "TQDataTable" ) && !editor->widget()->inherits( "TQDataBrowser" ) &&
- !editor->widget()->inherits( "TQDataView" ) && parent_is_data_aware( editor->widget() ) ) {
+ 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() ) ) {
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" ) || editor->widget()->inherits( "TQDataBrowser" ) || editor->widget()->inherits( "TQDataView" ) ) {
+ if ( editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) ) {
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" ) || editor->widget()->inherits( "TQTextView" ) );
+ editor->widget()->inherits( TQLABEL_OBJECT_NAME_STRING ) || editor->widget()->inherits( TQTEXTVIEW_OBJECT_NAME_STRING ) );
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" ) ||
- ( o->inherits( "TQLineEdit" ) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
+ } else if ( ( !o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ||
+ ( o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && ( (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" ) ) {
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 );
return true;
}
- } else if ( e->type() == TQEvent::FocusOut && o->inherits( "TQLineEdit" ) && editor->formWindow() ) {
+ } else if ( e->type() == TQEvent::FocusOut && o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) {
TQMouseEvent *me;