summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/propertyeditor.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-11-26 02:33:14 +0900
committerMichele Calgaro <[email protected]>2023-11-26 17:32:41 +0900
commitd31a7027d0b8e2237b1b398e436e82e9944b38cb (patch)
tree1cd933e46759d2209dad0c74090f1e3487ab4b3e /kdevdesigner/designer/propertyeditor.cpp
parent8308ebcedcc01c7588346da09b69b97b5c8e8059 (diff)
downloadtdevelop-d31a7027d0b8e2237b1b398e436e82e9944b38cb.tar.gz
tdevelop-d31a7027d0b8e2237b1b398e436e82e9944b38cb.zip
Replaced various '#define' with actual strings - part 4
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 676a13490dc7163e5c99a0f39094a2a4148d3963)
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 1bb7e680..68fe21f1 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -753,7 +753,7 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- bool richText = !::tqqt_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 );
@@ -2307,7 +2307,7 @@ void PropertyPaletteItem::getPalette()
return;
bool ok = FALSE;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
- if ( ::tqqt_cast<TQScrollView*>(w) )
+ if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
w->backgroundMode(), listview,
@@ -3019,7 +3019,7 @@ static bool parent_is_data_aware( TQWidget *w )
{
TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
- if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) )
+ if ( ::tqt_cast<QDesignerDataBrowser*>(p) || ::tqt_cast<QDesignerDataView*>(p) )
return TRUE;
p = p->parentWidget();
}
@@ -3035,7 +3035,7 @@ void PropertyList::setupProperties()
{
if ( !editor->widget() )
return;
- bool allProperties = !::tqqt_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;
@@ -3053,8 +3053,8 @@ void PropertyList::setupProperties()
continue;
if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue;
- if ( ::tqqt_cast<QDesignerToolBar*>(editor->widget()) ||
- ::tqqt_cast<MenuBarEditor*>(editor->widget()) ) {
+ if ( ::tqt_cast<QDesignerToolBar*>(editor->widget()) ||
+ ::tqt_cast<MenuBarEditor*>(editor->widget()) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@@ -3090,7 +3090,7 @@ void PropertyList::setupProperties()
continue;
if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( ::tqqt_cast<TQLayoutWidget*>(w) || ::tqqt_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 )
@@ -3133,7 +3133,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( ::tqqt_cast<TQActionGroup*>(w) ) {
+ if ( ::tqt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -3150,7 +3150,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() ||
- !::tqqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
+ !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue;
}
@@ -3172,7 +3172,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( TRUE, FALSE );
- if ( !::tqqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
+ if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -3183,7 +3183,7 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( TRUE, FALSE );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( ::tqqt_cast<TQGroupBox*>(w) )
+ if ( ::tqt_cast<TQGroupBox*>(w) )
item->setVisible( FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@@ -3231,7 +3231,7 @@ void PropertyList::setupProperties()
}
}
- if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) &&
+ if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) &&
w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
@@ -3248,8 +3248,8 @@ void PropertyList::setupProperties()
else
layoutInitValue( item );
TQWidget *widget = (TQWidget*)w;
- if ( ( !::tqqt_cast<TQLayoutWidget*>(widget) &&
- widget->parentWidget() && ::tqqt_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";
@@ -3264,8 +3264,8 @@ void PropertyList::setupProperties()
}
}
- if ( !::tqqt_cast<Spacer*>(w) && !::tqqt_cast<TQLayoutWidget*>(w) &&
- !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) ) {
+ if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
+ !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
@@ -3277,16 +3277,16 @@ void PropertyList::setupProperties()
}
#ifndef TQT_NO_SQL
- if ( !::tqqt_cast<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) &&
- !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_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 ( ::tqqt_cast<TQDataTable*>(editor->widget()) || ::tqqt_cast<TQDataBrowser*>(editor->widget()) ||
- ::tqqt_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" ) )
@@ -3369,9 +3369,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
switch ( t ) {
case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, TRUE,
- ::tqqt_cast<TQLabel*>(editor->widget()) ||
- ::tqqt_cast<TQTextView*>(editor->widget()) ||
- ::tqqt_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,
@@ -3549,8 +3549,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return TRUE;
- } else if ( ( !::tqqt_cast<TQLineEdit*>(o) ||
- ( ::tqqt_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 ||
@@ -3560,12 +3560,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 ) && ::tqqt_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 && ::tqqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
+ } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) {
TQMouseEvent *me;
@@ -3574,7 +3574,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::MouseButtonPress:
me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() );
- if ( i && ( ::tqqt_cast<PropertyColorItem*>(i) || ::tqqt_cast<PropertyPixmapItem*>(i) ) ) {
+ if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
pressPos = me->pos();
mousePressed = TRUE;
@@ -3588,7 +3588,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( i && i == pressItem ) {
if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
- if ( ::tqqt_cast<PropertyColorItem*>(i) ) {
+ if ( ::tqt_cast<PropertyColorItem*>(i) ) {
TQColor col = i->value().asColor();
TQColorDrag *drg = new TQColorDrag( col, this );
TQPixmap pix( 25, 25 );
@@ -3600,7 +3600,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
mousePressed = FALSE;
drg->dragCopy();
}
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) {
TQImage img = pix.convertToImage();
@@ -3786,9 +3786,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
return;
}
- if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3802,9 +3802,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
return;
}
- if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3818,14 +3818,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e )
return;
}
- if ( ::tqqt_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 ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
TQImage img;
TQImageDrag::decode( e, img );
TQPixmap pm;