diff options
Diffstat (limited to 'kalzium/src')
48 files changed, 640 insertions, 624 deletions
diff --git a/kalzium/src/detailedgraphicaloverview.cpp b/kalzium/src/detailedgraphicaloverview.cpp index d31e2579..67a4d231 100644 --- a/kalzium/src/detailedgraphicaloverview.cpp +++ b/kalzium/src/detailedgraphicaloverview.cpp @@ -28,14 +28,14 @@ email : cniehaus@kde.org #include <tqpixmap.h> #include <tqrect.h> -DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( el ); } -DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( 0L ); } @@ -59,12 +59,12 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) TQPainter p; p.begin( &pm ); - p.setBrush(Qt::SolidPattern); + p.setBrush(TQt::SolidPattern); if ( !m_element ) { pm.fill( paletteBackgroundColor() ); - p.drawText( 0, 0, w, h, Qt::AlignCenter | Qt::WordBreak, i18n( "No element selected" ) ); + p.drawText( 0, 0, w, h, TQt::AlignCenter | TQt::WordBreak, i18n( "No element selected" ) ); } else { @@ -80,8 +80,8 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setBrush( m_element->elementColor() ); p.drawRect( x1 , y1 , x2 , y2 ); - p.setBrush( Qt::black ); - p.setBrush(Qt::NoBrush); + p.setBrush( TQt::black ); + p.setBrush(TQt::NoBrush); TQFont fA = KGlobalSettings::generalFont(); TQFont fB = KGlobalSettings::generalFont(); @@ -126,20 +126,20 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setFont( fC ); //Name - p.drawText( 1, 0, w/2, h, Qt::AlignLeft, m_element->elname() ); + p.drawText( 1, 0, w/2, h, TQt::AlignLeft, m_element->elname() ); //Oxidationstates fC.setPointSize( size2 ); p.setFont( fC ); int offsetOx = KalziumUtils::StringHeight( strLocalizedMass , fC, &p ); - p.drawText( 1, h-offsetOx, w/2, offsetOx, Qt::AlignLeft, m_element->oxstage() ); + p.drawText( 1, h-offsetOx, w/2, offsetOx, TQt::AlignLeft, m_element->oxstage() ); //Mass fC.setPointSize( size3 ); p.setFont( fC ); int offset = KalziumUtils::StringHeight( strLocalizedMass, fC, &p ); - p.drawText( w/2, h-offset, w/2, offset, Qt::AlignRight, strLocalizedMass ); + p.drawText( w/2, h-offset, w/2, offset, TQt::AlignRight, strLocalizedMass ); drawBiologicalSymbol( &p ); } @@ -164,9 +164,9 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) if ( m_element->biological() > 0 ) { const int radius = db + 8; - p->setBrush( Qt::SolidPattern ); - p->setBrush( Qt::white ); - p->setPen( Qt::black ); + p->setBrush( TQt::SolidPattern ); + p->setBrush( TQt::white ); + p->setPen( TQt::black ); p->drawRoundRect( TQRect( width() - radius, -radius, 2 * radius, @@ -178,52 +178,52 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) case 0: //nothing break; case 1: //red, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::red ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::red ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 2: //green, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 3: //green - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 4: //green, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 5: //blue - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::blue ); - p->setPen( Qt::blue ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::blue ); + p->setPen( TQt::blue ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 6: //blue, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); + p->setBrush(TQt::SolidPattern); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; } diff --git a/kalzium/src/detailedgraphicaloverview.h b/kalzium/src/detailedgraphicaloverview.h index 6fb649dc..90658abc 100644 --- a/kalzium/src/detailedgraphicaloverview.h +++ b/kalzium/src/detailedgraphicaloverview.h @@ -25,13 +25,14 @@ class Element; * in one widget like a lot people know it from school * @author Carsten Niehaus */ -class DetailedGraphicalOverview : public QWidget +class DetailedGraphicalOverview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DetailedGraphicalOverview( Element *el, TQWidget *parent, const char *name=0 ); - DetailedGraphicalOverview( TQWidget *parent, const char *name=0 ); + DetailedGraphicalOverview( Element *el, TQWidget *tqparent, const char *name=0 ); + DetailedGraphicalOverview( TQWidget *tqparent, const char *name=0 ); /** * sets the elements whose data will be used to @p el diff --git a/kalzium/src/detailinfodlg.cpp b/kalzium/src/detailinfodlg.cpp index c4fc8899..7503c77d 100644 --- a/kalzium/src/detailinfodlg.cpp +++ b/kalzium/src/detailinfodlg.cpp @@ -44,8 +44,8 @@ //TODO add bondxx-radius (H-H-distance for example) -DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *name) - : KDialogBase( IconList, name, Help|User1|User2|Close, Close, parent, name, +DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *tqparent, const char *name) + : KDialogBase( IconList, name, Help|User1|User2|Close, Close, tqparent, name, false, //non modal false, KGuiItem(i18n("Next element", "Next"), "1rightarrow"), @@ -66,7 +66,7 @@ DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *na createContent(); m_actionCollection = new KActionCollection(this); - KStdAction::quit(this, TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); setButtonTip( User2, i18n( "Goes to the previous element" ) ); setButtonTip( User1, i18n( "Goes to the next element" ) ); @@ -94,10 +94,10 @@ void DetailedInfoDlg::setElement(Element *element) KHTMLPart* DetailedInfoDlg::addHTMLTab( const TQString& title, const TQString& icontext, const TQString& iconname ) { TQFrame *frame = addPage(title, icontext, BarIcon(iconname)); - TQVBoxLayout *layout = new TQVBoxLayout( frame ); - layout->setMargin( 0 ); - KHTMLPart *w = new KHTMLPart( frame, "html-part", frame ); - layout->addWidget( w->view() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( frame ); + tqlayout->setMargin( 0 ); + KHTMLPart *w = new KHTMLPart( frame, "html-part", TQT_TQOBJECT(frame) ); + tqlayout->addWidget( w->view() ); return w; } @@ -122,43 +122,43 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) html.append( "<div><table summary=\"header\"><tr><td>" ); html.append( m_element->symbol() ); html.append( "<td><td>" ); - html.append( i18n( "Block: %1" ).arg( m_element->block() ) ); + html.append( i18n( "Block: %1" ).tqarg( m_element->block() ) ); html.append( "</td></tr></table></div>" ); html.append( "<table summary=\"characteristics\" class=\"characterstics\">"); switch ( type ) { case CHEMICAL: html.append( "<tr><td><img src=\"structure.png\" alt=\"icon\"/></td><td>" ); - html.append( "<b>" + i18n( "Electronic configuration: %1" ).arg( m_element->parsedOrbits() ) + "</b>" ); + html.append( "<b>" + i18n( "Electronic configuration: %1" ).tqarg( m_element->parsedOrbits() ) + "</b>" ); html.append( "</td></tr>" ); html.append( "<tr><td><img src=\"density.png\" alt=\"icon\"/></td><td>" ); - html.append( "<b>" + i18n( "Density: %1" ).arg( m_element->adjustUnits( Element::DENSITY ) ) + "</b>" ); + html.append( "<b>" + i18n( "Density: %1" ).tqarg( m_element->adjustUnits( Element::DENSITY ) ) + "</b>" ); html.append( "</td></tr>" ); html.append( "<tr><td><img src=\"radius.png\" alt=\"icon\"/></td><td><b>" ); - html.append( "<b>" + i18n( "Covalent Radius: %1" ).arg( m_element->adjustRadius( Element::COVALENT ) ) + "</b>" ); + html.append( "<b>" + i18n( "Covalent Radius: %1" ).tqarg( m_element->adjustRadius( Element::COVALENT ) ) + "</b>" ); html.append( "</td></tr>" ); if ( m_element->radius(Element::IONIC) > 0.0 ) { html.append( "<tr><td><img src=\"radius.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "<b>Ionic Radius (Charge): %1</b> (%2)" ).arg( m_element->adjustRadius(Element::IONIC) ).arg( m_element->ioncharge() ) ); + html.append( i18n( "<b>Ionic Radius (Charge): %1</b> (%2)" ).tqarg( m_element->adjustRadius(Element::IONIC) ).tqarg( m_element->ioncharge() ) ); html.append( "</td></tr>" ); } if ( m_element->radius(Element::VDW) > 0.0 ) { html.append( "<tr><td><img src=\"radius.png\" alt=\"icon\"/></td><td>" ); - html.append( "<b>" + i18n( "van der Waals Radius: %1" ).arg( m_element->adjustRadius(Element::VDW) ) + "</b>" ); + html.append( "<b>" + i18n( "van der Waals Radius: %1" ).tqarg( m_element->adjustRadius(Element::VDW) ) + "</b>" ); html.append( "</td></tr>" ); } if ( m_element->radius(Element::ATOMIC) > 0.0 ) { html.append( "<tr><td><img src=\"radius.png\" alt=\"icon\"/></td><td><b>" ); - html.append( "<b>" + i18n( "Atomic Radius: %1" ).arg( m_element->adjustRadius(Element::ATOMIC) ) + "</b>" ); + html.append( "<b>" + i18n( "Atomic Radius: %1" ).tqarg( m_element->adjustRadius(Element::ATOMIC) ) + "</b>" ); html.append( "</td></tr>" ); } html.append( "<tr><td stype=\"text-align:center\"><img src=\"mass.png\" alt=\"icon\"/></td><td>" ); - html.append( "<b>" + i18n( "Mass: %1" ).arg( m_element->adjustUnits( Element::MASS ) ) + "</b>" ); + html.append( "<b>" + i18n( "Mass: %1" ).tqarg( m_element->adjustUnits( Element::MASS ) ) + "</b>" ); html.append( "</td></tr>" ); if ( !m_element->isotopes().isEmpty() ) { @@ -171,22 +171,22 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) html.append( "<tr><td><img src=\"discovery.png\" alt=\"icon\"/></td><td>" ); html.append( m_element->adjustUnits( Element::DATE ) ); if ( !m_element->scientist( ).isEmpty() ) - html += "<br />" + i18n("It was discovered by %1").arg(m_element->scientist() ); + html += "<br />" + i18n("It was discovered by %1").tqarg(m_element->scientist() ); html.append( "</td></tr>" ); if ( m_element->abundance() > 0 ){ html.append( "<tr><td><img src=\"abundance.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).arg( KGlobal::locale()->formatLong( m_element->abundance() ) ) ); + html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).tqarg( KGlobal::locale()->formatLong( m_element->abundance() ) ) ); html.append( "</td></tr>" ); } html.append( "<tr><td><img src=\"mass.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Mean mass: %1 u" ).arg( KalziumUtils::localizedValue( m_element->meanmass(), 6 ) ) ); + html.append( i18n( "Mean mass: %1 u" ).tqarg( KalziumUtils::localizedValue( m_element->meanmass(), 6 ) ) ); html.append( "</td></tr>" ); if ( !m_element->nameOrigin().isEmpty() ) { html.append( "<tr><td><img src=\"book.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Origin of the name: %1" ).arg( m_element->nameOrigin() ) ); + html.append( i18n( "Origin of the name: %1" ).tqarg( m_element->nameOrigin() ) ); html.append( "</td></tr>" ); } if ( m_element->artificial() || m_element->radioactive() ) @@ -203,16 +203,16 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) break; case ENERGY: html.append( "<tr><td><img src=\"meltingpoint.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Melting Point: %1" ).arg( m_element->adjustUnits( Element::MELTINGPOINT ) ) ); + html.append( i18n( "Melting Point: %1" ).tqarg( m_element->adjustUnits( Element::MELTINGPOINT ) ) ); html.append( "</td></tr>" ); html.append( "<tr><td><img src=\"boilingpoint.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Boiling Point: %1" ).arg( m_element->adjustUnits( Element::BOILINGPOINT ) ) ); + html.append( i18n( "Boiling Point: %1" ).tqarg( m_element->adjustUnits( Element::BOILINGPOINT ) ) ); html.append( "</td></tr>" ); html.append( "<tr><td><img src=\"structure.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Electronegativity: %1" ).arg( m_element->adjustUnits( Element::EN ) ) ); + html.append( i18n( "Electronegativity: %1" ).tqarg( m_element->adjustUnits( Element::EN ) ) ); html.append( "</td></tr>" ); html.append( "<tr><td><img src=\"electronaffinity.png\" alt=\"icon\"/></td><td>" ); - html.append( i18n( "Electron affinity: %1 " ).arg( m_element->adjustUnits(Element::EA) ) ); + html.append( i18n( "Electron affinity: %1 " ).tqarg( m_element->adjustUnits(Element::EA) ) ); html.append( "</td></tr>" ); @@ -221,7 +221,7 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type) { html.append( "<tr><td><img src=\"ionisation.png\" alt=\"icon\"/></td><td>" ); html.append( i18n("the first variable is a number. The result is for example '1.' or '5.', the second is the value of the ionisation energy", - "%1. Ionization energy: %2" ).arg( TQString::number( i+1 ), m_element->adjustUnits( Element::IE, ionlist[i] ) ) ); + "%1. Ionization energy: %2" ).tqarg( TQString::number( i+1 ), m_element->adjustUnits( Element::IE, ionlist[i] ) ) ); html.append( "</td></tr>" ); } break; @@ -264,13 +264,13 @@ TQString DetailedInfoDlg::isotopeTable() { html.append( "<tr><td align=\"right\">" ); if ( ( *it )->weight() > 0.0 ) - html.append( i18n( "%1 u" ).arg( KalziumUtils::localizedValue( ( *it )->weight(), 6 ) ) ); - // html.append( i18n( "%1 u" ).arg( TQString::number( ( *it )->weight() ) )); + html.append( i18n( "%1 u" ).tqarg( KalziumUtils::localizedValue( ( *it )->weight(), 6 ) ) ); + // html.append( i18n( "%1 u" ).tqarg( TQString::number( ( *it )->weight() ) )); html.append( "</td><td>" ); html.append( TQString::number( ( *it )->neutrons() ) ); html.append( "</td><td>" ); if ( ( *it )->percentage() > 0.0 ) - html.append( i18n( "this can for example be '24%'", "%1%" ).arg( KalziumUtils::localizedValue( ( *it )->percentage(), 6 ) ) ); + html.append( i18n( "this can for example be '24%'", "%1%" ).tqarg( KalziumUtils::localizedValue( ( *it )->percentage(), 6 ) ) ); html.append( "</td><td>" ); if ( ( *it )->halflife() > 0.0 ) { html.append( ( *it )->halflifeAsString() ); @@ -278,49 +278,49 @@ TQString DetailedInfoDlg::isotopeTable() html.append( "</td><td>" ); if ( ( *it )->alphapercentage() > 0.0 ){ if ( ( *it )->alphadecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->alphadecay(), 6 ) ) ); - html.append( i18n( " %1" ).arg( TQChar( 945 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->alphadecay(), 6 ) ) ); + html.append( i18n( " %1" ).tqarg( TQChar( 945 ) ) ); if ( ( *it )->alphapercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( (*it )->alphapercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( (*it )->alphapercentage(), 6 ) ) ); if ( ( *it )->betaminuspercentage() > 0.0 || ( *it )->betapluspercentage() > 0.0 || ( *it )->ecpercentage() > 0.0) html.append( i18n( ", " ) ); } if ( ( *it )->betaminuspercentage() > 0.0 ){ if ( ( *it )->betaminusdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->betaminusdecay(), 6 ) ) ); - html.append( i18n( " %1<sup>-</sup>" ).arg( TQChar( 946 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaminusdecay(), 6 ) ) ); + html.append( i18n( " %1<sup>-</sup>" ).tqarg( TQChar( 946 ) ) ); if ( ( *it )->betaminuspercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->betaminuspercentage(), 6 ) )); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaminuspercentage(), 6 ) )); if ( ( *it )->betapluspercentage() > 0.0 || ( *it )->ecpercentage() > 0.0 ) html.append( i18n( ", " ) ); } if ( ( *it )->betapluspercentage() > 0.0 ){ if ( ( *it )->betaplusdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->betaplusdecay(), 6 ) ) ); - html.append( i18n( " %1<sup>+</sup>" ).arg(TQChar( 946 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->betaplusdecay(), 6 ) ) ); + html.append( i18n( " %1<sup>+</sup>" ).tqarg(TQChar( 946 ) ) ); if ( ( *it )->betapluspercentage() == ( *it )->ecpercentage() ) { if ( ( *it )->ecdecay() > 0.0 ) { - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); } html.append( i18n( "Acronym of Electron Capture"," EC" ) ); } if ( ( *it )->betapluspercentage() < 100.0) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->betapluspercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->betapluspercentage(), 6 ) ) ); html += " "; } if ( ( *it )->ecpercentage() > 0.0 && ( *it )->ecpercentage()!=( *it )->betapluspercentage()){ if ( ( *it )->ecdecay() > 0.0 ) - html.append( i18n( "%1 MeV" ).arg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); + html.append( i18n( "%1 MeV" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecdecay(), 6 ) ) ); html.append( i18n( "Acronym of Electron Capture"," EC" ) ); if ( ( *it )->ecpercentage() < 100.0 ) - html.append( i18n( "(%1%)" ).arg( KalziumUtils::localizedValue( ( *it )->ecpercentage(), 6 ) ) ); + html.append( i18n( "(%1%)" ).tqarg( KalziumUtils::localizedValue( ( *it )->ecpercentage(), 6 ) ) ); } html.append( "</td><td>" ); html.append( ( *it )->spin() ); html.append( "</td><td>" ); if ( !( *it )->magmoment().isEmpty() ) { TQString v = KGlobal::locale()->formatNumber( ( *it )->magmoment(), false, 6 ); - html.append( i18n( "%1 %2<sub>n</sub>" ).arg( v ).arg( TQChar( 956 ) ) ); + html.append( i18n( "%1 %2<sub>n</sub>" ).tqarg( v ).tqarg( TQChar( 956 ) ) ); } html.append( "</td></tr>" ); @@ -379,7 +379,7 @@ void DetailedInfoDlg::reloadContent() const TQString element_symbol = m_element->symbol(); // updating caption - setCaption( i18n( "For example Carbon (6)" , "%1 (%2)" ).arg( element_name ).arg( m_elementNumber ) ); + setCaption( i18n( "For example Carbon (6)" , "%1 (%2)" ).tqarg( element_name ).tqarg( m_elementNumber ) ); // updating overview tab dTab->setElement( m_element ); @@ -389,21 +389,21 @@ void DetailedInfoDlg::reloadContent() if ( TQFile::exists( picpath ) ) { TQImage img( picpath, "JPEG" ); - img = img.smoothScale ( 400, 400, TQImage::ScaleMin ); + img = img.smoothScale ( 400, 400, TQ_ScaleMin ); TQPixmap pic; pic.convertFromImage( img ); piclabel->setPixmap( pic ); } else - piclabel->setText( i18n( "No picture of %1 found." ).arg( element_name ) ); + piclabel->setText( i18n( "No picture of %1 found." ).tqarg( element_name ) ); // updating atomic model tab wOrbits->setElementNumber( m_elementNumber ); TQWhatsThis::add( wOrbits, i18n( "Here you can see the atomic hull of %1. %2 has the configuration %3." ) - .arg( m_element->elname() ) - .arg( m_element->elname() ) - .arg( m_element->parsedOrbits() ) ); + .tqarg( m_element->elname() ) + .tqarg( m_element->elname() ) + .tqarg( m_element->parsedOrbits() ) ); // updating html tabs fillHTMLTab( m_htmlpages["chemical"], getHtml( CHEMICAL ) ); @@ -422,7 +422,7 @@ void DetailedInfoDlg::reloadContent() } else { - m_spectrumLabel->setText( i18n( "No spectrum of %1 found." ).arg( element_name ) ); + m_spectrumLabel->setText( i18n( "No spectrum of %1 found." ).tqarg( element_name ) ); m_spectrumStack->raiseWidget( m_spectrumLabel ); } } diff --git a/kalzium/src/detailinfodlg.h b/kalzium/src/detailinfodlg.h index a00c06a2..4087239d 100644 --- a/kalzium/src/detailinfodlg.h +++ b/kalzium/src/detailinfodlg.h @@ -39,9 +39,10 @@ class KHTMLPart; class DetailedInfoDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DetailedInfoDlg( Element *el , TQWidget *parent=0, const char *name=0); + DetailedInfoDlg( Element *el , TQWidget *tqparent=0, const char *name=0); void setElement(Element *el); diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 3fc7e493..687f0ad8 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -68,8 +68,8 @@ TQString Element::parsedOrbits( bool canBeEmpty ) TQString orbits = m_orbits; TQRegExp rxs("([a-z])([0-9]+)"); TQRegExp rxb("([a-z]{2}) ",false); - orbits.replace(rxs,"\\1<sup>\\2</sup>"); //superscript around electron number - orbits.replace(rxb,"<b>\\1</b> "); //bold around element symbols + orbits.tqreplace(rxs,"\\1<sup>\\2</sup>"); //superscript around electron number + orbits.tqreplace(rxb,"<b>\\1</b> "); //bold around element symbols return orbits; } @@ -106,7 +106,7 @@ const TQString Element::adjustRadius( RADIUSTYPE rtype ) if ( val <= 0 ) v = i18n( "Value unknown" ); else - v = i18n( "%1 is a length, eg: 12.3 pm", "%1 pm" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 is a length, eg: 12.3 pm", "%1 pm" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); return v; } @@ -132,7 +132,7 @@ const TQString Element::adjustUnits( const int type, double value ) const TQString Element::adjustUnits( const int type ) { - TQString v = TQString::null; + TQString v = TQString(); double val = 0.0; //the value to convert @@ -151,19 +151,19 @@ const TQString Element::adjustUnits( const int type ) TQString strVal = KalziumUtils::localizedValue( newvalue, 6 ); switch (Prefs::temperature()) { case 0: //Kelvin - v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).arg( strVal ); + v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).tqarg( strVal ); break; case 1://Kelvin to Celsius - v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 2: // Kelvin to Fahrenheit - v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 3: // Kelvin to Rankine - v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; case 4: // Kelvin to Reaumur - v = i18n( "%1 is the temperature in Reaumur", "%1 %2R" ).arg( strVal ).arg( TQChar(0xB0) ); + v = i18n( "%1 is the temperature in Reaumur", "%1 %2R" ).tqarg( strVal ).tqarg( TQChar(0xB0) ); break; } } @@ -186,12 +186,12 @@ const TQString Element::adjustUnits( const int type ) { if ( Prefs::energies() == 0 ) { - v = i18n( "%1 kJ/mol" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 kJ/mol" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else // use electronvolt { val/=96.6; - v = i18n( "%1 eV" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 eV" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } } } @@ -201,7 +201,7 @@ const TQString Element::adjustUnits( const int type ) if ( val <= 0 ) v = i18n( "Value unknown" ); else - v = i18n( "%1 u" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 u" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else if ( type == DENSITY ) // its a density { @@ -213,11 +213,11 @@ const TQString Element::adjustUnits( const int type ) { if ( boiling() < 295.0 && melting() < 295.0)//gasoline { - v = i18n( "%1 g/L" ).arg( KalziumUtils::localizedValue( val, 6 ) ); + v = i18n( "%1 g/L" ).tqarg( KalziumUtils::localizedValue( val, 6 ) ); } else//liquid or solid { - v = i18n( "%1 g/cm<sup>3</sup>" ).arg( KalziumUtils::localizedValue( val, 6 )); + v = i18n( "%1 g/cm<sup>3</sup>" ).tqarg( KalziumUtils::localizedValue( val, 6 )); } } } @@ -230,7 +230,7 @@ const TQString Element::adjustUnits( const int type ) } else { - v = i18n( "This element was discovered in the year %1" ).arg( TQString::number( val ) ); + v = i18n( "This element was discovered in the year %1" ).tqarg( TQString::number( val ) ); } } @@ -263,18 +263,18 @@ void Element::drawStateOfMatter( TQPainter* p, double temp ) p->setFont( f ); //top left - p->setPen( Qt::black ); + p->setPen( TQt::black ); text = KalziumUtils::localizedValue( KalziumUtils::strippedValue( mass( ) ), 6 ); - p->drawText( X,Y ,ELEMENTSIZE,h_small,Qt::AlignCenter, text ); + p->drawText( X,Y ,ELEMENTSIZE,h_small,TQt::AlignCenter, text ); text = TQString::number( number() ); - p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,Qt::AlignCenter, text ); + p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,TQt::AlignCenter, text ); p->setFont( symbol_font ); - p->drawText( X,Y, ELEMENTSIZE,ELEMENTSIZE,Qt::AlignCenter, symbol() ); + p->drawText( X,Y, ELEMENTSIZE,ELEMENTSIZE,TQt::AlignCenter, symbol() ); //border - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -289,7 +289,7 @@ TQColor Element::currentColor( const double temp ) //If either the mp or bp is not known return //This is to avoid undefined behaviour // if ( iButton_boiling <= 0.0 || iButton_melting <= 0.0 ) -// return Qt::lightGray; +// return TQt::lightGray; if ( temp < iButton_melting ) { //the element is solid @@ -305,7 +305,7 @@ TQColor Element::currentColor( const double temp ) color= Prefs::color_vapor(); } else - color = Qt::lightGray; + color = TQt::lightGray; return color; } @@ -329,23 +329,23 @@ void Element::drawGradient( TQPainter* p, const TQString& value, const TQColor& p->setPen( c ); p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, c ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); TQFont symbol_font = p->font(); TQFont f = p->font(); f.setPointSize( KalziumUtils::maxSize(value, TQRect( X,Y+ELEMENTSIZE-h_small, ELEMENTSIZE, h_small ),f, p ) ); p->setFont( f ); - p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,Qt::AlignCenter, value ); + p->drawText( X,Y+ELEMENTSIZE-h_small , ELEMENTSIZE, h_small,TQt::AlignCenter, value ); const TQRect rect = TQRect( X,Y,ELEMENTSIZE-2,ELEMENTSIZE-10 ); int goodsize = KalziumUtils::maxSize( symbol(), rect, symbol_font, p ); symbol_font.setPointSize( goodsize ); p->setFont( symbol_font ); - p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,TQt::AlignCenter, symbol() ); //border - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -357,18 +357,18 @@ void Element::drawGrayedOut( TQPainter *p ) //The Y-coordinate int Y = yPos(); - p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, Qt::lightGray ); + p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, TQt::lightGray ); - p->setPen( Qt::darkGray ); + p->setPen( TQt::darkGray ); TQFont symbol_font = p->font(); const TQRect rect = TQRect( X,Y,ELEMENTSIZE-2,ELEMENTSIZE-10 ); int goodsize = KalziumUtils::maxSize( symbol(), rect, symbol_font, p ); symbol_font.setPointSize( goodsize ); p->setFont( symbol_font ); - p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,ELEMENTSIZE-10,TQt::AlignCenter, symbol() ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } @@ -385,7 +385,7 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) p->setPen( elementColor() ); p->fillRect( X, Y,ELEMENTSIZE,ELEMENTSIZE, elementColor() ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); TQString text; TQFont symbol_font = p->font(); @@ -399,9 +399,9 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) p->setFont( symbol_font ); if ( !simple ) - p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,Qt::AlignCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,TQt::AlignCenter, symbol() ); else - p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,Qt::AlignHCenter, symbol() ); + p->drawText( X+1,Y+5, ELEMENTSIZE-2,max,TQt::AlignHCenter, symbol() ); TQFont f = p->font(); @@ -441,11 +441,11 @@ void Element::drawSelf( TQPainter* p, bool simple, bool isCrystal ) } else text = KalziumUtils::localizedValue( KalziumUtils::strippedValue( mass( ) ), 6 ); - p->drawText( X+2,Y ,ELEMENTSIZE-4 ,h_small,Qt::AlignCenter, text ); + p->drawText( X+2,Y ,ELEMENTSIZE-4 ,h_small,TQt::AlignCenter, text ); } text = TQString::number( number() ); - p->drawText( X+2,Y+ELEMENTSIZE-h_small , ELEMENTSIZE-4, h_small,Qt::AlignCenter, text ); + p->drawText( X+2,Y+ELEMENTSIZE-h_small , ELEMENTSIZE-4, h_small,TQt::AlignCenter, text ); p->drawRect( X, Y,ELEMENTSIZE+1,ELEMENTSIZE+1); } diff --git a/kalzium/src/elementdataviewer.cpp b/kalzium/src/elementdataviewer.cpp index 108889cc..d14eb343 100644 --- a/kalzium/src/elementdataviewer.cpp +++ b/kalzium/src/elementdataviewer.cpp @@ -30,18 +30,18 @@ #include <tqcheckbox.h> #include <tqlabel.h> -ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) +ElementDataViewer::ElementDataViewer( TQWidget *tqparent, const char* name ) : KDialogBase( KDialogBase::Plain, i18n( "Plot Data") , Help | User1 | Close, User1, - parent, name ) + tqparent, name ) { d = KalziumDataObject::instance(); yData = new AxisData(); - TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), 0, KDialog::spacingHint() ); + TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), 0, KDialog::spacingHint() ); m_pPlotSetupWidget = new PlotSetupWidget( plainPage(), "plotsetup" ); m_pPlotSetupWidget->from->setMaxValue( d->numberOfElements() - 1 ); @@ -51,10 +51,10 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) m_pPlotWidget->setMinimumWidth( 200 ); m_pPlotWidget->resize( 400, m_pPlotWidget->height() ); - layout->addWidget( m_pPlotSetupWidget ); - layout->addWidget( m_pPlotWidget ); - layout->setStretchFactor( m_pPlotSetupWidget, 0 ); - layout->setStretchFactor( m_pPlotWidget, 1 ); + tqlayout->addWidget( m_pPlotSetupWidget ); + tqlayout->addWidget( m_pPlotWidget ); + tqlayout->setStretchFactor( m_pPlotSetupWidget, 0 ); + tqlayout->setStretchFactor( m_pPlotWidget, 1 ); // setup the list of names EList::iterator it = d->ElementList.begin(); @@ -69,7 +69,7 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) setButtonText( User1, i18n("&Plot") ); m_actionCollection = new KActionCollection(this); - KStdAction::quit(this, TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); connect ( m_pPlotSetupWidget->KCB_y, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( drawPlot()) ); @@ -294,7 +294,7 @@ void ElementDataViewer::drawPlot() /* * reserve the memory for the KPlotObjects */ - //TODO QT4 replace TQMemArray with QVector + //TODO QT4 replace TQMemArray with TQVector TQMemArray<KPlotObject*> dataPoint(num); TQMemArray<KPlotObject*> dataPointLabel(num); diff --git a/kalzium/src/elementdataviewer.h b/kalzium/src/elementdataviewer.h index 76fea4b1..062377ae 100644 --- a/kalzium/src/elementdataviewer.h +++ b/kalzium/src/elementdataviewer.h @@ -96,9 +96,10 @@ class AxisData class ElementDataViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ElementDataViewer( TQWidget *parent=0 , const char *name =0 ); + ElementDataViewer( TQWidget *tqparent=0 , const char *name =0 ); /** * the AxixData for the y-Axis diff --git a/kalzium/src/eqchemview.cpp b/kalzium/src/eqchemview.cpp index fee6e9c7..4a22cd20 100644 --- a/kalzium/src/eqchemview.cpp +++ b/kalzium/src/eqchemview.cpp @@ -46,11 +46,11 @@ extern "C" { char* solve_equation(const char *) { return NULL; } #endif -eqchemView::eqchemView(TQWidget *parent) : TQWidget(parent) +eqchemView::eqchemView(TQWidget *tqparent) : TQWidget(tqparent) { settingsChanged(); - TQGridLayout *l = new TQGridLayout(this, 2, 2, 11, 6, "eqchemView::eqchemView layout"); + TQGridLayout *l = new TQGridLayout(this, 2, 2, 11, 6, "eqchemView::eqchemView tqlayout"); m_eqResult = new EqResult(this); m_eqedit = new KLineEdit(this); @@ -89,8 +89,8 @@ void eqchemView::clear() void eqchemView::compute() { TQString equation( m_eqedit->text() ); - equation.replace("+", "+"); - equation.replace("->", " -> "); + equation.tqreplace("+", "+"); + equation.tqreplace("->", " -> "); equation.append(" "); equation.prepend(" "); @@ -104,13 +104,13 @@ void eqchemView::compute() m_eqResult->add( equation, disp ); } -EQChemDialog::EQChemDialog( TQWidget *parent ) - : KDialogBase(parent, "EQChemDialog", true, i18n( "Solve Chemical Equations" ), +ETQChemDialog::ETQChemDialog( TQWidget *tqparent ) + : KDialogBase(tqparent, "ETQChemDialog", true, i18n( "Solve Chemical Equations" ), KDialogBase::Apply|KDialogBase::Close|KDialogBase::Help, KDialogBase::Apply, true ) { } -void EQChemDialog::slotHelp() +void ETQChemDialog::slotHelp() { emit helpClicked(); if ( kapp ) diff --git a/kalzium/src/eqchemview.h b/kalzium/src/eqchemview.h index 0e1ad686..85a9dda8 100644 --- a/kalzium/src/eqchemview.h +++ b/kalzium/src/eqchemview.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _EQCHEMVIEW_H_ -#define _EQCHEMVIEW_H_ +#ifndef _ETQCHEMVIEW_H_ +#define _ETQCHEMVIEW_H_ #include <tqwidget.h> #include <kdialogbase.h> @@ -40,14 +40,15 @@ class KPushButton; * @author Thomas Nagy <tnagy2^8\@yahoo.fr> * @version 0.1 */ -class eqchemView : public QWidget +class eqchemView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - eqchemView(TQWidget *parent); + eqchemView(TQWidget *tqparent); /** * Destructor @@ -82,17 +83,18 @@ private: /** * @author Carsten Niehaus */ -class EQChemDialog : public KDialogBase +class ETQChemDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * public constructor * - * @param parent the parent widget + * @param tqparent the tqparent widget */ - EQChemDialog( TQWidget *parent ); + ETQChemDialog( TQWidget *tqparent ); private slots: /** @@ -101,4 +103,4 @@ class EQChemDialog : public KDialogBase void slotHelp(); }; -#endif // _EQCHEMVIEW_H_ +#endif // _ETQCHEMVIEW_H_ diff --git a/kalzium/src/eqresult.cpp b/kalzium/src/eqresult.cpp index c128c93e..a4aad576 100644 --- a/kalzium/src/eqresult.cpp +++ b/kalzium/src/eqresult.cpp @@ -47,7 +47,7 @@ TQListBoxItem ( listBox ) void QuestionItem::paint( TQPainter* painter ) { - int tf = Qt::NoAccel | Qt::SingleLine | Qt::AlignVCenter; + int tf = TQt::NoAccel | TQt::SingleLine | TQt::AlignVCenter; TQRect r ( 0, 0, listBox()->contentsWidth(), height( listBox() ) ); painter->fillRect( r, m_bgcolor ); @@ -61,7 +61,7 @@ void AnswerItem::paint( TQPainter* painter ) TQRect r ( 0, 0, listBox()->contentsWidth(), height( listBox() ) ); painter->fillRect( r, m_bgcolor ); - TQColorGroup cg = listBox()->colorGroup(); + TQColorGroup cg = listBox()->tqcolorGroup(); cg.setColor( TQColorGroup::Background, m_bgcolor ); m_richtext->draw(painter, 0, 0, r, cg ); @@ -89,7 +89,7 @@ void AnswerItem::checkSize() m_richtext->setWidth( (t1>t2)?t1:t2 ); } -EqResult::EqResult(TQWidget *parent) : TQListBox(parent) +EqResult::EqResult(TQWidget *tqparent) : TQListBox(tqparent) { m_alternate_color = false; setMinimumWidth(140); @@ -101,7 +101,7 @@ EqResult::~EqResult() void EqResult::add(const TQString & question, const TQString & answer) { - TQColor bgcolor = colorGroup().base(); + TQColor bgcolor = tqcolorGroup().base(); if ( m_alternate_color ) bgcolor = bgcolor.dark( 120 ); diff --git a/kalzium/src/eqresult.h b/kalzium/src/eqresult.h index 39e7d85a..2b862d3b 100644 --- a/kalzium/src/eqresult.h +++ b/kalzium/src/eqresult.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _EQRESULT_H_ -#define _EQRESULT_H_ +#ifndef _ETQRESULT_H_ +#define _ETQRESULT_H_ #include <tqlistbox.h> #include <tqsimplerichtext.h> @@ -27,7 +27,7 @@ /** * @author Thomas Nagy */ -class QuestionItem : public QListBoxItem +class QuestionItem : public TQListBoxItem { public: QuestionItem( TQListBox*, const TQString&, TQColor bg ); @@ -43,7 +43,7 @@ class QuestionItem : public QListBoxItem /** * @author Thomas Nagy */ -class AnswerItem : public QListBoxItem +class AnswerItem : public TQListBoxItem { public: AnswerItem( TQListBox*, const TQString&, const TQString&, TQColor bg ); @@ -69,12 +69,13 @@ class AnswerItem : public QListBoxItem /** * @author Thomas Nagy */ -class EqResult : public QListBox +class EqResult : public TQListBox { Q_OBJECT + TQ_OBJECT public: - EqResult(TQWidget *parent); + EqResult(TQWidget *tqparent); ~EqResult(); public slots: @@ -86,5 +87,5 @@ private: bool m_alternate_color; }; -#endif // _EQRESULT_H_ +#endif // _ETQRESULT_H_ diff --git a/kalzium/src/isotope.cpp b/kalzium/src/isotope.cpp index 268e99d4..3b2dbe63 100644 --- a/kalzium/src/isotope.cpp +++ b/kalzium/src/isotope.cpp @@ -52,24 +52,24 @@ TQString Isotope::halflifeAsString() if ( !seconds() )//years { if ( m_halflife > 1000000 ) - halflife = i18n("%1 million years").arg( KalziumUtils::localizedValue( m_halflife/1000000.0, 2 ) ); + halflife = i18n("%1 million years").tqarg( KalziumUtils::localizedValue( m_halflife/1000000.0, 2 ) ); if ( m_halflife > 1000000000 ) - halflife = i18n("%1 billion years").arg( KalziumUtils::localizedValue( m_halflife/1000000000.0, 2 ) ); + halflife = i18n("%1 billion years").tqarg( KalziumUtils::localizedValue( m_halflife/1000000000.0, 2 ) ); else - halflife = i18n("%1 years").arg( KalziumUtils::localizedValue( m_halflife, 2 ) ); + halflife = i18n("%1 years").tqarg( KalziumUtils::localizedValue( m_halflife, 2 ) ); } else { if ( m_halflife < 120 ) - halflife = i18n("%1 seconds").arg( KalziumUtils::localizedValue( m_halflife, 2 ) ); + halflife = i18n("%1 seconds").tqarg( KalziumUtils::localizedValue( m_halflife, 2 ) ); else if ( m_halflife > 1000 ) - halflife = i18n("%1 minutes").arg( KalziumUtils::localizedValue( m_halflife/60.0, 2 ) ); + halflife = i18n("%1 minutes").tqarg( KalziumUtils::localizedValue( m_halflife/60.0, 2 ) ); else if ( m_halflife > 3600 ) - halflife = i18n("%1 hours").arg( KalziumUtils::localizedValue( m_halflife/( 60*60 ), 2 ) ); + halflife = i18n("%1 hours").tqarg( KalziumUtils::localizedValue( m_halflife/( 60*60 ), 2 ) ); if ( m_halflife > 86400 ) //one day - halflife = i18n("%1 days").arg( KalziumUtils::localizedValue( m_halflife/( 60*60*24 ), 2 ) ); + halflife = i18n("%1 days").tqarg( KalziumUtils::localizedValue( m_halflife/( 60*60*24 ), 2 ) ); if ( m_halflife > ( 31536000 * 2 ) ) //two year - halflife = i18n("%1 years").arg( KalziumUtils::localizedValue( m_halflife/( 3600.0*365 ), 2 ) ); + halflife = i18n("%1 years").tqarg( KalziumUtils::localizedValue( m_halflife/( 3600.0*365 ), 2 ) ); } return halflife; diff --git a/kalzium/src/kalzium.cpp b/kalzium/src/kalzium.cpp index 84c2c984..747c230f 100644 --- a/kalzium/src/kalzium.cpp +++ b/kalzium/src/kalzium.cpp @@ -74,10 +74,10 @@ Kalzium::Kalzium() m_infoDialog = 0; m_toolboxCurrent = 0; - connect( m_PerodicTableView, TQT_SIGNAL( ElementClicked( int ) ), this, TQT_SLOT( openInformationDialog( int ) )); - connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), this, TQT_SLOT( slotStatusbar( int ) )); + connect( m_PerodicTableView, TQT_SIGNAL( ElementClicked( int ) ), TQT_TQOBJECT(this), TQT_SLOT( openInformationDialog( int ) )); + connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotStatusbar( int ) )); - // layouting + // tqlayouting setCentralWidget( centralWidget ); centralWidget->show(); @@ -107,14 +107,14 @@ Kalzium::Kalzium() void Kalzium::setupActions() { - m_actionNoScheme = new KToggleAction(i18n("&No Color Scheme"), 0, this, TQT_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); + m_actionNoScheme = new KToggleAction(i18n("&No Color Scheme"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); // the actions for the color schemes - m_actionGroups = new KToggleAction(i18n("Show &Groups"), 0, this, TQT_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); - m_actionBlocks = new KToggleAction(i18n("Show &Blocks"), 0, this, TQT_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); - m_actionAcid = new KToggleAction(i18n("Show &Acid Behavior"), 0, this, TQT_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); - m_actionFamily = new KToggleAction(i18n("Show &Family"), 0, this, TQT_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); - m_actionCrystal = new KToggleAction(i18n("Show &Crystal Structures"), 0, this, TQT_SLOT(slotLookCrystal()), actionCollection(), "view_look_crystal"); + m_actionGroups = new KToggleAction(i18n("Show &Groups"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); + m_actionBlocks = new KToggleAction(i18n("Show &Blocks"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); + m_actionAcid = new KToggleAction(i18n("Show &Acid Behavior"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); + m_actionFamily = new KToggleAction(i18n("Show &Family"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); + m_actionCrystal = new KToggleAction(i18n("Show &Crystal Structures"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookCrystal()), actionCollection(), "view_look_crystal"); //the actions for switching PerodicTableView TQStringList gradientlist; @@ -127,9 +127,9 @@ void Kalzium::setupActions() gradientlist.append(i18n("Melting Point")); gradientlist.append(i18n("Electronegativity")); gradientlist.append(i18n("Electron Affinity")); - gradient_action = new KSelectAction(i18n("&Gradient"), 0, this, 0, actionCollection(), "view_look_gradmenu"); + gradient_action = new KSelectAction(i18n("&Gradient"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_look_gradmenu"); gradient_action->setItems(gradientlist); - connect (gradient_action, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwitchtoGradient(int))); + connect (gradient_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoGradient(int))); // the actions for switching PerodicTableView TQStringList numlist; @@ -137,28 +137,28 @@ void Kalzium::setupActions() numlist.append(i18n("Show &IUPAC")); numlist.append(i18n("Show &CAS")); numlist.append(i18n("Show &Old IUPAC")); - numeration_action = new KSelectAction (i18n("&Numeration"), 0, this, 0, actionCollection(), "view_numerationtype"); + numeration_action = new KSelectAction (i18n("&Numeration"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_numerationtype"); numeration_action->setItems(numlist); numeration_action->setCurrentItem(Prefs::numeration()); - connect (numeration_action, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwitchtoNumeration(int))); + connect (numeration_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoNumeration(int))); - m_SidebarAction = new KAction(i18n("Show &Sidebar"), "sidebar", 0, this, TQT_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); + m_SidebarAction = new KAction(i18n("Show &Sidebar"), "sidebar", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); #ifdef HAVE_FACILE - m_EQSolverAction = new KAction(i18n("&Equation Solver..."), "eqchem", 0, this, TQT_SLOT(slotShowEQSolver()), actionCollection(), "tools_eqsolver"); + m_ETQSolverAction = new KAction(i18n("&Equation Solver..."), "eqchem", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowETQSolver()), actionCollection(), "tools_eqsolver"); #endif // tools actions - m_pPlotAction = new KAction(i18n("&Plot Data..."), "plot", 0, this, TQT_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); - m_pGlossaryAction = new KAction(i18n("&Glossary..."), "glossary", 0, this, TQT_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); + m_pPlotAction = new KAction(i18n("&Plot Data..."), "plot", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); + m_pGlossaryAction = new KAction(i18n("&Glossary..."), "glossary", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); // other period view options - m_pLegendAction = new KAction(i18n("Show &Legend"), "legend", 0, this, TQT_SLOT(slotShowLegend()), actionCollection(), "view_legend"); - m_pTooltipAction = new KAction(i18n("Show &Tooltip"), "tooltip", 0, this, TQT_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); + m_pLegendAction = new KAction(i18n("Show &Legend"), "legend", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowLegend()), actionCollection(), "view_legend"); + m_pTooltipAction = new KAction(i18n("Show &Tooltip"), "tooltip", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); // the standard actions - KStdAction::preferences(this, TQT_SLOT(showSettingsDialog()), actionCollection()); - KStdAction::quit( kapp, TQT_SLOT (closeAllWindows()),actionCollection() ); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettingsDialog()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()),actionCollection() ); slotShowScheme( Prefs::colorschemebox() ); slotSwitchtoNumeration( Prefs::numeration() ); @@ -212,8 +212,8 @@ void Kalzium::setupSidebars() TQVBoxLayout *lay = new TQVBoxLayout( fake, 5 ); lay->activate(); m_detailWidget = new DetailedGraphicalOverview( fake, "DetailedGraphicalOverview" ); - m_detailWidget->setMinimumSize( 200, m_detailWidget->minimumSize().height() ); - connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), this, TQT_SLOT( slotSelectedNumber( int ) )); + m_detailWidget->setMinimumSize( 200, m_detailWidget->tqminimumSize().height() ); + connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotSelectedNumber( int ) )); lay->addWidget( m_detailWidget ); lay->addItem( new TQSpacerItem( 10, 10, TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding ) ); m_toolbox->addItem( fake, SmallIcon( "overview" ), i18n( "Overview" ) ); @@ -235,13 +235,13 @@ void Kalzium::setupSidebars() m_PerodicTableView, TQT_SLOT( setTemperature( int ) ) ); m_toolbox->addItem( m_somWidget, SmallIcon( "statematter" ), i18n( "State of Matter" ) ); - connect( m_toolbox, TQT_SIGNAL( currentChanged( int ) ), this, TQT_SLOT( slotToolboxCurrentChanged( int ) ) ); + connect( m_toolbox, TQT_SIGNAL( currentChanged( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolboxCurrentChanged( int ) ) ); moveDockWindow( m_dockWin, DockLeft ); setDockEnabled( /*m_dockWin, */DockTop, false ); setDockEnabled( /*m_dockWin, */DockBottom, false ); m_dockWin->hide(); - connect( m_dockWin, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotSidebarVisibilityChanged(bool))); + connect( m_dockWin, TQT_SIGNAL(visibilityChanged(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSidebarVisibilityChanged(bool))); } @@ -250,10 +250,10 @@ void Kalzium::slotGlossary() m_glossarydlg->show(); } -void Kalzium::slotShowEQSolver() +void Kalzium::slotShowETQSolver() { #ifdef HAVE_FACILE - EQChemDialog *dlg = new EQChemDialog( this ); + ETQChemDialog *dlg = new ETQChemDialog( this ); TQWidget *page = new TQWidget( dlg ); dlg->setMainWidget( page ); @@ -422,7 +422,7 @@ void Kalzium::setupStatusBar() void Kalzium::slotStatusbar( int num ) { Element *e = KalziumDataObject::instance()->element( num ); - statusBar()->changeItem( i18n( "For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u" ).arg( e->elname() ).arg(e->number() ).arg( KalziumUtils::localizedValue( e->mass(), 6 ) ) , IDS_ELEMENTINFO ); + statusBar()->changeItem( i18n( "For example: \"Carbon (6), Mass: 12.0107 u\"", "%1 (%2), Mass: %3 u" ).tqarg( e->elname() ).tqarg(e->number() ).tqarg( KalziumUtils::localizedValue( e->mass(), 6 ) ) , IDS_ELEMENTINFO ); } void Kalzium::openInformationDialog( int number ) diff --git a/kalzium/src/kalzium.h b/kalzium/src/kalzium.h index 1a726fed..44b2583e 100644 --- a/kalzium/src/kalzium.h +++ b/kalzium/src/kalzium.h @@ -46,6 +46,7 @@ class GlossaryDialog; class Kalzium : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -95,7 +96,7 @@ class Kalzium : public KMainWindow KAction *m_pTooltipAction; KAction *m_pLegendAction; KAction *m_SidebarAction; - KAction *m_EQSolverAction; + KAction *m_ETQSolverAction; KToggleAction *m_actionNoScheme; KToggleAction *m_actionGroups; @@ -105,7 +106,7 @@ class Kalzium : public KMainWindow KToggleAction *m_actionCrystal; /** - * the layout of the central Widget ( CentralWidget ) + * the tqlayout of the central Widget ( CentralWidget ) */ TQVBoxLayout *m_pCentralLayout; @@ -138,7 +139,7 @@ class Kalzium : public KMainWindow */ void slotShowScheme(int); - void slotShowEQSolver(); + void slotShowETQSolver(); void slotShowLegend(); diff --git a/kalzium/src/kalziumdataobject.cpp b/kalzium/src/kalziumdataobject.cpp index a759fee2..f25cbfc4 100644 --- a/kalzium/src/kalziumdataobject.cpp +++ b/kalzium/src/kalziumdataobject.cpp @@ -46,29 +46,29 @@ KalziumDataObject::KalziumDataObject() KURL url; url.setPath( locate("data", "kalzium/data/")); url.setFileName( "data.xml" ); - TQFile layoutFile( url.path() ); + TQFile tqlayoutFile( url.path() ); - if (!layoutFile.exists()) + if (!tqlayoutFile.exists()) { kdDebug() << "data.xml not found, exiting" << endl; kapp->exit(0); return; } - if (!layoutFile.open(IO_ReadOnly)) + if (!tqlayoutFile.open(IO_ReadOnly)) { kdDebug() << "data.xml IO-error" << endl; return; } // Check if the document is well-formed - if (!doc.setContent(&layoutFile)) + if (!doc.setContent(&tqlayoutFile)) { kdDebug() << "wrong xml" << endl; - layoutFile.close(); + tqlayoutFile.close(); return; } - layoutFile.close(); + tqlayoutFile.close(); ElementList = readData( doc ); m_numOfElements = ElementList.count(); diff --git a/kalzium/src/kalziumtip.cpp b/kalzium/src/kalziumtip.cpp index ba2a8252..794c9f25 100644 --- a/kalzium/src/kalziumtip.cpp +++ b/kalzium/src/kalziumtip.cpp @@ -38,9 +38,9 @@ #include <klocale.h> #include <kstandarddirs.h> -KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWidget( parent, name, f ) +KalziumTip::KalziumTip( TQWidget * tqparent, const char * name, WFlags f ) : TQWidget( tqparent, name, f ) { - setFocusPolicy(NoFocus); //the widget don't get the keyboard focus + setFocusPolicy(TQ_NoFocus); //the widget don't get the keyboard focus setBackgroundMode(NoBackground); // widget has no background resize(0,0); hide(); //initailly hide it @@ -54,8 +54,8 @@ KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWid void KalziumTip::showTip( TQPoint mouse, Element* element, int visibleWidth, int visibleHeight ) { TQWidget *p = 0; - if ( dynamic_cast<TQWidget*>( parent() ) ) - p = static_cast<TQWidget*>( parent() ); + if ( dynamic_cast<TQWidget*>( tqparent() ) ) + p = TQT_TQWIDGET( tqparent() ); if ( p ) { @@ -82,8 +82,8 @@ void KalziumTip::showTip( TQPoint mouse, Element* element, int visibleWidth, int if( element == m_tippedElement ) { // Avoid moving out of the current screen - if (m_mousePointer.x()+width() > qApp->desktop()->width()) - m_mousePointer.setX(qApp->desktop()->width() - width()); + if (m_mousePointer.x()+width() > tqApp->desktop()->width()) + m_mousePointer.setX(tqApp->desktop()->width() - width()); move(m_mousePointer); //do not paint again if already painted } @@ -113,7 +113,7 @@ void KalziumTip::paintEvent(TQPaintEvent* e) void KalziumTip::mouseMoveEvent(TQMouseEvent * e) { - // delegate the mouse move event to the parent (actually the elements table) + // delegate the mouse move event to the tqparent (actually the elements table) // so that this tooltip doesn't stop to be updated e->ignore(); } @@ -128,10 +128,10 @@ void KalziumTip::display() TQString elementname = m_tippedElement->elname(); TQString number = i18n( "Number: %1" ) - .arg( TQString::number(m_tippedElement->number()) ); + .tqarg( TQString::number(m_tippedElement->number()) ); TQString mass = i18n( "Mass: %1" ) - .arg( KalziumUtils::localizedValue(m_tippedElement->mass(), 6) ); + .tqarg( KalziumUtils::localizedValue(m_tippedElement->mass(), 6) ); m_richText = new TQSimpleRichText("<qt><h1>" + elementname + "</h1><p>" + number + "</p><p>" @@ -139,7 +139,7 @@ void KalziumTip::display() m_richText->setWidth(400); - m_maskEffect = isVisible() ? Plain : Dissolve; + m_tqmaskEffect = isVisible() ? Plain : Dissolve; m_dissolveSize = 24; m_dissolveDelta = -1; @@ -167,18 +167,18 @@ void KalziumTip::displayInternal() textRect.addCoords(0,0,2,2); int margin = KDialog::marginHint(); - int height = QMAX(m_icon.height(), textRect.height()) + 2 * margin; + int height = TQMAX(m_icon.height(), textRect.height()) + 2 * margin; int textX = 2 + m_icon.width() + 2 * margin; int width = textX + textRect.width() + margin; int textY = (height - textRect.height()) / 2; - //resize pixmap, mask and widget - m_mask.resize(width, height); + //resize pixmap, tqmask and widget + m_tqmask.resize(width, height); m_pixmap.resize(width, height); resize(width, height); - // create and set transparency mask - switch(m_maskEffect) + // create and set transparency tqmask + switch(m_tqmaskEffect) { case Plain: plainMask(); @@ -191,7 +191,7 @@ void KalziumTip::displayInternal() // draw background TQPainter bufferPainter(&m_pixmap); - bufferPainter.setPen(Qt::black); + bufferPainter.setPen(TQt::black); bufferPainter.setBrush(backgroundColor()); bufferPainter.drawRoundRect(0, 0, width, height, 1600 / width, 1600 / height); @@ -206,32 +206,32 @@ void KalziumTip::displayInternal() } // draw text shadow - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor(TQColorGroup::Text, cg.background().dark(115)); int shadowOffset = TQApplication::reverseLayout() ? -1 : 1; m_richText->draw(&bufferPainter, 5 + textX + shadowOffset, textY + 1, TQRect(), cg); // draw text - cg = colorGroup(); + cg = tqcolorGroup(); m_richText->draw(&bufferPainter, 5 + textX, textY, rect(), cg); } void KalziumTip::dissolveMask() { - TQPainter maskPainter(&m_mask); + TQPainter tqmaskPainter(&m_tqmask); - m_mask.fill(Qt::black); + m_tqmask.fill(TQt::black); - maskPainter.setBrush(Qt::white); - maskPainter.setPen(Qt::white); - maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), - 1600 / m_mask.rect().height()); + tqmaskPainter.setBrush(TQt::white); + tqmaskPainter.setPen(TQt::white); + tqmaskPainter.drawRoundRect(m_tqmask.rect(), 1600 / m_tqmask.rect().width(), + 1600 / m_tqmask.rect().height()); m_dissolveSize += m_dissolveDelta; if (m_dissolveSize > 0) { - maskPainter.setRasterOp(Qt::EraseROP); + tqmaskPainter.setRasterOp(TQt::EraseROP); int x, y, s; const int size = 16; @@ -247,7 +247,7 @@ void KalziumTip::dissolveMask() { s = 0; } - maskPainter.drawEllipse(x - s / 2, y - s / 2, s, s); + tqmaskPainter.drawEllipse(x - s / 2, y - s / 2, s, s); } } } @@ -257,7 +257,7 @@ void KalziumTip::dissolveMask() m_dissolveDelta = 1; } - setMask(m_mask); + setMask(m_tqmask); } void KalziumTip::hide() @@ -269,15 +269,15 @@ void KalziumTip::hide() void KalziumTip::plainMask() { - TQPainter maskPainter(&m_mask); + TQPainter tqmaskPainter(&m_tqmask); - m_mask.fill(Qt::black); + m_tqmask.fill(TQt::black); - maskPainter.setBrush(Qt::white); - maskPainter.setPen(Qt::white); - maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), - 1600 / m_mask.rect().height()); - setMask(m_mask); + tqmaskPainter.setBrush(TQt::white); + tqmaskPainter.setPen(TQt::white); + tqmaskPainter.drawRoundRect(m_tqmask.rect(), 1600 / m_tqmask.rect().width(), + 1600 / m_tqmask.rect().height()); + setMask(m_tqmask); m_frameTimer.stop(); } @@ -293,7 +293,7 @@ void KalziumTip::loadIcon() if ( !iconpath.isEmpty() ) { TQImage img ( iconpath, "JPEG" ); - img = img.smoothScale ( 128, 128, TQImage::ScaleMin ); + img = img.smoothScale ( 128, 128, TQ_ScaleMin ); m_icon.convertFromImage( img ); } diff --git a/kalzium/src/kalziumtip.h b/kalzium/src/kalziumtip.h index 0186529f..79923bd0 100644 --- a/kalzium/src/kalziumtip.h +++ b/kalzium/src/kalziumtip.h @@ -37,14 +37,15 @@ class TQTimer; * @short tooltip for kalzium * @author Martin Pfeiffer */ -class KalziumTip : public QWidget +class KalziumTip : public TQWidget { - Q_OBJECT + Q_OBJECT + TQ_OBJECT public: enum MaskEffect { Plain, Dissolve }; - KalziumTip( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KalziumTip( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); void showTip( TQPoint, Element* element, int visibleWidth, int visibleHeight ); //show the tip void hide(); // hide it @@ -54,7 +55,7 @@ class KalziumTip : public QWidget void plainMask(); void dissolveMask(); - // if the mouse pointer hovers us, send the event to the parent + // if the mouse pointer hovers us, send the event to the tqparent // so we are some-what 'mouse transparent' void mouseMoveEvent(TQMouseEvent * e); void displayInternal(); @@ -66,20 +67,20 @@ class KalziumTip : public QWidget void internalUpdate(); private: - TQBitmap m_mask; + TQBitmap m_tqmask; TQPoint m_mousePointer; TQPixmap m_pixmap; TQPixmap m_icon; //icon shown on the tip TQPixmap m_noElemIcon; //icon for element wich have no image - MaskEffect m_maskEffect; //inidicates to show mask effect or plain + MaskEffect m_tqmaskEffect; //inidicates to show tqmask effect or plain TQSimpleRichText* m_richText; int m_dissolveSize; int m_dissolveDelta; TQTimer m_frameTimer; //timer for the dissolve effect - bool m_dirty; //indicates repainting the tooltip internal + bool m_dirty; //indicates tqrepainting the tooltip internal const Element* m_tippedElement; //the element the tip is about }; diff --git a/kalzium/src/kalziumutils.cpp b/kalzium/src/kalziumutils.cpp index 1522e495..f7ed9d09 100644 --- a/kalzium/src/kalziumutils.cpp +++ b/kalzium/src/kalziumutils.cpp @@ -35,10 +35,10 @@ int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont fo { font.setPointSize( size ); p->setFont( font ); - r = p->boundingRect( TQRect(), Qt::AlignAuto, string ); + r = p->boundingRect( TQRect(), TQt::AlignAuto, string ); r.moveBy( rect.left(), rect.top() ); - if ( rect.contains( r ) ) + if ( rect.tqcontains( r ) ) goodSizeFound = true; else size--; @@ -50,12 +50,12 @@ int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont fo int KalziumUtils::StringHeight( const TQString& string, const TQFont& font, TQPainter* p ) { - return p->boundingRect( TQRect(), Qt::AlignAuto, string ).height(); + return p->boundingRect( TQRect(), TQt::AlignAuto, string ).height(); } int KalziumUtils::StringWidth( const TQString& string, const TQFont& font, TQPainter* p ) { - return p->boundingRect( TQRect(), Qt::AlignAuto, string ).width(); + return p->boundingRect( TQRect(), TQt::AlignAuto, string ).width(); } double KalziumUtils::strippedValue( double num ) @@ -69,7 +69,7 @@ double KalziumUtils::strippedValue( double num ) power *= 10; num = num / power * 10000; - num = qRound( num ); + num = tqRound( num ); return num * power / 10000; } diff --git a/kalzium/src/molcalcwidget.cpp b/kalzium/src/molcalcwidget.cpp index 60eb5108..0bcc4f80 100644 --- a/kalzium/src/molcalcwidget.cpp +++ b/kalzium/src/molcalcwidget.cpp @@ -41,8 +41,8 @@ #include <tqtooltip.h> -MolcalcWidget::MolcalcWidget( TQWidget *parent, const char *name ) - : MolcalcWidgetBase( parent, name ) +MolcalcWidget::MolcalcWidget( TQWidget *tqparent, const char *name ) + : MolcalcWidgetBase( tqparent, name ) { clear(); } @@ -82,16 +82,16 @@ void MolcalcWidget::updateUI() for ( ; it != itEnd; ++it ) { // Update the resultLabel str += i18n( "For example: \"1 Carbon\" or \"3 Oxygen\"", "%1 %2\n" ) - .arg( (*it)->count() ) - .arg( (*it)->element()->elname() ); + .tqarg( (*it)->count() ) + .tqarg( (*it)->element()->elname() ); complexString += i18n( "For example: 1 Seaborgium. Cumulative Mass: 263.119 u (39.25%)", "%1 %2. Cumulative Mass: %3 u (%4%)\n" ) - .arg( (*it)->count() ) - .arg( (*it)->element()->elname() ) - .arg( (*it)->count() * (*it)->element()->mass() ) - .arg( KalziumUtils::strippedValue( (( (*it)->count() * (*it)->element()->mass() ) + .tqarg( (*it)->count() ) + .tqarg( (*it)->element()->elname() ) + .tqarg( (*it)->count() * (*it)->element()->mass() ) + .tqarg( KalziumUtils::strippedValue( (( (*it)->count() * (*it)->element()->mass() ) / m_mass ) * 100 ) ); } resultLabel->setText( str ); @@ -100,7 +100,7 @@ void MolcalcWidget::updateUI() resultComposition->setText( compositionString(m_elementMap) ); // The mass - resultMass->setText( i18n( "Molecular mass: %1 u" ).arg( m_mass ) ); + resultMass->setText( i18n( "Molecular mass: %1 u" ).tqarg( m_mass ) ); TQToolTip::add( resultMass, complexString ); TQToolTip::add( resultComposition, complexString ); @@ -126,8 +126,8 @@ TQString MolcalcWidget::compositionString( ElementCountMap &_map ) ElementCountMap::Iterator itEnd = _map.end(); for (; it != itEnd; ++it) { str += i18n( "%1<sub>%2</sub> " ) - .arg( (*it)->element()->symbol() ) - .arg( (*it)->count() ); + .tqarg( (*it)->element()->symbol() ) + .tqarg( (*it)->count() ); } return str; diff --git a/kalzium/src/molcalcwidget.h b/kalzium/src/molcalcwidget.h index c86d41d3..27cb0269 100644 --- a/kalzium/src/molcalcwidget.h +++ b/kalzium/src/molcalcwidget.h @@ -41,13 +41,14 @@ class MoleculeParser; class MolcalcWidget : public MolcalcWidgetBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of this widget */ - MolcalcWidget( TQWidget *parent = 0, const char *name = 0 ); + MolcalcWidget( TQWidget *tqparent = 0, const char *name = 0 ); protected slots: void slotCalcButtonClicked(); diff --git a/kalzium/src/molcalcwidgetbase.ui b/kalzium/src/molcalcwidgetbase.ui index a330b773..ab3f9f80 100644 --- a/kalzium/src/molcalcwidgetbase.ui +++ b/kalzium/src/molcalcwidgetbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MolcalcWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MolcalcWidgetBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <hbox> <widget class="KLineEdit"> <property name="name"> @@ -56,7 +56,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>resultComposition</cstring> </property> @@ -69,7 +69,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -83,14 +83,14 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>resultLabel</cstring> </property> @@ -98,7 +98,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>resultMass</cstring> </property> @@ -124,10 +124,10 @@ <slot>slotCalcButtonClicked()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotCalcButtonClicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kalzium/src/moleculeparser.cpp b/kalzium/src/moleculeparser.cpp index 6780e65e..b3d19120 100644 --- a/kalzium/src/moleculeparser.cpp +++ b/kalzium/src/moleculeparser.cpp @@ -172,7 +172,7 @@ MoleculeParser::parseSubmolecule(double *_resultMass, // Parse a term within the molecule, i.e. a single atom or a -// submolecule within parenthesis followed by an optional number. +// submolecule within tqparenthesis followed by an optional number. // Examples: Bk, Mn2, (COOH)2 // // Return true if correct, otherwise return false. diff --git a/kalzium/src/orbitswidget.cpp b/kalzium/src/orbitswidget.cpp index 06824c0f..35e74bf7 100644 --- a/kalzium/src/orbitswidget.cpp +++ b/kalzium/src/orbitswidget.cpp @@ -24,7 +24,7 @@ static TQStringList hulllist; -OrbitsWidget::OrbitsWidget( TQWidget *parent, const char *name) : TQWidget( parent, name ) +OrbitsWidget::OrbitsWidget( TQWidget *tqparent, const char *name) : TQWidget( tqparent, name ) { if ( hulllist.count() == 0 ) { @@ -162,20 +162,20 @@ void OrbitsWidget::getNumberOfOrbits() int cut = 0; bool cont = true; - if ( !o.contains( rxb ) ) //only true for H and He + if ( !o.tqcontains( rxb ) ) //only true for H and He numOfElectrons.append( o.toInt() ); else //every other element { while ( cont ) { - pos = o.find( rxb ); + pos = o.tqfind( rxb ); cut = o.length()-pos-1; numOfElectrons.append(o.left( pos ).toInt()); o = o.right( cut ); num++; - if ( !o.contains( rxb ) ) + if ( !o.tqcontains( rxb ) ) { numOfElectrons.append( o.toInt() ); cont = false; diff --git a/kalzium/src/orbitswidget.h b/kalzium/src/orbitswidget.h index cd7279bf..14ab4752 100644 --- a/kalzium/src/orbitswidget.h +++ b/kalzium/src/orbitswidget.h @@ -26,12 +26,13 @@ * @short the widget which displays the Bohr-orbit of the element * @author Carsten Niehaus */ -class OrbitsWidget : public QWidget +class OrbitsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - OrbitsWidget( TQWidget *parent=0 , const char *name =0 ); + OrbitsWidget( TQWidget *tqparent=0 , const char *name =0 ); void setElementNumber( const int num ); diff --git a/kalzium/src/parser.cpp b/kalzium/src/parser.cpp index d678885f..9edd9f1f 100644 --- a/kalzium/src/parser.cpp +++ b/kalzium/src/parser.cpp @@ -21,7 +21,7 @@ Parser::Parser() { - start(TQString::null); + start(TQString()); } @@ -48,7 +48,7 @@ Parser::start(const TQString& _str) } else { m_index = 0; - m_nextChar = m_str.at(0).latin1(); + m_nextChar = m_str.tqat(0).latin1(); getNextToken(); } } @@ -148,7 +148,7 @@ Parser::getNextChar() m_nextChar = -1; } else - m_nextChar = m_str.at(++m_index).latin1(); + m_nextChar = m_str.tqat(++m_index).latin1(); // Take care of null-terminated strings. if (m_nextChar == 0) { diff --git a/kalzium/src/periodictableview.cpp b/kalzium/src/periodictableview.cpp index a09dcf34..0e810aff 100644 --- a/kalzium/src/periodictableview.cpp +++ b/kalzium/src/periodictableview.cpp @@ -41,8 +41,8 @@ #include <tqcolor.h> #include <tqrect.h> -PerodicTableView::PerodicTableView(TQWidget *parent, const char *name) - : TQWidget(parent, name), m_kalziumTip(0), table(0), table2(0) +PerodicTableView::PerodicTableView(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), m_kalziumTip(0), table(0), table2(0) { d = KalziumDataObject::instance(); @@ -171,8 +171,8 @@ void PerodicTableView::slotToolTip( int number ) m_tooltipElementNumber = number; TQWidget *p = 0; - if ( dynamic_cast<TQWidget*>( parent() ) ) - p = static_cast<TQWidget*>( parent() ); + if ( dynamic_cast<TQWidget*>( tqparent() ) ) + p = TQT_TQWIDGET( tqparent() ); if( p ) m_kalziumTip->showTip( mapFromGlobal(TQCursor::pos()), @@ -328,7 +328,7 @@ void PerodicTableView::resizeEvent( TQResizeEvent * /*e*/ ) table->resize( width(), height() ); table2->resize( width(), height() ); // XXX: I know it isn't the best way, but otherwise the table won't be redrawn - // on repaint... Feel *free* to remove these two lines if you foind a better + // on tqrepaint... Feel *free* to remove these two lines if you foind a better // solution... doFullDraw = true; update(); @@ -417,14 +417,14 @@ void PerodicTableView::paintCurrentSelection() p.begin(table); TQPen pen; - pen.setStyle( DotLine ); + pen.setStyle( Qt::DotLine ); pen.setWidth( 4 ); - pen.setColor( Qt::blue ); + pen.setColor( TQt::blue ); p.setPen( pen ); p.drawEllipse( x-10,y-10,ELEMENTSIZE+20,ELEMENTSIZE+20 ); pen.setWidth( 3 ); - pen.setColor( Qt::red ); + pen.setColor( TQt::red ); p.setPen( pen ); p.drawEllipse( x-5,y-5,ELEMENTSIZE+10,ELEMENTSIZE+10 ); @@ -491,12 +491,12 @@ void PerodicTableView::drawLegendToolTip( TQPainter* p ) bRect.moveBy( 15, 0 ); } - p->setBrush(Qt::SolidPattern); + p->setBrush(TQt::SolidPattern); p->setBrush( TQColor( 255, 255, 220 ) ); p->drawRect( bRectExt ); - p->setBrush( Qt::black ); - p->setBrush(Qt::NoBrush); + p->setBrush( TQt::black ); + p->setBrush(TQt::NoBrush); p->drawText( bRect, AlignLeft|AlignTop, text ); } @@ -582,9 +582,9 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*3, square_w, square_h, c_liquid ); p->fillRect(x1, fieldheight*4, square_w, square_h, c_vapor ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Solid") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Liquid") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Vaporous") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Solid") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Liquid") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Vaporous") ); return; } switch ( m_currentScheme ){ @@ -601,14 +601,14 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect( x2, fieldheight*4, square_w, square_h, color_7); p->fillRect( x2, fieldheight*5, square_w, square_h, color_8 ); - p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 1") ); - p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 2")); - p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 3")); - p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 4")); - p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 5")); - p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 6")); - p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 7")); - p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Group 8")); + p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 1") ); + p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 2")); + p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 3")); + p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 4")); + p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 5")); + p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 6")); + p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 7")); + p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Group 8")); break; case PerodicTableView::BLOCK: p->fillRect(x1, fieldheight*2, square_w, square_h, color_s ); @@ -616,10 +616,10 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*4, square_w, square_h, color_d ); p->fillRect(x1, fieldheight*5, square_w, square_h, color_f ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("s-Block") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("p-Block") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("d-Block") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("f-Block") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("s-Block") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("p-Block") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("d-Block") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("f-Block") ); break; case PerodicTableView::ACIDIC: p->fillRect(x1, fieldheight*2, square_w, square_h, color_ba ); @@ -627,10 +627,10 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect(x1, fieldheight*4, square_w, square_h, color_ac ); p->fillRect(x1, fieldheight*5, square_w, square_h, color_amp ); - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Basic") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Neutral") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Acidic") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("both acidic and basic behaviour","Amphoteric") ); + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Basic") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Neutral") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Acidic") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("both acidic and basic behaviour","Amphoteric") ); break; case PerodicTableView::FAMILY: p->fillRect( x1, fieldheight*2, square_w, square_h, c_alkaline ); @@ -643,28 +643,28 @@ void PerodicTableView::drawLegend( TQPainter* p ) p->fillRect( x2, fieldheight*5, square_w, square_h, c_noble_gas ); p->fillRect( x1, fieldheight*6, square_w, square_h, c_metalloid ); - p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Alkaline") ); - p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Rare Earth")); - p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Non-Metals")); - p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("Alkalie-Metals")); - p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Other Metal")); - p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("Halogene")); - p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Transition Metal")); - p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("Noble Gas")); - p->drawText( x1 + textOffset , fieldheight*6, fieldsize, fieldheight, Qt::AlignLeft, i18n("Metalloid")); + p->drawText( x1 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Alkaline") ); + p->drawText( x2 + textOffset , fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Rare Earth")); + p->drawText( x1 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Non-Metals")); + p->drawText( x2 + textOffset , fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("Alkalie-Metals")); + p->drawText( x1 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Other Metal")); + p->drawText( x2 + textOffset , fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("Halogene")); + p->drawText( x1 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Transition Metal")); + p->drawText( x2 + textOffset , fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("Noble Gas")); + p->drawText( x1 + textOffset , fieldheight*6, fieldsize, fieldheight, TQt::AlignLeft, i18n("Metalloid")); break; case PerodicTableView::CRYSTAL: - p->fillRect(x1, fieldheight*2, square_w, square_h, Qt::cyan ); - p->fillRect(x1, fieldheight*3, square_w, square_h, Qt::red ); - p->fillRect(x1, fieldheight*4, square_w, square_h, Qt::yellow ); - p->fillRect(x1, fieldheight*5, square_w, square_h, Qt::green ); - p->fillRect(x1, fieldheight*6, square_w, square_h, Qt::white ); - - p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, Qt::AlignLeft, i18n("Own") ); - p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, Qt::AlignLeft, i18n("bcc, body centered cubic") ); - p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, Qt::AlignLeft, i18n("hdp, hexagonal") ); - p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, Qt::AlignLeft, i18n("ccp, cubic close packed") ); - p->drawText(x1 + textOffset, fieldheight*6, fieldsize, fieldheight, Qt::AlignLeft, i18n("Unknown") ); + p->fillRect(x1, fieldheight*2, square_w, square_h, TQt::cyan ); + p->fillRect(x1, fieldheight*3, square_w, square_h, TQt::red ); + p->fillRect(x1, fieldheight*4, square_w, square_h, TQt::yellow ); + p->fillRect(x1, fieldheight*5, square_w, square_h, TQt::green ); + p->fillRect(x1, fieldheight*6, square_w, square_h, TQt::white ); + + p->drawText(x1 + textOffset, fieldheight*2, fieldsize, fieldheight, TQt::AlignLeft, i18n("Own") ); + p->drawText(x1 + textOffset, fieldheight*3, fieldsize, fieldheight, TQt::AlignLeft, i18n("bcc, body centered cubic") ); + p->drawText(x1 + textOffset, fieldheight*4, fieldsize, fieldheight, TQt::AlignLeft, i18n("hdp, hexagonal") ); + p->drawText(x1 + textOffset, fieldheight*5, fieldsize, fieldheight, TQt::AlignLeft, i18n("ccp, cubic close packed") ); + p->drawText(x1 + textOffset, fieldheight*6, fieldsize, fieldheight, TQt::AlignLeft, i18n("Unknown") ); break; } } @@ -679,19 +679,19 @@ void PerodicTableView::drawNumeration( TQPainter* p ) case PerodicTableView::CAS: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, TQString::number(i+1)); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, TQString::number(i+1)); } break; case PerodicTableView::IUPAC: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, m_IUPAClist[i]); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, m_IUPAClist[i]); } break; case PerodicTableView::IUPACOLD: for(int i = 0; i < 18 ; ++i ) { - p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, Qt::AlignCenter, m_IUPACOLDlist[i]); + p->drawText( i*ELEMENTSIZE,0 ,ELEMENTSIZE,ELEMENTSIZE, TQt::AlignCenter, m_IUPACOLDlist[i]); } break; } @@ -741,7 +741,7 @@ void PerodicTableView::mouseMoveEvent( TQMouseEvent * /*mouse*/ ) //JH: only update() if we were showing a tooltip if ( m_tooltipElementNumber || m_showLegendTooltip ) { - //this invalidates the number. If the mouse + //this tqinvalidates the number. If the mouse //is moved, the number is invalid. m_tooltipElementNumber = 0; m_showLegendTooltip = false; @@ -977,7 +977,7 @@ void PerodicTableView::calculateGradient( TQPainter *p ) void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double min, const double max ) { - TQString title = TQString::null; + TQString title = TQString(); const double var = max-min; EList::ConstIterator it = d->ElementList.begin(); @@ -1103,7 +1103,7 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double // Create the gradient image. TQSize s( ELEMENTSIZE*7+20, 20 ); - TQImage img = KImageEffect::gradient ( s, Qt::white, Qt::red, + TQImage img = KImageEffect::gradient ( s, TQt::white, TQt::red, KImageEffect::HorizontalGradient ); TQPixmap pm( img ); @@ -1122,7 +1122,7 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double font.setPointSize(maxSize); p->setFont(font); - p->drawText( x+5, y+50, ELEMENTSIZE*10,20, Qt::AlignCenter, title ); + p->drawText( x+5, y+50, ELEMENTSIZE*10,20, TQt::AlignCenter, title ); p->drawPixmap( x+50, y+80, pm ); if ( m_gradientType == Element::EA ) @@ -1130,13 +1130,13 @@ void PerodicTableView::drawGradientPerodicTableView( TQPainter *p, const double // FIXME: In the lines below, "30" is the max allowed text // height. This should be calculated from the font // metrics, not hard coded. - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignRight, TQString::number( min ) ); - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignLeft, TQString::number( max ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignRight, TQString::number( min ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignLeft, TQString::number( max ) ); } else { - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignRight, TQString::number( max ) ); - p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, Qt::AlignLeft, TQString::number( min ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignRight, TQString::number( max ) ); + p->drawText( x+50,y+100,ELEMENTSIZE*7+20,30, TQt::AlignLeft, TQString::number( min ) ); } } @@ -1178,13 +1178,13 @@ void PerodicTableView::drawGradientButton( TQPainter *p, Element* e, double coef e->drawGradient( p, v, c ); } else - e->drawGradient( p, i18n("It means: Not Available. Translators: keep it as short as you can!", "N/A"), Qt::lightGray ); + e->drawGradient( p, i18n("It means: Not Available. Translators: keep it as short as you can!", "N/A"), TQt::lightGray ); } TQColor PerodicTableView::calculateColor( const double coeff ) { - const TQColor color2 = Qt::white; - const TQColor color1 = Qt::red; + const TQColor color2 = TQt::white; + const TQColor color1 = TQt::red; int red = (int)( (color1.red() - color2.red()) * coeff + color2.red() ); int green = (int)( (color1.green() - color2.green()) * coeff + color2.green() ); @@ -1347,15 +1347,15 @@ void PerodicTableView::setLook( PerodicTableView::SCHEMETYPE type, int which ) { structure = ( *it )->crystalstructure(); if ( structure == "own") - (*it)->setElementColor( Qt::cyan ); + (*it)->setElementColor( TQt::cyan ); else if ( structure == "bcc" ) - (*it)->setElementColor( Qt::red ); + (*it)->setElementColor( TQt::red ); else if ( structure == "hdp" ) - (*it)->setElementColor( Qt::yellow ); + (*it)->setElementColor( TQt::yellow ); else if ( structure == "ccp" ) - (*it)->setElementColor( Qt::green ); + (*it)->setElementColor( TQt::green ); else - (*it)->setElementColor( Qt::white ); + (*it)->setElementColor( TQt::white ); ++it; } setGradient( false ); diff --git a/kalzium/src/periodictableview.h b/kalzium/src/periodictableview.h index 6f373555..8115ebe2 100644 --- a/kalzium/src/periodictableview.h +++ b/kalzium/src/periodictableview.h @@ -38,17 +38,18 @@ class KalziumTip; * @short basic class for the specific PerodicTableViews * @author Carsten Niehaus */ -class PerodicTableView : public QWidget +class PerodicTableView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of this widget */ - PerodicTableView( TQWidget *parent = 0, const char *name = 0); + PerodicTableView( TQWidget *tqparent = 0, const char *name = 0); ~PerodicTableView(); enum SCHEMETYPE diff --git a/kalzium/src/plotsetupwidget.ui b/kalzium/src/plotsetupwidget.ui index a395541d..f3de4fc9 100644 --- a/kalzium/src/plotsetupwidget.ui +++ b/kalzium/src/plotsetupwidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PlotSetupWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PlotSetupWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="9" column="0"> + <widget class="TQLabel" row="9" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -24,15 +24,15 @@ <string>First element:</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -40,7 +40,7 @@ <string>Average value:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>aValue</cstring> </property> @@ -67,15 +67,15 @@ <string>Define the last element whose value should be plotted</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -83,7 +83,7 @@ <string>Minimum value:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>minValue</cstring> </property> @@ -93,7 +93,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="8" column="0"> + <widget class="TQCheckBox" row="8" column="0"> <property name="name"> <cstring>showNames</cstring> </property> @@ -104,7 +104,7 @@ <string>Define whether the names of the plotted element should be displayed</string> </property> </widget> - <widget class="QLabel" row="11" column="0"> + <widget class="TQLabel" row="11" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -112,15 +112,15 @@ <string>Last element:</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -128,7 +128,7 @@ <string>Maximum value:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>maxValue</cstring> </property> @@ -138,7 +138,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="7" column="0"> + <widget class="TQCheckBox" row="7" column="0"> <property name="name"> <cstring>connectPoints</cstring> </property> @@ -176,14 +176,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> </size> </property> </spacer> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -248,7 +248,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/kalzium/src/plotwidget.cpp b/kalzium/src/plotwidget.cpp index 2619b504..6a5a9156 100644 --- a/kalzium/src/plotwidget.cpp +++ b/kalzium/src/plotwidget.cpp @@ -25,9 +25,9 @@ PlotWidget::PlotWidget( double x1, double x2, double y1, double y2, - TQWidget *parent, + TQWidget *tqparent, const char* name) - : KPlotWidget( x1, x2, y1, y2, parent, name ) + : KPlotWidget( x1, x2, y1, y2, tqparent, name ) { m_connectPoints = false; } @@ -63,7 +63,7 @@ void PlotWidget::drawObjects( TQPainter *p ) old.setX( q.x() ); old.setY( q.y() ); } - p->setBrush( Qt::NoBrush ); + p->setBrush( TQt::NoBrush ); } } diff --git a/kalzium/src/plotwidget.h b/kalzium/src/plotwidget.h index 44591f39..1c5ed5de 100644 --- a/kalzium/src/plotwidget.h +++ b/kalzium/src/plotwidget.h @@ -24,9 +24,10 @@ class PlotWidget : public KPlotWidget { Q_OBJECT + TQ_OBJECT public: - PlotWidget( double x1 = 0.0, double x2 = 0.0, double y1 = 0.0, double y2 = 0.0, TQWidget *parent=0 , const char *name =0 ); + PlotWidget( double x1 = 0.0, double x2 = 0.0, double y1 = 0.0, double y2 = 0.0, TQWidget *tqparent=0 , const char *name =0 ); /** * toggles if the points will be connected with diff --git a/kalzium/src/settings_colors.ui b/kalzium/src/settings_colors.ui index f32360d0..e2d338a1 100644 --- a/kalzium/src/settings_colors.ui +++ b/kalzium/src/settings_colors.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>setColors</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>setColors</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>dfgdfg</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,23 +34,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout32</cstring> + <cstring>tqlayout32</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel13</cstring> </property> @@ -68,15 +68,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout29</cstring> + <cstring>tqlayout29</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel14</cstring> </property> @@ -94,15 +94,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout30</cstring> + <cstring>tqlayout30</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel15</cstring> </property> @@ -120,15 +120,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout31</cstring> + <cstring>tqlayout31</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel16</cstring> </property> @@ -150,7 +150,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -161,23 +161,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout26</cstring> + <cstring>tqlayout26</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -195,15 +195,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -221,15 +221,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel11</cstring> </property> @@ -247,15 +247,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout26</cstring> + <cstring>tqlayout26</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -277,7 +277,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -288,23 +288,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -322,15 +322,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -348,15 +348,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -374,15 +374,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -400,15 +400,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -426,15 +426,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -452,15 +452,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -478,15 +478,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -508,7 +508,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -519,23 +519,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -556,15 +556,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -582,15 +582,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -612,7 +612,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -623,23 +623,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12_2</cstring> + <cstring>tqlayout12_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2_2_2</cstring> </property> @@ -657,15 +657,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19_2</cstring> + <cstring>tqlayout19_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8_2</cstring> </property> @@ -683,15 +683,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18_2</cstring> + <cstring>tqlayout18_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7_2</cstring> </property> @@ -709,15 +709,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17_2</cstring> + <cstring>tqlayout17_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6_2</cstring> </property> @@ -735,15 +735,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16_2</cstring> + <cstring>tqlayout16_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5_2_2</cstring> </property> @@ -761,15 +761,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15_2</cstring> + <cstring>tqlayout15_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4_2_2</cstring> </property> @@ -787,15 +787,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14_2</cstring> + <cstring>tqlayout14_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2_2</cstring> </property> @@ -813,15 +813,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13_2</cstring> + <cstring>tqlayout13_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2_3</cstring> </property> @@ -839,15 +839,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2_3_2</cstring> </property> @@ -869,7 +869,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -901,7 +901,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kalzium/src/settings_misc.ui b/kalzium/src/settings_misc.ui index a66693dd..189dc1b9 100644 --- a/kalzium/src/settings_misc.ui +++ b/kalzium/src/settings_misc.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>setupMisc</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>setupMisc</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>kcfg_pselook</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton10</cstring> </property> @@ -38,7 +38,7 @@ <string>Display atomic &mass in the PSE</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton13</cstring> </property> @@ -58,7 +58,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -67,5 +67,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kalzium/src/settings_units.ui b/kalzium/src/settings_units.ui index e054021a..4888572f 100644 --- a/kalzium/src/settings_units.ui +++ b/kalzium/src/settings_units.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>setupUnits</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>setupUnits</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>kcfg_temperature</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton19</cstring> </property> @@ -47,7 +47,7 @@ <string>If selected, the temperatures will be displayed in Kelvin. This is then saved in configuration and restored next time you start Kalzium.</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton11_2</cstring> </property> @@ -64,7 +64,7 @@ <string>If selected, the temperatures will be displayed in Degrees Fahrenheit. This is then saved in configuration and restored next time you start Kalzium.</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>radioButton21</cstring> </property> @@ -81,7 +81,7 @@ <string>If selected, the temperatures will be displayed in Degrees Rankine. This is then saved in configuration and restored next time you start Kalzium.</string> </property> </widget> - <widget class="QRadioButton" row="4" column="0"> + <widget class="TQRadioButton" row="4" column="0"> <property name="name"> <cstring>radioButton22</cstring> </property> @@ -98,7 +98,7 @@ <string>If selected, the temperatures will be displayed in Degrees RĂ©aumur. This is then saved in configuration and restored next time you start Kalzium.</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton20</cstring> </property> @@ -117,7 +117,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>kcfg_energies</cstring> </property> @@ -131,7 +131,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton3_2_2_2</cstring> </property> @@ -145,7 +145,7 @@ <string>Check this if you prefer the energy unit in kJ/mol (kilojoule per mol). The other choice you have is eV (electronvolt).</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton4_2_2_2</cstring> </property> @@ -163,5 +163,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kalzium/src/somwidget.ui b/kalzium/src/somwidget.ui index 83e19209..d39b9a9b 100644 --- a/kalzium/src/somwidget.ui +++ b/kalzium/src/somwidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SOMWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SOMWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -26,14 +26,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> </size> </property> </spacer> - <widget class="QTextEdit" row="4" column="0"> + <widget class="TQTextEdit" row="4" column="0"> <property name="name"> <cstring>text</cstring> </property> @@ -58,22 +58,22 @@ the state of matter</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lbl1</cstring> </property> @@ -91,7 +91,7 @@ the state of matter</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -100,15 +100,15 @@ the state of matter</string> </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>temp_slider</cstring> </property> @@ -141,7 +141,7 @@ the state of matter</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>5</width> <height>20</height> @@ -162,7 +162,7 @@ the state of matter</string> <number>295</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblUnit</cstring> </property> @@ -178,7 +178,7 @@ the state of matter</string> </customwidgets> <connections> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> </includehints> diff --git a/kalzium/src/somwidget_impl.cpp b/kalzium/src/somwidget_impl.cpp index 6e3f4b71..a2b3da77 100644 --- a/kalzium/src/somwidget_impl.cpp +++ b/kalzium/src/somwidget_impl.cpp @@ -30,13 +30,13 @@ #include "prefs.h" #include "tempunit.h" -SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) - : SOMWidget( parent,name ) +SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *tqparent, const char* name ) + : SOMWidget( tqparent,name ) { m_list = KalziumDataObject::instance()->ElementList; - text->setAlignment( text->alignment() | Qt::WordBreak ); - text->setTextFormat( Qt::RichText ); + text->tqsetAlignment( text->tqalignment() | TQt::WordBreak ); + text->setTextFormat( TQt::RichText ); text->setReadOnly( true ); text->setPaletteBackgroundColor( paletteBackgroundColor() ); text->setFrameStyle( TQFrame::NoFrame ); @@ -58,7 +58,7 @@ SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) void SOMWidgetIMPL::reloadUnits() { lblUnit->setText( TempUnit::unitListSymbol( Prefs::temperature() ) ); - QPair<double, double> range = TempUnit::rangeForUnit( Prefs::temperature() ); + TQPair<double, double> range = TempUnit::rangeForUnit( Prefs::temperature() ); double newvalue = TempUnit::convert( Number1->value(), m_prevUnit, Prefs::temperature() ); Number1->setRange( range.first, range.second, 0.1, 1 ); @@ -70,7 +70,7 @@ kdDebug() << "min: " << Number1->minValue() << " - max: " << Number1->maxValue() void SOMWidgetIMPL::sliderValueChanged( int temp ) { -// TODO check if in Qt4 the RangeControl emits the signal again +// TODO check if in TQt4 the RangeControl emits the signal again disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( spinValueChanged( double ) ) ); disconnect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), @@ -139,7 +139,7 @@ void SOMWidgetIMPL::setNewTemp( double newtemp ) htmlcode += i18n( "Elements with melting point around this temperature:" ) + "<br>"; for ( uint i = 0; i < listMeltingPoint.count(); i++ ) { - htmlcode += " <b>·</b> " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).arg( listMeltingPoint[i] ).arg( listMeltingPointValue[i] ) + "<br>"; + htmlcode += " <b>·</b> " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).tqarg( listMeltingPoint[i] ).tqarg( listMeltingPointValue[i] ) + "<br>"; } htmlcode += "<br>"; } @@ -153,7 +153,7 @@ void SOMWidgetIMPL::setNewTemp( double newtemp ) htmlcode += i18n( "Elements with boiling point around this temperature:" ) + "<br>"; for ( uint i = 0; i < listBoilingPoint.count(); i++ ) { - htmlcode += " <b>·</b> " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).arg( listBoilingPoint[i] ).arg( listBoilingPointValue[i] ) + "<br>"; + htmlcode += " <b>·</b> " + i18n( "For example: Carbon (300K)", "%1 (%2)" ).tqarg( listBoilingPoint[i] ).tqarg( listBoilingPointValue[i] ) + "<br>"; } htmlcode += "<br>"; } diff --git a/kalzium/src/somwidget_impl.h b/kalzium/src/somwidget_impl.h index ab616f54..5d32dbdc 100644 --- a/kalzium/src/somwidget_impl.h +++ b/kalzium/src/somwidget_impl.h @@ -29,13 +29,14 @@ class Element; class SOMWidgetIMPL : public SOMWidget { Q_OBJECT + TQ_OBJECT public: /** - * @param parent The parent of this widget + * @param tqparent The tqparent of this widget * @param name The name of this widget */ - SOMWidgetIMPL( TQWidget *parent = 0, const char* name = 0 ); + SOMWidgetIMPL( TQWidget *tqparent = 0, const char* name = 0 ); public slots: /** diff --git a/kalzium/src/spectrum.cpp b/kalzium/src/spectrum.cpp index dc8abb01..45c62180 100644 --- a/kalzium/src/spectrum.cpp +++ b/kalzium/src/spectrum.cpp @@ -97,7 +97,7 @@ void Spectrum::adjustIntensities() double curInt = ( ( double )( *it ).intensity ); double newInt = max*1000/curInt; - ( *it ).intensity = qRound( newInt ); + ( *it ).intensity = tqRound( newInt ); } } @@ -130,17 +130,17 @@ TQString Spectrum::bandsAsHtml() for (;it!=itEnd;++it) { html += TQString( "<tr>" ) - + "<td>" + i18n( "Wavelength: %1 nm" ).arg( ( *it ).wavelength ) + "</td>" - + "<td>" + i18n( "Intensity: %1" ).arg( ( *it ).intensity ) + "</td>" - + "<td>" + i18n( "Probability: %1 10<sup>8</sup>s<sup>-1</sup>" ).arg( ( *it ).aki ) + "</td>" - + "<td>" + i18n( "Energy 1: %1" ).arg( ( *it ).energy1 ) + "</td>" - + "<td>" + i18n( "Energy 2: %1" ).arg( ( *it ).energy2 ) + "</td>" - + "<td>" + i18n( "Electron Configuration 1: %1" ).arg( ( *it ).electronconfig1 ) + "</td>" - + "<td>" + i18n( "Electron Configuration 2: %1" ).arg( ( *it ).electronconfig2 ) + "</td>" - + "<td>" + i18n( "Term 1: %1" ).arg( ( *it ).term1 ) + "</td>" - + "<td>" + i18n( "Term 2: %1" ).arg( ( *it ).term2 ) + "</td>" - + "<td>" + i18n( "J 1: %1" ).arg( ( *it ).J1 ) + "</td>" - + "<td>" + i18n( "J 2: %1" ).arg( ( *it ).J2 ) + "</td>" + + "<td>" + i18n( "Wavelength: %1 nm" ).tqarg( ( *it ).wavelength ) + "</td>" + + "<td>" + i18n( "Intensity: %1" ).tqarg( ( *it ).intensity ) + "</td>" + + "<td>" + i18n( "Probability: %1 10<sup>8</sup>s<sup>-1</sup>" ).tqarg( ( *it ).aki ) + "</td>" + + "<td>" + i18n( "Energy 1: %1" ).tqarg( ( *it ).energy1 ) + "</td>" + + "<td>" + i18n( "Energy 2: %1" ).tqarg( ( *it ).energy2 ) + "</td>" + + "<td>" + i18n( "Electron Configuration 1: %1" ).tqarg( ( *it ).electronconfig1 ) + "</td>" + + "<td>" + i18n( "Electron Configuration 2: %1" ).tqarg( ( *it ).electronconfig2 ) + "</td>" + + "<td>" + i18n( "Term 1: %1" ).tqarg( ( *it ).term1 ) + "</td>" + + "<td>" + i18n( "Term 2: %1" ).tqarg( ( *it ).term2 ) + "</td>" + + "<td>" + i18n( "J 1: %1" ).tqarg( ( *it ).J1 ) + "</td>" + + "<td>" + i18n( "J 2: %1" ).tqarg( ( *it ).J2 ) + "</td>" + "</tr>\n"; } diff --git a/kalzium/src/spectrum.h b/kalzium/src/spectrum.h index 090822a6..4d71837f 100644 --- a/kalzium/src/spectrum.h +++ b/kalzium/src/spectrum.h @@ -143,9 +143,9 @@ class Spectrum TQString bandsAsHtml(); /** - * @return the parent element of this spectrum + * @return the tqparent element of this spectrum */ - Element* parentElement() + Element* tqparentElement() { return m_parentElement; } private: diff --git a/kalzium/src/spectrumview.ui b/kalzium/src/spectrumview.ui index 2787ab66..c7d53dbb 100644 --- a/kalzium/src/spectrumview.ui +++ b/kalzium/src/spectrumview.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SpectrumView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SpectrumView</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -36,15 +36,15 @@ <string>This is the spectrum of the element</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>label1</cstring> </property> @@ -55,7 +55,7 @@ <cstring>minimumValue</cstring> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>minimumValue</cstring> </property> @@ -75,7 +75,7 @@ <string>This sets the leftmost wavelength of the spectrum</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>label2</cstring> </property> @@ -86,7 +86,7 @@ <cstring>maximumValue</cstring> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>maximumValue</cstring> </property> @@ -108,9 +108,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>211</width> <height>21</height> @@ -159,7 +159,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>1</height> @@ -213,10 +213,10 @@ <slot>slotExportAsImage()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotExportAsImage()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>spectrumwidget.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kalzium/src/spectrumviewimpl.cpp b/kalzium/src/spectrumviewimpl.cpp index 89bc36ac..d862e5fd 100644 --- a/kalzium/src/spectrumviewimpl.cpp +++ b/kalzium/src/spectrumviewimpl.cpp @@ -22,10 +22,10 @@ #include "exporter.h" -SpectrumViewImpl::SpectrumViewImpl( TQWidget *parent, const char* name ) - : SpectrumView( parent, name ) +SpectrumViewImpl::SpectrumViewImpl( TQWidget *tqparent, const char* name ) + : SpectrumView( tqparent, name ) { - resize( minimumSizeHint() ); + resize( tqminimumSizeHint() ); // simulating an update m_spectrumWidget->setRightBorder( maximumValue->value() ); exportButton->setGuiItem( KGuiItem( i18n( "&Export Spectrum as Image" ), "fileexport" ) ); @@ -35,7 +35,7 @@ void SpectrumViewImpl::slotExportAsImage() { Exporter* exporter = new Exporter(); TQString fileName = KFileDialog::getSaveFileName( - TQString::null, exporter->supportedImageFormats(), + TQString(), exporter->supportedImageFormats(), this, i18n( "Save Spectrum" ) ); if( !fileName.isEmpty() ) { diff --git a/kalzium/src/spectrumviewimpl.h b/kalzium/src/spectrumviewimpl.h index ed02db85..aea5ad2a 100644 --- a/kalzium/src/spectrumviewimpl.h +++ b/kalzium/src/spectrumviewimpl.h @@ -23,13 +23,14 @@ class SpectrumViewImpl : public SpectrumView { Q_OBJECT + TQ_OBJECT public: /** - * @param parent the parent widget + * @param tqparent the tqparent widget * @param name the name used internally */ - SpectrumViewImpl( TQWidget* parent, const char* name ); + SpectrumViewImpl( TQWidget* tqparent, const char* name ); /** * sets the spectrum to @p spec diff --git a/kalzium/src/spectrumwidget.cpp b/kalzium/src/spectrumwidget.cpp index 54f70972..2431b407 100644 --- a/kalzium/src/spectrumwidget.cpp +++ b/kalzium/src/spectrumwidget.cpp @@ -39,7 +39,7 @@ #include <ieeefp.h> #endif -SpectrumWidget::SpectrumWidget( TQWidget *parent, const char* name ) : TQWidget( parent, name ) +SpectrumWidget::SpectrumWidget( TQWidget *tqparent, const char* name ) : TQWidget( tqparent, name ) { startValue = 0; endValue = 0; @@ -57,7 +57,7 @@ SpectrumWidget::SpectrumWidget( TQWidget *parent, const char* name ) : TQWidget( setType( EmissionSpectrum ); setMinimumSize( 400, 230 ); - setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); + tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); setBackgroundMode( NoBackground ); } @@ -70,8 +70,8 @@ void SpectrumWidget::paintEvent( TQPaintEvent * /*e*/ ) m_pixmap.fill( this, width(), height() ); TQPainter p; - p.begin( &m_pixmap, this ); - p.fillRect( 0, 0, width(), m_realHeight, Qt::black ); + p.tqbegin( &m_pixmap, this ); + p.fillRect( 0, 0, width(), m_realHeight, TQt::black ); paintBands( &p ); @@ -89,7 +89,7 @@ void SpectrumWidget::paintEvent( TQPaintEvent * /*e*/ ) void SpectrumWidget::drawZoomLine( TQPainter* p ) { - p->setPen( Qt::white ); + p->setPen( TQt::white ); p->drawLine( m_LMBPointPress.x(), m_LMBPointPress.y(), m_LMBPointCurrent.x(), m_LMBPointPress.y() ); p->drawLine( m_LMBPointCurrent.x(), m_LMBPointPress.y()+10, m_LMBPointCurrent.x(), m_LMBPointPress.y()-10 ); p->drawLine( m_LMBPointPress.x(), m_LMBPointPress.y()+10, m_LMBPointPress.x(), m_LMBPointPress.y()-10 ); @@ -107,7 +107,7 @@ void SpectrumWidget::paintBands( TQPainter* p ) p->drawLine( x,0,x, m_realHeight ); } - p->setPen( Qt::black ); + p->setPen( TQt::black ); } int i = 0; @@ -131,12 +131,12 @@ void SpectrumWidget::paintBands( TQPainter* p ) p->setPen( linecolor( ( *it ).wavelength ) ); p->drawLine( x,0,x, m_realHeight-1 ); - p->setPen( Qt::black ); + p->setPen( TQt::black ); // p->drawLine( x,m_realHeight,x, m_realHeight ); break; case AbsorptionSpectrum: - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawLine( x,0,x, m_realHeight-1 ); break; } @@ -223,7 +223,7 @@ int SpectrumWidget::Adjust( double color, double factor ) if ( color == 0.0 ) return 0; else - return qRound( IntensityMax * pow( color*factor, Gamma ) ); + return tqRound( IntensityMax * pow( color*factor, Gamma ) ); } void SpectrumWidget::drawTickmarks( TQPainter* p ) @@ -249,8 +249,8 @@ void SpectrumWidget::drawTickmarks( TQPainter* p ) i*d < width()-space ) { pos = ( double ) ( i*d )/width(); - p->fillRect( i*d-space, m_realHeight+12, 2*space, 15, Qt::white ); - p->drawText( i*d-space, m_realHeight+12, 2*space, 15, Qt::AlignCenter, KalziumUtils::localizedValue( KalziumUtils::strippedValue( Wavelength( pos ) ), 6 ) ); + p->fillRect( i*d-space, m_realHeight+12, 2*space, 15, TQt::white ); + p->drawText( i*d-space, m_realHeight+12, 2*space, 15, TQt::AlignCenter, KalziumUtils::localizedValue( KalziumUtils::strippedValue( Wavelength( pos ) ), 6 ) ); } } else {//small tickmarks @@ -320,9 +320,9 @@ void SpectrumWidget::mouseMoveEvent( TQMouseEvent *e ) void SpectrumWidget::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) + if ( e->button() == Qt::LeftButton ) m_LMBPointPress = e->pos(); - if ( e->button() == TQMouseEvent::RightButton ) + if ( e->button() == Qt::RightButton ) slotZoomOut(); //FIXME //the tooltip is not really working. Better to not have it @@ -376,22 +376,22 @@ void SpectrumWidget::PrepareTooltip( double wavelength ) void SpectrumWidget::drawTooltip( TQPainter *p ) { - p->setPen( Qt::white ); + p->setPen( TQt::white ); TQPoint pt = mapFromGlobal( TQCursor::pos() ); - p->drawText( pt, i18n("Wavelength: %1").arg(m_band.wavelength) ); + p->drawText( pt, i18n("Wavelength: %1").tqarg(m_band.wavelength) ); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Intensity: %1").arg(m_band.intensity) ); + p->drawText( pt, i18n("Intensity: %1").tqarg(m_band.intensity) ); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Energy 1, Energy 2: %1, %2").arg(m_band.energy1).arg( m_band.energy2 )); + p->drawText( pt, i18n("Energy 1, Energy 2: %1, %2").tqarg(m_band.energy1).tqarg( m_band.energy2 )); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("Term 1, Term 2: %1, %2").arg(m_band.term1).arg( m_band.term2 )); + p->drawText( pt, i18n("Term 1, Term 2: %1, %2").tqarg(m_band.term1).tqarg( m_band.term2 )); pt.setY( pt.y() + 15 ); - p->drawText( pt, i18n("J 1, J 2: %1, %2").arg(m_band.J1).arg( m_band.J2 )); + p->drawText( pt, i18n("J 1, J 2: %1, %2").tqarg(m_band.J1).tqarg( m_band.J2 )); } void SpectrumWidget::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::LeftButton ) + if ( e->button() == Qt::LeftButton ) { int left = (int)Wavelength( ( double )m_LMBPointPress.x()/width() ); int right = (int)Wavelength( ( double )e->pos().x()/width() ); @@ -415,12 +415,12 @@ TQPixmap SpectrumWidget::pixmap() TQString text; if( m_type == EmissionSpectrum ) - text = i18n( "Emission spectrum of %1" ).arg( m_spectrum->parentElement()->elname() ); + text = i18n( "Emission spectrum of %1" ).tqarg( m_spectrum->tqparentElement()->elname() ); else - text = i18n( "Absorption spectrum of %1" ).arg( m_spectrum->parentElement()->elname() ); + text = i18n( "Absorption spectrum of %1" ).tqarg( m_spectrum->tqparentElement()->elname() ); TQPainter p( &tmp ); - p.setPen( Qt::black ); + p.setPen( TQt::black ); p.drawText( 30, m_realHeight + 70, text ); return tmp; diff --git a/kalzium/src/spectrumwidget.h b/kalzium/src/spectrumwidget.h index c29e433c..f5c98099 100644 --- a/kalzium/src/spectrumwidget.h +++ b/kalzium/src/spectrumwidget.h @@ -31,12 +31,13 @@ * @author Carsten Niehaus * */ -class SpectrumWidget : public QWidget +class SpectrumWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SpectrumWidget( TQWidget *parent, const char* name = 0 ); + SpectrumWidget( TQWidget *tqparent, const char* name = 0 ); ~SpectrumWidget(){} diff --git a/kalzium/src/tempunit.cpp b/kalzium/src/tempunit.cpp index a4e18ef7..bab2461c 100644 --- a/kalzium/src/tempunit.cpp +++ b/kalzium/src/tempunit.cpp @@ -94,40 +94,40 @@ TQString TempUnit::unitListSymbol( int i ) return l[i]; } -QPair<double, double> TempUnit::rangeForUnit( TempUnit::Unit u ) +TQPair<double, double> TempUnit::rangeForUnit( TempUnit::Unit u ) { switch( u ) { case Kelvin: { - return QPair<double, double>( 0.0, 5000.0 ); + return TQPair<double, double>( 0.0, 5000.0 ); break; } case Celsius: { - return QPair<double, double>( -273.16, 4726.84 ); + return TQPair<double, double>( -273.16, 4726.84 ); break; } case Fahrenheit: { - return QPair<double, double>( -459.67, 8540.33 ); + return TQPair<double, double>( -459.67, 8540.33 ); break; } case Rankine: { - return QPair<double, double>( 0.0, 9000.0 ); + return TQPair<double, double>( 0.0, 9000.0 ); break; } case Reaumur: { - return QPair<double, double>( -218.52, 3781.48 ); + return TQPair<double, double>( -218.52, 3781.48 ); break; } } - return QPair<double, double>( 0.0, 5000.0 ); + return TQPair<double, double>( 0.0, 5000.0 ); } -QPair<double, double> TempUnit::rangeForUnit( int u ) +TQPair<double, double> TempUnit::rangeForUnit( int u ) { return rangeForUnit( (TempUnit::Unit)u ); } diff --git a/kalzium/src/tempunit.h b/kalzium/src/tempunit.h index 23629bb2..5c3e5e4e 100644 --- a/kalzium/src/tempunit.h +++ b/kalzium/src/tempunit.h @@ -81,12 +81,12 @@ class TempUnit */ static TQString unitListSymbol( int i ); - static QPair<double, double> rangeForUnit( TempUnit::Unit u ); + static TQPair<double, double> rangeForUnit( TempUnit::Unit u ); /** * @overload */ - static QPair<double, double> rangeForUnit( int u ); + static TQPair<double, double> rangeForUnit( int u ); }; #endif // TEMPUNIT_H diff --git a/kalzium/src/timewidget.ui b/kalzium/src/timewidget.ui index fcb46391..7466c21c 100644 --- a/kalzium/src/timewidget.ui +++ b/kalzium/src/timewidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>TimeWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TimeWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -26,22 +26,22 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lbl1_2</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -76,15 +76,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>time_slider</cstring> </property> @@ -117,7 +117,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>5</width> <height>21</height> @@ -150,14 +150,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>text</cstring> </property> @@ -194,7 +194,7 @@ of the elements</string> <slot>setValue(int)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> </includehints> diff --git a/kalzium/src/timewidget_impl.cpp b/kalzium/src/timewidget_impl.cpp index a5f186bc..576ab17d 100644 --- a/kalzium/src/timewidget_impl.cpp +++ b/kalzium/src/timewidget_impl.cpp @@ -20,11 +20,11 @@ #include <knuminput.h> -TimeWidgetIMPL::TimeWidgetIMPL( TQWidget *parent, const char* name ) - : TimeWidget( parent, name ) +TimeWidgetIMPL::TimeWidgetIMPL( TQWidget *tqparent, const char* name ) + : TimeWidget( tqparent, name ) { - text->setAlignment( text->alignment() | Qt::WordBreak ); - text->setTextFormat( Qt::RichText ); + text->tqsetAlignment( text->tqalignment() | TQt::WordBreak ); + text->setTextFormat( TQt::RichText ); text->setReadOnly( true ); text->setPaletteBackgroundColor( paletteBackgroundColor() ); text->setFrameStyle( TQFrame::NoFrame ); diff --git a/kalzium/src/timewidget_impl.h b/kalzium/src/timewidget_impl.h index 65030da1..b728b435 100644 --- a/kalzium/src/timewidget_impl.h +++ b/kalzium/src/timewidget_impl.h @@ -22,13 +22,14 @@ class TimeWidgetIMPL : public TimeWidget { Q_OBJECT + TQ_OBJECT public: /** - * @param parent The parent of this widget + * @param tqparent The tqparent of this widget * @param name The name of this widget */ - TimeWidgetIMPL( TQWidget *parent = 0, const char* name = 0 ); + TimeWidgetIMPL( TQWidget *tqparent = 0, const char* name = 0 ); public slots: /** |