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.cpp1430
1 files changed, 715 insertions, 715 deletions
diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index 06b8f93b..7ec9cc9b 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -24,7 +24,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "propertyeditor.h"
#include "formwindow.h"
@@ -49,56 +49,56 @@
#include <klocale.h>
#include "kdevdesigner_part.h"
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qfontdialog.h>
-#include <qspinbox.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlistbox.h>
-#include <qfontdatabase.h>
-#include <qcolor.h>
-#include <qcolordialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsizepolicy.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qaccel.h>
-#include <qworkspace.h>
-#include <qtimer.h>
-#include <qdragobject.h>
-#include <qdom.h>
-#include <qprocess.h>
-#include <qstyle.h>
-#include <qdatetimeedit.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqfontdialog.h>
+#include <tqspinbox.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlistbox.h>
+#include <tqfontdatabase.h>
+#include <tqcolor.h>
+#include <tqcolordialog.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqaccel.h>
+#include <tqworkspace.h>
+#include <tqtimer.h>
+#include <tqdragobject.h>
+#include <tqdom.h>
+#include <tqprocess.h>
+#include <tqstyle.h>
+#include <tqdatetimeedit.h>
#include <qassistantclient.h>
-#include <qdrawutil.h>
-#include <qmultilineedit.h> // FIXME: obsolete
-#include <qsplitter.h>
-#include <qdatatable.h>
-#include <qtextview.h>
+#include <tqdrawutil.h>
+#include <tqmultilineedit.h> // FIXME: obsolete
+#include <tqsplitter.h>
+#include <tqdatatable.h>
+#include <tqtextview.h>
#include <limits.h>
-static QFontDatabase *fontDataBase = 0;
-QString assistantPath();
+static TQFontDatabase *fontDataBase = 0;
+TQString assistantPath();
#ifdef Q_WS_MAC
-#include <qwindowsstyle.h>
-static void setupStyle(QWidget *w)
+#include <tqwindowsstyle.h>
+static void setupStyle(TQWidget *w)
{
- static QStyle *windowsStyle = 0;
+ static TQStyle *windowsStyle = 0;
if(!windowsStyle)
windowsStyle = new QWindowsStyle;
w->setStyle(windowsStyle);
@@ -113,7 +113,7 @@ static void cleanupFontDatabase()
fontDataBase = 0;
}
-static QStringList getFontList()
+static TQStringList getFontList()
{
if ( !fontDataBase ) {
fontDataBase = new QFontDatabase;
@@ -127,8 +127,8 @@ class PropertyWhatsThis : public QWhatsThis
{
public:
PropertyWhatsThis( PropertyList *l );
- QString text( const QPoint &pos );
- bool clicked( const QString& href );
+ TQString text( const TQPoint &pos );
+ bool clicked( const TQString& href );
private:
PropertyList *propertyList;
@@ -136,20 +136,20 @@ private:
};
PropertyWhatsThis::PropertyWhatsThis( PropertyList *l )
- : QWhatsThis( l->viewport() ), propertyList( l )
+ : TQWhatsThis( l->viewport() ), propertyList( l )
{
}
-QString PropertyWhatsThis::text( const QPoint &pos )
+TQString PropertyWhatsThis::text( const TQPoint &pos )
{
return propertyList->whatsThisAt( pos );
}
-bool PropertyWhatsThis::clicked( const QString& href )
+bool PropertyWhatsThis::clicked( const TQString& href )
{
if ( !href.isEmpty() ) {
QAssistantClient *ac = MainWindow::self->assistantClient();
- ac->showPage( QString( qInstallPathDocs() ) + "/html/" + href );
+ ac->showPage( TQString( qInstallPathDocs() ) + "/html/" + href );
}
return FALSE; // do not hide window
}
@@ -170,8 +170,8 @@ bool PropertyWhatsThis::clicked( const QString& href )
\a prop as the parent item.
*/
-PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
- : QListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
+PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
+ : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
{
setSelectable( FALSE );
open = FALSE;
@@ -206,10 +206,10 @@ void PropertyItem::updateBackColor()
backColor = *backColor1;
}
-QColor PropertyItem::backgroundColor()
+TQColor PropertyItem::backgroundColor()
{
updateBackColor();
- if ( (QListViewItem*)this == listview->currentItem() )
+ if ( (TQListViewItem*)this == listview->currentItem() )
return *selectedBack;
return backColor;
}
@@ -230,12 +230,12 @@ void PropertyItem::initChildren()
{
}
-void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- g.setColor( QColorGroup::Foreground, Qt::black );
- g.setColor( QColorGroup::Text, Qt::black );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ g.setColor( TQColorGroup::Foreground, Qt::black );
+ g.setColor( TQColorGroup::Text, Qt::black );
int indent = 0;
if ( column == 0 ) {
indent = 20 + ( property ? 20 : 0 );
@@ -246,16 +246,16 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in
if ( isChanged() && column == 0 ) {
p->save();
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold( TRUE );
p->setFont( f );
}
if ( !hasCustomContents() || column != 1 ) {
- QListViewItem::paintCell( p, g, column, width - indent, align );
+ TQListViewItem::paintCell( p, g, column, width - indent, align );
} else {
p->fillRect( 0, 0, width, height(), backgroundColor() );
- drawCustomContents( p, QRect( 0, 0, width, height() ) );
+ drawCustomContents( p, TQRect( 0, 0, width, height() ) );
}
if ( isChanged() && column == 0 )
@@ -273,29 +273,29 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in
p->restore();
}
p->save();
- p->setPen( QPen( cg.dark(), 1 ) );
+ p->setPen( TQPen( cg.dark(), 1 ) );
p->drawLine( 0, height() - 1, width, height() - 1 );
p->drawLine( width - 1, 0, width - 1, height() );
p->restore();
if ( listview->currentItem() == this && column == 0 &&
!listview->hasFocus() && !listview->viewport()->hasFocus() )
- paintFocus( p, cg, QRect( 0, 0, width, height() ) );
+ paintFocus( p, cg, TQRect( 0, 0, width, height() ) );
}
-void PropertyItem::paintBranches( QPainter * p, const QColorGroup & cg,
+void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg,
int w, int y, int h )
{
- QColorGroup g( cg );
- g.setColor( QColorGroup::Base, backgroundColor() );
- QListViewItem::paintBranches( p, g, w, y, h );
+ TQColorGroup g( cg );
+ g.setColor( TQColorGroup::Base, backgroundColor() );
+ TQListViewItem::paintBranches( p, g, w, y, h );
}
-void PropertyItem::paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r )
+void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r )
{
p->save();
- QApplication::style().drawPrimitive(QStyle::PE_Panel, p, r, cg,
- QStyle::Style_Sunken, QStyleOption(1,1) );
+ TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg,
+ TQStyle::Style_Sunken, TQStyleOption(1,1) );
p->restore();
}
@@ -365,12 +365,12 @@ void PropertyItem::hideEditor()
subclasses to init the editor
*/
-void PropertyItem::setValue( const QVariant &v )
+void PropertyItem::setValue( const TQVariant &v )
{
val = v;
}
-QVariant PropertyItem::value() const
+TQVariant PropertyItem::value() const
{
return val;
}
@@ -394,7 +394,7 @@ void PropertyItem::setChanged( bool b, bool updateDb )
updateResetButtonState();
}
-QString PropertyItem::name() const
+TQString PropertyItem::name() const
{
return propertyName;
}
@@ -405,22 +405,22 @@ void PropertyItem::createResetButton()
resetButton->parentWidget()->lower();
return;
}
- const QPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance());
- QHBox *hbox = new QHBox( listview->viewport() );
- hbox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ TQHBox *hbox = new TQHBox( listview->viewport() );
+ hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
hbox->setLineWidth( 1 );
- resetButton = new QPushButton( hbox );
+ resetButton = new TQPushButton( hbox );
setupStyle( resetButton );
resetButton->setPixmap( DesignerResetPix );
resetButton->setFixedWidth( resetButton->sizeHint().width() );
hbox->layout()->setAlignment( Qt::AlignRight );
listview->addChild( hbox );
hbox->hide();
- QObject::connect( resetButton, SIGNAL( clicked() ),
- listview, SLOT( resetProperty() ) );
- QToolTip::add( resetButton, i18n( "Reset the property to its default value" ) );
- QWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) );
+ TQObject::connect( resetButton, TQT_SIGNAL( clicked() ),
+ listview, TQT_SLOT( resetProperty() ) );
+ TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) );
+ TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) );
updateResetButtonState();
}
@@ -438,10 +438,10 @@ void PropertyItem::updateResetButtonState()
call it from showEditor())
*/
-void PropertyItem::placeEditor( QWidget *w )
+void PropertyItem::placeEditor( TQWidget *w )
{
createResetButton();
- QRect r = listview->itemRect( this );
+ TQRect r = listview->itemRect( this );
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
#if defined(Q_WS_WIN)
@@ -452,7 +452,7 @@ void PropertyItem::placeEditor( QWidget *w )
r.setX( listview->header()->sectionPos( 1 ) );
r.setWidth( listview->header()->sectionSize( 1 ) - 1 );
r.setWidth( r.width() - resetButton->width() - 2 );
- r = QRect( listview->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
listview->moveChild( w, r.x(), r.y() );
resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() );
@@ -519,13 +519,13 @@ bool PropertyItem::hasCustomContents() const
\sa hasCustomContents()
*/
-void PropertyItem::drawCustomContents( QPainter *, const QRect & )
+void PropertyItem::drawCustomContents( TQPainter *, const TQRect & )
{
}
-QString PropertyItem::currentItem() const
+TQString PropertyItem::currentItem() const
{
- return QString::null;
+ return TQString::null;
}
int PropertyItem::currentIntItem() const
@@ -533,7 +533,7 @@ int PropertyItem::currentIntItem() const
return -1;
}
-void PropertyItem::setCurrentItem( const QString & )
+void PropertyItem::setCurrentItem( const TQString & )
{
}
@@ -546,12 +546,12 @@ int PropertyItem::currentIntItemFromObject() const
return -1;
}
-QString PropertyItem::currentItemFromObject() const
+TQString PropertyItem::currentItemFromObject() const
{
- return QString::null;
+ return TQString::null;
}
-void PropertyItem::setFocus( QWidget *w )
+void PropertyItem::setFocus( TQWidget *w )
{
if ( !qApp->focusWidget() ||
listview->propertyEditor()->formWindow() &&
@@ -560,18 +560,18 @@ void PropertyItem::setFocus( QWidget *w )
w->setFocus();
}
-void PropertyItem::setText( int col, const QString &t )
+void PropertyItem::setText( int col, const TQString &t )
{
- QString txt( t );
+ TQString txt( t );
if ( col == 1 )
txt = txt.replace( "\n", " " );
- QListViewItem::setText( col, txt );
+ TQListViewItem::setText( col, txt );
}
// --------------------------------------------------------------
PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool comment, bool multiLine, bool ascii, bool a )
+ const TQString &propName, bool comment, bool multiLine, bool ascii, bool a )
: PropertyItem( l, after, prop, propName ), withComment( comment ),
hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a )
{
@@ -579,30 +579,30 @@ PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, Proper
box = 0;
}
-QLineEdit *PropertyTextItem::lined()
+TQLineEdit *PropertyTextItem::lined()
{
if ( lin )
return lin;
if ( hasMultiLines ) {
- box = new QHBox( listview->viewport() );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box = new TQHBox( listview->viewport() );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
box->hide();
}
lin = 0;
if ( hasMultiLines )
- lin = new QLineEdit( box );
+ lin = new TQLineEdit( box );
else
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" ) {
- lin->setValidator( new AsciiValidator( QString(":"), lin, "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) );
if ( listview->propertyEditor()->formWindow()->isFake() )
lin->setEnabled( FALSE );
} else {
- lin->setValidator( new AsciiValidator( QString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
+ lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
@@ -611,30 +611,30 @@ QLineEdit *PropertyTextItem::lined()
} if ( !hasMultiLines ) {
lin->hide();
} else {
- button = new QPushButton( "...", box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getText() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getText() ) );
lin->setFrame( FALSE );
}
- connect( lin, SIGNAL( returnPressed() ),
- this, SLOT( setValue() ) );
- connect( lin, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( setValue() ) );
if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" )
- connect( lin, SIGNAL( returnPressed() ),
+ connect( lin, TQT_SIGNAL( returnPressed() ),
listview->propertyEditor()->formWindow()->commandHistory(),
- SLOT( checkCompressedCommand() ) );
+ TQT_SLOT( checkCompressedCommand() ) );
lin->installEventFilter( listview );
return lin;
}
PropertyTextItem::~PropertyTextItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
- delete (QHBox*)box;
+ delete (TQHBox*)box;
box = 0;
}
@@ -669,7 +669,7 @@ void PropertyTextItem::showEditor()
lined()->blockSignals( FALSE );
}
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -709,7 +709,7 @@ void PropertyTextItem::initChildren()
void PropertyTextItem::hideEditor()
{
PropertyItem::hideEditor();
- QWidget* w;
+ TQWidget* w;
if ( hasMultiLines )
w = box;
else
@@ -718,7 +718,7 @@ void PropertyTextItem::hideEditor()
w->hide();
}
-void PropertyTextItem::setValue( const QVariant &v )
+void PropertyTextItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -739,9 +739,9 @@ void PropertyTextItem::setValue( const QVariant &v )
void PropertyTextItem::setValue()
{
setText( 1, lined()->text() );
- QVariant v;
+ TQVariant v;
if ( accel ) {
- v = QVariant( QKeySequence( lined()->text() ) );
+ v = TQVariant( TQKeySequence( lined()->text() ) );
if ( v.toString().isNull() )
return; // not yet valid input
} else {
@@ -753,10 +753,10 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- bool richText = !::qt_cast<QButton*>(listview->propertyEditor()->widget()) ||
+ bool richText = !::qt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" );
bool doWrap = FALSE;
- QString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
+ TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
if ( !txt.isEmpty() ) {
setText( 1, txt );
PropertyItem::setValue( txt );
@@ -770,30 +770,30 @@ void PropertyTextItem::getText()
// --------------------------------------------------------------
PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
}
-QLineEdit *PropertyDoubleItem::lined()
+TQLineEdit *PropertyDoubleItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
- lin->setValidator( new QDoubleValidator( lin, "double_validator" ) );
+ lin = new TQLineEdit( listview->viewport() );
+ lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
- connect( lin, SIGNAL( returnPressed() ),
- this, SLOT( setValue() ) );
- connect( lin, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( setValue() ) );
lin->installEventFilter( listview );
return lin;
}
PropertyDoubleItem::~PropertyDoubleItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
}
@@ -802,10 +802,10 @@ void PropertyDoubleItem::showEditor()
PropertyItem::showEditor();
if ( !lin ) {
lined()->blockSignals( TRUE );
- lined()->setText( QString::number( value().toDouble() ) );
+ lined()->setText( TQString::number( value().toDouble() ) );
lined()->blockSignals( FALSE );
}
- QWidget* w = lined();
+ TQWidget* w = lined();
placeEditor( w );
if ( !w->isVisible() || !lined()->hasFocus() ) {
@@ -818,11 +818,11 @@ void PropertyDoubleItem::showEditor()
void PropertyDoubleItem::hideEditor()
{
PropertyItem::hideEditor();
- QWidget* w = lined();
+ TQWidget* w = lined();
w->hide();
}
-void PropertyDoubleItem::setValue( const QVariant &v )
+void PropertyDoubleItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
@@ -830,19 +830,19 @@ void PropertyDoubleItem::setValue( const QVariant &v )
lined()->blockSignals( TRUE );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
- lined()->setText( QString::number( v.toDouble() ) );
+ lined()->setText( TQString::number( v.toDouble() ) );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
lined()->blockSignals( FALSE );
}
- setText( 1, QString::number( v.toDouble() ) );
+ setText( 1, TQString::number( v.toDouble() ) );
PropertyItem::setValue( v );
}
void PropertyDoubleItem::setValue()
{
setText( 1, lined()->text() );
- QVariant v = lined()->text().toDouble();
+ TQVariant v = lined()->text().toDouble();
PropertyItem::setValue( v );
notifyValueChange();
}
@@ -850,7 +850,7 @@ void PropertyDoubleItem::setValue()
// --------------------------------------------------------------
-PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -861,12 +861,12 @@ QDateEdit *PropertyDateItem::lined()
if ( lin )
return lin;
lin = new QDateEdit( listview->viewport() );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
- connect( lin, SIGNAL( valueChanged( const QDate & ) ),
- this, SLOT( setValue() ) );
+ connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ),
+ this, TQT_SLOT( setValue() ) );
return lin;
}
@@ -898,7 +898,7 @@ void PropertyDateItem::hideEditor()
lin->hide();
}
-void PropertyDateItem::setValue( const QVariant &v )
+void PropertyDateItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -917,7 +917,7 @@ void PropertyDateItem::setValue( const QVariant &v )
void PropertyDateItem::setValue()
{
setText( 1, lined()->date().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->date();
PropertyItem::setValue( v );
notifyValueChange();
@@ -925,7 +925,7 @@ void PropertyDateItem::setValue()
// --------------------------------------------------------------
-PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -936,10 +936,10 @@ QTimeEdit *PropertyTimeItem::lined()
if ( lin )
return lin;
lin = new QTimeEdit( listview->viewport() );
- connect( lin, SIGNAL( valueChanged( const QTime & ) ),
- this, SLOT( setValue() ) );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
+ this, TQT_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
return lin;
@@ -973,7 +973,7 @@ void PropertyTimeItem::hideEditor()
lin->hide();
}
-void PropertyTimeItem::setValue( const QVariant &v )
+void PropertyTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -992,7 +992,7 @@ void PropertyTimeItem::setValue( const QVariant &v )
void PropertyTimeItem::setValue()
{
setText( 1, lined()->time().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->time();
PropertyItem::setValue( v );
notifyValueChange();
@@ -1000,7 +1000,7 @@ void PropertyTimeItem::setValue()
// --------------------------------------------------------------
-PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
@@ -1011,10 +1011,10 @@ QDateTimeEdit *PropertyDateTimeItem::lined()
if ( lin )
return lin;
lin = new QDateTimeEdit( listview->viewport() );
- connect( lin, SIGNAL( valueChanged( const QDateTime & ) ),
- this, SLOT( setValue() ) );
- QObjectList *l = lin->queryList( "QLineEdit" );
- for ( QObject *o = l->first(); o; o = l->next() )
+ connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
+ this, TQT_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
return lin;
@@ -1048,7 +1048,7 @@ void PropertyDateTimeItem::hideEditor()
lin->hide();
}
-void PropertyDateTimeItem::setValue( const QVariant &v )
+void PropertyDateTimeItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1067,7 +1067,7 @@ void PropertyDateTimeItem::setValue( const QVariant &v )
void PropertyDateTimeItem::setValue()
{
setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) );
- QVariant v;
+ TQVariant v;
v = lined()->dateTime();
PropertyItem::setValue( v );
notifyValueChange();
@@ -1075,36 +1075,36 @@ void PropertyDateTimeItem::setValue()
// --------------------------------------------------------------
-PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
comb = 0;
}
-QComboBox *PropertyBoolItem::combo()
+TQComboBox *PropertyBoolItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( FALSE, listview->viewport() );
comb->hide();
comb->insertItem( i18n( "False" ) );
comb->insertItem( i18n( "True" ) );
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
PropertyBoolItem::~PropertyBoolItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
comb = 0;
}
void PropertyBoolItem::toggle()
{
bool b = value().toBool();
- setValue( QVariant( !b, 0 ) );
+ setValue( TQVariant( !b, 0 ) );
setValue();
}
@@ -1132,7 +1132,7 @@ void PropertyBoolItem::hideEditor()
combo()->hide();
}
-void PropertyBoolItem::setValue( const QVariant &v )
+void PropertyBoolItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1146,7 +1146,7 @@ void PropertyBoolItem::setValue( const QVariant &v )
combo()->setCurrentItem( 0 );
combo()->blockSignals( FALSE );
}
- QString tmp = i18n( "True" );
+ TQString tmp = i18n( "True" );
if ( !v.toBool() )
tmp = i18n( "False" );
setText( 1, tmp );
@@ -1159,41 +1159,41 @@ void PropertyBoolItem::setValue()
return;
setText( 1, combo()->currentText() );
bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
- PropertyItem::setValue( QVariant( b, 0 ) );
+ PropertyItem::setValue( TQVariant( b, 0 ) );
notifyValueChange();
}
// --------------------------------------------------------------
PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool s )
+ const TQString &propName, bool s )
: PropertyItem( l, after, prop, propName ), signedValue( s )
{
spinBx = 0;
}
-QSpinBox *PropertyIntItem::spinBox()
+TQSpinBox *PropertyIntItem::spinBox()
{
if ( spinBx )
return spinBx;
if ( signedValue )
- spinBx = new QSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() );
else
- spinBx = new QSpinBox( 0, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() );
spinBx->hide();
spinBx->installEventFilter( listview );
- QObjectList *ol = spinBx->queryList( "QLineEdit" );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, SIGNAL( valueChanged( int ) ),
- this, SLOT( setValue() ) );
+ connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( setValue() ) );
return spinBx;
}
PropertyIntItem::~PropertyIntItem()
{
- delete (QSpinBox*)spinBx;
+ delete (TQSpinBox*)spinBx;
spinBx = 0;
}
@@ -1221,7 +1221,7 @@ void PropertyIntItem::hideEditor()
spinBox()->hide();
}
-void PropertyIntItem::setValue( const QVariant &v )
+void PropertyIntItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -1237,9 +1237,9 @@ void PropertyIntItem::setValue( const QVariant &v )
}
if ( signedValue )
- setText( 1, QString::number( v.toInt() ) );
+ setText( 1, TQString::number( v.toInt() ) );
else
- setText( 1, QString::number( v.toUInt() ) );
+ setText( 1, TQString::number( v.toUInt() ) );
PropertyItem::setValue( v );
}
@@ -1247,7 +1247,7 @@ void PropertyIntItem::setValue()
{
if ( !spinBx )
return;
- setText( 1, QString::number( spinBox()->value() ) );
+ setText( 1, TQString::number( spinBox()->value() ) );
if ( signedValue )
PropertyItem::setValue( spinBox()->value() );
else
@@ -1258,7 +1258,7 @@ void PropertyIntItem::setValue()
// --------------------------------------------------------------
PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
spinBx = 0;
@@ -1266,24 +1266,24 @@ PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, Pr
PropertyLayoutItem::~PropertyLayoutItem()
{
- delete (QSpinBox*)spinBx;
+ delete (TQSpinBox*)spinBx;
spinBx = 0;
}
-QSpinBox* PropertyLayoutItem::spinBox()
+TQSpinBox* PropertyLayoutItem::spinBox()
{
if ( spinBx )
return spinBx;
- spinBx = new QSpinBox( -1, INT_MAX, 1, listview->viewport() );
+ spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() );
spinBx->setSpecialValueText( i18n( "default" ) );
spinBx->hide();
spinBx->installEventFilter( listview );
- QObjectList *ol = spinBx->queryList( "QLineEdit" );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, SIGNAL( valueChanged( int ) ),
- this, SLOT( setValue() ) );
+ connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( setValue() ) );
return spinBx;
}
@@ -1308,14 +1308,14 @@ void PropertyLayoutItem::hideEditor()
spinBox()->hide();
}
-void PropertyLayoutItem::setValue( const QVariant &v )
+void PropertyLayoutItem::setValue( const TQVariant &v )
{
if ( spinBx ) {
spinBox()->blockSignals( TRUE );
spinBox()->setValue( v.toInt() );
spinBox()->blockSignals( FALSE );
}
- QString s = v.toString();
+ TQString s = v.toString();
if ( v.toInt() == -1 )
s = spinBox()->specialValueText();
setText( 1, s );
@@ -1334,24 +1334,24 @@ void PropertyLayoutItem::setValue()
// --------------------------------------------------------------
PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool e )
+ const TQString &propName, bool e )
: PropertyItem( l, after, prop, propName ), editable( e )
{
comb = 0;
oldInt = -1;
}
-QComboBox *PropertyListItem::combo()
+TQComboBox *PropertyListItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( editable, listview->viewport() );
+ comb = new TQComboBox( editable, listview->viewport() );
comb->hide();
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
if ( editable ) {
- QObjectList *ol = comb->queryList( "QLineEdit" );
+ TQObjectList *ol = comb->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
@@ -1361,7 +1361,7 @@ QComboBox *PropertyListItem::combo()
PropertyListItem::~PropertyListItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
comb = 0;
}
@@ -1387,7 +1387,7 @@ void PropertyListItem::hideEditor()
combo()->hide();
}
-void PropertyListItem::setValue( const QVariant &v )
+void PropertyListItem::setValue( const TQVariant &v )
{
if ( comb ) {
combo()->blockSignals( TRUE );
@@ -1404,7 +1404,7 @@ void PropertyListItem::setValue()
if ( !comb )
return;
setText( 1, combo()->currentText() );
- QStringList lst;
+ TQStringList lst;
for ( uint i = 0; i < combo()->listBox()->count(); ++i )
lst << combo()->listBox()->item( i )->text();
PropertyItem::setValue( lst );
@@ -1413,12 +1413,12 @@ void PropertyListItem::setValue()
oldString = currentItem();
}
-QString PropertyListItem::currentItem() const
+TQString PropertyListItem::currentItem() const
{
return ( (PropertyListItem*)this )->combo()->currentText();
}
-void PropertyListItem::setCurrentItem( const QString &s )
+void PropertyListItem::setCurrentItem( const TQString &s )
{
if ( comb && currentItem().lower() == s.lower() )
return;
@@ -1440,7 +1440,7 @@ void PropertyListItem::setCurrentItem( const QString &s )
oldString = currentItem();
}
-void PropertyListItem::addItem( const QString &s )
+void PropertyListItem::addItem( const TQString &s )
{
combo()->insertItem( s );
}
@@ -1472,7 +1472,7 @@ int PropertyListItem::currentIntItemFromObject() const
return oldInt;
}
-QString PropertyListItem::currentItemFromObject() const
+TQString PropertyListItem::currentItemFromObject() const
{
return oldString;
}
@@ -1480,18 +1480,18 @@ QString PropertyListItem::currentItemFromObject() const
// --------------------------------------------------------------
PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t )
+ const TQString &propName, Type t )
: PropertyItem( l, after, prop, propName ), typ( t )
{
lin = 0;
}
-QLineEdit *PropertyCoordItem::lined()
+TQLineEdit *PropertyCoordItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
lin->setReadOnly( TRUE );
lin->installEventFilter( listview );
lin->hide();
@@ -1546,7 +1546,7 @@ void PropertyCoordItem::initChildren()
PropertyCoordItem::~PropertyCoordItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
lin = 0;
}
@@ -1568,22 +1568,22 @@ void PropertyCoordItem::hideEditor()
lined()->hide();
}
-void PropertyCoordItem::setValue( const QVariant &v )
+void PropertyCoordItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
return;
- QString s;
+ TQString s;
if ( typ == Rect )
- s = "[ " + QString::number( v.toRect().x() ) + ", " + QString::number( v.toRect().y() ) + ", " +
- QString::number( v.toRect().width() ) + ", " + QString::number( v.toRect().height() ) + " ]";
+ s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " +
+ TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]";
else if ( typ == Point )
- s = "[ " + QString::number( v.toPoint().x() ) + ", " +
- QString::number( v.toPoint().y() ) + " ]";
+ s = "[ " + TQString::number( v.toPoint().x() ) + ", " +
+ TQString::number( v.toPoint().y() ) + " ]";
else if ( typ == Size )
- s = "[ " + QString::number( v.toSize().width() ) + ", " +
- QString::number( v.toSize().height() ) + " ]";
+ s = "[ " + TQString::number( v.toSize().width() ) + ", " +
+ TQString::number( v.toSize().height() ) + " ]";
setText( 1, s );
if ( lin )
lined()->setText( s );
@@ -1598,7 +1598,7 @@ bool PropertyCoordItem::hasSubItems() const
void PropertyCoordItem::childValueChanged( PropertyItem *child )
{
if ( typ == Rect ) {
- QRect r = value().toRect();
+ TQRect r = value().toRect();
if ( child->name() == i18n( "x" ) )
r.moveBy( -r.x() + child->value().toInt(), 0 );
else if ( child->name() == i18n( "y" ) )
@@ -1609,14 +1609,14 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child )
r.setHeight( child->value().toInt() );
setValue( r );
} else if ( typ == Point ) {
- QPoint r = value().toPoint();
+ TQPoint r = value().toPoint();
if ( child->name() == i18n( "x" ) )
r.setX( child->value().toInt() );
else if ( child->name() == i18n( "y" ) )
r.setY( child->value().toInt() );
setValue( r );
} else if ( typ == Size ) {
- QSize r = value().toSize();
+ TQSize r = value().toSize();
if ( child->name() == i18n( "width" ) )
r.setWidth( child->value().toInt() );
else if ( child->name() == i18n( "height" ) )
@@ -1629,28 +1629,28 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child )
// --------------------------------------------------------------
PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, Type t )
+ const TQString &propName, Type t )
: PropertyItem( l, after, prop, propName ), type( t )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- pixPrev = new QLabel( box );
- pixPrev->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Minimum ) );
- pixPrev->setBackgroundColor( pixPrev->colorGroup().color( QColorGroup::Base ) );
- button = new QPushButton( "...", box );
+ pixPrev = new TQLabel( box );
+ pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- pixPrev->setFrameStyle( QFrame::NoFrame );
+ pixPrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getPixmap() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getPixmap() ) );
}
PropertyPixmapItem::~PropertyPixmapItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyPixmapItem::showEditor()
@@ -1669,9 +1669,9 @@ void PropertyPixmapItem::hideEditor()
box->hide();
}
-void PropertyPixmapItem::setValue( const QVariant &v )
+void PropertyPixmapItem::setValue( const TQVariant &v )
{
- QString s;
+ TQString s;
if ( type == Pixmap )
pixPrev->setPixmap( v.toPixmap() );
else if ( type == IconSet )
@@ -1684,12 +1684,12 @@ void PropertyPixmapItem::setValue( const QVariant &v )
void PropertyPixmapItem::getPixmap()
{
- QPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() );
+ TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() );
if ( !pix.isNull() ) {
if ( type == Pixmap )
setValue( pix );
else if ( type == IconSet )
- setValue( QIconSet( pix ) );
+ setValue( TQIconSet( pix ) );
else
setValue( pix.convertToImage() );
@@ -1702,9 +1702,9 @@ bool PropertyPixmapItem::hasCustomContents() const
return TRUE;
}
-void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
- QPixmap pix;
+ TQPixmap pix;
if ( type == Pixmap )
pix = value().toPixmap();
else if ( type == IconSet )
@@ -1714,7 +1714,7 @@ void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
if ( !pix.isNull() ) {
p->save();
- p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
(int)(p->worldMatrix().dy() + r.y()) ),
r.size() ) );
p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix );
@@ -1726,29 +1726,29 @@ void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool children )
+ const TQString &propName, bool children )
: PropertyItem( l, after, prop, propName ), withChildren( children )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- colorPrev = new QFrame( box );
- button = new QPushButton( "...", box );
+ colorPrev = new TQFrame( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- colorPrev->setFrameStyle( QFrame::Plain | QFrame::Box );
+ colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box );
colorPrev->setLineWidth( 2 );
- QPalette pal = colorPrev->palette();
- QColorGroup cg = pal.active();
- cg.setColor( QColorGroup::Foreground, cg.color( QColorGroup::Base ) );
+ TQPalette pal = colorPrev->palette();
+ TQColorGroup cg = pal.active();
+ cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) );
pal.setActive( cg );
pal.setInactive( cg );
pal.setDisabled( cg );
colorPrev->setPalette( pal );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getColor() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getColor() ) );
}
void PropertyColorItem::createChildren()
@@ -1778,7 +1778,7 @@ void PropertyColorItem::initChildren()
PropertyColorItem::~PropertyColorItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyColorItem::showEditor()
@@ -1797,13 +1797,13 @@ void PropertyColorItem::hideEditor()
box->hide();
}
-void PropertyColorItem::setValue( const QVariant &v )
+void PropertyColorItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
return;
- QString s;
+ TQString s;
setText( 1, v.toColor().name() );
colorPrev->setBackgroundColor( v.toColor() );
PropertyItem::setValue( v );
@@ -1816,7 +1816,7 @@ bool PropertyColorItem::hasSubItems() const
void PropertyColorItem::childValueChanged( PropertyItem *child )
{
- QColor c( val.toColor() );
+ TQColor c( val.toColor() );
if ( child->name() == i18n( "Red" ) )
c.setRgb( child->value().toInt(), c.green(), c.blue() );
else if ( child->name() == i18n( "Green" ) )
@@ -1829,7 +1829,7 @@ void PropertyColorItem::childValueChanged( PropertyItem *child )
void PropertyColorItem::getColor()
{
- QColor c = QColorDialog::getColor( val.asColor(), listview );
+ TQColor c = QColorDialog::getColor( val.asColor(), listview );
if ( c.isValid() ) {
setValue( c );
notifyValueChange();
@@ -1841,10 +1841,10 @@ bool PropertyColorItem::hasCustomContents() const
return TRUE;
}
-void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
p->save();
- p->setPen( QPen( black, 1 ) );
+ p->setPen( TQPen( black, 1 ) );
p->setBrush( val.toColor() );
p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 );
p->restore();
@@ -1852,16 +1852,16 @@ void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
-PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName )
+PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- lined = new QLineEdit( box );
- button = new QPushButton( "...", box );
+ lined = new TQLineEdit( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( FALSE );
lined->setReadOnly( TRUE );
@@ -1869,8 +1869,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
box->installEventFilter( listview );
lined->installEventFilter( listview );
button->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getFont() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getFont() ) );
}
void PropertyFontItem::createChildren()
@@ -1901,19 +1901,19 @@ void PropertyFontItem::initChildren()
} else if ( item->name() == i18n( "Point Size" ) )
item->setValue( val.toFont().pointSize() );
else if ( item->name() == i18n( "Bold" ) )
- item->setValue( QVariant( val.toFont().bold(), 0 ) );
+ item->setValue( TQVariant( val.toFont().bold(), 0 ) );
else if ( item->name() == i18n( "Italic" ) )
- item->setValue( QVariant( val.toFont().italic(), 0 ) );
+ item->setValue( TQVariant( val.toFont().italic(), 0 ) );
else if ( item->name() == i18n( "Underline" ) )
- item->setValue( QVariant( val.toFont().underline(), 0 ) );
+ item->setValue( TQVariant( val.toFont().underline(), 0 ) );
else if ( item->name() == i18n( "Strikeout" ) )
- item->setValue( QVariant( val.toFont().strikeOut(), 0 ) );
+ item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) );
}
}
PropertyFontItem::~PropertyFontItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyFontItem::showEditor()
@@ -1932,20 +1932,20 @@ void PropertyFontItem::hideEditor()
box->hide();
}
-void PropertyFontItem::setValue( const QVariant &v )
+void PropertyFontItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- setText( 1, v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
- lined->setText( v.toFont().family() + "-" + QString::number( v.toFont().pointSize() ) );
+ setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) );
+ lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) );
PropertyItem::setValue( v );
}
void PropertyFontItem::getFont()
{
bool ok = FALSE;
- QFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
+ TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
notifyValueChange();
@@ -1959,7 +1959,7 @@ bool PropertyFontItem::hasSubItems() const
void PropertyFontItem::childValueChanged( PropertyItem *child )
{
- QFont f = val.toFont();
+ TQFont f = val.toFont();
if ( child->name() == i18n( "Family" ) )
f.setFamily( ( (PropertyListItem*)child )->currentItem() );
else if ( child->name() == i18n( "Point Size" ) )
@@ -1979,16 +1979,16 @@ void PropertyFontItem::childValueChanged( PropertyItem *child )
// --------------------------------------------------------------
PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName, bool wField )
+ const TQString &propName, bool wField )
: PropertyItem( l, after, prop, propName ), withField( wField )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- lined = new QLineEdit( box );
- button = new QPushButton( "...", box );
+ lined = new TQLineEdit( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
lined->setFrame( FALSE );
lined->setReadOnly( TRUE );
@@ -2015,18 +2015,18 @@ void PropertyDatabaseItem::initChildren()
{
#ifndef QT_NO_SQL
PropertyItem *item = 0;
- QStringList lst = value().toStringList();
- QString conn, table;
+ TQStringList lst = value().toStringList();
+ TQString conn, table;
for ( int i = 0; i < childCount(); ++i ) {
item = PropertyItem::child( i );
if ( item->name() == i18n( "Connection" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList();
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList();
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 0 )
- item->setValue( QStringList( lst[ 0 ] ) );
+ item->setValue( TQStringList( lst[ 0 ] ) );
else if ( withField )
- item->setValue( QStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
+ item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] ) );
if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
@@ -2038,13 +2038,13 @@ void PropertyDatabaseItem::initChildren()
item->setCurrentItem( 0 );
conn = item->currentItem();
} else if ( item->name() == i18n( "Table" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn );
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn );
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 1 )
- item->setValue( QStringList( lst[ 1 ] ) );
+ item->setValue( TQStringList( lst[ 1 ] ) );
else if ( withField ) {
- QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setValue( fakeLst[ 1 ] );
}
@@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren()
if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
item->setCurrentItem( lst[ 1 ] );
else if ( !isChanged() && withField ) {
- QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setCurrentItem( fakeLst[ 1 ] );
else
@@ -2061,11 +2061,11 @@ void PropertyDatabaseItem::initChildren()
item->setCurrentItem( 0 );
table = item->currentItem();
} else if ( item->name() == i18n( "Field" ) ) {
- QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table );
+ TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table );
if ( !cl.isEmpty() )
item->setValue( cl );
else if ( lst.count() > 2 )
- item->setValue( QStringList( lst[ 2 ] ) );
+ item->setValue( TQStringList( lst[ 2 ] ) );
if ( lst.count() > 2 && !lst[ 2 ].isEmpty() )
item->setCurrentItem( lst[ 2 ] );
else
@@ -2077,7 +2077,7 @@ void PropertyDatabaseItem::initChildren()
PropertyDatabaseItem::~PropertyDatabaseItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyDatabaseItem::showEditor()
@@ -2096,13 +2096,13 @@ void PropertyDatabaseItem::hideEditor()
box->hide();
}
-void PropertyDatabaseItem::setValue( const QVariant &v )
+void PropertyDatabaseItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- QStringList lst = v.toStringList();
- QString s = lst.join( "." );
+ TQStringList lst = v.toStringList();
+ TQString s = lst.join( "." );
setText( 1, s );
lined->setText( s );
PropertyItem::setValue( v );
@@ -2116,7 +2116,7 @@ bool PropertyDatabaseItem::hasSubItems() const
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
{
#ifndef QT_NO_SQL
- QStringList lst;
+ TQStringList lst;
lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
<< ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
if ( withField )
@@ -2146,17 +2146,17 @@ void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
// --------------------------------------------------------------
PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
lin = 0;
}
-QLineEdit *PropertySizePolicyItem::lined()
+TQLineEdit *PropertySizePolicyItem::lined()
{
if ( lin )
return lin;
- lin = new QLineEdit( listview->viewport() );
+ lin = new TQLineEdit( listview->viewport() );
lin->hide();
lin->setReadOnly( TRUE );
return lin;
@@ -2164,7 +2164,7 @@ QLineEdit *PropertySizePolicyItem::lined()
void PropertySizePolicyItem::createChildren()
{
- QStringList lst;
+ TQStringList lst;
lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
PropertyItem *i = this;
@@ -2183,7 +2183,7 @@ void PropertySizePolicyItem::createChildren()
void PropertySizePolicyItem::initChildren()
{
PropertyItem *item = 0;
- QSizePolicy sp = val.toSizePolicy();
+ TQSizePolicy sp = val.toSizePolicy();
for ( int i = 0; i < childCount(); ++i ) {
item = PropertyItem::child( i );
if ( item->name() == i18n( "hSizeType" ) )
@@ -2199,7 +2199,7 @@ void PropertySizePolicyItem::initChildren()
PropertySizePolicyItem::~PropertySizePolicyItem()
{
- delete (QLineEdit*)lin;
+ delete (TQLineEdit*)lin;
}
void PropertySizePolicyItem::showEditor()
@@ -2218,12 +2218,12 @@ void PropertySizePolicyItem::hideEditor()
lined()->hide();
}
-void PropertySizePolicyItem::setValue( const QVariant &v )
+void PropertySizePolicyItem::setValue( const TQVariant &v )
{
if ( value() == v )
return;
- QString s = i18n( "%1/%2/%3/%4" );
+ TQString s = i18n( "%1/%2/%3/%4" );
s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
arg( size_type_to_string( v.toSizePolicy().verData() ) ).
arg( v.toSizePolicy().horStretch() ).
@@ -2235,7 +2235,7 @@ void PropertySizePolicyItem::setValue( const QVariant &v )
void PropertySizePolicyItem::childValueChanged( PropertyItem *child )
{
- QSizePolicy sp = val.toSizePolicy();
+ TQSizePolicy sp = val.toSizePolicy();
if ( child->name() == i18n( "hSizeType" ) )
sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) );
else if ( child->name() == i18n( "vSizeType" ) )
@@ -2256,25 +2256,25 @@ bool PropertySizePolicyItem::hasSubItems() const
// --------------------------------------------------------------
PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- palettePrev = new QLabel( box );
- button = new QPushButton( "...", box );
+ palettePrev = new TQLabel( box );
+ button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- palettePrev->setFrameStyle( QFrame::NoFrame );
+ palettePrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, SIGNAL( clicked() ),
- this, SLOT( getPalette() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( getPalette() ) );
}
PropertyPaletteItem::~PropertyPaletteItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyPaletteItem::showEditor()
@@ -2293,9 +2293,9 @@ void PropertyPaletteItem::hideEditor()
box->hide();
}
-void PropertyPaletteItem::setValue( const QVariant &v )
+void PropertyPaletteItem::setValue( const TQVariant &v )
{
- QString s;
+ TQString s;
palettePrev->setPalette( v.toPalette() );
PropertyItem::setValue( v );
repaint();
@@ -2306,10 +2306,10 @@ void PropertyPaletteItem::getPalette()
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
bool ok = FALSE;
- QWidget *w = (QWidget*)listview->propertyEditor()->widget();
- if ( ::qt_cast<QScrollView*>(w) )
- w = ( (QScrollView*)w )->viewport();
- QPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
+ TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
+ if ( ::qt_cast<TQScrollView*>(w) )
+ w = ( (TQScrollView*)w )->viewport();
+ TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL)
w->backgroundMode(), listview->topLevelWidget(),
#else
@@ -2327,19 +2327,19 @@ bool PropertyPaletteItem::hasCustomContents() const
return TRUE;
}
-void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r )
+void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
- QPalette pal( value().toPalette() );
+ TQPalette pal( value().toPalette() );
p->save();
- p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()),
+ p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
(int)(p->worldMatrix().dy() + r.y()) ),
r.size() ) );
- QRect r2( r );
+ TQRect r2( r );
r2.setX( r2.x() + 2 );
r2.setY( r2.y() + 2 );
r2.setWidth( r2.width() - 3 );
r2.setHeight( r2.height() - 3 );
- p->setPen( QPen( black, 1 ) );
+ p->setPen( TQPen( black, 1 ) );
p->setBrush( pal.active().background() );
p->drawRect( r2 );
p->restore();
@@ -2348,62 +2348,62 @@ void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r )
// --------------------------------------------------------------
PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
comb = 0;
}
-QComboBox *PropertyCursorItem::combo()
+TQComboBox *PropertyCursorItem::combo()
{
if ( comb )
return comb;
- comb = new QComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( FALSE, listview->viewport() );
comb->hide();
- QBitmap cur;
-
- const QPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance());
- const QPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance());
- const QPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance());
- const QPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance());
- const QPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance());
- const QPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance());
- const QPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance());
- const QPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance());
- const QPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance());
- const QPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance());
-
- comb->insertItem( ArrowPix, i18n("Arrow"), QObject::ArrowCursor);
- comb->insertItem( UpArrowPix, i18n("Up-Arrow"), QObject::UpArrowCursor );
- comb->insertItem( CrossPix, i18n("Cross"), QObject::CrossCursor );
- comb->insertItem( WaitPix, i18n("Waiting"), QObject::WaitCursor );
- comb->insertItem( IBeamPix, i18n("iBeam"), QObject::IbeamCursor );
- comb->insertItem( SizeVPix, i18n("Size Vertical"), QObject::SizeVerCursor );
- comb->insertItem( SizeHPix, i18n("Size Horizontal"), QObject::SizeHorCursor );
- comb->insertItem( SizeFPix, i18n("Size Slash"), QObject::SizeBDiagCursor );
- comb->insertItem( SizeBPix, i18n("Size Backslash"), QObject::SizeFDiagCursor );
- comb->insertItem( SizeAllPix, i18n("Size All"), QObject::SizeAllCursor );
- cur = QBitmap( 25, 25, 1 );
+ TQBitmap cur;
+
+ const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance());
+
+ comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor);
+ comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor );
+ comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor );
+ comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor );
+ comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor );
+ comb->insertItem( SizeVPix, i18n("Size Vertical"), TQObject::SizeVerCursor );
+ comb->insertItem( SizeHPix, i18n("Size Horizontal"), TQObject::SizeHorCursor );
+ comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor );
+ comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor );
+ comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor );
+ cur = TQBitmap( 25, 25, 1 );
cur.setMask( cur );
- comb->insertItem( cur, i18n("Blank"), QObject::BlankCursor );
- comb->insertItem( VSplitPix, i18n("Split Vertical"), QObject::SplitVCursor );
- comb->insertItem( HSplitPix, i18n("Split Horizontal"), QObject::SplitHCursor );
- comb->insertItem( HandPix, i18n("Pointing Hand"), QObject::PointingHandCursor );
- comb->insertItem( NoPix, i18n("Forbidden"), QObject::ForbiddenCursor );
-
- connect( comb, SIGNAL( activated( int ) ),
- this, SLOT( setValue() ) );
+ comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor );
+ comb->insertItem( VSplitPix, i18n("Split Vertical"), TQObject::SplitVCursor );
+ comb->insertItem( HSplitPix, i18n("Split Horizontal"), TQObject::SplitHCursor );
+ comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor );
+ comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor );
+
+ connect( comb, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
PropertyCursorItem::~PropertyCursorItem()
{
- delete (QComboBox*)comb;
+ delete (TQComboBox*)comb;
}
void PropertyCursorItem::showEditor()
@@ -2427,7 +2427,7 @@ void PropertyCursorItem::hideEditor()
combo()->hide();
}
-void PropertyCursorItem::setValue( const QVariant &v )
+void PropertyCursorItem::setValue( const TQVariant &v )
{
if ( ( !hasSubItems() || !isOpen() )
&& value() == v )
@@ -2444,10 +2444,10 @@ void PropertyCursorItem::setValue()
{
if ( !comb )
return;
- if ( QVariant( QCursor( combo()->currentItem() ) ) == val )
+ if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val )
return;
setText( 1, combo()->currentText() );
- PropertyItem::setValue( QCursor( combo()->currentItem() ) );
+ PropertyItem::setValue( TQCursor( combo()->currentItem() ) );
notifyValueChange();
}
@@ -2456,21 +2456,21 @@ void PropertyCursorItem::setValue()
PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l,
PropertyItem *after,
PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName ),
k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE )
{
- box = new QHBox( listview->viewport() );
+ box = new TQHBox( listview->viewport() );
box->hide();
- sequence = new QLineEdit( box );
- connect( sequence, SIGNAL(textChanged( const QString & )),
- this, SLOT(setValue()) );
+ sequence = new TQLineEdit( box );
+ connect( sequence, TQT_SIGNAL(textChanged( const TQString & )),
+ this, TQT_SLOT(setValue()) );
sequence->installEventFilter( this );
}
PropertyKeysequenceItem::~PropertyKeysequenceItem()
{
- delete (QHBox*)box;
+ delete (TQHBox*)box;
}
void PropertyKeysequenceItem::showEditor()
@@ -2489,41 +2489,41 @@ void PropertyKeysequenceItem::hideEditor()
box->hide();
}
-bool PropertyKeysequenceItem::eventFilter( QObject *o, QEvent *e )
+bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e )
{
Q_UNUSED( o );
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = (QKeyEvent *)e;
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = (TQKeyEvent *)e;
if ( !mouseEnter &&
- (k->key() == QObject::Key_Up ||
- k->key() == QObject::Key_Down) )
+ (k->key() == TQObject::Key_Up ||
+ k->key() == TQObject::Key_Down) )
return FALSE;
handleKeyEvent( k );
return TRUE;
- } else if ( (e->type() == QEvent::FocusIn) ||
- (e->type() == QEvent::MouseButtonPress) ) {
+ } else if ( (e->type() == TQEvent::FocusIn) ||
+ (e->type() == TQEvent::MouseButtonPress) ) {
mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) ||
- (e->type() == QEvent::MouseButtonPress);
+ (e->type() == TQEvent::MouseButtonPress);
return TRUE;
}
// Lets eat accelerators now..
- if ( e->type() == QEvent::Accel ||
- e->type() == QEvent::AccelOverride ||
- e->type() == QEvent::KeyRelease )
+ if ( e->type() == TQEvent::Accel ||
+ e->type() == TQEvent::AccelOverride ||
+ e->type() == TQEvent::KeyRelease )
return TRUE;
return FALSE;
}
-void PropertyKeysequenceItem::handleKeyEvent( QKeyEvent *e )
+void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e )
{
int nextKey = e->key();
if ( num > 3 ||
- nextKey == QObject::Key_Control ||
- nextKey == QObject::Key_Shift ||
- nextKey == QObject::Key_Meta ||
- nextKey == QObject::Key_Alt )
+ nextKey == TQObject::Key_Control ||
+ nextKey == TQObject::Key_Shift ||
+ nextKey == TQObject::Key_Meta ||
+ nextKey == TQObject::Key_Alt )
return;
nextKey |= translateModifiers( e->state() );
@@ -2544,28 +2544,28 @@ void PropertyKeysequenceItem::handleKeyEvent( QKeyEvent *e )
break;
}
num++;
- QKeySequence ks( k1, k2, k3, k4 );
+ TQKeySequence ks( k1, k2, k3, k4 );
sequence->setText( ks );
}
int PropertyKeysequenceItem::translateModifiers( int state )
{
int result = 0;
- if ( state & QObject::ShiftButton )
- result |= QObject::SHIFT;
- if ( state & QObject::ControlButton )
- result |= QObject::CTRL;
- if ( state & QObject::MetaButton )
- result |= QObject::META;
- if ( state & QObject::AltButton )
- result |= QObject::ALT;
+ if ( state & TQObject::ShiftButton )
+ result |= TQObject::SHIFT;
+ if ( state & TQObject::ControlButton )
+ result |= TQObject::CTRL;
+ if ( state & TQObject::MetaButton )
+ result |= TQObject::META;
+ if ( state & TQObject::AltButton )
+ result |= TQObject::ALT;
return result;
}
void PropertyKeysequenceItem::setValue()
{
- QVariant v;
- v = QVariant( QKeySequence(sequence->text()) );
+ TQVariant v;
+ v = TQVariant( TQKeySequence(sequence->text()) );
if ( v.toString().isNull() )
return;
setText( 1, sequence->text() );
@@ -2575,9 +2575,9 @@ void PropertyKeysequenceItem::setValue()
setChanged( TRUE );
}
-void PropertyKeysequenceItem::setValue( const QVariant &v )
+void PropertyKeysequenceItem::setValue( const TQVariant &v )
{
- QKeySequence ks = v.toKeySequence();
+ TQKeySequence ks = v.toKeySequence();
if ( sequence ) {
sequence->setText( ks );
}
@@ -2592,13 +2592,13 @@ void PropertyKeysequenceItem::setValue( const QVariant &v )
// --------------------------------------------------------------
-EnumPopup::EnumPopup( QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f )
+EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f )
{
setLineWidth( 1 );
setFrameStyle( Panel | Plain );
setPaletteBackgroundColor( Qt::white );
- popLayout = new QVBoxLayout( this, 3 );
+ popLayout = new TQVBoxLayout( this, 3 );
checkBoxList.setAutoDelete( TRUE );
}
@@ -2606,16 +2606,16 @@ EnumPopup::~EnumPopup()
{
}
-void EnumPopup::insertEnums( QValueList<EnumItem> lst )
+void EnumPopup::insertEnums( TQValueList<EnumItem> lst )
{
while ( checkBoxList.count() )
checkBoxList.removeFirst();
itemList = lst;
- QCheckBox *cb;
- QValueListConstIterator<EnumItem> it = itemList.begin();
+ TQCheckBox *cb;
+ TQValueListConstIterator<EnumItem> it = itemList.begin();
for ( ; it != itemList.end(); ++it ) {
- cb = new QCheckBox( this );
+ cb = new TQCheckBox( this );
cb->setText( (*it).key );
cb->setChecked( (*it).selected );
if ( it == itemList.begin() )
@@ -2626,7 +2626,7 @@ void EnumPopup::insertEnums( QValueList<EnumItem> lst )
}
}
-void EnumPopup::keyPressEvent( QKeyEvent *e )
+void EnumPopup::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape ) {
hide();
@@ -2638,7 +2638,7 @@ void EnumPopup::keyPressEvent( QKeyEvent *e )
void EnumPopup::closeWidget()
{
- QPtrListIterator<QCheckBox> it( checkBoxList );
+ TQPtrListIterator<TQCheckBox> it( checkBoxList );
int i = 0;
while ( it.current() != 0 ) {
itemList[i].selected = (*it)->isChecked();
@@ -2649,17 +2649,17 @@ void EnumPopup::closeWidget()
emit closed();
}
-QValueList<EnumItem> EnumPopup::enumList() const
+TQValueList<EnumItem> EnumPopup::enumList() const
{
return itemList;
}
-EnumBox::EnumBox( QWidget *parent, const char *name )
- : QComboBox( parent, name )
+EnumBox::EnumBox( TQWidget *parent, const char *name )
+ : TQComboBox( parent, name )
{
- pop = new EnumPopup( this, "popup", QObject::WType_Popup );
- connect( pop, SIGNAL( hidden() ), this, SLOT( popupHidden() ) );
- connect( pop, SIGNAL( closed() ), this, SLOT( popupClosed() ) );
+ pop = new EnumPopup( this, "popup", TQObject::WType_Popup );
+ connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) );
+ connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) );
popupShown = FALSE;
arrowDown = FALSE;
}
@@ -2675,50 +2675,50 @@ void EnumBox::popupClosed()
emit valueChanged();
}
-void EnumBox::paintEvent( QPaintEvent * )
+void EnumBox::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- const QColorGroup & g = colorGroup();
+ TQPainter p( this );
+ const TQColorGroup & g = colorGroup();
p.setPen(g.text());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if ( width() < 5 || height() < 5 ) {
qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2,
- &g.brush( QColorGroup::Button ) );
+ &g.brush( TQColorGroup::Button ) );
return;
}
- style().drawComplexControl( QStyle::CC_ComboBox, &p, this, rect(), g,
- flags, QStyle::SC_All,
+ style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
+ flags, TQStyle::SC_All,
(arrowDown ?
- QStyle::SC_ComboBoxArrow :
- QStyle::SC_None ));
+ TQStyle::SC_ComboBoxArrow :
+ TQStyle::SC_None ));
- QRect re = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxEditField );
- re = QStyle::visualRect(re, this);
+ TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxEditField );
+ re = TQStyle::visualRect(re, this);
p.setClipRect( re );
if ( !str.isNull() ) {
p.save();
p.setFont(font());
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
int x = re.x(), y = re.y() + fm.ascent();
p.drawText( x, y, str );
p.restore();
}
}
-void EnumBox::insertEnums( QValueList<EnumItem> lst )
+void EnumBox::insertEnums( TQValueList<EnumItem> lst )
{
pop->insertEnums( lst );
}
-QValueList<EnumItem> EnumBox::enumList() const
+TQValueList<EnumItem> EnumBox::enumList() const
{
return pop->enumList();
}
@@ -2730,21 +2730,21 @@ void EnumBox::popup()
popupShown = FALSE;
return;
}
- pop->move( ((QWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
+ pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
pop->setMinimumWidth( width() );
emit aboutToShowPopup();
pop->show();
popupShown = TRUE;
}
-void EnumBox::mousePressEvent( QMouseEvent *e )
+void EnumBox::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() != LeftButton )
return;
- QRect arrowRect = style().querySubControlMetrics( QStyle::CC_ComboBox, this,
- QStyle::SC_ComboBoxArrow);
- arrowRect = QStyle::visualRect(arrowRect, this);
+ TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQStyle::SC_ComboBoxArrow);
+ arrowRect = TQStyle::visualRect(arrowRect, this);
arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
@@ -2754,14 +2754,14 @@ void EnumBox::mousePressEvent( QMouseEvent *e )
}
popup();
- QTimer::singleShot( 100, this, SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
}
-void EnumBox::keyPressEvent( QKeyEvent *e )
+void EnumBox::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Space ) {
popup();
- QTimer::singleShot( 100, this, SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
} else if ( e->key() == Key_Enter || e->key() == Key_Return ) {
popup();
}
@@ -2773,7 +2773,7 @@ void EnumBox::restoreArrow()
repaint( FALSE );
}
-void EnumBox::setText( const QString &text )
+void EnumBox::setText( const TQString &text )
{
str = text;
repaint( FALSE );
@@ -2784,14 +2784,14 @@ void EnumBox::setText( const QString &text )
PropertyEnumItem::PropertyEnumItem( PropertyList *l,
PropertyItem *after,
PropertyItem *prop,
- const QString &propName )
+ const TQString &propName )
: PropertyItem( l, after, prop, propName )
{
box = new EnumBox( listview->viewport() );
box->hide();
box->installEventFilter( listview );
- connect( box, SIGNAL( aboutToShowPopup() ), this, SLOT( insertEnums() ) );
- connect( box, SIGNAL( valueChanged() ), this, SLOT( setValue() ) );
+ connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) );
+ connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) );
}
PropertyEnumItem::~PropertyEnumItem()
@@ -2817,12 +2817,12 @@ void PropertyEnumItem::hideEditor()
box->hide();
}
-void PropertyEnumItem::setValue( const QVariant &v )
+void PropertyEnumItem::setValue( const TQVariant &v )
{
enumString = "";
enumList.clear();
- QStringList lst = v.toStringList();
- QValueListConstIterator<QString> it = lst.begin();
+ TQStringList lst = v.toStringList();
+ TQValueListConstIterator<TQString> it = lst.begin();
for ( ; it != lst.end(); ++it )
enumList.append( EnumItem( *it, FALSE ) );
enumList.first().selected = TRUE;
@@ -2841,7 +2841,7 @@ void PropertyEnumItem::setValue()
{
enumList = box->enumList();
enumString = "";
- QValueListConstIterator<EnumItem> it = enumList.begin();
+ TQValueListConstIterator<EnumItem> it = enumList.begin();
for ( ; it != enumList.end(); ++it ) {
if ( (*it).selected )
enumString += "|" + (*it).key;
@@ -2854,15 +2854,15 @@ void PropertyEnumItem::setValue()
notifyValueChange();
}
-void PropertyEnumItem::setCurrentValues( QStrList lst )
+void PropertyEnumItem::setCurrentValues( TQStrList lst )
{
enumString ="";
- QStrList::ConstIterator it = lst.begin();
- QValueList<EnumItem>::Iterator eit = enumList.begin();
+ TQStrList::ConstIterator it = lst.begin();
+ TQValueList<EnumItem>::Iterator eit = enumList.begin();
for ( ; eit != enumList.end(); ++eit ) {
(*eit).selected = FALSE;
for ( it = lst.begin(); it != lst.end(); ++it ) {
- if ( QString( *it ) == (*eit).key ) {
+ if ( TQString( *it ) == (*eit).key ) {
(*eit).selected = TRUE;
enumString += "|" + (*eit).key;
break;
@@ -2875,12 +2875,12 @@ void PropertyEnumItem::setCurrentValues( QStrList lst )
setText( 1, enumString );
}
-QString PropertyEnumItem::currentItem() const
+TQString PropertyEnumItem::currentItem() const
{
return enumString;
}
-QString PropertyEnumItem::currentItemFromObject() const
+TQString PropertyEnumItem::currentItemFromObject() const
{
return enumString;
}
@@ -2889,7 +2889,7 @@ QString PropertyEnumItem::currentItemFromObject() const
/*!
\class PropertyList propertyeditor.h
- \brief PropertyList is a QListView derived class which is used for editing widget properties
+ \brief PropertyList is a TQListView derived class which is used for editing widget properties
This class is used for widget properties. It has to be child of a
PropertyEditor.
@@ -2908,7 +2908,7 @@ QString PropertyEnumItem::currentItemFromObject() const
*/
PropertyList::PropertyList( PropertyEditor *e )
- : QListView( e ), editor( e )
+ : TQListView( e ), editor( e )
{
init_colors();
@@ -2916,21 +2916,21 @@ PropertyList::PropertyList( PropertyEditor *e )
showSorted = FALSE;
header()->setMovingEnabled( FALSE );
header()->setStretchEnabled( TRUE );
- setResizePolicy( QScrollView::Manual );
+ setResizePolicy( TQScrollView::Manual );
viewport()->setAcceptDrops( TRUE );
viewport()->installEventFilter( this );
addColumn( i18n( "Property" ) );
addColumn( i18n( "Value" ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- this, SLOT( updateEditorSize() ) );
- disconnect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( changeSortColumn( int ) ) );
- connect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( toggleSort() ) );
- connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( toggleOpen( QListViewItem * ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQT_SLOT( updateEditorSize() ) );
+ disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( changeSortColumn( int ) ) );
+ connect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( toggleSort() ) );
+ connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
@@ -2948,80 +2948,80 @@ void PropertyList::toggleSort()
editor->setup();
}
-void PropertyList::resizeEvent( QResizeEvent *e )
+void PropertyList::resizeEvent( TQResizeEvent *e )
{
- QListView::resizeEvent( e );
+ TQListView::resizeEvent( e );
if ( currentItem() )
( ( PropertyItem* )currentItem() )->showEditor();
}
-static QVariant::Type type_to_variant( const QString &s )
+static TQVariant::Type type_to_variant( const TQString &s )
{
if ( s == "Invalid " )
- return QVariant::Invalid;
+ return TQVariant::Invalid;
if ( s == "Map" )
- return QVariant::Map;
+ return TQVariant::Map;
if ( s == "List" )
- return QVariant::List;
+ return TQVariant::List;
if ( s == "String" )
- return QVariant::String;
+ return TQVariant::String;
if ( s == "StringList" )
- return QVariant::StringList;
+ return TQVariant::StringList;
if ( s == "Font" )
- return QVariant::Font;
+ return TQVariant::Font;
if ( s == "Pixmap" )
- return QVariant::Pixmap;
+ return TQVariant::Pixmap;
if ( s == "Brush" )
- return QVariant::Brush;
+ return TQVariant::Brush;
if ( s == "Rect" )
- return QVariant::Rect;
+ return TQVariant::Rect;
if ( s == "Size" )
- return QVariant::Size;
+ return TQVariant::Size;
if ( s == "Color" )
- return QVariant::Color;
+ return TQVariant::Color;
if ( s == "Palette" )
- return QVariant::Palette;
+ return TQVariant::Palette;
if ( s == "ColorGroup" )
- return QVariant::ColorGroup;
+ return TQVariant::ColorGroup;
if ( s == "IconSet" )
- return QVariant::IconSet;
+ return TQVariant::IconSet;
if ( s == "Point" )
- return QVariant::Point;
+ return TQVariant::Point;
if ( s == "Image" )
- return QVariant::Image;
+ return TQVariant::Image;
if ( s == "Int" )
- return QVariant::Int;
+ return TQVariant::Int;
if ( s == "UInt" )
- return QVariant::UInt;
+ return TQVariant::UInt;
if ( s == "Bool" )
- return QVariant::Bool;
+ return TQVariant::Bool;
if ( s == "Double" )
- return QVariant::Double;
+ return TQVariant::Double;
if ( s == "CString" )
- return QVariant::CString;
+ return TQVariant::CString;
if ( s == "PointArray" )
- return QVariant::PointArray;
+ return TQVariant::PointArray;
if ( s == "Region" )
- return QVariant::Region;
+ return TQVariant::Region;
if ( s == "Bitmap" )
- return QVariant::Bitmap;
+ return TQVariant::Bitmap;
if ( s == "Cursor" )
- return QVariant::Cursor;
+ return TQVariant::Cursor;
if ( s == "SizePolicy" )
- return QVariant::SizePolicy;
+ return TQVariant::SizePolicy;
if ( s == "Date" )
- return QVariant::Date;
+ return TQVariant::Date;
if ( s == "Time" )
- return QVariant::Time;
+ return TQVariant::Time;
if ( s == "DateTime" )
- return QVariant::DateTime;
- return QVariant::Invalid;
+ return TQVariant::DateTime;
+ return TQVariant::Invalid;
}
#ifndef QT_NO_SQL
-static bool parent_is_data_aware( QWidget *w )
+static bool parent_is_data_aware( TQWidget *w )
{
- QWidget *p = w ? w->parentWidget() : 0;
+ TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
if ( ::qt_cast<QDesignerDataBrowser*>(p) || ::qt_cast<QDesignerDataView*>(p) )
return TRUE;
@@ -3040,22 +3040,22 @@ void PropertyList::setupProperties()
if ( !editor->widget() )
return;
bool allProperties = !::qt_cast<Spacer*>(editor->widget());
- QStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
+ TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
- QMap<QString, bool> unique;
- QObject *w = editor->widget();
- QStringList valueSet;
+ TQMap<TQString, bool> unique;
+ TQObject *w = editor->widget();
+ TQStringList valueSet;
bool parentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( (QWidget*)w ) && ( (QWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- const QMetaProperty* p =
+ !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() &&
+ WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ const TQMetaProperty* p =
editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties );
if ( !p )
continue;
- if ( unique.contains( QString::fromLatin1( it.current() ) ) )
+ if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue;
if ( ::qt_cast<QDesignerToolBar*>(editor->widget()) ||
::qt_cast<MenuBarEditor*>(editor->widget()) ) {
@@ -3076,9 +3076,9 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
continue;
}
- unique.insert( QString::fromLatin1( it.current() ), TRUE );
+ unique.insert( TQString::fromLatin1( it.current() ), TRUE );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( (QWidget*)editor->widget() ) ) {
+ editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -3137,7 +3137,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( ::qt_cast<QActionGroup*>(w) ) {
+ if ( ::qt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -3154,7 +3154,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<QButtonGroup*>(editor->widget()->parent()) )
+ !::qt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue;
}
@@ -3164,8 +3164,8 @@ void PropertyList::setupProperties()
isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) &&
( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) {
if ( p->isSetType() ) {
- if ( QString( p->name() ) == "alignment" ) {
- QStringList lst;
+ if ( TQString( p->name() ) == "alignment" ) {
+ TQStringList lst;
lst << p->valueToKey( AlignAuto )
<< p->valueToKey( AlignLeft )
<< p->valueToKey( AlignHCenter )
@@ -3176,7 +3176,7 @@ void PropertyList::setupProperties()
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( TRUE, FALSE );
- if ( !::qt_cast<QMultiLineEdit*>(editor->widget()) ) {
+ if ( !::qt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
@@ -3187,18 +3187,18 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( TRUE, FALSE );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( ::qt_cast<QGroupBox*>(w) )
+ if ( ::qt_cast<TQGroupBox*>(w) )
item->setVisible( FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
item->setChanged( TRUE, FALSE );
}
} else {
- QStrList lst( p->enumKeys() );
- QStringList l;
- QPtrListIterator<char> it( lst );
+ TQStrList lst( p->enumKeys() );
+ TQStringList l;
+ TQPtrListIterator<char> it( lst );
while ( it.current() != 0 ) {
- l << QString(*it);
+ l << TQString(*it);
++it;
}
item = new PropertyEnumItem( this, item, 0, p->name() );
@@ -3208,19 +3208,19 @@ void PropertyList::setupProperties()
item->setChanged( TRUE, FALSE );
}
} else if ( p->isEnumType() ) {
- QStrList l = p->enumKeys();
- QStringList lst;
+ TQStrList l = p->enumKeys();
+ TQStringList lst;
for ( uint i = 0; i < l.count(); ++i ) {
- QString k = l.at( i );
+ TQString k = l.at( i );
// filter out enum-masks
- if ( k[0] == 'M' && k[1].category() == QChar::Letter_Uppercase )
+ if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase )
continue;
lst << k;
}
item = new PropertyListItem( this, item, 0, p->name(), FALSE );
item->setValue( lst );
} else {
- QVariant::Type t = QVariant::nameToType( p->type() );
+ TQVariant::Type t = TQVariant::nameToType( p->type() );
if ( !addPropertyItem( item, p->name(), t ) )
continue;
}
@@ -3235,8 +3235,8 @@ void PropertyList::setupProperties()
}
}
- if ( !::qt_cast<QSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<QDesignerToolBar*>(w) &&
- w->isWidgetType() && WidgetFactory::layoutType( (QWidget*)w ) != WidgetFactory::NoLayout ) {
+ if ( !::qt_cast<TQSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<QDesignerToolBar*>(w) &&
+ w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
@@ -3251,15 +3251,15 @@ void PropertyList::setupProperties()
layoutInitValue( item, TRUE );
else
layoutInitValue( item );
- QWidget *widget = (QWidget*)w;
+ TQWidget *widget = (TQWidget*)w;
if ( ( !::qt_cast<QLayoutWidget*>(widget) &&
widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) {
item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
- QStringList lst;
+ TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
item->setValue( lst );
setPropertyValue( item );
- QString resizeMod = MetaDataBase::resizeMode( editor->widget() );
+ TQString resizeMod = MetaDataBase::resizeMode( editor->widget() );
if ( !resizeMod.isEmpty() &&
resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) {
item->setChanged( TRUE, FALSE );
@@ -3281,16 +3281,16 @@ void PropertyList::setupProperties()
}
#ifndef QT_NO_SQL
- if ( !::qt_cast<QDataTable*>(editor->widget()) && !::qt_cast<QDataBrowser*>(editor->widget()) &&
- !::qt_cast<QDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<QWidget*>(editor->widget()) ) ) {
+ 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()) ) ) {
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<QDataTable*>(editor->widget()) || ::qt_cast<QDataBrowser*>(editor->widget()) ||
- ::qt_cast<QDataView*>(editor->widget()) ) {
+ if ( ::qt_cast<TQDataTable*>(editor->widget()) || ::qt_cast<TQDataBrowser*>(editor->widget()) ||
+ ::qt_cast<TQDataView*>(editor->widget()) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -3303,8 +3303,8 @@ void PropertyList::setupProperties()
#endif
if ( w->isA("PropertyObject") ) {
- const QWidgetList wl = ( (PropertyObject*)w )->widgetList();
- QPtrListIterator<QWidget> wIt( wl );
+ const TQWidgetList wl = ( (PropertyObject*)w )->widgetList();
+ TQPtrListIterator<TQWidget> wIt( wl );
while ( *wIt ) {
if ( (*wIt)->inherits("CustomWidget") ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget();
@@ -3331,17 +3331,17 @@ void PropertyList::setupProperties()
}
void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
- QMap<QString, bool> &unique,
+ TQMap<TQString, bool> &unique,
PropertyItem *&item )
{
if ( !cw )
return;
- for ( QValueList<MetaDataBase::Property>::Iterator it =
+ for ( TQValueList<MetaDataBase::Property>::Iterator it =
cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( QString( (*it).property ) ) )
+ if ( unique.contains( TQString( (*it).property ) ) )
continue;
- unique.insert( QString( (*it).property ), TRUE );
+ unique.insert( TQString( (*it).property ), TRUE );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) )
@@ -3349,13 +3349,13 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
}
}
-bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t )
+bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
{
if ( name == "buddy" ) {
PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE );
- QPtrDict<QWidget> *widgets = editor->formWindow()->widgets();
- QPtrDictIterator<QWidget> it( *widgets );
- QStringList l;
+ TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets();
+ TQPtrDictIterator<TQWidget> it( *widgets );
+ TQStringList l;
l << "";
while ( it.current() ) {
if ( editor->formWindow()->canBeBuddy( it.current() ) ) {
@@ -3371,25 +3371,25 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
}
switch ( t ) {
- case QVariant::String:
+ case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, TRUE,
- ::qt_cast<QLabel*>(editor->widget()) ||
- ::qt_cast<QTextView*>(editor->widget()) ||
- ::qt_cast<QButton*>(editor->widget()) );
+ ::qt_cast<TQLabel*>(editor->widget()) ||
+ ::qt_cast<TQTextView*>(editor->widget()) ||
+ ::qt_cast<TQButton*>(editor->widget()) );
break;
- case QVariant::CString:
+ case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
editor->widget() == editor->formWindow()->mainContainer(),
FALSE, TRUE );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
item = new PropertyBoolItem( this, item, 0, name );
break;
- case QVariant::Font:
+ case TQVariant::Font:
item = new PropertyFontItem( this, item, 0, name );
break;
- case QVariant::Int:
+ case TQVariant::Int:
if ( name == "accel" )
item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE );
else if ( name == "layoutSpacing" || name == "layoutMargin" )
@@ -3399,55 +3399,55 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
else
item = new PropertyIntItem( this, item, 0, name, TRUE );
break;
- case QVariant::Double:
+ case TQVariant::Double:
item = new PropertyDoubleItem( this, item, 0, name );
break;
- case QVariant::KeySequence:
+ case TQVariant::KeySequence:
item = new PropertyKeysequenceItem( this, item, 0, name );
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
item = new PropertyIntItem( this, item, 0, name, FALSE );
break;
- case QVariant::StringList:
+ case TQVariant::StringList:
item = new PropertyListItem( this, item, 0, name, TRUE );
break;
- case QVariant::Rect:
+ case TQVariant::Rect:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
break;
- case QVariant::Point:
+ case TQVariant::Point:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point );
break;
- case QVariant::Size:
+ case TQVariant::Size:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
break;
- case QVariant::Color:
+ case TQVariant::Color:
item = new PropertyColorItem( this, item, 0, name, TRUE );
break;
- case QVariant::Pixmap:
+ case TQVariant::Pixmap:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap );
break;
- case QVariant::IconSet:
+ case TQVariant::IconSet:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet );
break;
- case QVariant::Image:
+ case TQVariant::Image:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image );
break;
- case QVariant::SizePolicy:
+ case TQVariant::SizePolicy:
item = new PropertySizePolicyItem( this, item, 0, name );
break;
- case QVariant::Palette:
+ case TQVariant::Palette:
item = new PropertyPaletteItem( this, item, 0, name );
break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
item = new PropertyCursorItem( this, item, 0, name );
break;
- case QVariant::Date:
+ case TQVariant::Date:
item = new PropertyDateItem( this, item, 0, name );
break;
- case QVariant::Time:
+ case TQVariant::Time:
item = new PropertyTimeItem( this, item, 0, name );
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
item = new PropertyDateTimeItem( this, item, 0, name );
break;
default:
@@ -3456,19 +3456,19 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q
return TRUE;
}
-void PropertyList::paintEmptyArea( QPainter *p, const QRect &r )
+void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r )
{
p->fillRect( r, *backColor2 );
}
-void PropertyList::setCurrentItem( QListViewItem *i )
+void PropertyList::setCurrentItem( TQListViewItem *i )
{
if ( !i )
return;
if ( currentItem() )
( (PropertyItem*)currentItem() )->hideEditor();
- QListView::setCurrentItem( i );
+ TQListView::setCurrentItem( i );
( (PropertyItem*)currentItem() )->showEditor();
}
@@ -3486,7 +3486,7 @@ void PropertyList::valueChanged( PropertyItem *i )
{
if ( !editor->widget() )
return;
- QString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -3500,7 +3500,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
{
if ( !editor->widget() )
return;
- QString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -3511,7 +3511,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
i->setChanged( changed );
}
-void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
+void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c )
{
if ( !i )
return;
@@ -3523,7 +3523,7 @@ void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c )
toggleOpen( i );
}
-void PropertyList::toggleOpen( QListViewItem *i )
+void PropertyList::toggleOpen( TQListViewItem *i )
{
if ( !i )
return;
@@ -3535,26 +3535,26 @@ void PropertyList::toggleOpen( QListViewItem *i )
}
}
-bool PropertyList::eventFilter( QObject *o, QEvent *e )
+bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e )
return TRUE;
PropertyItem *i = (PropertyItem*)currentItem();
- if ( e->type() == QEvent::KeyPress )
+ if ( e->type() == TQEvent::KeyPress )
theLastEvent = KeyEvent;
- else if ( e->type() == QEvent::MouseButtonPress )
+ else if ( e->type() == TQEvent::MouseButtonPress )
theLastEvent = MouseEvent;
- if ( o != this &&e->type() == QEvent::KeyPress ) {
- QKeyEvent *ke = (QKeyEvent*)e;
+ if ( o != this &&e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
- QApplication::sendEvent( this, (QKeyEvent*)e );
+ TQApplication::sendEvent( this, (TQKeyEvent*)e );
return TRUE;
- } else if ( ( !::qt_cast<QLineEdit*>(o) ||
- ( ::qt_cast<QLineEdit*>(o) && ( (QLineEdit*)o )->isReadOnly() ) ) &&
+ } else if ( ( !::qt_cast<TQLineEdit*>(o) ||
+ ( ::qt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
@@ -3564,19 +3564,19 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
( ke->key() == Key_Minus ||
ke->key() == Key_Left ) )
i->setOpen( FALSE );
- } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<QComboBox*>(o) ) {
- QKeyEvent ke2( QEvent::KeyPress, Key_Space, 0, 0 );
- QApplication::sendEvent( o, &ke2 );
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<TQComboBox*>(o) ) {
+ TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
+ TQApplication::sendEvent( o, &ke2 );
return TRUE;
}
- } else if ( e->type() == QEvent::FocusOut && ::qt_cast<QLineEdit*>(o) && editor->formWindow() ) {
- QTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
+ } else if ( e->type() == TQEvent::FocusOut && ::qt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
+ TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) {
- QMouseEvent *me;
+ TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- me = (QMouseEvent*)e;
+ case TQEvent::MouseButtonPress:
+ me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() );
if ( i && ( ::qt_cast<PropertyColorItem*>(i) || ::qt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
@@ -3584,20 +3584,20 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
mousePressed = TRUE;
}
break;
- case QEvent::MouseMove:
- me = (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ me = (TQMouseEvent*)e;
if ( me && me->state() & LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() );
if ( i && i == pressItem ) {
- if (( pressPos - me->pos() ).manhattanLength() > QApplication::startDragDistance() ){
+ if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
if ( ::qt_cast<PropertyColorItem*>(i) ) {
- QColor col = i->value().asColor();
- QColorDrag *drg = new QColorDrag( col, this );
- QPixmap pix( 25, 25 );
+ TQColor col = i->value().asColor();
+ TQColorDrag *drg = new TQColorDrag( col, this );
+ TQPixmap pix( 25, 25 );
pix.fill( col );
- QPainter p( &pix );
+ TQPainter p( &pix );
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
@@ -3605,10 +3605,10 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
drg->dragCopy();
}
else if ( ::qt_cast<PropertyPixmapItem*>(i) ) {
- QPixmap pix = i->value().asPixmap();
+ TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) {
- QImage img = pix.convertToImage();
- QImageDrag *drg = new QImageDrag( img, this );
+ TQImage img = pix.convertToImage();
+ TQImageDrag *drg = new TQImageDrag( img, this );
drg->setPixmap( pix );
mousePressed = FALSE;
drg->dragCopy();
@@ -3622,9 +3622,9 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
break;
}
} else if ( o == header() ) {
- if ( e->type() == QEvent::ContextMenu ) {
- ((QContextMenuEvent *)e)->accept();
- QPopupMenu menu( 0 );
+ if ( e->type() == TQEvent::ContextMenu ) {
+ ((TQContextMenuEvent *)e)->accept();
+ TQPopupMenu menu( 0 );
menu.setCheckable( TRUE );
const int cat_id = 1;
const int alpha_id = 2;
@@ -3634,7 +3634,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
menu.setItemChecked( alpha_id, TRUE );
else
menu.setItemChecked( cat_id, TRUE );
- int res = menu.exec( ( (QContextMenuEvent*)e )->globalPos() );
+ int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() );
if ( res != -1 ) {
bool newShowSorted = ( res == alpha );
if ( showSorted != newShowSorted ) {
@@ -3647,7 +3647,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
}
}
- return QListView::eventFilter( o, e );
+ return TQListView::eventFilter( o, e );
}
/*! This method re-initializes each item of the property list.
@@ -3655,7 +3655,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e )
void PropertyList::refetchData()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
PropertyItem *i = (PropertyItem*)it.current();
if ( !i->propertyParent() )
@@ -3675,7 +3675,7 @@ void PropertyList::refetchData()
updateEditorSize();
}
-static void clearAlignList( QStrList &l )
+static void clearAlignList( TQStrList &l )
{
if ( l.count() == 1 )
return;
@@ -3691,7 +3691,7 @@ static void clearAlignList( QStrList &l )
void PropertyList::setPropertyValue( PropertyItem *i )
{
- const QMetaProperty *p =
+ const TQMetaProperty *p =
editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE );
if ( !p ) {
@@ -3700,7 +3700,7 @@ void PropertyList::setPropertyValue( PropertyItem *i )
p = editor->widget()->metaObject()->
property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE );
align &= ~AlignVertical_Mask;
- QStrList l = p->valueToKeys( align );
+ TQStrList l = p->valueToKeys( align );
clearAlignList( l );
( (PropertyListItem*)i )->setCurrentItem( l.last() );
} else if ( i->name() == "vAlign" ) {
@@ -3712,15 +3712,15 @@ void PropertyList::setPropertyValue( PropertyItem *i )
} else if ( i->name() == "wordwrap" ) {
int align = editor->widget()->property( "alignment" ).toInt();
if ( align & WordBreak )
- i->setValue( QVariant( TRUE, 0 ) );
+ i->setValue( TQVariant( TRUE, 0 ) );
else
- i->setValue( QVariant( FALSE, 0 ) );
+ i->setValue( TQVariant( FALSE, 0 ) );
} else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "layoutMargin" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "resizeMode" ) {
- ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
+ ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
} else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -3741,14 +3741,14 @@ void PropertyList::setPropertyValue( PropertyItem *i )
i->setValue( editor->widget()->property( i->name() ) );
}
-void PropertyList::setCurrentProperty( const QString &n )
+void PropertyList::setCurrentProperty( const TQString &n )
{
if ( currentItem() && currentItem()->text( 0 ) == n ||
currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() &&
( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n )
return;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( it.current()->text( 0 ) == n ) {
setCurrentItem( it.current() );
@@ -3769,7 +3769,7 @@ void PropertyList::resetProperty()
PropertyItem *i = (PropertyItem*)currentItem();
if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) )
return;
- QString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), i->value(),
@@ -3782,7 +3782,7 @@ void PropertyList::resetProperty()
i->initChildren();
}
-void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
+void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3790,15 +3790,15 @@ void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) )
+ if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && QImageDrag::canDecode( e ) )
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
+void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3806,15 +3806,15 @@ void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) )
+ if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::qt_cast<PropertyPixmapItem*>(i) && QImageDrag::canDecode( e ) )
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
-void PropertyList::viewportDropEvent ( QDropEvent *e )
+void PropertyList::viewportDropEvent ( TQDropEvent *e )
{
PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() );
if( !i ) {
@@ -3822,19 +3822,19 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
return;
}
- if ( ::qt_cast<PropertyColorItem*>(i) && QColorDrag::canDecode( e ) ) {
- QColor color;
- QColorDrag::decode( e, color );
- i->setValue( QVariant( color ) );
+ if ( ::qt_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) && QImageDrag::canDecode( e ) ) {
- QImage img;
- QImageDrag::decode( e, img );
- QPixmap pm;
+ else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
+ TQImage img;
+ TQImageDrag::decode( e, img );
+ TQPixmap pm;
pm.convertFromImage( img );
- i->setValue( QVariant( pm ) );
+ i->setValue( TQVariant( pm ) );
valueChanged( i );
e->accept();
}
@@ -3842,7 +3842,7 @@ void PropertyList::viewportDropEvent ( QDropEvent *e )
e->ignore();
}
-QString PropertyList::whatsThisAt( const QPoint &p )
+TQString PropertyList::whatsThisAt( const TQPoint &p )
{
return whatsThisText( itemAt( p ) );
}
@@ -3851,32 +3851,32 @@ void PropertyList::showCurrentWhatsThis()
{
if ( !currentItem() )
return;
- QPoint p( 0, currentItem()->itemPos() );
+ TQPoint p( 0, currentItem()->itemPos() );
p = viewport()->mapToGlobal( contentsToViewport( p ) );
- QWhatsThis::display( whatsThisText( currentItem() ), p, viewport() );
+ TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() );
}
-QString PropertyList::whatsThisText( QListViewItem *i )
+TQString PropertyList::whatsThisText( TQListViewItem *i )
{
if ( !i || !editor->widget() )
- return QString::null;
+ return TQString::null;
readPropertyDocs();
if ( ( (PropertyItem*)i )->propertyParent() )
i = ( (PropertyItem*)i )->propertyParent();
- const QMetaObject *mo = editor->widget()->metaObject();
- QString prop = ( (PropertyItem*)i )->name();
+ const TQMetaObject *mo = editor->widget()->metaObject();
+ TQString prop = ( (PropertyItem*)i )->name();
while ( mo ) {
- QString s;
- s = QString( mo->className() ) + "::" + prop;
- QMap<QString, QString>::Iterator it;
+ TQString s;
+ s = TQString( mo->className() ) + "::" + prop;
+ TQMap<TQString, TQString>::Iterator it;
if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
return *it;
}
mo = mo->superClass();
}
- return i18n( "<p><b>QWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
+ return i18n( "<p><b>TQWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
}
void PropertyList::readPropertyDocs()
@@ -3884,21 +3884,21 @@ void PropertyList::readPropertyDocs()
if ( !propertyDocs.isEmpty() )
return;
- QString docFile = MainWindow::self->documentationPath() + "/propertydocs";
- QFile f( docFile );
+ TQString docFile = MainWindow::self->documentationPath() + "/propertydocs";
+ TQFile f( docFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine;
if ( !doc.setContent( &f, &errMsg, &errLine ) )
return;
- QDomElement e = doc.firstChild().toElement().firstChild().toElement();
+ TQDomElement e = doc.firstChild().toElement().firstChild().toElement();
for ( ; !e.isNull(); e = e.nextSibling().toElement() ) {
- QDomElement n = e.firstChild().toElement();
- QString name;
- QString doc;
+ TQDomElement n = e.firstChild().toElement();
+ TQString name;
+ TQString doc;
for ( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "name" )
name = n.firstChild().toText().data();
@@ -3916,26 +3916,26 @@ PropertyList::LastEventType PropertyList::lastEvent()
}
// ------------------------------------------------------------
-EventList::EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e )
+EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
: HierarchyList( parent, fw, TRUE ), editor( e )
{
header()->hide();
removeColumn( 1 );
setRootIsDecorated( TRUE );
- connect( this, SIGNAL( itemRenamed( QListViewItem *, int, const QString & ) ),
- this, SLOT( renamed( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQT_SLOT( renamed( TQListViewItem * ) ) );
}
-QString clean_arguments( const QString &s )
+TQString clean_arguments( const TQString &s )
{
- QString slot = s;
- QString arg = slot.mid( slot.find( '(' ) + 1 );
+ TQString slot = s;
+ TQString arg = slot.mid( slot.find( '(' ) + 1 );
arg = arg.left( arg.findRev( ')' ) );
- QStringList args = QStringList::split( ',', arg );
+ TQStringList args = TQStringList::split( ',', arg );
slot = slot.left( slot.find( '(' ) + 1 );
int num = 0;
- for ( QStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) {
- QString a = *it;
+ for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) {
+ TQString a = *it;
int i;
if ( ( i =a.find( ':' ) ) == -1 )
slot += a.simplifyWhiteSpace();
@@ -3958,61 +3958,61 @@ void EventList::setup()
if ( !formWindow )
return;
LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() );
- const QPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
- QStrList sigs;
+ const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
+ TQStrList sigs;
if ( iface )
{
sigs = iface->signalNames( editor->widget() );
}
- QStrListIterator it( sigs );
+ TQStrListIterator it( sigs );
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0,
- it.current(), QString::null, QString::null );
+ it.current(), TQString::null, TQString::null );
eventItem->setOpen( TRUE );
- QValueList<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0;
- for ( QValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
cit != conns.end(); ++cit ) {
- QString s = it.current();
- if ( MetaDataBase::normalizeFunction( clean_arguments( QString( (*cit).signal ) ) ) !=
+ TQString s = it.current();
+ if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) !=
MetaDataBase::normalizeFunction( clean_arguments( s ) ) )
continue;
item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item,
- (*cit).slot, QString::null, QString::null );
+ (*cit).slot, TQString::null, TQString::null );
item->setPixmap( 0, DesignerEditSlotsPix );
}
++it;
}
}
-extern QListViewItem *newItem;
+extern TQListViewItem *newItem;
-void EventList::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
- QListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
if ( !i || i->parent() )
return;
- QString s;
+ TQString s;
if ( !formWindow->project()->isCpp() ) {
- QString s1 = i->text( 0 );
+ TQString s1 = i->text( 0 );
int pt = s1.find( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
- s = QString( editor->widget()->name() ) + "_" + s1;
+ s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = QString( editor->widget()->name() ) + "_" + i->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + i->text( 0 );
}
- const QPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
+ const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance());
insertEntry( i, DesignerEditSlotsPix , s );
}
-void EventList::setCurrent( QWidget * )
+void EventList::setCurrent( TQWidget * )
{
}
-void EventList::objectClicked( QListViewItem *i )
+void EventList::objectClicked( TQListViewItem *i )
{
if ( !i || !i->parent() )
return;
@@ -4021,26 +4021,26 @@ void EventList::objectClicked( QListViewItem *i )
// formWindow->mainWindow()->editFunction( i->text( 0 ) );
}
-void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
+void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
{
if ( !i )
return;
- QPopupMenu menu;
+ TQPopupMenu menu;
const int NEW_ITEM = 1;
const int DEL_ITEM = 2;
menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM );
menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM );
int res = menu.exec( pos );
if ( res == NEW_ITEM ) {
- QString s;
+ TQString s;
if ( !formWindow->project()->isCpp() ) {
- QString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
+ TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
int pt = s1.find( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
- s = QString( editor->widget()->name() ) + "_" + s1;
+ s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = QString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
}
insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), s );
} else if ( res == DEL_ITEM && i->parent() ) {
@@ -4059,13 +4059,13 @@ void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos )
}
}
-void EventList::renamed( QListViewItem *i )
+void EventList::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
if ( !i->parent() )
return;
- QListViewItem *itm = i->parent()->firstChild();
+ TQListViewItem *itm = i->parent()->firstChild();
bool del = FALSE;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
@@ -4089,9 +4089,9 @@ void EventList::renamed( QListViewItem *i )
formWindow->commandHistory()->addCommand( cmd );
// #### we should look if the specified slot already
// exists and if we can connect to this one
- QString funcname = i->text( 0 ).latin1();
+ TQString funcname = i->text( 0 ).latin1();
if ( funcname.find( '(' ) == -1 ) { // try to create a signature
- QString sig = i->parent()->text( 0 );
+ TQString sig = i->parent()->text( 0 );
sig = sig.mid( sig.find( '(' ) + 1 );
sig.remove( (int)sig.length() - 1, 1 );
LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() );
@@ -4118,10 +4118,10 @@ void EventList::renamed( QListViewItem *i )
}
}
-void EventList::save( QListViewItem *p )
+void EventList::save( TQListViewItem *p )
{
- QStringList lst;
- QListViewItem *i = p->firstChild();
+ TQStringList lst;
+ TQListViewItem *i = p->firstChild();
while ( i ) {
lst << i->text( 0 );
i = i->nextSibling();
@@ -4138,8 +4138,8 @@ void EventList::save( QListViewItem *p )
listview for editing properties.
*/
-PropertyEditor::PropertyEditor( QWidget *parent )
- : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+PropertyEditor::PropertyEditor( TQWidget *parent )
+ : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
setCaption( i18n( "Property Editor" ) );
@@ -4151,12 +4151,12 @@ PropertyEditor::PropertyEditor( QWidget *parent )
addTab( eList, i18n( "Signa&l Handlers" ) );
}
-QObject *PropertyEditor::widget() const
+TQObject *PropertyEditor::widget() const
{
return wid;
}
-void PropertyEditor::setWidget( QObject *w, FormWindow *fw )
+void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
{
if ( fw && fw->isFake() )
w = fw->project()->objectForFakeForm( fw );
@@ -4165,8 +4165,8 @@ void PropertyEditor::setWidget( QObject *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::layoutType( (QWidget*)wid ) != WidgetFactory::NoLayout ) {
- QListViewItemIterator it( listview );
+ if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
+ TQListViewItemIterator it( listview );
ret = FALSE;
while ( it.current() ) {
if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
@@ -4243,7 +4243,7 @@ void PropertyEditor::closed( FormWindow *w )
}
}
-void PropertyEditor::closeEvent( QCloseEvent *e )
+void PropertyEditor::closeEvent( TQCloseEvent *e )
{
emit hidden();
e->accept();
@@ -4259,32 +4259,32 @@ FormWindow *PropertyEditor::formWindow() const
return formwindow;
}
-QString PropertyEditor::currentProperty() const
+TQString PropertyEditor::currentProperty() const
{
if ( !wid )
- return QString::null;
+ return TQString::null;
if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() )
return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name();
return ( (PropertyItem*)listview->currentItem() )->name();
}
-QString PropertyEditor::classOfCurrentProperty() const
+TQString PropertyEditor::classOfCurrentProperty() const
{
if ( !wid )
- return QString::null;
- QObject *o = wid;
- QString curr = currentProperty();
- QMetaObject *mo = o->metaObject();
+ return TQString::null;
+ TQObject *o = wid;
+ TQString curr = currentProperty();
+ TQMetaObject *mo = o->metaObject();
while ( mo ) {
- QStrList props = mo->propertyNames( FALSE );
+ TQStrList props = mo->propertyNames( FALSE );
if ( props.find( curr.latin1() ) != -1 )
return mo->className();
mo = mo->superClass();
}
- return QString::null;
+ return TQString::null;
}
-QMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
+TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
{
if ( !wid )
return 0;
@@ -4324,9 +4324,9 @@ void PropertyEditor::updateWindow()
{
if ( isHidden() && count() ) {
parentWidget()->show();
- MainWindow::self->setAppropriate( (QDockWindow*)parentWidget(), TRUE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE );
} else if ( isShown() && !count() ) {
parentWidget()->hide();
- MainWindow::self->setAppropriate( (QDockWindow*)parentWidget(), FALSE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE );
}
}