summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/propertyeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/propertyeditor.cpp')
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index 49eac9eb..01ac4295 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -184,7 +184,7 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *
PropertyItem::~PropertyItem()
{
if ( resetButton )
- delete resetButton->tqparentWidget();
+ delete resetButton->parentWidget();
resetButton = 0;
}
@@ -349,7 +349,7 @@ void PropertyItem::setOpen( bool b )
void PropertyItem::showEditor()
{
createResetButton();
- resetButton->tqparentWidget()->show();
+ resetButton->parentWidget()->show();
}
/*! Subclasses have to hide the editor of the item here
@@ -358,7 +358,7 @@ void PropertyItem::showEditor()
void PropertyItem::hideEditor()
{
createResetButton();
- resetButton->tqparentWidget()->hide();
+ resetButton->parentWidget()->hide();
}
/*! This is called to init the value of the item. Reimplement in
@@ -402,7 +402,7 @@ TQString PropertyItem::name() const
void PropertyItem::createResetButton()
{
if ( resetButton ) {
- resetButton->tqparentWidget()->lower();
+ resetButton->parentWidget()->lower();
return;
}
const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance());
@@ -455,8 +455,8 @@ void PropertyItem::placeEditor( TQWidget *w )
r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
listview->moveChild( w, r.x(), r.y() );
- resetButton->tqparentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() );
- listview->moveChild( resetButton->tqparentWidget(), r.x() + r.width() - 8, r.y() );
+ resetButton->parentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() );
+ listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() );
resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) );
}
@@ -3019,13 +3019,13 @@ static TQVariant::Type type_to_variant( const TQString &s )
}
#ifndef TQT_NO_SQL
-static bool tqparent_is_data_aware( TQWidget *w )
+static bool parent_is_data_aware( TQWidget *w )
{
- TQWidget *p = w ? w->tqparentWidget() : 0;
+ TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) )
return TRUE;
- p = p->tqparentWidget();
+ p = p->parentWidget();
}
return FALSE;
}
@@ -3045,10 +3045,10 @@ void PropertyList::setupProperties()
TQMap<TQString, bool> unique;
TQObject *w = editor->widget();
TQStringList valueSet;
- bool tqparentHasLayout =
+ bool parentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->tqparentWidget() &&
- WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
+ !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
editor->widget()->tqmetaObject()->
@@ -3092,7 +3092,7 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "baseSize" ) == 0 )
continue;
- if ( tqparentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
+ if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
if ( ::tqqt_cast<TQLayoutWidget*>(w) || ::tqqt_cast<Spacer*>(w) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
@@ -3212,7 +3212,7 @@ void PropertyList::setupProperties()
TQStringList lst;
for ( uint i = 0; i < l.count(); ++i ) {
TQString k = l.at( i );
- // filter out enum-tqmasks
+ // filter out enum-masks
if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase )
continue;
lst << k;
@@ -3236,24 +3236,24 @@ void PropertyList::setupProperties()
}
if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) &&
- w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
- item = new PropertyLayoutItem( this, item, 0, "tqlayoutSpacing" );
+ w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
+ item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
- if ( MetaDataBase::isPropertyChanged( editor->widget(), "tqlayoutSpacing" )
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
|| MetaDataBase::spacing( editor->widget() ) != -1 )
- tqlayoutInitValue( item, TRUE );
+ layoutInitValue( item, TRUE );
else
- tqlayoutInitValue( item );
- item = new PropertyLayoutItem( this, item, 0, "tqlayoutMargin" );
+ layoutInitValue( item );
+ item = new PropertyLayoutItem( this, item, 0, "layoutMargin" );
setPropertyValue( item );
- if ( MetaDataBase::isPropertyChanged( editor->widget(), "tqlayoutMargin" )
+ if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" )
|| MetaDataBase::margin( editor->widget() ) != -1 )
- tqlayoutInitValue( item, TRUE );
+ layoutInitValue( item, TRUE );
else
- tqlayoutInitValue( item );
+ layoutInitValue( item );
TQWidget *widget = (TQWidget*)w;
if ( ( !::tqqt_cast<TQLayoutWidget*>(widget) &&
- widget->tqparentWidget() && ::tqqt_cast<FormWindow*>(widget->tqparentWidget()) ) ) {
+ widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
@@ -3282,7 +3282,7 @@ void PropertyList::setupProperties()
#ifndef TQT_NO_SQL
if ( !::tqqt_cast<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) &&
- !::tqqt_cast<TQDataView*>(editor->widget()) && tqparent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) {
+ !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -3392,7 +3392,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
case TQVariant::Int:
if ( name == "accel" )
item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE );
- else if ( name == "tqlayoutSpacing" || name == "tqlayoutMargin" )
+ else if ( name == "layoutSpacing" || name == "layoutMargin" )
item = new PropertyLayoutItem( this, item, 0, name );
else if ( name == "resizeMode" )
item = new PropertyListItem( this, item, 0, name, TRUE );
@@ -3496,7 +3496,7 @@ void PropertyList::valueChanged( PropertyItem *i )
editor->formWindow()->commandHistory()->addCommand( cmd, TRUE );
}
-void PropertyList::tqlayoutInitValue( PropertyItem *i, bool changed )
+void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
{
if ( !editor->widget() )
return;
@@ -3663,7 +3663,7 @@ void PropertyList::refetchData()
if ( i->hasSubItems() )
i->initChildren();
bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() );
- if ( ( i->name() == "tqlayoutSpacing" || i->name() == "tqlayoutMargin" ) ) {
+ if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) {
if ( i->value().toString() != "-1" )
i->setChanged( TRUE, FALSE );
else
@@ -3715,9 +3715,9 @@ void PropertyList::setPropertyValue( PropertyItem *i )
i->setValue( TQVariant( TRUE, 0 ) );
else
i->setValue( TQVariant( FALSE, 0 ) );
- } else if ( i->name() == "tqlayoutSpacing" ) {
+ } else if ( i->name() == "layoutSpacing" ) {
( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) ));
- } else if ( i->name() == "tqlayoutMargin" ) {
+ } else if ( i->name() == "layoutMargin" ) {
( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) ));
} else if ( i->name() == "resizeMode" ) {
( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) );
@@ -4165,11 +4165,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
// if there is no properties displayed then we really should show them.
// to do this check the number of properties in the list.
bool ret = (listview->childCount() > 0) ? TRUE : FALSE;
- if ( wid->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
+ if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
TQListViewItemIterator it( listview );
ret = FALSE;
while ( it.current() ) {
- if ( it.current()->text( 0 ) == "tqlayoutSpacing" || it.current()->text( 0 ) == "tqlayoutMargin" ) {
+ if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
ret = TRUE;
break;
}
@@ -4323,10 +4323,10 @@ void PropertyEditor::setSignalHandlersEnabled( bool b )
void PropertyEditor::updateWindow()
{
if ( isHidden() && count() ) {
- tqparentWidget()->show();
- MainWindow::self->setAppropriate( (TQDockWindow*)tqparentWidget(), TRUE );
+ parentWidget()->show();
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE );
} else if ( isShown() && !count() ) {
- tqparentWidget()->hide();
- MainWindow::self->setAppropriate( (TQDockWindow*)tqparentWidget(), FALSE );
+ parentWidget()->hide();
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE );
}
}