summaryrefslogtreecommitdiffstats
path: root/tools/designer/designer/propertyeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/designer/propertyeditor.cpp')
-rw-r--r--tools/designer/designer/propertyeditor.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp
index db8b12ac0..a4bc629e5 100644
--- a/tools/designer/designer/propertyeditor.cpp
+++ b/tools/designer/designer/propertyeditor.cpp
@@ -752,7 +752,7 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- bool richText = !::qt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
+ bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" );
bool doWrap = FALSE;
TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
@@ -2306,7 +2306,7 @@ void PropertyPaletteItem::getPalette()
return;
bool ok = FALSE;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
- if ( ::qt_cast<TQScrollView*>(w) )
+ if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL)
@@ -3013,7 +3013,7 @@ static bool parent_is_data_aware( TQWidget *w )
{
TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
- if ( ::qt_cast<TQDesignerDataBrowser*>(p) || ::qt_cast<TQDesignerDataView*>(p) )
+ if ( ::tqt_cast<TQDesignerDataBrowser*>(p) || ::tqt_cast<TQDesignerDataView*>(p) )
return TRUE;
p = p->parentWidget();
}
@@ -3029,7 +3029,7 @@ void PropertyList::setupProperties()
{
if ( !editor->widget() )
return;
- bool allProperties = !::qt_cast<Spacer*>(editor->widget());
+ bool allProperties = !::tqt_cast<Spacer*>(editor->widget());
TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
TQMap<TQString, bool> unique;
@@ -3047,8 +3047,8 @@ void PropertyList::setupProperties()
continue;
if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue;
- if ( ::qt_cast<TQDesignerToolBar*>(editor->widget()) ||
- ::qt_cast<MenuBarEditor*>(editor->widget()) ) {
+ if ( ::tqt_cast<TQDesignerToolBar*>(editor->widget()) ||
+ ::tqt_cast<MenuBarEditor*>(editor->widget()) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@@ -3084,7 +3084,7 @@ void PropertyList::setupProperties()
continue;
if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( ::qt_cast<TQLayoutWidget*>(w) || ::qt_cast<Spacer*>(w) ) {
+ if ( ::tqt_cast<TQLayoutWidget*>(w) || ::tqt_cast<Spacer*>(w) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -3127,7 +3127,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( ::qt_cast<TQActionGroup*>(w) ) {
+ if ( ::tqt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -3144,7 +3144,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() ||
- !::qt_cast<TQButtonGroup*>(editor->widget()->parent()) )
+ !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue;
}
@@ -3166,7 +3166,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( TRUE, FALSE );
- if ( !::qt_cast<TQMultiLineEdit*>(editor->widget()) ) {
+ if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -3177,7 +3177,7 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( TRUE, FALSE );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( ::qt_cast<TQGroupBox*>(w) )
+ if ( ::tqt_cast<TQGroupBox*>(w) )
item->setVisible( FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@@ -3225,7 +3225,7 @@ void PropertyList::setupProperties()
}
}
- if ( !::qt_cast<TQSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) &&
+ if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) &&
w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
@@ -3242,8 +3242,8 @@ void PropertyList::setupProperties()
else
layoutInitValue( item );
TQWidget *widget = (TQWidget*)w;
- if ( ( !::qt_cast<TQLayoutWidget*>(widget) &&
- widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) {
+ if ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
+ widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
@@ -3258,8 +3258,8 @@ void PropertyList::setupProperties()
}
}
- if ( !::qt_cast<Spacer*>(w) && !::qt_cast<TQLayoutWidget*>(w) &&
- !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) ) {
+ if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
+ !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
@@ -3271,16 +3271,16 @@ void PropertyList::setupProperties()
}
#ifndef QT_NO_SQL
- if ( !::qt_cast<TQDataTable*>(editor->widget()) && !::qt_cast<TQDataBrowser*>(editor->widget()) &&
- !::qt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<TQWidget*>(editor->widget()) ) ) {
+ if ( !::tqt_cast<TQDataTable*>(editor->widget()) && !::tqt_cast<TQDataBrowser*>(editor->widget()) &&
+ !::tqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqt_cast<TQWidget*>(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 ( ::qt_cast<TQDataTable*>(editor->widget()) || ::qt_cast<TQDataBrowser*>(editor->widget()) ||
- ::qt_cast<TQDataView*>(editor->widget()) ) {
+ if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
+ ::tqt_cast<TQDataView*>(editor->widget()) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -3363,9 +3363,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
switch ( t ) {
case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, TRUE,
- ::qt_cast<TQLabel*>(editor->widget()) ||
- ::qt_cast<TQTextView*>(editor->widget()) ||
- ::qt_cast<TQButton*>(editor->widget()) );
+ ::tqt_cast<TQLabel*>(editor->widget()) ||
+ ::tqt_cast<TQTextView*>(editor->widget()) ||
+ ::tqt_cast<TQButton*>(editor->widget()) );
break;
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
@@ -3543,8 +3543,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return TRUE;
- } else if ( ( !::qt_cast<TQLineEdit*>(o) ||
- ( ::qt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
+ } else if ( ( !::tqt_cast<TQLineEdit*>(o) ||
+ ( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
@@ -3554,12 +3554,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 ) && ::qt_cast<TQComboBox*>(o) ) {
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 );
return TRUE;
}
- } else if ( e->type() == TQEvent::FocusOut && ::qt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
+ } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) {
TQMouseEvent *me;
@@ -3568,7 +3568,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::MouseButtonPress:
me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() );
- if ( i && ( ::qt_cast<PropertyColorItem*>(i) || ::qt_cast<PropertyPixmapItem*>(i) ) ) {
+ if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
pressPos = me->pos();
mousePressed = TRUE;
@@ -3582,7 +3582,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( i && i == pressItem ) {
if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
- if ( ::qt_cast<PropertyColorItem*>(i) ) {
+ if ( ::tqt_cast<PropertyColorItem*>(i) ) {
TQColor col = i->value().asColor();
TQColorDrag *drg = new TQColorDrag( col, this );
TQPixmap pix( 25, 25 );
@@ -3594,7 +3594,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
mousePressed = FALSE;
drg->dragCopy();
}
- else if ( ::qt_cast<PropertyPixmapItem*>(i) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) {
TQImage img = pix.convertToImage();
@@ -3780,9 +3780,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3796,9 +3796,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3812,14 +3812,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
TQColor color;
TQColorDrag::decode( e, color );
i->setValue( TQVariant( color ) );
valueChanged( i );
e->accept();
}
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
TQImage img;
TQImageDrag::decode( e, img );
TQPixmap pm;