summaryrefslogtreecommitdiffstats
path: root/kommander/editor/widgetfactory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 03:03:11 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-17 03:03:11 +0000
commita2bae01d006ea8053e85bc16d09a8cf40a4b0b75 (patch)
tree7f2b2a1d90d0d5fbcbf23e06962192923058e0ad /kommander/editor/widgetfactory.cpp
parent4e0c064056c23aabc053dc4a54d82ff1dceaf6a9 (diff)
downloadtdewebdev-a2bae01d006ea8053e85bc16d09a8cf40a4b0b75.tar.gz
tdewebdev-a2bae01d006ea8053e85bc16d09a8cf40a4b0b75.zip
Fix kdewebdev FTBFS under Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/widgetfactory.cpp')
-rw-r--r--kommander/editor/widgetfactory.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 920a3605..b908f8e9 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -137,52 +137,52 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* )
}
-TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *tqparent, const char *name )
+QDesignerTabWidget::QDesignerTabWidget( TQWidget *tqparent, const char *name )
: TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
}
-int TQDesignerTabWidget::currentPage() const
+int QDesignerTabWidget::currentPage() const
{
return tabBar()->currentTab();
}
-void TQDesignerTabWidget::setCurrentPage( int i )
+void QDesignerTabWidget::setCurrentPage( int i )
{
tabBar()->setCurrentTab( i );
}
-TQString TQDesignerTabWidget::pageTitle() const
+TQString QDesignerTabWidget::pageTitle() const
{
return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );
}
-void TQDesignerTabWidget::setPageTitle( const TQString& title )
+void QDesignerTabWidget::setPageTitle( const TQString& title )
{
changeTab( TQTabWidget::currentPage(), title );
}
-void TQDesignerTabWidget::setPageName( const TQCString& name )
+void QDesignerTabWidget::setPageName( const TQCString& name )
{
if ( TQTabWidget::currentPage() )
TQTabWidget::currentPage()->setName( name );
}
-TQCString TQDesignerTabWidget::pageName() const
+TQCString QDesignerTabWidget::pageName() const
{
if ( !TQTabWidget::currentPage() )
return 0;
return TQTabWidget::currentPage()->name();
}
-int TQDesignerTabWidget::count() const
+int QDesignerTabWidget::count() const
{
return tabBar()->count();
}
-bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
+bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
@@ -303,7 +303,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
return false;
}
-int TQDesignerWizard::currentPageNum() const
+int QDesignerWizard::currentPageNum() const
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == currentPage() )
@@ -312,7 +312,7 @@ int TQDesignerWizard::currentPageNum() const
return 0;
}
-void TQDesignerWizard::setCurrentPage( int i )
+void QDesignerWizard::setCurrentPage( int i )
{
if ( i < currentPageNum() ) {
while ( i < currentPageNum() ) {
@@ -330,30 +330,30 @@ void TQDesignerWizard::setCurrentPage( int i )
}
}
-TQString TQDesignerWizard::pageTitle() const
+TQString QDesignerWizard::pageTitle() const
{
return title( currentPage() );
}
-void TQDesignerWizard::setPageTitle( const TQString& title )
+void QDesignerWizard::setPageTitle( const TQString& title )
{
setTitle( currentPage(), title );
}
-void TQDesignerWizard::setPageName( const TQCString& name )
+void QDesignerWizard::setPageName( const TQCString& name )
{
if ( TQWizard::currentPage() )
TQWizard::currentPage()->setName( name );
}
-TQCString TQDesignerWizard::pageName() const
+TQCString QDesignerWizard::pageName() const
{
if ( !TQWizard::currentPage() )
return 0;
return TQWizard::currentPage()->name();
}
-int TQDesignerWizard::pageNum( TQWidget *p )
+int QDesignerWizard::pageNum( TQWidget *p )
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == p )
@@ -362,20 +362,20 @@ int TQDesignerWizard::pageNum( TQWidget *p )
return -1;
}
-void TQDesignerWizard::addPage( TQWidget *p, const TQString &t )
+void QDesignerWizard::addPage( TQWidget *p, const TQString &t )
{
TQWizard::addPage( p, t );
if ( removedPages.tqfind( p ) )
removedPages.remove( p );
}
-void TQDesignerWizard::removePage( TQWidget *p )
+void QDesignerWizard::removePage( TQWidget *p )
{
TQWizard::removePage( p );
removedPages.insert( p, p );
}
-void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
+void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
{
TQWizard::insertPage( p, t, index );
if ( removedPages.tqfind( p ) )
@@ -721,7 +721,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid:
- l = new TQDesignerGridLayout( gb->tqlayout() );
+ l = new QDesignerGridLayout( gb->tqlayout() );
MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
l->tqsetAlignment( AlignTop );
@@ -749,7 +749,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new TQDesignerGridLayout( tqlayout );
+ l = new QDesignerGridLayout( tqlayout );
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
@@ -787,7 +787,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new TQDesignerGridLayout( widget );
+ l = new QDesignerGridLayout( widget );
MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
@@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
TQPushButton *b = 0;
if (init)
{
- b = new TQDesignerPushButton(tqparent, name);
+ b = new QDesignerPushButton(tqparent, name);
b->setText(TQString::tqfromLatin1(name));
} else
{
- b = new TQDesignerPushButton(tqparent, name);
+ b = new QDesignerPushButton(tqparent, name);
}
TQWidget *w = find_formwindow(b);
b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING));
@@ -850,29 +850,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
{
if (init)
{
- TQDesignerToolButton *tb = new TQDesignerToolButton(tqparent, name);
+ QDesignerToolButton *tb = new QDesignerToolButton(tqparent, name);
tb->setText("...");
return tb;
}
- return new TQDesignerToolButton(tqparent, name);
+ return new QDesignerToolButton(tqparent, name);
} else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
{
if (init)
{
- TQDesignerCheckBox *cb = new TQDesignerCheckBox(tqparent, name);
+ QDesignerCheckBox *cb = new QDesignerCheckBox(tqparent, name);
cb->setText(TQString::tqfromLatin1(name));
return cb;
}
- return new TQDesignerCheckBox(tqparent, name);
+ return new QDesignerCheckBox(tqparent, name);
} else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
- TQDesignerRadioButton *rb = new TQDesignerRadioButton(tqparent, name);
+ QDesignerRadioButton *rb = new QDesignerRadioButton(tqparent, name);
rb->setText(TQString::tqfromLatin1(name));
return rb;
}
- return new TQDesignerRadioButton(tqparent, name);
+ return new QDesignerRadioButton(tqparent, name);
} else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
{
if (init)
@@ -947,7 +947,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return new TQTextEdit(tqparent, name);
else if (className == TQLABEL_OBJECT_NAME_STRING)
{
- TQDesignerLabel *l = new TQDesignerLabel(tqparent, name);
+ QDesignerLabel *l = new QDesignerLabel(tqparent, name);
if (init)
{
l->setText(TQString::tqfromLatin1(name));
@@ -959,14 +959,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return new TQLayoutWidget(tqparent, name);
else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
{
- TQTabWidget *tw = new TQDesignerTabWidget(tqparent, name);
+ TQTabWidget *tw = new QDesignerTabWidget(tqparent, name);
if (init)
{
FormWindow *fw = find_formwindow(tqparent);
- TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
- w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
MetaDataBase::addEntry(TQT_TQOBJECT(tw));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -984,7 +984,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
FormWindow *fw = find_formwindow(tqparent);
if (fw)
{
- TQDesignerWidget *dw = new TQDesignerWidget(fw, tqparent, name);
+ QDesignerWidget *dw = new QDesignerWidget(fw, tqparent, name);
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
return dw;
}
@@ -994,7 +994,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
{
TQDialog *dia = 0;
if (tqparent && tqparent->inherits("FormWindow"))
- dia = new TQDesignerDialog((FormWindow *) tqparent, tqparent, name);
+ dia = new QDesignerDialog((FormWindow *) tqparent, tqparent, name);
else
dia = new TQDialog(tqparent, name);
if (tqparent && !tqparent->inherits("MainWindow"))
@@ -1002,14 +1002,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
return dia;
} else if (className == TQWIZARD_OBJECT_NAME_STRING)
{
- TQWizard *wiz = new TQDesignerWizard(tqparent, name);
+ TQWizard *wiz = new QDesignerWizard(tqparent, name);
if (tqparent && !tqparent->inherits("MainWindow"))
{
wiz->reparent(tqparent, TQPoint(0, 0), true);
}
if (init && tqparent && tqparent->inherits("FormWindow"))
{
- TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page");
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
@@ -1089,7 +1089,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
{
TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0);
mw->setDockEnabled(TQt::DockMinimized, false);
- TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, mw, "central widget");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, mw, "central widget");
mw->setDockMenuEnabled(false);
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
mw->setCentralWidget(dw);
@@ -1100,13 +1100,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
#ifndef TQT_NO_SQL
else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
{
- TQWidget *w = new TQDesignerDataBrowser(tqparent, name);
+ TQWidget *w = new QDesignerDataBrowser(tqparent, name);
if (tqparent)
w->reparent(tqparent, TQPoint(0, 0), true);
return w;
} else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
{
- TQWidget *w = new TQDesignerDataView(tqparent, name);
+ TQWidget *w = new QDesignerDataView(tqparent, name);
if (tqparent)
w->reparent(tqparent, TQPoint(0, 0), true);
return w;
@@ -1144,14 +1144,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
//qDebug("Creating Wizard...");
TQWizard *wiz;
if (tqparent && tqparent->inherits("FormWindow"))
- wiz = new TQDesignerWizard(tqparent, name);
+ wiz = new QDesignerWizard(tqparent, name);
else
wiz = new Wizard(tqparent, name);
if (tqparent)
wiz->reparent(tqparent, TQPoint(0, 0), true);
if (init && tqparent && tqparent->inherits("FormWindow"))
{
- TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ QDesignerWidget *dw = new QDesignerWidget((FormWindow *) tqparent, wiz, "page");
MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
@@ -1165,10 +1165,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
if (init)
{
FormWindow *fw = find_formwindow(tqparent);
- TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
- w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
MetaDataBase::addEntry(TQT_TQOBJECT(tw));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -1180,10 +1180,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa
if (init)
{
FormWindow *fw = find_formwindow(tqparent);
- TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
- w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 2"));
MetaDataBase::addEntry(TQT_TQOBJECT(tw));
MetaDataBase::addEntry(TQT_TQOBJECT(w));
@@ -1415,7 +1415,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
*/
const char* WidgetFactory::classNameOf( TQObject* o )
{
- if (o->inherits("TQDesignerTabWidget"))
+ if (o->inherits("QDesignerTabWidget"))
return TQTABWIDGET_OBJECT_NAME_STRING;
#ifdef KOMMANDER
else if (o->inherits("EditorTabWidget"))
@@ -1423,34 +1423,34 @@ const char* WidgetFactory::classNameOf( TQObject* o )
else if (o->inherits("EditorToolBox"))
return "ToolBox";
#endif
- else if (o->inherits("TQDesignerDialog"))
+ else if (o->inherits("QDesignerDialog"))
return TQDIALOG_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerWidget"))
+ else if (o->inherits("QDesignerWidget"))
return TQWIDGET_OBJECT_NAME_STRING;
else if (o->inherits("CustomWidget"))
return ((CustomWidget *) o)->realClassName().latin1();
- else if (o->inherits("TQDesignerLabel"))
+ else if (o->inherits("QDesignerLabel"))
return TQLABEL_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerWizard"))
+ else if (o->inherits("QDesignerWizard"))
return TQWIZARD_OBJECT_NAME_STRING;
else if (o->inherits("EditorWizard"))
return "Wizard";
- else if (o->inherits("TQDesignerPushButton"))
+ else if (o->inherits("QDesignerPushButton"))
return TQPUSHBUTTON_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerToolButton"))
+ else if (o->inherits("QDesignerToolButton"))
return TQTOOLBUTTON_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerRadioButton"))
+ else if (o->inherits("QDesignerRadioButton"))
return TQRADIOBUTTON_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerCheckBox"))
+ else if (o->inherits("QDesignerCheckBox"))
return TQCHECKBOX_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerMenuBar"))
+ else if (o->inherits("QDesignerMenuBar"))
return TQMENUBAR_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerToolBar"))
+ else if (o->inherits("QDesignerToolBar"))
return TQTOOLBAR_OBJECT_NAME_STRING;
#ifndef TQT_NO_SQL
- else if (o->inherits("TQDesignerDataBrowser"))
+ else if (o->inherits("QDesignerDataBrowser"))
return TQDATABROWSER_OBJECT_NAME_STRING;
- else if (o->inherits("TQDesignerDataView"))
+ else if (o->inherits("QDesignerDataView"))
return TQDATAVIEW_OBJECT_NAME_STRING;
#endif
else if (o->inherits("EditorDialog"))
@@ -1466,7 +1466,7 @@ const char* WidgetFactory::classNameOf( TQObject* o )
void WidgetFactory::initChangedProperties( TQObject *o )
{
MetaDataBase::setPropertyChanged( o, "name", true );
- if ( !o->inherits( "TQDesignerToolBar" ) && !o->inherits( "TQDesignerMenuBar" ) )
+ if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
MetaDataBase::setPropertyChanged( o, "geometry", true );
if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
@@ -1503,9 +1503,9 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
} else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "orientation", true );
- } else if ( o->inherits( "TQDesignerToolBar" ) ) {
+ } else if ( o->inherits( "QDesignerToolBar" ) ) {
MetaDataBase::setPropertyChanged( o, "label", true );
- } else if ( o->inherits( "TQDesignerMenuBar" ) ) {
+ } else if ( o->inherits( "QDesignerMenuBar" ) ) {
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemNumber", true );
MetaDataBase::setPropertyChanged( o, "itemText", true );
@@ -1745,7 +1745,7 @@ TQVariant WidgetFactory::property( TQObject *w, const char *name )
return MetaDataBase::fakeProperty( w, name );
}
-void TQDesignerLabel::updateBuddy()
+void QDesignerLabel::updateBuddy()
{
if ( myBuddy.isEmpty() )
@@ -1761,12 +1761,12 @@ void TQDesignerLabel::updateBuddy()
delete l;
}
-void TQDesignerWidget::paintEvent( TQPaintEvent *e )
+void QDesignerWidget::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-void TQDesignerDialog::paintEvent( TQPaintEvent *e )
+void QDesignerDialog::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}