diff options
Diffstat (limited to 'kalzium/src')
31 files changed, 134 insertions, 134 deletions
diff --git a/kalzium/src/CMakeLists.txt b/kalzium/src/CMakeLists.txt index 5a91842b..ee4f437b 100644 --- a/kalzium/src/CMakeLists.txt +++ b/kalzium/src/CMakeLists.txt @@ -20,7 +20,7 @@ link_directories( ) if( WITH_OCAML_SOLVER ) - set( OCAML_LIBRARIES asmrun nums m ${CMAKE_DL_LIBS} ) + set( OCAML_LIBRARIES asmrun m ${NUMS_LIBRARIES} ${ZARITH_LIBRARIES} ${CMAKE_DL_LIBS} ) set( OCAML_SOLVER ${CMAKE_CURRENT_BINARY_DIR}/solver/modwrap.o ${CMAKE_CURRENT_BINARY_DIR}/solver/solver.o diff --git a/kalzium/src/Makefile.am b/kalzium/src/Makefile.am index d781491e..1667d5b7 100644 --- a/kalzium/src/Makefile.am +++ b/kalzium/src/Makefile.am @@ -79,7 +79,7 @@ rcui_DATA = kalziumui.rc KDE_ICON = AUTO # the library search path. -kalzium_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kalzium_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor #this RegExp-monster grep for <name origin=foo">bar</name> and puts the i18n() around foo and bar messages-old: rc.cpp diff --git a/kalzium/src/detailedgraphicaloverview.h b/kalzium/src/detailedgraphicaloverview.h index b0844802..4b616baa 100644 --- a/kalzium/src/detailedgraphicaloverview.h +++ b/kalzium/src/detailedgraphicaloverview.h @@ -27,7 +27,7 @@ class Element; */ class DetailedGraphicalOverview : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/detailinfodlg.cpp b/kalzium/src/detailinfodlg.cpp index 97dd76e6..ff1e3e10 100644 --- a/kalzium/src/detailinfodlg.cpp +++ b/kalzium/src/detailinfodlg.cpp @@ -23,7 +23,7 @@ #include <kiconloader.h> #include <tdehtml_part.h> #include <tdehtmlview.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeactioncollection.h> #include <kcombobox.h> #include <tdeapplication.h> @@ -66,7 +66,7 @@ DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *na createContent(); m_actionCollection = new TDEActionCollection(this); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(this, TQ_SLOT(slotClose()), m_actionCollection); setButtonTip( User2, i18n( "Goes to the previous element" ) ); setButtonTip( User1, i18n( "Goes to the next element" ) ); @@ -96,7 +96,7 @@ TDEHTMLPart* DetailedInfoDlg::addHTMLTab( const TQString& title, const TQString& TQFrame *frame = addPage(title, icontext, BarIcon(iconname)); TQVBoxLayout *layout = new TQVBoxLayout( frame ); layout->setMargin( 0 ); - TDEHTMLPart *w = new TDEHTMLPart( frame, "html-part", TQT_TQOBJECT(frame) ); + TDEHTMLPart *w = new TDEHTMLPart( frame, "html-part", frame ); layout->addWidget( w->view() ); return w; @@ -389,7 +389,7 @@ void DetailedInfoDlg::reloadContent() if ( TQFile::exists( picpath ) ) { TQImage img( picpath, "JPEG" ); - img = img.smoothScale ( 400, 400, TQ_ScaleMin ); + img = img.smoothScale ( 400, 400, TQImage::ScaleMin ); TQPixmap pic; pic.convertFromImage( img ); piclabel->setPixmap( pic ); @@ -456,8 +456,8 @@ void DetailedInfoDlg::slotHelp() break; } - if ( kapp ) - kapp->invokeHelp ( chapter, "kalzium" ); + if ( tdeApp ) + tdeApp->invokeHelp ( chapter, "kalzium" ); } void DetailedInfoDlg::wheelEvent( TQWheelEvent *ev ) diff --git a/kalzium/src/detailinfodlg.h b/kalzium/src/detailinfodlg.h index 18494746..8abf1d4b 100644 --- a/kalzium/src/detailinfodlg.h +++ b/kalzium/src/detailinfodlg.h @@ -38,7 +38,7 @@ class TDEHTMLPart; */ class DetailedInfoDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 14dea1a1..80a8c5b8 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -35,7 +35,7 @@ #include <kdebug.h> #include <tdelocale.h> #include <kurl.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> Element::Element() { diff --git a/kalzium/src/elementdataviewer.cpp b/kalzium/src/elementdataviewer.cpp index 500f9354..e3897d2b 100644 --- a/kalzium/src/elementdataviewer.cpp +++ b/kalzium/src/elementdataviewer.cpp @@ -69,15 +69,15 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) setButtonText( User1, i18n("&Plot") ); m_actionCollection = new TDEActionCollection(this); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), m_actionCollection); + KStdAction::quit(this, TQ_SLOT(slotClose()), m_actionCollection); - connect ( m_pPlotSetupWidget->KCB_y, TQT_SIGNAL( activated(int) ), - this, TQT_SLOT( drawPlot()) ); + connect ( m_pPlotSetupWidget->KCB_y, TQ_SIGNAL( activated(int) ), + this, TQ_SLOT( drawPlot()) ); - connect ( m_pPlotSetupWidget->connectPoints, TQT_SIGNAL( toggled(bool) ), - this, TQT_SLOT( drawPlot()) ); - connect ( m_pPlotSetupWidget->showNames, TQT_SIGNAL( toggled(bool) ), - this, TQT_SLOT( drawPlot()) ); + connect ( m_pPlotSetupWidget->connectPoints, TQ_SIGNAL( toggled(bool) ), + this, TQ_SLOT( drawPlot()) ); + connect ( m_pPlotSetupWidget->showNames, TQ_SIGNAL( toggled(bool) ), + this, TQ_SLOT( drawPlot()) ); // Draw the plot so that the user doesn't have to press the "Plot" // button to seee anything. @@ -87,8 +87,8 @@ ElementDataViewer::ElementDataViewer( TQWidget *parent, const char* name ) void ElementDataViewer::slotHelp() { emit helpClicked(); - if ( kapp ) - kapp->invokeHelp ( "plot_data", "kalzium" ); + if ( tdeApp ) + tdeApp->invokeHelp ( "plot_data", "kalzium" ); } // Reimplement slotUser1 from KDialogBase @@ -294,7 +294,6 @@ void ElementDataViewer::drawPlot() /* * reserve the memory for the KPlotObjects */ - //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 0b73b582..818976e8 100644 --- a/kalzium/src/elementdataviewer.h +++ b/kalzium/src/elementdataviewer.h @@ -95,7 +95,7 @@ class AxisData */ class ElementDataViewer : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/eqchemview.cpp b/kalzium/src/eqchemview.cpp index 19d1469a..c2d8a95b 100644 --- a/kalzium/src/eqchemview.cpp +++ b/kalzium/src/eqchemview.cpp @@ -63,7 +63,7 @@ eqchemView::eqchemView(TQWidget *parent) : TQWidget(parent) m_eqclear->setIconSet( TDEGlobal::instance()->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::NoGroup, 22 /*TDEIcon::SizeSmallMedium*/) ); - connect(m_eqclear, TQT_SIGNAL(clicked()), m_eqedit, TQT_SLOT(clear()) ); + connect(m_eqclear, TQ_SIGNAL(clicked()), m_eqedit, TQ_SLOT(clear()) ); } eqchemView::~eqchemView() @@ -113,8 +113,8 @@ EQChemDialog::EQChemDialog( TQWidget *parent ) void EQChemDialog::slotHelp() { emit helpClicked(); - if ( kapp ) - kapp->invokeHelp ( "eq_solver", "kalzium" ); + if ( tdeApp ) + tdeApp->invokeHelp ( "eq_solver", "kalzium" ); } #include "eqchemview.moc" diff --git a/kalzium/src/eqchemview.h b/kalzium/src/eqchemview.h index a492a318..3048198c 100644 --- a/kalzium/src/eqchemview.h +++ b/kalzium/src/eqchemview.h @@ -42,7 +42,7 @@ class KPushButton; */ class eqchemView : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -85,7 +85,7 @@ private: */ class EQChemDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/eqresult.cpp b/kalzium/src/eqresult.cpp index 1f3f44bf..5308cf66 100644 --- a/kalzium/src/eqresult.cpp +++ b/kalzium/src/eqresult.cpp @@ -111,7 +111,7 @@ void EqResult::add(const TQString & question, const TQString & answer) new QuestionItem( this, question, bgcolor ); new AnswerItem( this, question, answer, bgcolor ); - TQTimer::singleShot( 100, this, TQT_SLOT( scrollToEnd() ) ); + TQTimer::singleShot( 100, this, TQ_SLOT( scrollToEnd() ) ); } void EqResult::scrollToEnd() diff --git a/kalzium/src/eqresult.h b/kalzium/src/eqresult.h index d868c766..b1e3d3cc 100644 --- a/kalzium/src/eqresult.h +++ b/kalzium/src/eqresult.h @@ -71,7 +71,7 @@ class AnswerItem : public TQListBoxItem */ class EqResult : public TQListBox { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/kalzium.cpp b/kalzium/src/kalzium.cpp index e7393ec0..a1bbae10 100644 --- a/kalzium/src/kalzium.cpp +++ b/kalzium/src/kalzium.cpp @@ -46,7 +46,7 @@ #include <tdeaction.h> #include <tdeapplication.h> #include <kstatusbar.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kdialogbase.h> #include <knuminput.h> @@ -74,8 +74,8 @@ Kalzium::Kalzium() m_infoDialog = 0; m_toolboxCurrent = 0; - 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 ) )); + connect( m_PerodicTableView, TQ_SIGNAL( ElementClicked( int ) ), this, TQ_SLOT( openInformationDialog( int ) )); + connect( m_PerodicTableView, TQ_SIGNAL( MouseOver( int ) ), this, TQ_SLOT( slotStatusbar( int ) )); // layouting setCentralWidget( centralWidget ); @@ -107,14 +107,14 @@ Kalzium::Kalzium() void Kalzium::setupActions() { - m_actionNoScheme = new TDEToggleAction(i18n("&No Color Scheme"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); + m_actionNoScheme = new TDEToggleAction(i18n("&No Color Scheme"), 0, this, TQ_SLOT(slotNoLook()), actionCollection(), "view_look_noscheme"); // the actions for the color schemes - m_actionGroups = new TDEToggleAction(i18n("Show &Groups"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); - m_actionBlocks = new TDEToggleAction(i18n("Show &Blocks"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); - m_actionAcid = new TDEToggleAction(i18n("Show &Acid Behavior"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); - m_actionFamily = new TDEToggleAction(i18n("Show &Family"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); - m_actionCrystal = new TDEToggleAction(i18n("Show &Crystal Structures"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotLookCrystal()), actionCollection(), "view_look_crystal"); + m_actionGroups = new TDEToggleAction(i18n("Show &Groups"), 0, this, TQ_SLOT(slotLookGroups()), actionCollection(), "view_look_groups"); + m_actionBlocks = new TDEToggleAction(i18n("Show &Blocks"), 0, this, TQ_SLOT(slotLookBlocks()), actionCollection(), "view_look_blocks"); + m_actionAcid = new TDEToggleAction(i18n("Show &Acid Behavior"), 0, this, TQ_SLOT(slotLookAcidBehavior()), actionCollection(), "view_look_acid"); + m_actionFamily = new TDEToggleAction(i18n("Show &Family"), 0, this, TQ_SLOT(slotLookFamily()), actionCollection(), "view_look_family"); + m_actionCrystal = new TDEToggleAction(i18n("Show &Crystal Structures"), 0, this, TQ_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 TDESelectAction(i18n("&Gradient"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_look_gradmenu"); + gradient_action = new TDESelectAction(i18n("&Gradient"), 0, this, 0, actionCollection(), "view_look_gradmenu"); gradient_action->setItems(gradientlist); - connect (gradient_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoGradient(int))); + connect (gradient_action, TQ_SIGNAL(activated(int)), this, TQ_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 TDESelectAction (i18n("&Numeration"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "view_numerationtype"); + numeration_action = new TDESelectAction (i18n("&Numeration"), 0, this, 0, actionCollection(), "view_numerationtype"); numeration_action->setItems(numlist); numeration_action->setCurrentItem(Prefs::numeration()); - connect (numeration_action, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSwitchtoNumeration(int))); + connect (numeration_action, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotSwitchtoNumeration(int))); - m_SidebarAction = new TDEAction(i18n("Show &Sidebar"), "sidebar", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); + m_SidebarAction = new TDEAction(i18n("Show &Sidebar"), "sidebar", 0, this, TQ_SLOT(slotShowHideSidebar()), actionCollection(), "view_sidebar"); #ifdef HAVE_FACILE - m_EQSolverAction = new TDEAction(i18n("&Equation Solver..."), "eqchem", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowEQSolver()), actionCollection(), "tools_eqsolver"); + m_EQSolverAction = new TDEAction(i18n("&Equation Solver..."), "eqchem", 0, this, TQ_SLOT(slotShowEQSolver()), actionCollection(), "tools_eqsolver"); #endif // tools actions - m_pPlotAction = new TDEAction(i18n("&Plot Data..."), "plot", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); - m_pGlossaryAction = new TDEAction(i18n("&Glossary..."), "glossary", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); + m_pPlotAction = new TDEAction(i18n("&Plot Data..."), "plot", 0, this, TQ_SLOT(slotPlotData()), actionCollection(), "tools_plotdata"); + m_pGlossaryAction = new TDEAction(i18n("&Glossary..."), "glossary", 0, this, TQ_SLOT(slotGlossary()), actionCollection(), "tools_glossary"); // other period view options - m_pLegendAction = new TDEAction(i18n("Show &Legend"), "legend", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowLegend()), actionCollection(), "view_legend"); - m_pTooltipAction = new TDEAction(i18n("Show &Tooltip"), "tooltip", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); + m_pLegendAction = new TDEAction(i18n("Show &Legend"), "legend", 0, this, TQ_SLOT(slotShowLegend()), actionCollection(), "view_legend"); + m_pTooltipAction = new TDEAction(i18n("Show &Tooltip"), "tooltip", 0, this, TQ_SLOT(slotEnableTooltips()), actionCollection(), "view_tooltip"); // the standard actions - KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettingsDialog()), actionCollection()); - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()),actionCollection() ); + KStdAction::preferences(this, TQ_SLOT(showSettingsDialog()), actionCollection()); + KStdAction::quit(tdeApp, TQ_SLOT (closeAllWindows()),actionCollection() ); slotShowScheme( Prefs::colorschemebox() ); slotSwitchtoNumeration( Prefs::numeration() ); @@ -213,7 +213,7 @@ void Kalzium::setupSidebars() lay->activate(); m_detailWidget = new DetailedGraphicalOverview( fake, "DetailedGraphicalOverview" ); m_detailWidget->setMinimumSize( 200, m_detailWidget->minimumSize().height() ); - connect( m_PerodicTableView, TQT_SIGNAL( MouseOver( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotSelectedNumber( int ) )); + connect( m_PerodicTableView, TQ_SIGNAL( MouseOver( int ) ), this, TQ_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" ) ); @@ -222,26 +222,26 @@ void Kalzium::setupSidebars() m_toolbox->addItem( m_calcWidget, SmallIcon( "calculate" ), i18n( "Calculate" ) ); m_timeWidget = new TimeWidgetIMPL( this, "TimeWidget" ); - connect( m_timeWidget->time_slider, TQT_SIGNAL( valueChanged( int ) ), - m_PerodicTableView, TQT_SLOT( setDate( int ) ) ); - connect( m_timeWidget->time_slider, TQT_SIGNAL( valueChanged( int ) ), - m_timeWidget, TQT_SLOT( slotChanged( int ) ) ); - connect( m_timeWidget->Number1, TQT_SIGNAL( valueChanged( int ) ), - m_timeWidget, TQT_SLOT( slotChanged( int ) ) ); + connect( m_timeWidget->time_slider, TQ_SIGNAL( valueChanged( int ) ), + m_PerodicTableView, TQ_SLOT( setDate( int ) ) ); + connect( m_timeWidget->time_slider, TQ_SIGNAL( valueChanged( int ) ), + m_timeWidget, TQ_SLOT( slotChanged( int ) ) ); + connect( m_timeWidget->Number1, TQ_SIGNAL( valueChanged( int ) ), + m_timeWidget, TQ_SLOT( slotChanged( int ) ) ); m_toolbox->addItem( m_timeWidget, SmallIcon( "timeline" ), i18n( "Timeline" ) ); m_somWidget = new SOMWidgetIMPL( this, "somWidget" ); - connect( m_somWidget->temp_slider, TQT_SIGNAL( valueChanged( int ) ), - m_PerodicTableView, TQT_SLOT( setTemperature( int ) ) ); + connect( m_somWidget->temp_slider, TQ_SIGNAL( valueChanged( int ) ), + m_PerodicTableView, TQ_SLOT( setTemperature( int ) ) ); m_toolbox->addItem( m_somWidget, SmallIcon( "statematter" ), i18n( "State of Matter" ) ); - connect( m_toolbox, TQT_SIGNAL( currentChanged( int ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolboxCurrentChanged( int ) ) ); + connect( m_toolbox, TQ_SIGNAL( currentChanged( int ) ), this, TQ_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)), TQT_TQOBJECT(this), TQT_SLOT(slotSidebarVisibilityChanged(bool))); + connect( m_dockWin, TQ_SIGNAL(visibilityChanged(bool)), this, TQ_SLOT(slotSidebarVisibilityChanged(bool))); } @@ -263,7 +263,7 @@ void Kalzium::slotShowEQSolver() eqsolver->setMinimumSize( 600,400 ); vbox->addWidget( eqsolver ); - connect(dlg, TQT_SIGNAL(applyClicked()), eqsolver, TQT_SLOT(compute())); + connect(dlg, TQ_SIGNAL(applyClicked()), eqsolver, TQ_SLOT(compute())); dlg->show(); #endif } @@ -398,8 +398,8 @@ void Kalzium::showSettingsDialog() //TDEConfigDialog didn't find an instance of this dialog, so lets create it : TDEConfigDialog *dialog = new TDEConfigDialog(this,"settings", Prefs::self()); - connect( dialog, TQT_SIGNAL( settingsChanged() ), this , TQT_SLOT( slotUpdateSettings() ) ); - connect( dialog, TQT_SIGNAL( settingsChanged() ), m_somWidget, TQT_SLOT( reloadUnits() ) ); + connect( dialog, TQ_SIGNAL( settingsChanged() ), this , TQ_SLOT( slotUpdateSettings() ) ); + connect( dialog, TQ_SIGNAL( settingsChanged() ), m_somWidget, TQ_SLOT( reloadUnits() ) ); dialog->addPage( new setColors( 0, "colors_page"), i18n("Colors"), "colorize"); dialog->addPage( new setupUnits( 0, "units_page"), i18n("Units"), "gear"); dialog->addPage( new setupMisc( 0, "miscpage" ), i18n( "Miscellaneous" ), "misc" ); @@ -440,10 +440,10 @@ void Kalzium::openInformationDialog( int number ) this, "detailedDlg" ); // Remove the selection when this dialog finishes or hides. - connect(m_infoDialog, TQT_SIGNAL(hidden()), - m_PerodicTableView, TQT_SLOT(unSelect())); - connect(m_infoDialog, TQT_SIGNAL(elementChanged(int)), - m_PerodicTableView, TQT_SLOT(selectElement(int))); + connect(m_infoDialog, TQ_SIGNAL(hidden()), + m_PerodicTableView, TQ_SLOT(unSelect())); + connect(m_infoDialog, TQ_SIGNAL(elementChanged(int)), + m_PerodicTableView, TQ_SLOT(selectElement(int))); } m_infoDialog->show(); } diff --git a/kalzium/src/kalzium.h b/kalzium/src/kalzium.h index 3184b555..ee849eb3 100644 --- a/kalzium/src/kalzium.h +++ b/kalzium/src/kalzium.h @@ -45,7 +45,7 @@ class GlossaryDialog; */ class Kalzium : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/kalzium/src/kalziumdataobject.cpp b/kalzium/src/kalziumdataobject.cpp index 1e4f93e3..8f7d6f1c 100644 --- a/kalzium/src/kalziumdataobject.cpp +++ b/kalzium/src/kalziumdataobject.cpp @@ -30,7 +30,7 @@ #include <kdebug.h> #include <tdelocale.h> #include <kurl.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeapplication.h> KalziumDataObject* KalziumDataObject::instance() @@ -51,7 +51,7 @@ KalziumDataObject::KalziumDataObject() if (!layoutFile.exists()) { kdDebug() << "data.xml not found, exiting" << endl; - kapp->exit(0); + tdeApp->exit(0); return; } diff --git a/kalzium/src/kalziumtip.cpp b/kalzium/src/kalziumtip.cpp index e78cb0ef..c15130ab 100644 --- a/kalzium/src/kalziumtip.cpp +++ b/kalzium/src/kalziumtip.cpp @@ -36,11 +36,11 @@ #include <tdeglobal.h> #include <kiconloader.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWidget( parent, name, f ) { - setFocusPolicy(TQ_NoFocus); //the widget don't get the keyboard focus + setFocusPolicy(TQWidget::NoFocus); //the widget don't get the keyboard focus setBackgroundMode(NoBackground); // widget has no background resize(0,0); hide(); //initailly hide it @@ -48,14 +48,14 @@ KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWid m_noElemIcon = TDEGlobal::iconLoader()->loadIcon( "orbits", TDEIcon::NoGroup, 64 ); setMouseTracking(true); // receice mouse move events - connect(&m_frameTimer, TQT_SIGNAL(timeout()), TQT_SLOT(internalUpdate())); + connect(&m_frameTimer, TQ_SIGNAL(timeout()), TQ_SLOT(internalUpdate())); } void KalziumTip::showTip( TQPoint mouse, Element* element, int visibleWidth, int visibleHeight ) { TQWidget *p = 0; if ( dynamic_cast<TQWidget*>( parent() ) ) - p = TQT_TQWIDGET( parent() ); + p = static_cast<TQWidget*>( parent() ); if ( p ) { @@ -293,7 +293,7 @@ void KalziumTip::loadIcon() if ( !iconpath.isEmpty() ) { TQImage img ( iconpath, "JPEG" ); - img = img.smoothScale ( 128, 128, TQ_ScaleMin ); + img = img.smoothScale ( 128, 128, TQImage::ScaleMin ); m_icon.convertFromImage( img ); } diff --git a/kalzium/src/kalziumtip.h b/kalzium/src/kalziumtip.h index c819e32b..521bb312 100644 --- a/kalzium/src/kalziumtip.h +++ b/kalzium/src/kalziumtip.h @@ -39,7 +39,7 @@ class TQTimer; */ class KalziumTip : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/molcalcwidget.h b/kalzium/src/molcalcwidget.h index 9314eb4f..59b486cc 100644 --- a/kalzium/src/molcalcwidget.h +++ b/kalzium/src/molcalcwidget.h @@ -40,7 +40,7 @@ class MoleculeParser; */ class MolcalcWidget : public MolcalcWidgetBase { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/kalzium/src/molcalcwidgetbase.ui b/kalzium/src/molcalcwidgetbase.ui index 79a6074e..71dde981 100644 --- a/kalzium/src/molcalcwidgetbase.ui +++ b/kalzium/src/molcalcwidgetbase.ui @@ -124,9 +124,9 @@ <slot>slotCalcButtonClicked()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected">slotCalcButtonClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kalzium/src/orbitswidget.h b/kalzium/src/orbitswidget.h index 1b7c1efd..0e7eb36b 100644 --- a/kalzium/src/orbitswidget.h +++ b/kalzium/src/orbitswidget.h @@ -28,7 +28,7 @@ */ class OrbitsWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/periodictableview.cpp b/kalzium/src/periodictableview.cpp index d1e20339..4218c3a2 100644 --- a/kalzium/src/periodictableview.cpp +++ b/kalzium/src/periodictableview.cpp @@ -51,17 +51,17 @@ PerodicTableView::PerodicTableView(TQWidget *parent, const char *name) unSelect(); #if 0 - connect( this, TQT_SIGNAL( tableClicked( TQPoint ) ), - this, TQT_SLOT( selectPoint( TQPoint ) ) ); + connect( this, TQ_SIGNAL( tableClicked( TQPoint ) ), + this, TQ_SLOT( selectPoint( TQPoint ) ) ); #endif - connect( this, TQT_SIGNAL( ToolTip( int ) ), - this, TQT_SLOT( slotToolTip( int ) ) ); + connect( this, TQ_SIGNAL( ToolTip( int ) ), + this, TQ_SLOT( slotToolTip( int ) ) ); - connect( &HoverTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotTransientLabel() ) ); + connect( &HoverTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotTransientLabel() ) ); - connect( &MouseoverTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotMouseover() ) ); + connect( &MouseoverTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotMouseover() ) ); setMouseTracking( true ); @@ -172,7 +172,7 @@ void PerodicTableView::slotToolTip( int number ) TQWidget *p = 0; if ( dynamic_cast<TQWidget*>( parent() ) ) - p = TQT_TQWIDGET( parent() ); + p = static_cast<TQWidget*>( parent() ); if( p ) m_kalziumTip->showTip( mapFromGlobal(TQCursor::pos()), @@ -417,7 +417,7 @@ void PerodicTableView::paintCurrentSelection() p.begin(table); TQPen pen; - pen.setStyle( Qt::DotLine ); + pen.setStyle( TQt::DotLine ); pen.setWidth( 4 ); pen.setColor( TQt::blue ); p.setPen( pen ); diff --git a/kalzium/src/periodictableview.h b/kalzium/src/periodictableview.h index 3ceb5888..5bbb909f 100644 --- a/kalzium/src/periodictableview.h +++ b/kalzium/src/periodictableview.h @@ -40,7 +40,7 @@ class KalziumTip; */ class PerodicTableView : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/plotwidget.h b/kalzium/src/plotwidget.h index 9f4142d9..edf3bb26 100644 --- a/kalzium/src/plotwidget.h +++ b/kalzium/src/plotwidget.h @@ -23,7 +23,7 @@ */ class PlotWidget : public KPlotWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/solver/modwrap.c b/kalzium/src/solver/modwrap.c index 0ab5359e..e51ea3c5 100644 --- a/kalzium/src/solver/modwrap.c +++ b/kalzium/src/solver/modwrap.c @@ -21,8 +21,9 @@ #include <stdio.h> #include <string.h> -#include <caml/mlvalues.h> +#include <caml/alloc.h> #include <caml/callback.h> +#include <caml/mlvalues.h> char* solve_equation(const char * eq) { @@ -32,6 +33,6 @@ char* solve_equation(const char * eq) solve_equation_closure = caml_named_value("solve_equation"); } - return strdup(String_val(callback(*solve_equation_closure, copy_string(eq)) )); + return strdup(String_val(caml_callback(*solve_equation_closure, caml_copy_string(eq)) )); } diff --git a/kalzium/src/somwidget_impl.cpp b/kalzium/src/somwidget_impl.cpp index 93ae5838..dd6ac6bc 100644 --- a/kalzium/src/somwidget_impl.cpp +++ b/kalzium/src/somwidget_impl.cpp @@ -45,12 +45,12 @@ SOMWidgetIMPL::SOMWidgetIMPL( TQWidget *parent, const char* name ) m_htmlEnd = "</qt>"; m_prevUnit = Prefs::temperature(); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); reloadUnits(); } @@ -71,40 +71,40 @@ kdDebug() << "min: " << Number1->minValue() << " - max: " << Number1->maxValue() void SOMWidgetIMPL::sliderValueChanged( int temp ) { // 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 ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + disconnect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); double newvalue = TempUnit::convert( (double)temp, (int)TempUnit::Kelvin, Prefs::temperature() ); Number1->setValue( newvalue ); setNewTemp( newvalue ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); } void SOMWidgetIMPL::spinValueChanged( double temp ) { - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - disconnect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - disconnect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + disconnect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + disconnect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); int newvalue = (int)TempUnit::convert( temp, Prefs::temperature(), (int)TempUnit::Kelvin ); temp_slider->setValue( newvalue ); setNewTemp( temp ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( spinValueChanged( double ) ) ); - connect( temp_slider, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( sliderValueChanged( int ) ) ); - connect( Number1, TQT_SIGNAL( valueChanged( double ) ), - this, TQT_SLOT( setNewTemp( double ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( spinValueChanged( double ) ) ); + connect( temp_slider, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( sliderValueChanged( int ) ) ); + connect( Number1, TQ_SIGNAL( valueChanged( double ) ), + this, TQ_SLOT( setNewTemp( double ) ) ); } void SOMWidgetIMPL::setNewTemp( double newtemp ) diff --git a/kalzium/src/somwidget_impl.h b/kalzium/src/somwidget_impl.h index f66a5708..62f7070f 100644 --- a/kalzium/src/somwidget_impl.h +++ b/kalzium/src/somwidget_impl.h @@ -28,7 +28,7 @@ class Element; */ class SOMWidgetIMPL : public SOMWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/spectrumview.ui b/kalzium/src/spectrumview.ui index 25071379..5d846bdc 100644 --- a/kalzium/src/spectrumview.ui +++ b/kalzium/src/spectrumview.ui @@ -213,9 +213,9 @@ <slot>slotExportAsImage()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected">slotExportAsImage()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">spectrumwidget.h</include> diff --git a/kalzium/src/spectrumviewimpl.h b/kalzium/src/spectrumviewimpl.h index eff0510c..1b3d2b3b 100644 --- a/kalzium/src/spectrumviewimpl.h +++ b/kalzium/src/spectrumviewimpl.h @@ -22,7 +22,7 @@ */ class SpectrumViewImpl : public SpectrumView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/spectrumwidget.cpp b/kalzium/src/spectrumwidget.cpp index 88355a1c..66bfce27 100644 --- a/kalzium/src/spectrumwidget.cpp +++ b/kalzium/src/spectrumwidget.cpp @@ -320,9 +320,9 @@ void SpectrumWidget::mouseMoveEvent( TQMouseEvent *e ) void SpectrumWidget::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::LeftButton ) + if ( e->button() == TQt::LeftButton ) m_LMBPointPress = e->pos(); - if ( e->button() == Qt::RightButton ) + if ( e->button() == TQt::RightButton ) slotZoomOut(); //FIXME //the tooltip is not really working. Better to not have it @@ -391,7 +391,7 @@ void SpectrumWidget::drawTooltip( TQPainter *p ) void SpectrumWidget::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::LeftButton ) + if ( e->button() == TQt::LeftButton ) { int left = (int)Wavelength( ( double )m_LMBPointPress.x()/width() ); int right = (int)Wavelength( ( double )e->pos().x()/width() ); diff --git a/kalzium/src/spectrumwidget.h b/kalzium/src/spectrumwidget.h index 4af92561..57b66f10 100644 --- a/kalzium/src/spectrumwidget.h +++ b/kalzium/src/spectrumwidget.h @@ -33,7 +33,7 @@ */ class SpectrumWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kalzium/src/timewidget_impl.h b/kalzium/src/timewidget_impl.h index 6db713e5..99627c07 100644 --- a/kalzium/src/timewidget_impl.h +++ b/kalzium/src/timewidget_impl.h @@ -21,7 +21,7 @@ */ class TimeWidgetIMPL : public TimeWidget { - Q_OBJECT + TQ_OBJECT public: |