diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/plugins/calculator/main.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/plugins/calculator/main.cpp')
-rw-r--r-- | kspread/plugins/calculator/main.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kspread/plugins/calculator/main.cpp b/kspread/plugins/calculator/main.cpp index 35887547..c6efb99f 100644 --- a/kspread/plugins/calculator/main.cpp +++ b/kspread/plugins/calculator/main.cpp @@ -43,8 +43,8 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadcalc, CalcFactory ) KInstance* CalcFactory::s_global = 0; -CalcFactory::CalcFactory( QObject* parent, const char* name ) - : KLibFactory( parent, name ) +CalcFactory::CalcFactory( TQObject* tqparent, const char* name ) + : KLibFactory( tqparent, name ) { s_global = new KInstance( "kspreadcalc" ); } @@ -54,15 +54,15 @@ CalcFactory::~CalcFactory() delete s_global; } -QObject* CalcFactory::createObject( QObject* parent, const char* name, const char* /*classname*/, const QStringList & ) +TQObject* CalcFactory::createObject( TQObject* tqparent, const char* name, const char* /*classname*/, const TQStringList & ) { - if ( !parent->inherits("KSpread::View") ) + if ( !tqparent->inherits("KSpread::View") ) { - kdError() << "CalcFactory: KSpread::View expected. Parent is " << parent->className() << endl; + kdError() << "CalcFactory: KSpread::View expected. Parent is " << tqparent->className() << endl; return 0; } - QObject *obj = new Calculator( (View*)parent, name ); + TQObject *obj = new Calculator( (View*)tqparent, name ); return obj; } @@ -77,17 +77,17 @@ KInstance* CalcFactory::global() * ***************************************************/ -Calculator::Calculator( View* parent, const char* name ) - : KParts::Plugin( parent, name ) +Calculator::Calculator( View* tqparent, const char* name ) + : KParts::Plugin( tqparent, name ) { m_calc = 0; - m_view = parent; + m_view = tqparent; KGlobal::locale()->insertCatalogue("kspreadcalc_calc"); - parent->installEventFilter( this ); + tqparent->installEventFilter( this ); (void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()), - 0, this, SLOT( showCalculator() ), actionCollection(), "kspreadcalc"); + 0, this, TQT_SLOT( showCalculator() ), actionCollection(), "kspreadcalc"); } void Calculator::showCalculator() @@ -99,7 +99,7 @@ void Calculator::showCalculator() return; } - m_calc = new QtCalculator( this, (View*)parent() ); + m_calc = new TQtCalculator( this, (View*)tqparent() ); m_calc->setFixedSize( 9 + 100 + 9 + 233 + 9, 239); m_calc->show(); m_calc->raise(); @@ -109,7 +109,7 @@ Calculator::~Calculator() { } -bool Calculator::eventFilter( QObject*, QEvent* ev ) +bool Calculator::eventFilter( TQObject*, TQEvent* ev ) { if ( !m_calc ) return FALSE; @@ -145,7 +145,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) // Multiple cells selected ? m_calc->setData( event->rect(), event->sheet().latin1() ); - QString str = util_rangeName( sheet, event->rect() ); + TQString str = util_rangeName( sheet, event->rect() ); m_calc->setLabel( str.latin1() ); return FALSE; @@ -156,7 +156,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) /*************************************************** * - * QtCalculator + * TQtCalculator * ***************************************************/ @@ -164,7 +164,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) * This is a hook that makes the calculator to * ask KSpread for the values of the selected cells. */ -void QtCalculator::useData() +void TQtCalculator::useData() { stats.clearAll(); @@ -193,7 +193,7 @@ void QtCalculator::useData() delete []v; - sheet_name = QString::null; + sheet_name = TQString(); } #include "main.moc" |