From a374efce3a207b39514be3c52264091400ce297e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:44:41 +0000 Subject: TQt4 port kdeedu This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmplot/KmPlot.kdevelop | 2 +- kmplot/TODO | 2 +- kmplot/kmplot/FktDlg.cpp | 6 +- kmplot/kmplot/FktDlg.h | 5 +- kmplot/kmplot/FktDlgData.ui | 44 +++++------ kmplot/kmplot/MainDlg.cpp | 72 ++++++++--------- kmplot/kmplot/MainDlg.h | 17 ++-- kmplot/kmplot/Makefile.am | 4 +- kmplot/kmplot/View.cpp | 80 +++++++++---------- kmplot/kmplot/View.h | 5 +- kmplot/kmplot/coordsconfigdialog.cpp | 4 +- kmplot/kmplot/coordsconfigdialog.h | 3 +- kmplot/kmplot/diagr.cpp | 42 +++++----- kmplot/kmplot/diagr.h | 8 +- kmplot/kmplot/editderivativespage.ui | 28 +++---- kmplot/kmplot/editfunction.cpp | 24 +++--- kmplot/kmplot/editfunction.h | 5 +- kmplot/kmplot/editfunctionpage.ui | 140 ++++++++++++++++----------------- kmplot/kmplot/editintegralpage.ui | 30 +++---- kmplot/kmplot/kconstanteditor.cpp | 20 ++--- kmplot/kmplot/kconstanteditor.h | 3 +- kmplot/kmplot/keditconstant.cpp | 6 +- kmplot/kmplot/keditconstant.h | 5 +- kmplot/kmplot/keditparametric.cpp | 12 +-- kmplot/kmplot/keditparametric.h | 6 +- kmplot/kmplot/keditpolar.cpp | 6 +- kmplot/kmplot/keditpolar.h | 8 +- kmplot/kmplot/kminmax.cpp | 56 ++++++------- kmplot/kmplot/kminmax.h | 5 +- kmplot/kmplot/kmplot.cpp | 14 ++-- kmplot/kmplot/kmplot.h | 1 + kmplot/kmplot/kmplotio.cpp | 16 ++-- kmplot/kmplot/kmplotio.h | 4 +- kmplot/kmplot/kmplotprogress.cpp | 4 +- kmplot/kmplot/kmplotprogress.h | 5 +- kmplot/kmplot/kparametereditor.cpp | 20 ++--- kmplot/kmplot/kparametereditor.h | 3 +- kmplot/kmplot/kprinterdlg.cpp | 18 ++--- kmplot/kmplot/kprinterdlg.h | 5 +- kmplot/kmplot/ksliderwindow.cpp | 14 ++-- kmplot/kmplot/ksliderwindow.h | 5 +- kmplot/kmplot/parser.cpp | 38 ++++----- kmplot/kmplot/parser.h | 4 +- kmplot/kmplot/parseriface.h | 2 +- kmplot/kmplot/qconstanteditor.ui | 32 ++++---- kmplot/kmplot/qconstanteditor.ui.h | 2 +- kmplot/kmplot/qeditconstant.ui | 24 +++--- kmplot/kmplot/qeditconstant.ui.h | 2 +- kmplot/kmplot/qeditparametric.ui | 68 ++++++++-------- kmplot/kmplot/qeditpolar.ui | 48 +++++------ kmplot/kmplot/qminmax.ui | 20 ++--- kmplot/kmplot/qparametereditor.ui | 12 +-- kmplot/kmplot/settingspagecolor.ui | 58 +++++++------- kmplot/kmplot/settingspagecoords.ui | 114 +++++++++++++-------------- kmplot/kmplot/settingspagefonts.ui | 14 ++-- kmplot/kmplot/settingspageprecision.ui | 34 ++++---- kmplot/kmplot/settingspagescaling.ui | 36 ++++----- kmplot/kmplot/sliderwindow.ui | 16 ++-- kmplot/kmplot/xparser.cpp | 40 +++++----- kmplot/kmplot/xparser.h | 6 +- 60 files changed, 673 insertions(+), 654 deletions(-) (limited to 'kmplot') diff --git a/kmplot/KmPlot.kdevelop b/kmplot/KmPlot.kdevelop index c430df75..2bb7059b 100644 --- a/kmplot/KmPlot.kdevelop +++ b/kmplot/KmPlot.kdevelop @@ -143,7 +143,7 @@ false - *.o,*.lo,CVS,*.moc,*~ + *.o,*.lo,CVS,*.tqmoc,*~ false diff --git a/kmplot/TODO b/kmplot/TODO index 1a9acc22..10854f5c 100644 --- a/kmplot/TODO +++ b/kmplot/TODO @@ -5,7 +5,7 @@ TODO * Find bugs * More functions? * In tool menu: - * find "nollställen" ( en: where the function's value is 0) + * tqfind "nollställen" ( en: where the function's value is 0) * get slope for a x-point * Value table * Fix the unpolished lines? diff --git a/kmplot/kmplot/FktDlg.cpp b/kmplot/kmplot/FktDlg.cpp index ac3d84f1..025f1452 100644 --- a/kmplot/kmplot/FktDlg.cpp +++ b/kmplot/kmplot/FktDlg.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes // #include // #include @@ -49,7 +49,7 @@ #include -FktDlg::FktDlg( TQWidget* parent, View *view ) : FktDlgData( parent, "editPlots" ), m_view(view) +FktDlg::FktDlg( TQWidget* tqparent, View *view ) : FktDlgData( tqparent, "editPlots" ), m_view(view) { connect( cmdCopyFunction, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopyFunction()) ); connect( cmdMoveFunction, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveFunction()) ); @@ -137,7 +137,7 @@ void FktDlg::slotEdit() int const id = getId( currentItem->text().section( ";", 0, 0) ) ; // find out the function type - char const prefix = m_view->parser()->ufkt[ m_view->parser()->ixValue(id) ].fstr.at(0).latin1(); + char const prefix = m_view->parser()->ufkt[ m_view->parser()->ixValue(id) ].fstr.tqat(0).latin1(); if ( prefix == 'r') slotEditPolar( id ); diff --git a/kmplot/kmplot/FktDlg.h b/kmplot/kmplot/FktDlg.h index 8275b03f..c0b914e2 100644 --- a/kmplot/kmplot/FktDlg.h +++ b/kmplot/kmplot/FktDlg.h @@ -45,14 +45,15 @@ class XParser; class FktDlg : public FktDlgData { Q_OBJECT + TQ_OBJECT public: /** * The constructor gets the current parser instance - * @param parent Parent widget. + * @param tqparent Parent widget. * @param view points to the current view instance. */ - FktDlg( TQWidget* parent, View* view ); + FktDlg( TQWidget* tqparent, View* view ); /// Empty destructor. virtual ~FktDlg(); /// Fill the widgets with plots contained in the parser instance. diff --git a/kmplot/kmplot/FktDlgData.ui b/kmplot/kmplot/FktDlgData.ui index 9678e889..3170c48c 100644 --- a/kmplot/kmplot/FktDlgData.ui +++ b/kmplot/kmplot/FktDlgData.ui @@ -1,10 +1,10 @@ FktDlgData - + FktDlgData - + 0 0 @@ -12,7 +12,7 @@ 355 - + 350 250 @@ -31,15 +31,15 @@ 6 - + - layout3 + tqlayout3 unnamed - + pushButtonHelp @@ -57,14 +57,14 @@ Expanding - + 20 20 - + PushButtonOk @@ -78,7 +78,7 @@ Click here to apply your changes and close this dialog. - + pushButtonCancel @@ -94,7 +94,7 @@ - + frame5 @@ -133,7 +133,7 @@ Here you see the list of all functions to be plotted. The checked functions are visible, the others are hidden. Click on a checkbox to show or hide the function. - + PushButtonDel @@ -158,7 +158,7 @@ Click here to delete the selected function from the list. - + PushButtonEdit @@ -183,7 +183,7 @@ Click here to edit the selected function. - + PushButtonNewFunction @@ -208,7 +208,7 @@ Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list. - + PushButtonNewParametric @@ -230,7 +230,7 @@ Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list. - + PushButtonNewPolar @@ -262,14 +262,14 @@ Expanding - + 20 20 - + cmdCopyFunction @@ -294,7 +294,7 @@ Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list. - + cmdMoveFunction @@ -329,7 +329,7 @@ Expanding - + 20 20 @@ -407,7 +407,7 @@ pushButtonCancel pushButtonHelp - + slotDelete() slotEdit() slotHasSelection() @@ -416,8 +416,8 @@ slotNewFunction() slotHelp() slotNewPrime() - - + + klistview.h diff --git a/kmplot/kmplot/MainDlg.cpp b/kmplot/kmplot/MainDlg.cpp index e8916f93..d4239cef 100644 --- a/kmplot/kmplot/MainDlg.cpp +++ b/kmplot/kmplot/MainDlg.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes #include #include @@ -63,13 +63,13 @@ class KmPlotIO; bool MainDlg::oldfileversion; -MainDlg::MainDlg(TQWidget *parentWidget, const char *, TQObject *parent, const char *name) : DCOPObject( "MainDlg" ), KParts::ReadOnlyPart( parent, name ), m_recentFiles( 0 ), m_modified(false), m_parent(parentWidget) +MainDlg::MainDlg(TQWidget *tqparentWidget, const char *, TQObject *tqparent, const char *name) : DCOPObject( "MainDlg" ), KParts::ReadOnlyPart( tqparent, name ), m_recentFiles( 0 ), m_modified(false), m_parent(tqparentWidget) { // we need an instance setInstance( KmPlotPartFactory::instance() ); - kdDebug() << "parentWidget->name():" << parentWidget->name() << endl; - if ( TQString(parentWidget->name()).startsWith("KmPlot") ) + kdDebug() << "tqparentWidget->name():" << tqparentWidget->name() << endl; + if ( TQString(tqparentWidget->name()).startsWith("KmPlot") ) { setXMLFile("kmplot_part.rc"); m_readonly = false; @@ -82,14 +82,14 @@ MainDlg::MainDlg(TQWidget *parentWidget, const char *, TQObject *parent, const c } fdlg = 0; coordsDialog = 0; - m_popupmenu = new KPopupMenu(parentWidget); - view = new View( m_readonly, m_modified, m_popupmenu, parentWidget ); + m_popupmenu = new KPopupMenu(tqparentWidget); + view = new View( m_readonly, m_modified, m_popupmenu, tqparentWidget ); connect( view, TQT_SIGNAL( setStatusBarText(const TQString &)), this, TQT_SLOT( setReadOnlyStatusBarText(const TQString &) ) ); setWidget( view ); - view->setFocusPolicy(TQWidget::ClickFocus); + view->setFocusPolicy(TQ_ClickFocus); minmaxdlg = new KMinMax(view, m_parent); view->setMinMaxDlg(minmaxdlg); - m_quickEdit = new KLineEdit( parentWidget ); + m_quickEdit = new KLineEdit( tqparentWidget ); m_quickEdit->setFocus(); TQToolTip::add( m_quickEdit, i18n( "Enter a function equation, for example: f(x)=x^2" ) ); setupActions(); @@ -99,7 +99,7 @@ MainDlg::MainDlg(TQWidget *parentWidget, const char *, TQObject *parent, const c m_recentFiles->loadEntries( m_config ); // Let's create a Configure Diloag - m_settingsDialog = new KConfigDialog( parentWidget, "settings", Settings::self() ); + m_settingsDialog = new KConfigDialog( tqparentWidget, "settings", Settings::self() ); m_settingsDialog->setHelp("general-config"); // create and add the page(s) @@ -140,12 +140,12 @@ void MainDlg::setupActions() ( void ) new KAction( i18n( "E&xport..." ), 0, this, TQT_SLOT( slotExport() ), actionCollection(), "export"); //zoom menu - m_mnuNoZoom = new KRadioAction(i18n("&No Zoom") ,"CTRL+0",view, TQT_SLOT( mnuNoZoom_clicked() ),actionCollection(),"no_zoom" ); - KRadioAction * mnuRectangular = new KRadioAction(i18n("Zoom &Rectangular"), "viewmagfit", "CTRL+1",view, TQT_SLOT( mnuRectangular_clicked() ),actionCollection(),"zoom_rectangular" ); - KRadioAction * mnuZoomIn = new KRadioAction(i18n("Zoom &In"), "viewmag+", "CTRL+2",view, TQT_SLOT( mnuZoomIn_clicked() ),actionCollection(),"zoom_in" ); - KRadioAction * mnuZoomOut = new KRadioAction(i18n("Zoom &Out"), "viewmag-", "CTRL+3",view, TQT_SLOT( mnuZoomOut_clicked() ),actionCollection(),"zoom_out" ); - KRadioAction * mnuZoomCenter = new KRadioAction(i18n("&Center Point") ,"CTRL+4",view, TQT_SLOT( mnuCenter_clicked() ),actionCollection(),"zoom_center" ); - (void ) new KAction(i18n("&Fit Widget to Trigonometric Functions") ,0,view, TQT_SLOT( mnuTrig_clicked() ),actionCollection(),"zoom_trig" ); + m_mnuNoZoom = new KRadioAction(i18n("&No Zoom") ,"CTRL+0",TQT_TQOBJECT(view), TQT_SLOT( mnuNoZoom_clicked() ),actionCollection(),"no_zoom" ); + KRadioAction * mnuRectangular = new KRadioAction(i18n("Zoom &Rectangular"), "viewmagfit", "CTRL+1",TQT_TQOBJECT(view), TQT_SLOT( mnuRectangular_clicked() ),actionCollection(),"zoom_rectangular" ); + KRadioAction * mnuZoomIn = new KRadioAction(i18n("Zoom &In"), "viewmag+", "CTRL+2",TQT_TQOBJECT(view), TQT_SLOT( mnuZoomIn_clicked() ),actionCollection(),"zoom_in" ); + KRadioAction * mnuZoomOut = new KRadioAction(i18n("Zoom &Out"), "viewmag-", "CTRL+3",TQT_TQOBJECT(view), TQT_SLOT( mnuZoomOut_clicked() ),actionCollection(),"zoom_out" ); + KRadioAction * mnuZoomCenter = new KRadioAction(i18n("&Center Point") ,"CTRL+4",TQT_TQOBJECT(view), TQT_SLOT( mnuCenter_clicked() ),actionCollection(),"zoom_center" ); + (void ) new KAction(i18n("&Fit Widget to Trigonometric Functions") ,0,TQT_TQOBJECT(view), TQT_SLOT( mnuTrig_clicked() ),actionCollection(),"zoom_trig" ); m_mnuNoZoom->setExclusiveGroup("zoom_modes"); m_mnuNoZoom->setChecked(true); mnuRectangular->setExclusiveGroup("zoom_modes"); @@ -190,16 +190,16 @@ void MainDlg::setupActions() view->mnuSliders[3] = new KToggleAction( i18n( "Show Slider 4" ), 0, this, TQT_SLOT( toggleShowSlider3() ), actionCollection(), TQString( "options_configure_show_slider_3" ).latin1() ); // Popup menu - KAction *mnuHide = new KAction(i18n("&Hide") ,0,view, TQT_SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" ); + KAction *mnuHide = new KAction(i18n("&Hide") ,0,TQT_TQOBJECT(view), TQT_SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" ); mnuHide->plug(m_popupmenu); - KAction *mnuRemove = new KAction(i18n("&Remove"),"editdelete", 0,view, TQT_SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" ); + KAction *mnuRemove = new KAction(i18n("&Remove"),"editdelete", 0,TQT_TQOBJECT(view), TQT_SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" ); mnuRemove->plug(m_popupmenu); - KAction *mnuEdit = new KAction(i18n("&Edit"),"editplots", 0,view, TQT_SLOT( mnuEdit_clicked() ),actionCollection(),"mnuedit" ); + KAction *mnuEdit = new KAction(i18n("&Edit"),"editplots", 0,TQT_TQOBJECT(view), TQT_SLOT( mnuEdit_clicked() ),actionCollection(),"mnuedit" ); mnuEdit->plug(m_popupmenu); m_popupmenu->insertSeparator(); - KAction *mnuCopy = new KAction(i18n("&Copy"), 0,view, TQT_SLOT( mnuCopy_clicked() ),actionCollection(),"mnucopy" ); + KAction *mnuCopy = new KAction(i18n("&Copy"), 0,TQT_TQOBJECT(view), TQT_SLOT( mnuCopy_clicked() ),actionCollection(),"mnucopy" ); mnuCopy->plug(m_popupmenu); - KAction *mnuMove = new KAction(i18n("&Move"), 0,view, TQT_SLOT( mnuMove_clicked() ),actionCollection(),"mnumove" ); + KAction *mnuMove = new KAction(i18n("&Move"), 0,TQT_TQOBJECT(view), TQT_SLOT( mnuMove_clicked() ),actionCollection(),"mnumove" ); mnuMove->plug(m_popupmenu); m_popupmenu->insertSeparator(); mnuYValue->plug(m_popupmenu); @@ -212,7 +212,7 @@ bool MainDlg::checkModified() if( m_modified ) { int saveit = KMessageBox::warningYesNoCancel( m_parent, i18n( "The plot has been modified.\n" - "Do you want to save it?" ), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + "Do you want to save it?" ), TQString(), KStdGuiItem::save(), KStdGuiItem::discard() ); switch( saveit ) { case KMessageBox::Yes: @@ -249,7 +249,7 @@ void MainDlg::slotSave() if ( oldfileversion) { - if ( KMessageBox::warningContinueCancel( m_parent, i18n( "This file is saved with an old file format; if you save it, you cannot open the file with older versions of Kmplot. Are you sure you want to continue?" ), TQString::null, i18n("Save New Format") ) == KMessageBox::Cancel) + if ( KMessageBox::warningContinueCancel( m_parent, i18n( "This file is saved with an old file format; if you save it, you cannot open the file with older versions of Kmplot. Are you sure you want to continue?" ), TQString(), i18n("Save New Format") ) == KMessageBox::Cancel) return; } kmplotio->save( m_url.url() ); @@ -268,7 +268,7 @@ void MainDlg::slotSaveas() if ( !url.isEmpty() ) { // check if file exists and overwriting is ok. - if( !KIO::NetAccess::exists( url,false,m_parent ) || KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue ) + if( !KIO::NetAccess::exists( url,false,m_parent ) || KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).tqarg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue ) { if ( !kmplotio->save( url ) ) KMessageBox::error(m_parent, i18n("The file could not be saved") ); @@ -293,12 +293,12 @@ void MainDlg::slotExport() if(!url.isEmpty()) { // check if file exists and overwriting is ok. - if( KIO::NetAccess::exists(url,false,m_parent ) && KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg(url.url() ), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) != KMessageBox::Continue ) return; + if( KIO::NetAccess::exists(url,false,m_parent ) && KMessageBox::warningContinueCancel( m_parent, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).tqarg(url.url() ), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) != KMessageBox::Continue ) return; if( url.fileName().right(4).lower()==".svg") { TQPicture pic; - view->draw(&pic, 2); + view->draw(TQT_TQPAINTDEVICE(&pic), 2); if (url.isLocalFile() ) pic.save( url.prettyURL(0,KURL::StripFileProtocol), "SVG"); else @@ -314,7 +314,7 @@ void MainDlg::slotExport() else if( url.fileName().right(4).lower()==".bmp") { TQPixmap pic(100, 100); - view->draw(&pic, 3); + view->draw(TQT_TQPAINTDEVICE(&pic), 3); if (url.isLocalFile() ) pic.save( url.prettyURL(0,KURL::StripFileProtocol), "BMP"); else @@ -330,7 +330,7 @@ void MainDlg::slotExport() else if( url.fileName().right(4).lower()==".png") { TQPixmap pic(100, 100); - view->draw(&pic, 3); + view->draw(TQT_TQPAINTDEVICE(&pic), 3); if (url.isLocalFile() ) pic.save( url.prettyURL(0,KURL::StripFileProtocol), "PNG"); else @@ -526,7 +526,7 @@ void MainDlg::slotQuickEdit(const TQString& f_str_const ) { //creates a valid name for the function if the user has forgotten that TQString f_str( f_str_const ); - int const pos = f_str_const.find(';'); + int const pos = f_str_const.tqfind(';'); if (pos!=-1) f_str = f_str.left(pos); if (f_str.at(0)=='r') @@ -538,7 +538,7 @@ void MainDlg::slotQuickEdit(const TQString& f_str_const ) KMessageBox::error( m_parent, i18n("Parametric functions must be definied in the \"New Parametric Plot\"-dialog which you can find in the menubar")); return; } - if ( f_str.contains('y') != 0) + if ( f_str.tqcontains('y') != 0) { KMessageBox::error( m_parent, i18n( "Recursive function is not allowed")); m_quickEdit->setFocus(); @@ -630,7 +630,7 @@ void MainDlg::loadConstants() if ( tmp_constant == " " || tmp_constant == " ") return; - constant = tmp_constant.at(0).upper().latin1(); + constant = tmp_constant.tqat(0).upper().latin1(); if ( constant<'A' || constant>'Z') constant = 'A'; @@ -785,12 +785,12 @@ KmPlotPartFactory::~KmPlotPartFactory() s_instance = 0L; } -KParts::Part* KmPlotPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KParts::Part* KmPlotPartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *, const TQStringList & ) { // Create an instance of our Part - MainDlg* obj = new MainDlg( parentWidget, widgetName, parent, name ); + MainDlg* obj = new MainDlg( tqparentWidget, widgetName, tqparent, name ); emit objectCreated( obj ); return obj; } @@ -815,8 +815,8 @@ extern "C" /// BrowserExtension class -BrowserExtension::BrowserExtension(MainDlg* parent) - : KParts::BrowserExtension( parent, "KmPlot::BrowserExtension" ) +BrowserExtension::BrowserExtension(MainDlg* tqparent) + : KParts::BrowserExtension( tqparent, "KmPlot::BrowserExtension" ) { emit enableAction("print", true); setURLDropHandlingEnabled(true); @@ -824,7 +824,7 @@ BrowserExtension::BrowserExtension(MainDlg* parent) void BrowserExtension::print() { - static_cast(parent())->slotPrint(); + static_cast(tqparent())->slotPrint(); } diff --git a/kmplot/kmplot/MainDlg.h b/kmplot/kmplot/MainDlg.h index 7b4d83bf..8609de0e 100644 --- a/kmplot/kmplot/MainDlg.h +++ b/kmplot/kmplot/MainDlg.h @@ -28,7 +28,7 @@ #ifndef MainDlg_included #define MainDlg_included -// Qt includes +// TQt includes #include // KDE includes @@ -70,14 +70,15 @@ class BrowserExtension; class MainDlg : public KParts::ReadOnlyPart, virtual public MainDlgIface { Q_OBJECT + TQ_OBJECT public: /** Constuctor. - * @param parentWidget parent widget for this part - * @param parent parent object + * @param tqparentWidget tqparent widget for this part + * @param tqparent tqparent object * @param name name of this dialog */ - MainDlg(TQWidget *parentWidget, const char *, TQObject *parent, const char *name); + MainDlg(TQWidget *tqparentWidget, const char *, TQObject *tqparent, const char *name); /// Cleaning up a bit. virtual ~MainDlg(); /// This class needs access to private members, too. @@ -184,7 +185,7 @@ private: KmPlotIO *kmplotio; /// Set to true if the application is readonly bool m_readonly; - /// MainDlg's parent widget + /// MainDlg's tqparent widget TQWidget *m_parent; /// Current file KURL m_currentfile; @@ -216,11 +217,12 @@ protected slots: class KmPlotPartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: KmPlotPartFactory(); virtual ~KmPlotPartFactory(); - virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ); static KInstance* instance(); @@ -232,6 +234,7 @@ private: class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: BrowserExtension(MainDlg*); diff --git a/kmplot/kmplot/Makefile.am b/kmplot/kmplot/Makefile.am index f5158dc9..49d5931b 100644 --- a/kmplot/kmplot/Makefile.am +++ b/kmplot/kmplot/Makefile.am @@ -25,7 +25,7 @@ bin_PROGRAMS = kmplot # the application source, library search path, and link libraries kmplot_SOURCES = main.cpp kmplot.cpp kmplotprogress.cpp kmplotIface.skel -kmplot_LDFLAGS = $(KDE_RPATH) $(all_libraries) +kmplot_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_KPARTS) -lDCOP kmplot_LDADD = $(LIB_KPARTS) # this is where the desktop file will go @@ -44,7 +44,7 @@ kde_module_LTLIBRARIES = libkmplotpart.la # the Part's source, library search path, and link libraries libkmplotpart_la_SOURCES = FktDlgData.ui parser.cpp xparser.cpp diagr.cpp View.cpp MainDlg.cpp FktDlg.cpp kprinterdlg.cpp settings.kcfgc settingspagecolor.ui kconstanteditor.cpp qparametereditor.ui kparametereditor.cpp settingspagecoords.ui settingspagefonts.ui settingspagescaling.ui settingspageprecision.ui qeditparametric.ui keditparametric.cpp qeditpolar.ui keditpolar.cpp editfunctionpage.ui editderivativespage.ui editintegralpage.ui editfunction.cpp qeditconstant.ui qminmax.ui kminmax.cpp qconstanteditor.ui keditconstant.cpp kmplotio.cpp sliderwindow.ui ksliderwindow.cpp MainDlgIface.skel parseriface.skel Viewiface.skel coordsconfigdialog.cpp -libkmplotpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +libkmplotpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_KPARTS) -lDCOP libkmplotpart_la_LIBADD = $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) $(LIB_KDEPRINT) # this is where the desktop file will go diff --git a/kmplot/kmplot/View.cpp b/kmplot/kmplot/View.cpp index 0d45fd2c..288a9de6 100644 --- a/kmplot/kmplot/View.cpp +++ b/kmplot/kmplot/View.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes #include #include #include @@ -56,7 +56,7 @@ double View::xmin = 0; double View::xmax = 0; -View::View(bool const r, bool &mo, KPopupMenu *p, TQWidget* parent, const char* name ) : DCOPObject("View"), TQWidget( parent, name , WStaticContents ), buffer( width(), height() ), m_popupmenu(p), m_modified(mo), m_readonly(r), m_dcop_client(KApplication::kApplication()->dcopClient()) +View::View(bool const r, bool &mo, KPopupMenu *p, TQWidget* tqparent, const char* name ) : DCOPObject("View"), TQWidget( tqparent, name , WStaticContents ), buffer( width(), height() ), m_popupmenu(p), m_modified(mo), m_readonly(r), m_dcop_client(KApplication::kApplication()->dcopClient()) { csmode = csparam = -1; cstype = 0; @@ -140,7 +140,7 @@ void View::draw(TQPaintDevice *dev, int form) DC.resetXForm(); DC.scale((float)w/(float)(lx+2*ref.x()), (float)w/(float)(lx+2*ref.x())); } - wm=DC.worldMatrix(); + wm=DC.tqworldMatrix(); s=DC.xForm(TQPoint(1000, 0)).x()/1000.; dgr.Create( ref, lx, ly, xmin, xmax, ymin, ymax ); } @@ -211,7 +211,7 @@ void View::draw(TQPaintDevice *dev, int form) stepWidth=Settings::stepWidth(); isDrawing=true; - setCursor(Qt::WaitCursor ); + setCursor(TQt::WaitCursor ); stop_calculating = false; for(TQValueVector::iterator ufkt=m_parser->ufkt.begin(); ufkt!=m_parser->ufkt.end() && !stop_calculating; ++ufkt) if ( !ufkt->fname.isEmpty() ) @@ -531,7 +531,7 @@ void View::setpi(TQString *s) int i; TQChar c(960); - while((i=s->find('p')) != -1) s->replace(i, 2, &c, 1); + while((i=s->tqfind('p')) != -1) s->tqreplace(i, 2, &c, 1); } @@ -594,7 +594,7 @@ void View::drawPlot() if( m_minmax->isShown() ) m_minmax->updateFunctions(); buffer.fill(backgroundcolor); - draw(&buffer, 0); + draw(TQT_TQPAINTDEVICE(&buffer), 0); TQPainter p; p.begin(this); bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() ); @@ -613,11 +613,11 @@ void View::mouseMoveEvent(TQMouseEvent *e) p.end(); TQPainter painter(this); - TQPen pen(Qt::white, 1, Qt::DotLine); - painter.setRasterOp (Qt::XorROP); + TQPen pen(TQt::white, 1, TQt::DotLine); + painter.setRasterOp (TQt::XorROP); painter.setPen(pen); - painter.setBackgroundMode (TQPainter::OpaqueMode); - painter.setBackgroundColor (Qt::blue); + painter.setBackgroundMode (Qt::OpaqueMode); + painter.setBackgroundColor (TQt::blue); painter.drawRect(rectangle_point.x(), rectangle_point.y(), e->pos().x()-rectangle_point.x(), e->pos().y()-rectangle_point.y()); return; @@ -639,7 +639,7 @@ void View::mouseMoveEvent(TQMouseEvent *e) csflg=0; } - if(area.contains(e->pos()) || (e->button()==Qt::LeftButton && e->state()==Qt::LeftButton && csxpos>xmin && csxpospos()) || (e->button()==Qt::LeftButton && e->state()==Qt::LeftButton && csxpos>xmin && csxposbutton()==RightButton) //clicking with the right mouse button + if( !m_readonly && e->button()==Qt::RightButton) //clicking with the right mouse button { char function_type; for( TQValueVector::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it) @@ -887,10 +887,10 @@ void View::mousePressEvent(TQMouseEvent *e) it->setParameter( sw->slider->value() ); } - if ( function_type=='x' && fabs(csxpos-m_parser->fkt(it, csxpos))< g && it->fstr.contains('t')==1) //parametric plot + if ( function_type=='x' && fabs(csxpos-m_parser->fkt(it, csxpos))< g && it->fstr.tqcontains('t')==1) //parametric plot { TQValueVector::iterator ufkt_y = it+1; - if ( fabs(csypos-m_parser->fkt(ufkt_y, csxpos)fstr.contains('t')==1) + if ( fabs(csypos-m_parser->fkt(ufkt_y, csxpos)fstr.tqcontains('t')==1) { if ( csmode == -1) { @@ -942,7 +942,7 @@ void View::mousePressEvent(TQMouseEvent *e) else m_popupmenushown = 2; TQString function = it->fstr; - function = function.left(function.find('(')) + '\''; + function = function.left(function.tqfind('(')) + '\''; m_popupmenu->changeTitle(10, function); m_popupmenu->exec(TQCursor::pos()); return; @@ -959,7 +959,7 @@ void View::mousePressEvent(TQMouseEvent *e) else m_popupmenushown = 2; TQString function = it->fstr; - function = function.left(function.find('(')) + "\'\'"; + function = function.left(function.tqfind('(')) + "\'\'"; m_popupmenu->changeTitle(10, function); m_popupmenu->exec(TQCursor::pos()); return; @@ -969,7 +969,7 @@ void View::mousePressEvent(TQMouseEvent *e) } return; } - if(e->button()!=LeftButton) return ; + if(e->button()!=Qt::LeftButton) return ; if(csmode>=0) //disable trace mode if trace mode is enable { csmode=-1; @@ -1019,7 +1019,7 @@ void View::mousePressEvent(TQMouseEvent *e) csparam = k; m_minmax->selectItem(); TQString function = it->fstr; - function = function.left(function.find('(')) + '\''; + function = function.left(function.tqfind('(')) + '\''; setStatusBar(function,4); mouseMoveEvent(e); return; @@ -1031,7 +1031,7 @@ void View::mousePressEvent(TQMouseEvent *e) csparam = k; m_minmax->selectItem(); TQString function = it->fstr; - function = function.left(function.find('(')) + "\'\'"; + function = function.left(function.tqfind('(')) + "\'\'"; setStatusBar(function,4); mouseMoveEvent(e); return; @@ -1221,7 +1221,7 @@ void View::findMinMaxValue(Ufkt *ufkt, char p_mode, bool minimum, double &dmin, } isDrawing=true; - setCursor(Qt::WaitCursor ); + setCursor(TQt::WaitCursor ); double dx; if ( p_mode == 3) @@ -1404,7 +1404,7 @@ void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const TQStri stop_calculating = false; isDrawing=true; - setCursor(Qt::WaitCursor ); + setCursor(TQt::WaitCursor ); bool target_found=false; startProgressBar((int) double((dmax-dmin)/dx)/2); x = ufkt->oldx = ufkt->startx; //the initial x-point @@ -1449,7 +1449,7 @@ void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const TQStri void View::keyPressEvent( TQKeyEvent * e) { - if ( zoom_mode != Z_Normal && e->key() == Qt::Key_Escape ) + if ( zoom_mode != Z_Normal && e->key() == TQt::Key_Escape ) { resetZoom(); return; @@ -1470,11 +1470,11 @@ void View::keyPressEvent( TQKeyEvent * e) if (csmode==-1 ) return; TQMouseEvent *event; - if (e->key() == Qt::Key_Left ) + if (e->key() == TQt::Key_Left ) event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx-1,fcy-1),Qt::LeftButton,Qt::LeftButton); - else if (e->key() == Qt::Key_Right ) + else if (e->key() == TQt::Key_Right ) event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx+1,fcy+1),Qt::LeftButton,Qt::LeftButton); - else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) //switch graph in trace mode + else if (e->key() == TQt::Key_Up || e->key() == TQt::Key_Down) //switch graph in trace mode { TQValueVector::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)]; int const ke=it->parameters.count(); @@ -1561,21 +1561,21 @@ void View::keyPressEvent( TQKeyEvent * e) case 1: { TQString function = it->fstr; - function = function.left(function.find('(')) + '\''; + function = function.left(function.tqfind('(')) + '\''; setStatusBar(function,4); break; } case 2: { TQString function = it->fstr; - function = function.left(function.find('(')) + "\'\'"; + function = function.left(function.tqfind('(')) + "\'\'"; setStatusBar(function,4); break; } } event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton); } - else if ( e->key() == Qt::Key_Space ) + else if ( e->key() == TQt::Key_Space ) { event = new TQMouseEvent(TQEvent::MouseButtonPress,TQCursor::pos(),Qt::RightButton,Qt::RightButton); mousePressEvent(event); @@ -1672,7 +1672,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double int const origoy = dgr.Transy(0.0); int const rectwidth = dgr.Transx(dx)- dgr.Transx(0.0)+1; - setCursor(Qt::WaitCursor ); + setCursor(TQt::WaitCursor ); isDrawing=true; bool forward_direction; @@ -1681,7 +1681,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double else forward_direction = true; - int intervals = qRound((dmax-dmin)/dx); + int intervals = tqRound((dmax-dmin)/dx); int at = 0; while ((at<=intervals) || (p_mode == 3 && x>=dmin && !forward_direction) || (p_mode == 3 && x<=dmax && forward_direction)) @@ -1801,7 +1801,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double DC->end(); setFocus(); update(); - draw(&buffer,0); + draw(TQT_TQPAINTDEVICE(&buffer),0); } if ( calculated_area>0) @@ -1883,7 +1883,7 @@ void View::mnuHide_clicked() } else { - TQKeyEvent *event = new TQKeyEvent(TQKeyEvent::KeyPress,Qt::Key_Up ,Qt::Key_Up ,0); + TQKeyEvent *event = new TQKeyEvent(TQKeyEvent::KeyPress,TQt::Key_Up ,TQt::Key_Up ,0); keyPressEvent(event); //change selected graph delete event; return; @@ -1894,7 +1894,7 @@ void View::mnuRemove_clicked() if ( csmode == -1 ) return; - if ( KMessageBox::warningContinueCancel(this,i18n("Are you sure you want to remove this function?"), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this,i18n("Are you sure you want to remove this function?"), TQString(), KStdGuiItem::del()) == KMessageBox::Continue ) { Ufkt *ufkt = &m_parser->ufkt[m_parser->ixValue(csmode)]; char const function_type = ufkt->fstr[0].latin1(); @@ -1973,7 +1973,7 @@ void View::mnuMove_clicked() void View::mnuNoZoom_clicked() { - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); zoom_mode = Z_Normal; } @@ -1983,7 +1983,7 @@ void View::mnuRectangular_clicked() resetZoom(); else { - setCursor(Qt::CrossCursor); + setCursor(TQt::CrossCursor); zoom_mode = Z_Rectangular; } } @@ -2014,7 +2014,7 @@ void View::mnuCenter_clicked() resetZoom(); else { - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); zoom_mode = Z_Center; } } @@ -2053,10 +2053,10 @@ void View::restoreCursor() switch (zoom_mode) { case Z_Normal: //no zoom - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); break; case Z_Rectangular: //rectangle zoom - setCursor(Qt::CrossCursor); + setCursor(TQt::CrossCursor); break; case Z_ZoomIn: //zoom in setCursor( TQCursor( SmallIcon( "magnify", 32), 10, 10 ) ); @@ -2065,7 +2065,7 @@ void View::restoreCursor() setCursor( TQCursor( SmallIcon( "lessen", 32), 10, 10 ) ); break; case Z_Center: //center a point - setCursor(Qt::PointingHandCursor); + setCursor(TQt::PointingHandCursor); break; } } diff --git a/kmplot/kmplot/View.h b/kmplot/kmplot/View.h index a28aadbc..034f83da 100644 --- a/kmplot/kmplot/View.h +++ b/kmplot/kmplot/View.h @@ -27,7 +27,7 @@ #define View_included #undef GrayScale -// Qt includes +// TQt includes #include // KDE includes @@ -67,9 +67,10 @@ enum ZoomMode class View : public TQWidget, virtual public ViewIface { Q_OBJECT + TQ_OBJECT public: /// Contructor sets up the parser, too. - View(bool, bool &, KPopupMenu *, TQWidget* parent=NULL, const char* name=NULL ); + View(bool, bool &, KPopupMenu *, TQWidget* tqparent=NULL, const char* name=NULL ); void setMinMaxDlg(KMinMax *); virtual ~View(); diff --git a/kmplot/kmplot/coordsconfigdialog.cpp b/kmplot/kmplot/coordsconfigdialog.cpp index 37e92b16..ac4fac64 100644 --- a/kmplot/kmplot/coordsconfigdialog.cpp +++ b/kmplot/kmplot/coordsconfigdialog.cpp @@ -32,8 +32,8 @@ #include "settingspagecoords.h" #include "coordsconfigdialog.h" -CoordsConfigDialog::CoordsConfigDialog(XParser *p, TQWidget *parent) - : KConfigDialog(parent, "coords", Settings::self()), m_parser(p) +CoordsConfigDialog::CoordsConfigDialog(XParser *p, TQWidget *tqparent) + : KConfigDialog(tqparent, "coords", Settings::self()), m_parser(p) { configAxesDialog = new SettingsPageCoords( 0, "coordsSettings" ); addPage(configAxesDialog , i18n( "Coords" ), "coords", i18n( "Edit Coordinate System" ) ); diff --git a/kmplot/kmplot/coordsconfigdialog.h b/kmplot/kmplot/coordsconfigdialog.h index 9fe15490..1b5c7856 100644 --- a/kmplot/kmplot/coordsconfigdialog.h +++ b/kmplot/kmplot/coordsconfigdialog.h @@ -39,8 +39,9 @@ class SettingsPageCoords; class CoordsConfigDialog : public KConfigDialog { Q_OBJECT + TQ_OBJECT public: - CoordsConfigDialog(XParser *p, TQWidget *parent = 0); + CoordsConfigDialog(XParser *p, TQWidget *tqparent = 0); ~CoordsConfigDialog(); protected slots: virtual void slotOk(); diff --git a/kmplot/kmplot/diagr.cpp b/kmplot/kmplot/diagr.cpp index ba65fce8..144e73b0 100644 --- a/kmplot/kmplot/diagr.cpp +++ b/kmplot/kmplot/diagr.cpp @@ -45,9 +45,9 @@ int isinf(double x) CDiagr::CDiagr() { - frameColor=qRgb(0, 0, 0); - axesColor=qRgb(0, 0, 0); - gridColor=qRgb(192, 192, 192); + frameColor=tqRgb(0, 0, 0); + axesColor=tqRgb(0, 0, 0); + gridColor=tqRgb(192, 192, 192); borderThickness=2; axesLineWidth = Settings::axesLineWidth(); gridLineWidth = Settings::gridLineWidth(); @@ -416,7 +416,7 @@ void CDiagr::drawLabels(TQPainter* pDC) int n; TQString s; - //pDC->drawText(x-dx, y+dy, 0, 0, Qt::AlignRight|Qt::AlignVCenter|Qt::DontClip, "0"); + //pDC->drawText(x-dx, y+dy, 0, 0, TQt::AlignRight|TQt::AlignVCenter|TQt::DontClip, "0"); char draw_next=0; TQFontMetrics const test(font); int swidth=0; @@ -463,7 +463,7 @@ void CDiagr::drawLabels(TQPainter* pDC) else draw_next=0; } - pDC->drawText(Transx(d), y+dy, 0, 0, Qt::AlignCenter|Qt::DontClip, s); + pDC->drawText(Transx(d), y+dy, 0, 0, TQt::AlignCenter|TQt::DontClip, s); } else if(fabs(ex-M_PI/3.)<1e-3) { @@ -497,7 +497,7 @@ void CDiagr::drawLabels(TQPainter* pDC) else draw_next=0; } - pDC->drawText(Transx(d), y+dy, 0, 0, Qt::AlignCenter|Qt::DontClip, s); + pDC->drawText(Transx(d), y+dy, 0, 0, TQt::AlignCenter|TQt::DontClip, s); } else if(fabs(ex-M_PI/4.)<1e-3) { @@ -531,7 +531,7 @@ void CDiagr::drawLabels(TQPainter* pDC) else draw_next=0; } - pDC->drawText(Transx(d), y+dy, 0, 0, Qt::AlignCenter|Qt::DontClip, s); + pDC->drawText(Transx(d), y+dy, 0, 0, TQt::AlignCenter|TQt::DontClip, s); } else if((n%5==0 || n==1 || n==-1 || draw_next)) { @@ -552,14 +552,14 @@ void CDiagr::drawLabels(TQPainter* pDC) else draw_next=0; } - pDC->drawText(Transx(d), y+dy, 0, 0, Qt::AlignCenter|Qt::DontClip, s); + pDC->drawText(Transx(d), y+dy, 0, 0, TQt::AlignCenter|TQt::DontClip, s); } } if(ymax<0 && xmax<0) - pDC->drawText(Transx(xmax)-(4*dx), y+(dy-20), 0, 0, Qt::AlignCenter|Qt::DontClip, "x"); + pDC->drawText(Transx(xmax)-(4*dx), y+(dy-20), 0, 0, TQt::AlignCenter|TQt::DontClip, "x"); else - pDC->drawText(Transx(xmax)-dx, y+dy, 0, 0, Qt::AlignCenter|Qt::DontClip, "x"); + pDC->drawText(Transx(xmax)-dx, y+dy, 0, 0, TQt::AlignCenter|TQt::DontClip, "x"); for(d=tsy, n=(int)ceil(ymin/ey); d=0) - pDC->drawText(x+dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignLeft|Qt::DontClip, s); + pDC->drawText(x+dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignLeft|TQt::DontClip, s); else - pDC->drawText(x-dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, s); + pDC->drawText(x-dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, s); } else if(fabs(ey-M_PI/3.)<1e-3) { @@ -609,9 +609,9 @@ void CDiagr::drawLabels(TQPainter* pDC) else continue; if (xmin>=0) - pDC->drawText(x+dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignLeft|Qt::DontClip, s); + pDC->drawText(x+dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignLeft|TQt::DontClip, s); else - pDC->drawText(x-dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, s); + pDC->drawText(x-dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, s); } else if(fabs(ey-M_PI/4.)<1e-3) { @@ -630,24 +630,24 @@ void CDiagr::drawLabels(TQPainter* pDC) else continue; if (xmin>=0) - pDC->drawText(x+dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignLeft|Qt::DontClip, s); + pDC->drawText(x+dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignLeft|TQt::DontClip, s); else - pDC->drawText(x-dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, s); + pDC->drawText(x-dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, s); } else if((n%5==0 || n==1 || n==-1)) { s=TQString().sprintf("%+0.3g", n*ey); if (xmin>=0) - pDC->drawText(x+dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignLeft|Qt::DontClip, s); + pDC->drawText(x+dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignLeft|TQt::DontClip, s); else - pDC->drawText(x-dx, Transy(d), 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, s); + pDC->drawText(x-dx, Transy(d), 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, s); } } if(ymax<0 && xmax<0) - pDC->drawText(x-dx, Transy(ymax)+(2*dy), 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, "y"); + pDC->drawText(x-dx, Transy(ymax)+(2*dy), 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, "y"); else if (xmin>0) - pDC->drawText(x-(2*dx), Transy(ymax)+dy, 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, "y"); + pDC->drawText(x-(2*dx), Transy(ymax)+dy, 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, "y"); else - pDC->drawText(x-dx, Transy(ymax)+dy, 0, 0, Qt::AlignVCenter|Qt::AlignRight|Qt::DontClip, "y"); + pDC->drawText(x-dx, Transy(ymax)+dy, 0, 0, TQt::AlignVCenter|TQt::AlignRight|TQt::DontClip, "y"); } diff --git a/kmplot/kmplot/diagr.h b/kmplot/kmplot/diagr.h index 23375821..b054f06e 100644 --- a/kmplot/kmplot/diagr.h +++ b/kmplot/kmplot/diagr.h @@ -32,7 +32,7 @@ #include #include -// Qt includes +// TQt includes #include //@{ @@ -87,9 +87,9 @@ public: * These members hold the current options for line widths and colors */ //@{ - QRgb frameColor; ///< color of the border frame - QRgb axesColor; ///< color of the axes - QRgb gridColor; ///< color of the grid + TQRgb frameColor; ///< color of the border frame + TQRgb axesColor; ///< color of the axes + TQRgb gridColor; ///< color of the grid uint borderThickness, ///< current line width for the border frame axesLineWidth, ///< current line width for the axes diff --git a/kmplot/kmplot/editderivativespage.ui b/kmplot/kmplot/editderivativespage.ui index a6a88b78..f0482cbb 100644 --- a/kmplot/kmplot/editderivativespage.ui +++ b/kmplot/kmplot/editderivativespage.ui @@ -1,10 +1,10 @@ EditDerivativesPage - + EditDerivativesPage - + 0 0 @@ -19,7 +19,7 @@ unnamed - + grp1der @@ -50,7 +50,7 @@ Click this button to choose a color for the plot line. - + TextLabel2_2_2 @@ -58,7 +58,7 @@ 0.1mm - + textLabel2_2_2 @@ -86,7 +86,7 @@ Change the width of the plot line in steps of 0.1mm. - + showDerivative1 @@ -100,7 +100,7 @@ If this box is checked, the first derivative will be plotted, too. - + textLabel1_3_2_2 @@ -113,7 +113,7 @@ - + grp2der @@ -127,7 +127,7 @@ unnamed - + textLabel2_2 @@ -155,7 +155,7 @@ Click this button to choose a color for the plot line. - + textLabel1_3_2 @@ -183,7 +183,7 @@ Change the width of the plot line in steps of 0.1mm. - + TextLabel2_2 @@ -191,7 +191,7 @@ 0.1mm - + showDerivative2 @@ -217,7 +217,7 @@ Expanding - + 20 110 @@ -268,7 +268,7 @@ lineWidthDerivative2 colorDerivative2 - + knuminput.h knuminput.h diff --git a/kmplot/kmplot/editfunction.cpp b/kmplot/kmplot/editfunction.cpp index 2d75cc49..daf9fd86 100644 --- a/kmplot/kmplot/editfunction.cpp +++ b/kmplot/kmplot/editfunction.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes #include #include #include @@ -56,8 +56,8 @@ #include "editintegralpage.h" #include "kparametereditor.h" -EditFunction::EditFunction( XParser* parser, TQWidget* parent, const char* name ) : - KDialogBase( IconList, "Caption", Help|Ok|Cancel, Ok, parent, name ), m_parser(parser) +EditFunction::EditFunction( XParser* parser, TQWidget* tqparent, const char* name ) : + KDialogBase( IconList, "Caption", Help|Ok|Cancel, Ok, tqparent, name ), m_parser(parser) { TQVBox *page0 = addVBoxPage( i18n("Function"), i18n( "Function" ), SmallIcon( "func", 32 ) ); editfunctionpage = new EditFunctionPage( page0 ); @@ -67,7 +67,7 @@ EditFunction::EditFunction( XParser* parser, TQWidget* parent, const char* name editintegralpage = new EditIntegralPage( page2 ); for( int number = 0; number < SLIDER_COUNT; number++ ) { - editfunctionpage->listOfSliders->insertItem( i18n( "Slider No. %1" ).arg( number +1) ); + editfunctionpage->listOfSliders->insertItem( i18n( "Slider No. %1" ).tqarg( number +1) ); } connect( editfunctionpage->cmdParameter, TQT_SIGNAL ( clicked() ), this, TQT_SLOT( cmdParameter_clicked() ) ); connect( editfunctionpage->useNoParameter, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( noParameter_toggled(bool) ) ); @@ -226,7 +226,7 @@ void EditFunction::accept() if ( tmp_ufkt.dminView::xmax ) { - KMessageBox::error(this,i18n("Please insert a minimum and maximum range between %1 and %2").arg(View::xmin).arg(View::xmax) ); + KMessageBox::error(this,i18n("Please insert a minimum and maximum range between %1 and %2").tqarg(View::xmin).tqarg(View::xmax) ); showPage(0); editfunctionpage->min->setFocus(); editfunctionpage->min->selectAll(); @@ -296,7 +296,7 @@ void EditFunction::accept() tmp_ufkt.f2_linewidth = editderivativespage->lineWidthDerivative2->value(); tmp_ufkt.f2_color = editderivativespage->colorDerivative2->color().rgb(); - if ( f_str.contains('y') != 0 && ( tmp_ufkt.f_mode || tmp_ufkt.f1_mode || tmp_ufkt.f2_mode) ) + if ( f_str.tqcontains('y') != 0 && ( tmp_ufkt.f_mode || tmp_ufkt.f1_mode || tmp_ufkt.f2_mode) ) { KMessageBox::error( this, i18n( "Recursive function is only allowed when drawing integral graphs") ); return; @@ -391,9 +391,9 @@ void EditFunction::slotHelp() bool EditFunction::functionHas2Arguments() { - int const openBracket = editfunctionpage->equation->text().find( "(" ); - int const closeBracket = editfunctionpage->equation->text().find( ")" ); - return editfunctionpage->equation->text().mid( openBracket+1, closeBracket-openBracket-1 ).find( "," ) != -1; + int const openBracket = editfunctionpage->equation->text().tqfind( "(" ); + int const closeBracket = editfunctionpage->equation->text().tqfind( ")" ); + return editfunctionpage->equation->text().mid( openBracket+1, closeBracket-openBracket-1 ).tqfind( "," ) != -1; } void EditFunction::cmdParameter_clicked() { @@ -428,12 +428,12 @@ void EditFunction::customMaxRange_toggled(bool status) void EditFunction::fixFunctionArguments(TQString &f_str) { - int const openBracket = f_str.find( "(" ); - int const closeBracket = f_str.find( ")" ); + int const openBracket = f_str.tqfind( "(" ); + int const closeBracket = f_str.tqfind( ")" ); char parameter_name; if ( closeBracket-openBracket == 2) //the function atribute is only one character { - char const function_name = f_str.at(openBracket+1).latin1(); + char const function_name = f_str.tqat(openBracket+1).latin1(); parameter_name = 'a'; while ( parameter_name == function_name) parameter_name++; diff --git a/kmplot/kmplot/editfunction.h b/kmplot/kmplot/editfunction.h index 308beadf..ef2613a1 100644 --- a/kmplot/kmplot/editfunction.h +++ b/kmplot/kmplot/editfunction.h @@ -39,11 +39,12 @@ class EditIntegralPage; class EditFunction : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /// @param parser points to the parser instance. - /// @param parent points to the parent widget. + /// @param tqparent points to the tqparent widget. /// @param name of this instance. - EditFunction( XParser* parser, TQWidget* parent = NULL, const char* name = NULL ); + EditFunction( XParser* parser, TQWidget* tqparent = NULL, const char* name = NULL ); /// Nothing special to do. virtual ~EditFunction() {} /// Fill the dialog's widgets with the properties of the parser function number index. diff --git a/kmplot/kmplot/editfunctionpage.ui b/kmplot/kmplot/editfunctionpage.ui index 31d9bd28..ec9cd575 100644 --- a/kmplot/kmplot/editfunctionpage.ui +++ b/kmplot/kmplot/editfunctionpage.ui @@ -1,13 +1,13 @@ EditFunctionPage - + EditFunctionPage true - + 0 0 @@ -22,7 +22,7 @@ unnamed - + groupBox1 @@ -39,7 +39,7 @@ unnamed - + textLabel1_4 @@ -72,7 +72,7 @@ Example: f(x)=x^2 - + buttonGroup1 @@ -83,7 +83,7 @@ Example: f(x)=x^2 unnamed - + hide @@ -99,7 +99,7 @@ Example: f(x)=x^2 - + parameterValues @@ -110,7 +110,7 @@ Example: f(x)=x^2 unnamed - + useSlider @@ -124,7 +124,7 @@ Example: f(x)=x^2 Check this to change the parameter value by moving a slider. Select the slider from the list box on the right. The values vary from 0 (left) to 100 (right). - + listOfSliders @@ -138,7 +138,7 @@ Example: f(x)=x^2 Select one of the sliders to change the parameter value dynamically. The values vary from 0 (left) to 100 (right). - + useList @@ -169,7 +169,7 @@ Example: f(x)=x^2 Click here to open a list of parameter values. Here you can add, remove, and change them. - + useNoParameter @@ -188,7 +188,7 @@ Example: f(x)=x^2 - + frame5 @@ -202,7 +202,7 @@ Example: f(x)=x^2 unnamed - + customMinRange @@ -216,7 +216,7 @@ Example: f(x)=x^2 Check this button and enter the plot range boundarys below. - + textLabel1 @@ -241,7 +241,7 @@ Example: f(x)=x^2 Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too. - + customMaxRange @@ -269,7 +269,7 @@ Example: f(x)=x^2 Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too. - + textLabel1_2 @@ -282,7 +282,7 @@ Example: f(x)=x^2 - + frame6 @@ -296,7 +296,7 @@ Example: f(x)=x^2 unnamed - + textLabel2 @@ -321,7 +321,7 @@ Example: f(x)=x^2 Click this button to choose a color for the plot line. - + textLabel1_3 @@ -346,7 +346,7 @@ Example: f(x)=x^2 Change the width of the plot line in steps of 0.1mm. - + TextLabel2 @@ -366,7 +366,7 @@ Example: f(x)=x^2 Expanding - + 20 20 @@ -418,14 +418,14 @@ Example: f(x)=x^2 update() update(int,int,int,int) update(const QRect&) - repaint() - repaint(bool) - repaint(int,int,int,int) - repaint(int,int,int,int,bool) - repaint(const QRect&) - repaint(const QRect&,bool) - repaint(const QRegion&) - repaint(const QRegion&,bool) + tqrepaint() + tqrepaint(bool) + tqrepaint(int,int,int,int) + tqrepaint(int,int,int,int,bool) + tqrepaint(const QRect&) + tqrepaint(const QRect&,bool) + tqrepaint(const QRegion&) + tqrepaint(const QRegion&,bool) show() hide() setShown(bool) @@ -466,7 +466,7 @@ Example: f(x)=x^2 setPalette(const QPalette&) setSelection(int,int) setCursorPosition(int) - setAlignment(int) + tqsetAlignment(int) cut() copy() paste() @@ -490,10 +490,10 @@ Example: f(x)=x^2 setTextWorkaround(const QString&) name enabled - geometry + tqgeometry sizePolicy - minimumSize - maximumSize + tqminimumSize + tqmaximumSize sizeIncrement baseSize paletteForegroundColor @@ -519,7 +519,7 @@ Example: f(x)=x^2 frame echoMode cursorPosition - alignment + tqalignment dragEnabled readOnly inputMask @@ -565,14 +565,14 @@ Example: f(x)=x^2 update() update(int,int,int,int) update(const QRect&) - repaint() - repaint(bool) - repaint(int,int,int,int) - repaint(int,int,int,int,bool) - repaint(const QRect&) - repaint(const QRect&,bool) - repaint(const QRegion&) - repaint(const QRegion&,bool) + tqrepaint() + tqrepaint(bool) + tqrepaint(int,int,int,int) + tqrepaint(int,int,int,int,bool) + tqrepaint(const QRect&) + tqrepaint(const QRect&,bool) + tqrepaint(const QRegion&) + tqrepaint(const QRegion&,bool) show() hide() setShown(bool) @@ -606,10 +606,10 @@ Example: f(x)=x^2 chooseColor() name enabled - geometry + tqgeometry sizePolicy - minimumSize - maximumSize + tqminimumSize + tqmaximumSize sizeIncrement baseSize paletteForegroundColor @@ -671,14 +671,14 @@ Example: f(x)=x^2 update() update(int,int,int,int) update(const QRect&) - repaint() - repaint(bool) - repaint(int,int,int,int) - repaint(int,int,int,int,bool) - repaint(const QRect&) - repaint(const QRect&,bool) - repaint(const QRegion&) - repaint(const QRegion&,bool) + tqrepaint() + tqrepaint(bool) + tqrepaint(int,int,int,int) + tqrepaint(int,int,int,int,bool) + tqrepaint(const QRect&) + tqrepaint(const QRect&,bool) + tqrepaint(const QRegion&) + tqrepaint(const QRegion&,bool) show() hide() setShown(bool) @@ -713,10 +713,10 @@ Example: f(x)=x^2 slotEmitRelativeValueChanged(int) name enabled - geometry + tqgeometry sizePolicy - minimumSize - maximumSize + tqminimumSize + tqmaximumSize sizeIncrement baseSize paletteForegroundColor @@ -777,14 +777,14 @@ Example: f(x)=x^2 update() update(int,int,int,int) update(const QRect&) - repaint() - repaint(bool) - repaint(int,int,int,int) - repaint(int,int,int,int,bool) - repaint(const QRect&) - repaint(const QRect&,bool) - repaint(const QRegion&) - repaint(const QRegion&,bool) + tqrepaint() + tqrepaint(bool) + tqrepaint(int,int,int,int) + tqrepaint(int,int,int,int,bool) + tqrepaint(const QRect&) + tqrepaint(const QRect&,bool) + tqrepaint(const QRegion&) + tqrepaint(const QRegion&,bool) show() hide() setShown(bool) @@ -818,10 +818,10 @@ Example: f(x)=x^2 slotSettingsChanged(int) name enabled - geometry + tqgeometry sizePolicy - minimumSize - maximumSize + tqminimumSize + tqmaximumSize sizeIncrement baseSize paletteForegroundColor @@ -893,11 +893,11 @@ Example: f(x)=x^2 lineWidth color - + slotHelp() customRange_toggled( bool ) - - + + klineedit.h kpushbutton.h diff --git a/kmplot/kmplot/editintegralpage.ui b/kmplot/kmplot/editintegralpage.ui index 5180a8d2..bf38d0d4 100644 --- a/kmplot/kmplot/editintegralpage.ui +++ b/kmplot/kmplot/editintegralpage.ui @@ -1,10 +1,10 @@ EditIntegralPage - + EditIntegralPage - + 0 0 @@ -19,7 +19,7 @@ unnamed - + showIntegral @@ -33,7 +33,7 @@ Check this box if you want to hide the plot of the function. - + grpPoint @@ -47,7 +47,7 @@ unnamed - + textLabel1_5 @@ -58,7 +58,7 @@ txtInitX - + textLabel1_5_2 @@ -93,7 +93,7 @@ - + frame5_2_2 @@ -110,7 +110,7 @@ unnamed - + textLabel2_2_3 @@ -132,7 +132,7 @@ 0.01 - + customPrecision @@ -145,7 +145,7 @@ - + frame6_3 @@ -162,7 +162,7 @@ unnamed - + textLabel2_3 @@ -184,7 +184,7 @@ Click this button to choose a color for the plot line. - + textLabel1_3_3 @@ -209,7 +209,7 @@ Change the width of the plot line in steps of 0.1mm. - + TextLabel2_3 @@ -229,7 +229,7 @@ Expanding - + 20 62 @@ -281,7 +281,7 @@ lineWidth color - + knuminput.h diff --git a/kmplot/kmplot/kconstanteditor.cpp b/kmplot/kmplot/kconstanteditor.cpp index c2017c8a..7fbc4101 100644 --- a/kmplot/kmplot/kconstanteditor.cpp +++ b/kmplot/kmplot/kconstanteditor.cpp @@ -40,8 +40,8 @@ #include "kconstanteditor.h" -KConstantEditor::KConstantEditor(View *v, TQWidget *parent, const char *name) - : QConstantEditor(parent,name), m_view(v) +KConstantEditor::KConstantEditor(View *v, TQWidget *tqparent, const char *name) + : QConstantEditor(tqparent,name), m_view(v) { TQString str_value; TQValueVector::iterator it; @@ -69,7 +69,7 @@ void KConstantEditor::cmdEdit_clicked() { if ( !varlist->currentItem() ) return; - constant = varlist->currentItem()->text(0).at(0).latin1(); + constant = varlist->currentItem()->text(0).tqat(0).latin1(); value = varlist->currentItem()->text(1); KEditConstant *dlg = new KEditConstant(m_view->parser(), constant, value); @@ -82,14 +82,14 @@ void KConstantEditor::cmdDelete_clicked() if ( !varlist->currentItem() ) return; - constant = varlist->currentItem()->text(0).at(0).latin1(); + constant = varlist->currentItem()->text(0).tqat(0).latin1(); value = varlist->currentItem()->text(1); TQString str; for( TQValueVector::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it) { str = it->fstr; - for (int i=str.find(')'); (uint)ifindItem(TQChar(constant), 0); //removes the item from the constant list + delete varlist->tqfindItem(TQChar(constant), 0); //removes the item from the constant list } void KConstantEditor::varlist_clicked( TQListViewItem * item ) @@ -136,7 +136,7 @@ void KConstantEditor::cmdDuplicate_clicked() { if (!varlist->currentItem()) return; - constant = varlist->currentItem()->text(0).at(0).latin1(); + constant = varlist->currentItem()->text(0).tqat(0).latin1(); value = varlist->currentItem()->text(1); TQStringList list; @@ -158,7 +158,7 @@ void KConstantEditor::cmdDuplicate_clicked() TQStringList result = KInputDialog::getItemList(i18n("Choose Name"),i18n("Choose a name for the constant:"),list, TQStringList(), false, &found); if (found) { - constant = (*result.begin()).at(0).latin1(); + constant = (*result.begin()).tqat(0).latin1(); emit newConstantSlot(); } @@ -191,7 +191,7 @@ void KConstantEditor::editConstantSlot() return; } - TQListViewItem *item = varlist->findItem(TQChar(constant), 0); + TQListViewItem *item = varlist->tqfindItem(TQChar(constant), 0); if (item!=0) item->setText(1,value); @@ -199,7 +199,7 @@ void KConstantEditor::editConstantSlot() int index = 0; for( TQValueVector::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it) { - if( it->fstr.contains(constant)!=0 ) + if( it->fstr.tqcontains(constant)!=0 ) m_view->parser()->reparse(index); //reparsing the function ++index; } diff --git a/kmplot/kmplot/kconstanteditor.h b/kmplot/kmplot/kconstanteditor.h index 93343ac3..d8514064 100644 --- a/kmplot/kmplot/kconstanteditor.h +++ b/kmplot/kmplot/kconstanteditor.h @@ -37,8 +37,9 @@ class KConstantEditor : public QConstantEditor { Q_OBJECT + TQ_OBJECT public: - KConstantEditor(View *, TQWidget *parent = 0, const char *name = 0); + KConstantEditor(View *, TQWidget *tqparent = 0, const char *name = 0); ~KConstantEditor(); public slots: diff --git a/kmplot/kmplot/keditconstant.cpp b/kmplot/kmplot/keditconstant.cpp index 4f4ab040..0ab01836 100644 --- a/kmplot/kmplot/keditconstant.cpp +++ b/kmplot/kmplot/keditconstant.cpp @@ -32,8 +32,8 @@ #include "keditconstant.h" -KEditConstant::KEditConstant(XParser *p, char &c, TQString &v, TQWidget *parent, const char *name) - : QEditConstant(parent, name,Qt::WDestructiveClose), constant(c), value(v), m_parser(p) +KEditConstant::KEditConstant(XParser *p, char &c, TQString &v, TQWidget *tqparent, const char *name) + : QEditConstant(tqparent, name,TQt::WDestructiveClose), constant(c), value(v), m_parser(p) { if ( constant != '0' ) { @@ -54,7 +54,7 @@ KEditConstant::~KEditConstant() void KEditConstant::cmdOK_clicked() { - constant = txtConstant->text().at(0).latin1(); + constant = txtConstant->text().tqat(0).latin1(); value = txtValue->text(); if ( constant<'A' || constant>'Z') { diff --git a/kmplot/kmplot/keditconstant.h b/kmplot/kmplot/keditconstant.h index e6d19d20..dcc61298 100644 --- a/kmplot/kmplot/keditconstant.h +++ b/kmplot/kmplot/keditconstant.h @@ -35,9 +35,10 @@ /// A small dialog for creating an editing constants class KEditConstant : public QEditConstant { -Q_OBJECT + Q_OBJECT + TQ_OBJECT public: - KEditConstant(XParser *p, char &, TQString &,TQWidget *parent = 0, const char *name = 0); + KEditConstant(XParser *p, char &, TQString &,TQWidget *tqparent = 0, const char *name = 0); ~KEditConstant(); public slots: diff --git a/kmplot/kmplot/keditparametric.cpp b/kmplot/kmplot/keditparametric.cpp index 67ee0421..332d93f9 100644 --- a/kmplot/kmplot/keditparametric.cpp +++ b/kmplot/kmplot/keditparametric.cpp @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -// Qt includes +// TQt includes #include // KDE includes @@ -41,8 +41,8 @@ #include "xparser.h" #include "View.h" -KEditParametric::KEditParametric( XParser* parser, TQWidget* parent, const char* name ) : - QEditParametric( parent, name ), m_parser(parser) +KEditParametric::KEditParametric( XParser* parser, TQWidget* tqparent, const char* name ) : + QEditParametric( tqparent, name ), m_parser(parser) { connect( customMinRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMinRange_toggled(bool) ) ); connect( customMaxRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMaxRange_toggled(bool) ) ); @@ -103,7 +103,7 @@ void KEditParametric::setWidgets() void KEditParametric::accept() { - if ( kLineEditXFunction->text().contains('y') != 0 || kLineEditYFunction->text().contains('y') != 0) + if ( kLineEditXFunction->text().tqcontains('y') != 0 || kLineEditYFunction->text().tqcontains('y') != 0) { KMessageBox::error( this, i18n( "Recursive function not allowed")); kLineEditXFunction->setFocus(); @@ -116,7 +116,7 @@ void KEditParametric::accept() { TQString fname; m_parser->fixFunctionName(fname, XParser::ParametricX, m_x_id); - int const pos = fname.find('('); + int const pos = fname.tqfind('('); kLineEditName->setText(fname.mid(1,pos-1)); } @@ -308,7 +308,7 @@ void KEditParametric::splitEquation( const TQString equation, TQString &name, TQ { int start = 0; if( equation[ 0 ] == 'x' || equation[ 0 ] == 'y' ) start++; - int length = equation.find( '(' ) - start; + int length = equation.tqfind( '(' ) - start; name = equation.mid( start, length ); expression = equation.section( '=', 1, 1 ); diff --git a/kmplot/kmplot/keditparametric.h b/kmplot/kmplot/keditparametric.h index 334d997a..10a69dec 100644 --- a/kmplot/kmplot/keditparametric.h +++ b/kmplot/kmplot/keditparametric.h @@ -36,11 +36,12 @@ class XParser; class KEditParametric : public QEditParametric { Q_OBJECT + TQ_OBJECT public: /// @param parser points to the parser instance. - /// @param parent points to the parent widget. + /// @param tqparent points to the tqparent widget. /// @param name of this instance. - KEditParametric( XParser* parser, TQWidget* parent = NULL, const char* name = NULL ); + KEditParametric( XParser* parser, TQWidget* tqparent = NULL, const char* name = NULL ); /// Nothing special to do. virtual ~KEditParametric() {} @@ -75,6 +76,7 @@ class KEditParametric : public QEditParametric void customMaxRange_toggled(bool); void customMinRange_toggled(bool); + protected: Ufkt *m_updatedfunction; }; diff --git a/kmplot/kmplot/keditpolar.cpp b/kmplot/kmplot/keditpolar.cpp index 787e9e32..e37372e9 100644 --- a/kmplot/kmplot/keditpolar.cpp +++ b/kmplot/kmplot/keditpolar.cpp @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -// Qt includes +// TQt includes #include // KDE includes @@ -42,8 +42,8 @@ #include "xparser.h" #include "View.h" -KEditPolar::KEditPolar( XParser* parser, TQWidget* parent, const char* name ) : - QEditPolar( parent, name ),m_parser(parser) +KEditPolar::KEditPolar( XParser* parser, TQWidget* tqparent, const char* name ) : + QEditPolar( tqparent, name ),m_parser(parser) { connect( customMinRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMinRange_toggled(bool) ) ); connect( customMaxRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMaxRange_toggled(bool) ) ); diff --git a/kmplot/kmplot/keditpolar.h b/kmplot/kmplot/keditpolar.h index 131f2475..8b199110 100644 --- a/kmplot/kmplot/keditpolar.h +++ b/kmplot/kmplot/keditpolar.h @@ -36,11 +36,12 @@ class XParser; class KEditPolar : public QEditPolar { Q_OBJECT + TQ_OBJECT public: /// @param parser points to the parser instance. - /// @param parent points to the parent widget. + /// @param tqparent points to the tqparent widget. /// @param name of this instance. - KEditPolar( XParser* parser, TQWidget* parent = NULL, const char* name = NULL ); + KEditPolar( XParser* parser, TQWidget* tqparent = NULL, const char* name = NULL ); /// Nothing special to do. virtual ~KEditPolar() {} @@ -66,7 +67,8 @@ class KEditPolar : public QEditPolar void slotHelp(); void customMinRange_toggled(bool); void customMaxRange_toggled(bool); - + + protected: Ufkt *m_updatedfunction; }; diff --git a/kmplot/kmplot/kminmax.cpp b/kmplot/kmplot/kminmax.cpp index 3f8db2c8..a67d8f9b 100644 --- a/kmplot/kmplot/kminmax.cpp +++ b/kmplot/kmplot/kminmax.cpp @@ -36,8 +36,8 @@ #include "kminmax.h" #include "xparser.h" -KMinMax::KMinMax(View *v, TQWidget *parent, const char *name) - : QMinMax(parent, name), m_view(v) +KMinMax::KMinMax(View *v, TQWidget *tqparent, const char *name) + : QMinMax(tqparent, name), m_view(v) { m_mode=-1; connect( cmdClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() )); @@ -148,7 +148,7 @@ void KMinMax::updateFunctions() if ( it->f1_mode ) //1st derivative { TQString function (it->fstr); - int i= function.find('('); + int i= function.tqfind('('); function.truncate(i); function +="\'"; list->insertItem(function ); @@ -156,7 +156,7 @@ void KMinMax::updateFunctions() if ( it->f2_mode )//2nd derivative { TQString function (it->fstr); - int i= function.find('('); + int i= function.tqfind('('); function.truncate(i); function +="\'\'"; list->insertItem(function ); @@ -164,7 +164,7 @@ void KMinMax::updateFunctions() if ( it->integral_mode )//integral { TQString function (it->fstr); - int i= function.find('('); + int i= function.tqfind('('); function.truncate(i); function = function.upper(); list->insertItem(function ); @@ -177,7 +177,7 @@ void KMinMax::updateFunctions() else cmdFind->setEnabled(true); selectItem(); - TQListBoxItem *found_item = list->findItem(selected_item,Qt::ExactMatch); + TQListBoxItem *found_item = list->tqfindItem(selected_item,TQt::ExactMatch); if ( found_item && m_view->csmode < 0) list->setSelected(found_item,true); } @@ -192,18 +192,18 @@ void KMinMax::selectItem() TQString function = ufkt->fstr; if ( m_view->cstype == 2) { - int i= function.find('('); + int i= function.tqfind('('); function.truncate(i); function +="\'\'"; } else if ( m_view->cstype == 1) { - int i= function.find('('); + int i= function.tqfind('('); function.truncate(i); function +="\'"; } //kdDebug() << "function: " << function << endl; - TQListBoxItem *item = list->findItem(function,Qt::ExactMatch); + TQListBoxItem *item = list->tqfindItem(function,TQt::ExactMatch); list->setSelected(item,true); if ( !ufkt->parameters.isEmpty() ) @@ -248,7 +248,7 @@ void KMinMax::cmdFind_clicked() if ( dminView::xmax ) { - KMessageBox::error(this,i18n("Please insert a minimum and maximum range between %1 and %2").arg(View::xmin).arg(View::xmax) ); + KMessageBox::error(this,i18n("Please insert a minimum and maximum range between %1 and %2").tqarg(View::xmin).tqarg(View::xmax) ); min->setFocus(); min->selectAll(); return; @@ -258,22 +258,22 @@ void KMinMax::cmdFind_clicked() TQString function( list->currentText() ); char p_mode = 0; - if ( function.contains('\'') == 1) + if ( function.tqcontains('\'') == 1) { p_mode = 1; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,1); } - else if ( function.contains('\'') == 2) + else if ( function.tqcontains('\'') == 2) { p_mode = 2; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,2); } else if ( function.at(0).category() == TQChar::Letter_Uppercase) { p_mode = 3; - function.at(0) = function.at(0).lower(); + function.tqat(0) = function.tqat(0).lower(); } TQString fname, fstr; @@ -308,13 +308,13 @@ void KMinMax::cmdFind_clicked() { m_view->findMinMaxValue(ufkt,p_mode,true,dmin,dmax,parameter); if ( !m_view->isCalculationStopped() ) - KMessageBox::information(this,i18n("Minimum value:\nx: %1\ny: %2").arg(dmin).arg(dmax) ); + KMessageBox::information(this,i18n("Minimum value:\nx: %1\ny: %2").tqarg(dmin).tqarg(dmax) ); } else if ( m_mode == 1) { m_view->findMinMaxValue(ufkt,p_mode,false,dmin,dmax,parameter); if ( !m_view->isCalculationStopped() ) - KMessageBox::information(this,i18n("Maximum value:\nx: %1\ny: %2").arg(dmin).arg(dmax)); + KMessageBox::information(this,i18n("Maximum value:\nx: %1\ny: %2").tqarg(dmin).tqarg(dmax)); } else if ( m_mode == 2) { @@ -336,7 +336,7 @@ void KMinMax::cmdFind_clicked() { m_view->setFocus(); m_view->update(); - KMessageBox::information(this,i18n("The integral in the interval [%1, %2] is:\n%3").arg(dmin_tmp).arg(dmax).arg(dmin)); + KMessageBox::information(this,i18n("The integral in the interval [%1, %2] is:\n%3").tqarg(dmin_tmp).tqarg(dmax).tqarg(dmin)); } } @@ -352,22 +352,22 @@ void KMinMax::list_highlighted(TQListBoxItem* item) } TQString function( list->currentText() ); char p_mode = 0; - if ( function.contains('\'') == 1) + if ( function.tqcontains('\'') == 1) { p_mode = 1; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,1); } - else if ( function.contains('\'') == 2) + else if ( function.tqcontains('\'') == 2) { p_mode = 2; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,2); } else if ( function.at(0).category() == TQChar::Letter_Uppercase) { p_mode = 3; - function.at(0) = function.at(0).lower(); + function.tqat(0) = function.tqat(0).lower(); } TQString const sec_function = function.section('(',0,0); for(TQValueVector::iterator it = m_view->parser()->ufkt.begin(); it!=m_view->parser()->ufkt.end(); ++it) @@ -390,22 +390,22 @@ void KMinMax::cmdParameter_clicked() { TQString function( list->currentText() ); char p_mode = 0; - if ( function.contains('\'') == 1) + if ( function.tqcontains('\'') == 1) { p_mode = 1; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,1); } - else if ( function.contains('\'') == 2) + else if ( function.tqcontains('\'') == 2) { p_mode = 2; - int pos = function.find('\''); + int pos = function.tqfind('\''); function.remove(pos,2); } else if ( function.at(0).category() == TQChar::Letter_Uppercase) { p_mode = 3; - function.at(0) = function.at(0).lower(); + function.tqat(0) = function.tqat(0).lower(); } TQString const sec_function = function.section('(',0,0); diff --git a/kmplot/kmplot/kminmax.h b/kmplot/kmplot/kminmax.h index e564b6f5..ac68dd49 100644 --- a/kmplot/kmplot/kminmax.h +++ b/kmplot/kmplot/kminmax.h @@ -36,8 +36,9 @@ class KMinMax : public QMinMax { Q_OBJECT + TQ_OBJECT public: - KMinMax(View *, TQWidget *parent = 0, const char *name = 0); + KMinMax(View *, TQWidget *tqparent = 0, const char *name = 0); /// called every time the dialog is opened void init(char); /// update the list with functions @@ -48,7 +49,7 @@ public: ~KMinMax(); public slots: - /// the user has pressen the find/caluclate/draw button + /// the user has pressen the tqfind/caluclate/draw button void cmdFind_clicked(); /// the selecting a function that uses parameter function from a list the user can choose which paramater value he/she wants to use void cmdParameter_clicked(); diff --git a/kmplot/kmplot/kmplot.cpp b/kmplot/kmplot/kmplot.cpp index e6f71013..f3f6b7f6 100644 --- a/kmplot/kmplot/kmplot.cpp +++ b/kmplot/kmplot/kmplot.cpp @@ -59,7 +59,7 @@ KmPlot::KmPlot( KCmdLineArgs* args) { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = static_cast(factory->create(this, + m_part = static_cast(factory->create(TQT_TQOBJECT(this), "kmplot_part", "KParts::ReadOnlyPart" )); if (m_part) { @@ -82,7 +82,7 @@ KmPlot::KmPlot( KCmdLineArgs* args) } if (!initialGeometrySet()) - resize( TQSize(450, 520).expandedTo(minimumSizeHint())); + resize( TQSize(450, 520).expandedTo(tqminimumSizeHint())); // apply the saved mainwindow settings, if any, and ask the mainwindow // to automatically save settings if changed: window size, toolbar @@ -135,15 +135,15 @@ bool KmPlot::load(const KURL& url) void KmPlot::setupActions() { - KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); m_fullScreen = KStdAction::fullScreen( NULL, NULL, actionCollection(), this, "fullscreen"); connect( m_fullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool ))); diff --git a/kmplot/kmplot/kmplot.h b/kmplot/kmplot/kmplot.h index bb861f49..ce8da9bc 100644 --- a/kmplot/kmplot/kmplot.h +++ b/kmplot/kmplot/kmplot.h @@ -49,6 +49,7 @@ class KToggleAction; class KmPlot : public KParts::MainWindow, virtual public KmPlotIface { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor diff --git a/kmplot/kmplot/kmplotio.cpp b/kmplot/kmplot/kmplotio.cpp index 9a5288a8..a51b5395 100644 --- a/kmplot/kmplot/kmplotio.cpp +++ b/kmplot/kmplot/kmplotio.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes #include #include @@ -53,7 +53,7 @@ KmPlotIO::~KmPlotIO() bool KmPlotIO::save( const KURL &url ) { - // saving as xml by a QDomDocument + // saving as xml by a TQDomDocument TQDomDocument doc( "kmpdoc" ); // the root tag TQDomElement root = doc.createElement( "kmpdoc" ); @@ -210,12 +210,12 @@ bool KmPlotIO::save( const KURL &url ) } -void KmPlotIO::addTag( TQDomDocument &doc, TQDomElement &parentTag, const TQString tagName, const TQString tagValue ) +void KmPlotIO::addTag( TQDomDocument &doc, TQDomElement &tqparentTag, const TQString tagName, const TQString tagValue ) { TQDomElement tag = doc.createElement( tagName ); TQDomText value = doc.createTextNode( tagValue ); tag.appendChild( value ); - parentTag.appendChild( tag ); + tqparentTag.appendChild( tag ); } bool KmPlotIO::load( const KURL &url ) @@ -435,7 +435,7 @@ void KmPlotIO::parseFunction( XParser *m_parser, const TQDomElement & n ) TQString fstr = ufkt.fstr; if ( !fstr.isEmpty() ) { - int const i = fstr.find( ';' ); + int const i = fstr.tqfind( ';' ); TQString str; if ( i == -1 ) str = fstr; @@ -530,7 +530,7 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const TQDomElement & n ) } const TQString tmp_fstr = n.namedItem( "equation" ).toElement().text(); - const int pos = tmp_fstr.find(';'); + const int pos = tmp_fstr.tqfind(';'); if ( pos == -1 ) ufkt.fstr = tmp_fstr; else @@ -538,7 +538,7 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const TQDomElement & n ) ufkt.fstr = tmp_fstr.left(pos); if ( !m_parser->getext( &ufkt, tmp_fstr) ) { - KMessageBox::error(0,i18n("The function %1 could not be loaded").arg(ufkt.fstr)); + KMessageBox::error(0,i18n("The function %1 could not be loaded").tqarg(ufkt.fstr)); return; } } @@ -546,7 +546,7 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const TQDomElement & n ) TQString fstr = ufkt.fstr; if ( !fstr.isEmpty() ) { - int const i = fstr.find( ';' ); + int const i = fstr.tqfind( ';' ); TQString str; if ( i == -1 ) str = fstr; diff --git a/kmplot/kmplot/kmplotio.h b/kmplot/kmplot/kmplotio.h index 3a92aa75..09112bbd 100644 --- a/kmplot/kmplot/kmplotio.h +++ b/kmplot/kmplot/kmplotio.h @@ -60,11 +60,11 @@ class KmPlotIO private: /** Esay way to add a tag to the Dom tree * @param &doc The document. - * @param parentTag The parent tag to support encapsulated tags. + * @param tqparentTag The tqparent tag to support encapsulated tags. * @param tagName The Name of the tag. * @param tagValue The data between the opening and cloding tag. */ - void addTag( TQDomDocument &doc, TQDomElement &parentTag, const TQString tagName, const TQString tagValue ); + void addTag( TQDomDocument &doc, TQDomElement &tqparentTag, const TQString tagName, const TQString tagValue ); /// Reads axes parameters from the node @a n. /// @param n Node containing the options. void parseAxes( const TQDomElement &n ); diff --git a/kmplot/kmplot/kmplotprogress.cpp b/kmplot/kmplot/kmplotprogress.cpp index c470c8ba..0df07475 100644 --- a/kmplot/kmplot/kmplotprogress.cpp +++ b/kmplot/kmplot/kmplotprogress.cpp @@ -27,9 +27,9 @@ #include #include "kmplotprogress.h" -//#include "kmplotprogress.moc.cpp" +//#include "kmplotprogress.tqmoc.cpp" -KmPlotProgress::KmPlotProgress( TQWidget* parent, const char* name ) : TQWidget( parent, name) +KmPlotProgress::KmPlotProgress( TQWidget* tqparent, const char* name ) : TQWidget( tqparent, name) { button = new KPushButton(this); button->setPixmap( SmallIcon( "cancel" ) ); diff --git a/kmplot/kmplot/kmplotprogress.h b/kmplot/kmplot/kmplotprogress.h index c4a039f9..f556921b 100644 --- a/kmplot/kmplot/kmplotprogress.h +++ b/kmplot/kmplot/kmplotprogress.h @@ -30,11 +30,12 @@ #include /// The progress-widget in the statusbar which appears when drawing integrals -class KmPlotProgress: public QWidget +class KmPlotProgress: public TQWidget { Q_OBJECT + TQ_OBJECT public: - KmPlotProgress( TQWidget* parent = 0, const char* name = 0 ); + KmPlotProgress( TQWidget* tqparent = 0, const char* name = 0 ); ~KmPlotProgress(); void increase(); diff --git a/kmplot/kmplot/kparametereditor.cpp b/kmplot/kmplot/kparametereditor.cpp index 325241e9..9e87dda4 100644 --- a/kmplot/kmplot/kparametereditor.cpp +++ b/kmplot/kmplot/kparametereditor.cpp @@ -42,8 +42,8 @@ class ParameterValueList; -KParameterEditor::KParameterEditor(XParser *m, TQValueList *l, TQWidget *parent, const char *name) - : QParameterEditor(parent,name, true, Qt::WDestructiveClose), m_parameter(l), m_parser(m) +KParameterEditor::KParameterEditor(XParser *m, TQValueList *l, TQWidget *tqparent, const char *name) + : QParameterEditor(tqparent,name, true, TQt::WDestructiveClose), m_parameter(l), m_parser(m) { for ( TQValueList::Iterator it = m_parameter->begin(); it != m_parameter->end(); ++it ) list->insertItem( (*it).expression ); @@ -89,7 +89,7 @@ void KParameterEditor::cmdNew_clicked() } if ( checkTwoOfIt(result) ) { - KMessageBox::error(0,i18n("The value %1 already exists and will therefore not be added.").arg(result)); + KMessageBox::error(0,i18n("The value %1 already exists and will therefore not be added.").tqarg(result)); continue; } list->insertItem(result); @@ -116,7 +116,7 @@ void KParameterEditor::cmdEdit_clicked() if ( checkTwoOfIt(result) ) { if( result != list->currentText() ) - KMessageBox::error(0,i18n("The value %1 already exists.").arg(result)); + KMessageBox::error(0,i18n("The value %1 already exists.").tqarg(result)); continue; } list->removeItem( list->currentItem()); @@ -134,7 +134,7 @@ void KParameterEditor::cmdDelete_clicked() void KParameterEditor::cmdImport_clicked() { - KURL url = KFileDialog::getOpenURL( TQString::null,i18n("*.txt|Plain Text File ")); + KURL url = KFileDialog::getOpenURL( TQString(),i18n("*.txt|Plain Text File ")); if ( url.isEmpty() ) return; @@ -179,13 +179,13 @@ void KParameterEditor::cmdImport_clicked() } else if ( !verbose) { - if ( KMessageBox::warningContinueCancel(this,i18n("Line %1 is not a valid parameter value and will therefore not be included. Do you want to continue?").arg(i) ) == KMessageBox::Cancel) + if ( KMessageBox::warningContinueCancel(this,i18n("Line %1 is not a valid parameter value and will therefore not be included. Do you want to continue?").tqarg(i) ) == KMessageBox::Cancel) { file.close(); KIO::NetAccess::removeTempFile( tmpfile ); return; } - else if (KMessageBox::warningYesNo(this,i18n("Would you like to be informed about other lines that cannot be read?"), TQString::null, i18n("Get Informed"), i18n("Ignore Information") ) == KMessageBox::No) + else if (KMessageBox::warningYesNo(this,i18n("Would you like to be informed about other lines that cannot be read?"), TQString(), i18n("Get Informed"), i18n("Ignore Information") ) == KMessageBox::No) verbose = true; } } @@ -202,11 +202,11 @@ void KParameterEditor::cmdExport_clicked() { if ( !list->count() ) return; - KURL url = KFileDialog::getSaveURL( TQString::null,i18n("*.txt|Plain Text File ")); + KURL url = KFileDialog::getSaveURL( TQString(),i18n("*.txt|Plain Text File ")); if ( url.isEmpty() ) return; - if( !KIO::NetAccess::exists( url,false,this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).arg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue ) + if( !KIO::NetAccess::exists( url,false,this ) || KMessageBox::warningContinueCancel( this, i18n( "A file named \"%1\" already exists. Are you sure you want to continue and overwrite this file?" ).tqarg( url.url()), i18n( "Overwrite File?" ), KGuiItem( i18n( "&Overwrite" ) ) ) == KMessageBox::Continue ) { TQString tmpfile; TQFile file; @@ -289,7 +289,7 @@ void KParameterEditor::varlist_doubleClicked( TQListBoxItem * ) bool KParameterEditor::checkTwoOfIt(const TQString & text) { - if ( list->findItem(text,Qt::ExactMatch) == 0) + if ( list->tqfindItem(text,TQt::ExactMatch) == 0) return false; else return true; diff --git a/kmplot/kmplot/kparametereditor.h b/kmplot/kmplot/kparametereditor.h index 7c1d742d..e27b7fcc 100644 --- a/kmplot/kmplot/kparametereditor.h +++ b/kmplot/kmplot/kparametereditor.h @@ -38,8 +38,9 @@ class ParameterValueList; class KParameterEditor : public QParameterEditor { Q_OBJECT + TQ_OBJECT public: - KParameterEditor(XParser *, TQValueList *, TQWidget *parent = 0, const char *name = 0); + KParameterEditor(XParser *, TQValueList *, TQWidget *tqparent = 0, const char *name = 0); ~KParameterEditor(); public slots: diff --git a/kmplot/kmplot/kprinterdlg.cpp b/kmplot/kmplot/kprinterdlg.cpp index aa74a7b5..643ab21b 100644 --- a/kmplot/kmplot/kprinterdlg.cpp +++ b/kmplot/kmplot/kprinterdlg.cpp @@ -23,7 +23,7 @@ * */ -// Qt includes +// TQt includes #include // KDE includes @@ -33,20 +33,20 @@ // local includes #include "kprinterdlg.h" -KPrinterDlg::KPrinterDlg( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +KPrinterDlg::KPrinterDlg( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n( "KmPlot Options" ) ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setMargin( KDialog::marginHint() ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setMargin( KDialog::marginHint() ); + tqlayout->setSpacing( KDialog::spacingHint() ); printHeaderTable = new TQCheckBox( i18n( "Print header table" ), this ); transparent_background = new TQCheckBox( i18n( "Transparent background" ), this ); - layout->addWidget( printHeaderTable ); - layout->addWidget( transparent_background ); - layout->addStretch( 1 ); + tqlayout->addWidget( printHeaderTable ); + tqlayout->addWidget( transparent_background ); + tqlayout->addStretch( 1 ); } void KPrinterDlg::getOptions( TQMap& opts, bool include_def ) diff --git a/kmplot/kmplot/kprinterdlg.h b/kmplot/kmplot/kprinterdlg.h index 46113efb..27be9a52 100644 --- a/kmplot/kmplot/kprinterdlg.h +++ b/kmplot/kmplot/kprinterdlg.h @@ -28,7 +28,7 @@ #ifndef kprintdlg_included #define kprintdlg_included -// Qt includes +// TQt includes #include // KDE includes @@ -42,9 +42,10 @@ class KPrinterDlg : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: /// Getting the common arguments. - KPrinterDlg( TQWidget *parent = 0, const char *name = 0 ); + KPrinterDlg( TQWidget *tqparent = 0, const char *name = 0 ); /// Reimplemented. void getOptions( TQMap& opts, bool include_def = false ); diff --git a/kmplot/kmplot/ksliderwindow.cpp b/kmplot/kmplot/ksliderwindow.cpp index 24c71994..758f6abc 100644 --- a/kmplot/kmplot/ksliderwindow.cpp +++ b/kmplot/kmplot/ksliderwindow.cpp @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -// Qt includes +// TQt includes #include #include #include @@ -42,11 +42,11 @@ // local includes #include "ksliderwindow.h" -KSliderWindow::KSliderWindow(TQWidget* parent, int num ) : - SliderWindow( parent, "", false, Qt::WStyle_Tool-Qt::WStyle_Maximize ), m_num(num) +KSliderWindow::KSliderWindow(TQWidget* tqparent, int num ) : + SliderWindow( tqparent, "", false, TQt::WStyle_Tool-TQt::WStyle_Maximize ), m_num(num) { - setCaption(i18n( "Slider %1" ).arg( num+1 ) ); - TQToolTip::add( slider, i18n( "Slider no. %1" ).arg( num+1 )); + setCaption(i18n( "Slider %1" ).tqarg( num+1 ) ); + TQToolTip::add( slider, i18n( "Slider no. %1" ).tqarg( num+1 )); TQWhatsThis::add( this, i18n( "Move slider to change the parameter of the function plot connected to this slider." ) ); // load the min and max value + the current value @@ -61,9 +61,9 @@ KSliderWindow::KSliderWindow(TQWidget* parent, int num ) : installEventFilter(this); m_popupmenu = new KPopupMenu(this); - KAction *mnuMinValue = new KAction(i18n("&Change Minimum Value") ,0,this, TQT_SLOT( mnuMinValue_clicked() ),0); + KAction *mnuMinValue = new KAction(i18n("&Change Minimum Value") ,0,TQT_TQOBJECT(this), TQT_SLOT( mnuMinValue_clicked() ),0); mnuMinValue->plug(m_popupmenu); - KAction *mnuMaxValue = new KAction(i18n("&Change Maximum Value") ,0,this, TQT_SLOT( mnuMaxValue_clicked() ),0 ); + KAction *mnuMaxValue = new KAction(i18n("&Change Maximum Value") ,0,TQT_TQOBJECT(this), TQT_SLOT( mnuMaxValue_clicked() ),0 ); mnuMaxValue->plug(m_popupmenu); } diff --git a/kmplot/kmplot/ksliderwindow.h b/kmplot/kmplot/ksliderwindow.h index ff4843c8..79a3f089 100644 --- a/kmplot/kmplot/ksliderwindow.h +++ b/kmplot/kmplot/ksliderwindow.h @@ -34,10 +34,11 @@ class KSliderWindow : public SliderWindow { Q_OBJECT + TQ_OBJECT public: - /// @param parent points to the parent widget. + /// @param tqparent points to the tqparent widget. /// @param num number of this instance. - KSliderWindow(TQWidget* parent, int num ); + KSliderWindow(TQWidget* tqparent, int num ); virtual ~KSliderWindow(); private slots: diff --git a/kmplot/kmplot/parser.cpp b/kmplot/kmplot/parser.cpp index ed064b85..2b10f31c 100644 --- a/kmplot/kmplot/parser.cpp +++ b/kmplot/kmplot/parser.cpp @@ -190,7 +190,7 @@ double Parser::eval(TQString str) fix_expression(str,0); - if ( str.contains('y')!=0) + if ( str.tqcontains('y')!=0) { err=9; delete []stack; @@ -347,9 +347,9 @@ int Parser::addfkt(TQString str) stkptr=stack=0; err=0; errpos=1; - const int p1=str.find('('); - int p2=str.find(','); - const int p3=str.find(")="); + const int p1=str.tqfind('('); + int p2=str.tqfind(','); + const int p3=str.tqfind(")="); fix_expression(str,p1+4); if(p1==-1 || p3==-1 || p1>p3) @@ -435,9 +435,9 @@ void Parser::reparse(Ufkt *item) err=0; errpos=1; - const int p1=str.find('('); - int p2=str.find(','); - const int p3=str.find(")="); + const int p1=str.tqfind('('); + int p2=str.tqfind(','); + const int p3=str.tqfind(")="); fix_expression(str,p1+4); @@ -520,7 +520,7 @@ void Parser::fix_expression(TQString &str, int const pos) } } TQString str_end = str.mid(pos); - str_end = str_end.replace(m_decimalsymbol, "."); //replace the locale decimal symbol with a '.' + str_end = str_end.tqreplace(m_decimalsymbol, "."); //replace the locale decimal symbol with a '.' str.truncate(pos); str.append(str_end); //kdDebug() << "str:" << str << endl; @@ -959,33 +959,33 @@ int Parser::parserError(bool showMessageBox) switch(err) { case 1: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Syntax error").arg(TQString::number(errpos)), "KmPlot"); + "Syntax error").tqarg(TQString::number(errpos)), "KmPlot"); break; case 2: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Missing parenthesis").arg(TQString::number(errpos)), "KmPlot"); + "Missing tqparenthesis").tqarg(TQString::number(errpos)), "KmPlot"); break; case 3: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Function name unknown").arg(TQString::number(errpos)), "KmPlot"); + "Function name unknown").tqarg(TQString::number(errpos)), "KmPlot"); break; case 4: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Void function variable").arg(TQString::number(errpos)), "KmPlot"); + "Void function variable").tqarg(TQString::number(errpos)), "KmPlot"); break; case 5: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Too many functions").arg(TQString::number(errpos)), "KmPlot"); + "Too many functions").tqarg(TQString::number(errpos)), "KmPlot"); break; case 6: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Token-memory overflow").arg(TQString::number(errpos)), "KmPlot"); + "Token-memory overflow").tqarg(TQString::number(errpos)), "KmPlot"); break; case 7: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Stack overflow").arg(TQString::number(errpos)), "KmPlot"); + "Stack overflow").tqarg(TQString::number(errpos)), "KmPlot"); break; case 8: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Name of function not free.").arg(TQString::number(errpos)), "KmPlot"); + "Name of function not free.").tqarg(TQString::number(errpos)), "KmPlot"); break; case 9: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "recursive function not allowed.").arg(TQString::number(errpos)), "KmPlot"); + "recursive function not allowed.").tqarg(TQString::number(errpos)), "KmPlot"); break; - case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1." ).arg(TQString::number(errpos)), + case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1." ).tqarg(TQString::number(errpos)), "KmPlot"); break; case 11: KMessageBox::error(0, i18n("Empty function"), "KmPlot"); @@ -1006,7 +1006,7 @@ int Parser::parserError(bool showMessageBox) TQString Parser::number( double value ) { TQString str = TQString::number( value, 'g', 6 ); - str.replace( 'e', "*10^" ); + str.tqreplace( 'e', "*10^" ); // kDebug() << "returning str="< #include @@ -148,7 +148,7 @@ class Ufkt starty,///< startposition for Euler's method, the initial y-value startx, ///< startposition for Euler's method, the initial x-value last y'.valuenitial x-value last y'.valuenitial x-value integral_precision; /// parameters; ///< List with parameter for the function diff --git a/kmplot/kmplot/parseriface.h b/kmplot/kmplot/parseriface.h index eb20625f..830d684d 100644 --- a/kmplot/kmplot/parseriface.h +++ b/kmplot/kmplot/parseriface.h @@ -38,7 +38,7 @@ class ParserIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual bool addFunction(const TQString &extstr, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider) = 0; + virtual bool addFunction(const TQString &extstr, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, TQRgb color, TQRgb f1_color, TQRgb f2_color, TQRgb integral_color, TQStringList str_parameter, int use_slider) = 0; virtual int addFunction(const TQString &f_str) = 0; virtual bool delfkt(uint id) = 0; diff --git a/kmplot/kmplot/qconstanteditor.ui b/kmplot/kmplot/qconstanteditor.ui index 92baf7e5..d74d7d93 100644 --- a/kmplot/kmplot/qconstanteditor.ui +++ b/kmplot/kmplot/qconstanteditor.ui @@ -1,10 +1,10 @@ QConstantEditor - + QConstantEditor - + 0 0 @@ -19,7 +19,7 @@ unnamed - + cmdDelete @@ -36,7 +36,7 @@ Click here to delete the selected constant; it can only be removed if it is not currently used by a plot. - + cmdEdit @@ -53,7 +53,7 @@ Click here to edit the value of the selected constant. Its name cannot be changed. - + cmdDuplicate @@ -70,7 +70,7 @@ Click here to Copy the selected constant to another constant. You can choose the new name from a list. - + cmdNew @@ -133,7 +133,7 @@ Expanding - + 20 147 @@ -163,9 +163,9 @@ varlist - clicked(QListViewItem*) + clicked(TQListViewItem*) QConstantEditor - varlist_clicked(QListViewItem*) + varlist_clicked(TQListViewItem*) cmdDuplicate @@ -175,25 +175,25 @@ varlist - doubleClicked(QListViewItem*) + doubleClicked(TQListViewItem*) QConstantEditor - varlist_doubleClicked(QListViewItem*) + varlist_doubleClicked(TQListViewItem*) qconstanteditor.ui.h - + cmdCancel_clicked() cmdNew_clicked() cmdEdit_clicked() cmdDelete_clicked() - varlist_clicked( QListViewItem * item ) + varlist_clicked( TQListViewItem * item ) cmdDuplicate_clicked() newNewConstantSlot() - varlist_doubleClicked( QListViewItem * ) - - + varlist_doubleClicked( TQListViewItem * ) + + klistview.h diff --git a/kmplot/kmplot/qconstanteditor.ui.h b/kmplot/kmplot/qconstanteditor.ui.h index 00fd2554..068f3dec 100644 --- a/kmplot/kmplot/qconstanteditor.ui.h +++ b/kmplot/kmplot/qconstanteditor.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmplot/kmplot/qeditconstant.ui b/kmplot/kmplot/qeditconstant.ui index 1d9bdb0a..fdf19388 100644 --- a/kmplot/kmplot/qeditconstant.ui +++ b/kmplot/kmplot/qeditconstant.ui @@ -1,10 +1,10 @@ QEditConstant - + QEditConstant - + 0 0 @@ -22,7 +22,7 @@ unnamed - + textLabel1 @@ -30,7 +30,7 @@ Variable: - + textLabel2 @@ -38,15 +38,15 @@ Value: - + - layout1 + tqlayout1 unnamed - + cmdOK @@ -67,14 +67,14 @@ Expanding - + 71 20 - + cmdCancel @@ -128,10 +128,10 @@ qeditconstant.ui.h - + txtVariable_lostFocus() - - + + klineedit.h klineedit.h diff --git a/kmplot/kmplot/qeditconstant.ui.h b/kmplot/kmplot/qeditconstant.ui.h index a4b8efba..25ba07fb 100644 --- a/kmplot/kmplot/qeditconstant.ui.h +++ b/kmplot/kmplot/qeditconstant.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmplot/kmplot/qeditparametric.ui b/kmplot/kmplot/qeditparametric.ui index b41573ab..6acc24d8 100644 --- a/kmplot/kmplot/qeditparametric.ui +++ b/kmplot/kmplot/qeditparametric.ui @@ -1,10 +1,10 @@ QEditParametric - + QEditParametric - + 0 0 @@ -30,7 +30,7 @@ unnamed - + groupBox1 @@ -41,14 +41,14 @@ unnamed - + textLabel4 Name: - + AlignVCenter|AlignRight @@ -91,9 +91,9 @@ Example: cos(t) The name of a function must be unique. If you leave this line empty KmPlot will set a default name. You can change it later. - + - layout9 + tqlayout9 @@ -102,7 +102,7 @@ The name of a function must be unique. If you leave this line empty KmPlot will 0 - + textLabelY @@ -110,7 +110,7 @@ The name of a function must be unique. If you leave this line empty KmPlot will y - + textLabelYF @@ -123,7 +123,7 @@ The name of a function must be unique. If you leave this line empty KmPlot will f - + textLabelArgY @@ -154,9 +154,9 @@ The dummy variable is t. Example: sin(t) - + - layout8 + tqlayout8 @@ -168,7 +168,7 @@ Example: sin(t) 0 - + textLabelX @@ -176,7 +176,7 @@ Example: sin(t) x - + textLabelXF @@ -189,7 +189,7 @@ Example: sin(t) f - + textLabelArgX @@ -201,7 +201,7 @@ Example: sin(t) - + buttonGroup1 @@ -212,7 +212,7 @@ Example: sin(t) unnamed - + checkBoxHide @@ -228,7 +228,7 @@ Example: sin(t) - + frame6 @@ -242,7 +242,7 @@ Example: sin(t) unnamed - + textLabel2 @@ -267,7 +267,7 @@ Example: sin(t) Click this button to choose a color for the plot line. - + textLabel1_3 @@ -292,7 +292,7 @@ Example: sin(t) Change the width of the plot line in steps of 0.1mm. - + TextLabel2 @@ -302,7 +302,7 @@ Example: sin(t) - + Layout1 @@ -316,7 +316,7 @@ Example: sin(t) 6 - + buttonHelp @@ -340,14 +340,14 @@ Example: sin(t) Expanding - + 20 20 - + buttonOk @@ -367,7 +367,7 @@ Example: sin(t) Click this button to apply the changes to the list of functions. - + buttonCancel @@ -386,7 +386,7 @@ Example: sin(t) - + frame5 @@ -400,7 +400,7 @@ Example: sin(t) unnamed - + textLabel1 @@ -411,7 +411,7 @@ Example: sin(t) min - + textLabel1_2 @@ -422,7 +422,7 @@ Example: sin(t) max - + customMaxRange @@ -436,7 +436,7 @@ Example: sin(t) Check this button and enter the plot maximum range boundary below. - + customMinRange @@ -528,10 +528,10 @@ Example: sin(t) buttonCancel buttonHelp - + slotHelp() - - + + klineedit.h klineedit.h diff --git a/kmplot/kmplot/qeditpolar.ui b/kmplot/kmplot/qeditpolar.ui index e61c5c6d..aae68d87 100644 --- a/kmplot/kmplot/qeditpolar.ui +++ b/kmplot/kmplot/qeditpolar.ui @@ -1,10 +1,10 @@ QEditPolar - + QEditPolar - + 0 0 @@ -30,7 +30,7 @@ unnamed - + groupBox1 @@ -61,7 +61,7 @@ Example: loop(angle)=ln(angle) - + textLabelR @@ -69,7 +69,7 @@ Example: loop(angle)=ln(angle) r - + textLabel2_2 @@ -79,7 +79,7 @@ Example: loop(angle)=ln(angle) - + buttonGroup1 @@ -90,7 +90,7 @@ Example: loop(angle)=ln(angle) unnamed - + checkBoxHide @@ -106,7 +106,7 @@ Example: loop(angle)=ln(angle) - + frame6 @@ -120,7 +120,7 @@ Example: loop(angle)=ln(angle) unnamed - + textLabel2 @@ -145,7 +145,7 @@ Example: loop(angle)=ln(angle) Click this button to choose a color for the plot line. - + textLabel1_3 @@ -170,7 +170,7 @@ Example: loop(angle)=ln(angle) Change the width of the plot line in steps of 0.1mm. - + TextLabel2 @@ -180,7 +180,7 @@ Example: loop(angle)=ln(angle) - + Layout1 @@ -194,7 +194,7 @@ Example: loop(angle)=ln(angle) 6 - + buttonHelp @@ -218,14 +218,14 @@ Example: loop(angle)=ln(angle) Expanding - + 20 20 - + buttonOk @@ -245,7 +245,7 @@ Example: loop(angle)=ln(angle) Click this button to apply the changes to the list of functions. - + buttonCancel @@ -264,7 +264,7 @@ Example: loop(angle)=ln(angle) - + frame5 @@ -278,7 +278,7 @@ Example: loop(angle)=ln(angle) unnamed - + textLabel1_2 @@ -289,7 +289,7 @@ Example: loop(angle)=ln(angle) max - + textLabel1 @@ -328,7 +328,7 @@ Example: loop(angle)=ln(angle) Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too. - + customMinRange @@ -342,7 +342,7 @@ Example: loop(angle)=ln(angle) Check this button and enter the plot minimum range boundary below. - + customMaxRange @@ -392,10 +392,10 @@ Example: loop(angle)=ln(angle) buttonCancel buttonHelp - + slotHelp() - - + + klineedit.h kcolorbutton.h diff --git a/kmplot/kmplot/qminmax.ui b/kmplot/kmplot/qminmax.ui index d828cbd6..dc4f33b9 100644 --- a/kmplot/kmplot/qminmax.ui +++ b/kmplot/kmplot/qminmax.ui @@ -1,10 +1,10 @@ QMinMax - + QMinMax - + 0 0 @@ -30,7 +30,7 @@ true - + frame5 @@ -44,25 +44,25 @@ unnamed - + lblMin Search between the x-value: - + AlignCenter - + lblMax and: - + AlignCenter @@ -84,7 +84,7 @@ - + groupBox2 @@ -122,7 +122,7 @@ Close the dialog and return to the main window. - + cmdParameter @@ -138,5 +138,5 @@ - + diff --git a/kmplot/kmplot/qparametereditor.ui b/kmplot/kmplot/qparametereditor.ui index 619f4fd7..8c862d11 100644 --- a/kmplot/kmplot/qparametereditor.ui +++ b/kmplot/kmplot/qparametereditor.ui @@ -1,10 +1,10 @@ QParameterEditor - + QParameterEditor - + 0 0 @@ -22,7 +22,7 @@ unnamed - + frame3 @@ -119,7 +119,7 @@ Expanding - + 20 80 @@ -153,7 +153,7 @@ Expanding - + 20 21 @@ -181,5 +181,5 @@ - + diff --git a/kmplot/kmplot/settingspagecolor.ui b/kmplot/kmplot/settingspagecolor.ui index e8e85323..2e788f49 100644 --- a/kmplot/kmplot/settingspagecolor.ui +++ b/kmplot/kmplot/settingspagecolor.ui @@ -1,10 +1,10 @@ SettingsPageColor - + SettingsPageColor - + 0 0 @@ -16,11 +16,11 @@ unnamed - + tabs - + tab @@ -31,15 +31,15 @@ unnamed - + - layout2 + tqlayout2 unnamed - + textLabel1 @@ -78,7 +78,7 @@ Specify the color of the grid. The change will appear as soon as you press the OK button. - + textLabel2 @@ -101,7 +101,7 @@ Expanding - + 20 40 @@ -110,7 +110,7 @@ - + tab @@ -121,17 +121,17 @@ unnamed - + - layout19 + tqlayout19 unnamed - + - layout16 + tqlayout16 @@ -179,7 +179,7 @@ The default color for function number 1. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3 @@ -204,7 +204,7 @@ The default color for function number 3. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3_13 @@ -215,7 +215,7 @@ kcfg_Color3 - + textLabel3_2 @@ -226,7 +226,7 @@ kcfg_Color2 - + textLabel3_12 @@ -251,7 +251,7 @@ The default color for function number 4. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3_11 @@ -274,22 +274,22 @@ Expanding - + 20 20 - + - layout17 + tqlayout17 unnamed - + textLabel3_9 @@ -300,7 +300,7 @@ kcfg_Color7 - + textLabel3_8 @@ -325,7 +325,7 @@ The default color for function number 9. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3_10 @@ -378,7 +378,7 @@ The default color for function number 6. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3_7 @@ -403,7 +403,7 @@ The default color for function number 10. Please note that this color setting only affects empty functions, so if you have defined a function at number 1 and you change the color for that number here, the setting will be shown next time you define a new function at number 1. - + textLabel3_6 @@ -428,7 +428,7 @@ Expanding - + 20 40 @@ -455,5 +455,5 @@ kcfg_Color8 kcfg_Color9 - + diff --git a/kmplot/kmplot/settingspagecoords.ui b/kmplot/kmplot/settingspagecoords.ui index cf2826b3..a4acaddc 100644 --- a/kmplot/kmplot/settingspagecoords.ui +++ b/kmplot/kmplot/settingspagecoords.ui @@ -1,10 +1,10 @@ SettingsPageCoords - + SettingsPageCoords - + 0 0 @@ -16,11 +16,11 @@ unnamed - + tabs - + tab @@ -31,15 +31,15 @@ unnamed - + - layout23 + tqlayout23 unnamed - + kcfg_XRange @@ -50,7 +50,7 @@ unnamed - + radioButton1 @@ -67,7 +67,7 @@ Select one of the predefined plot ranges. - + radioButton1_3 @@ -84,7 +84,7 @@ Select one of the predefined plot ranges. - + radioButton1_2 @@ -101,7 +101,7 @@ Select one of the predefined plot ranges. - + radioButton1_5 @@ -118,7 +118,7 @@ Select one of the predefined plot ranges. - + radioButton1_4 @@ -129,15 +129,15 @@ 4 - + - layout20 + tqlayout20 unnamed - + textLabel4_2 @@ -145,7 +145,7 @@ Max: - + textLabel4 @@ -185,7 +185,7 @@ - + kcfg_YRange @@ -196,7 +196,7 @@ unnamed - + radioButton1_6 @@ -213,7 +213,7 @@ Select one of the predefined plot ranges. - + radioButton1_3_2 @@ -230,7 +230,7 @@ Select one of the predefined plot ranges. - + radioButton1_2_2 @@ -247,7 +247,7 @@ Select one of the predefined plot ranges. - + radioButton1_5_2 @@ -264,7 +264,7 @@ Select one of the predefined plot ranges. - + radioButton1_4_2 @@ -275,15 +275,15 @@ 4 - + - layout20_2 + tqlayout20_2 unnamed - + textLabel4_2_2 @@ -291,7 +291,7 @@ Max: - + textLabel4_3 @@ -333,15 +333,15 @@ - + - layout24 + tqlayout24 unnamed - + textLabel7 @@ -363,7 +363,7 @@ Line width - + textLabel8 @@ -373,15 +373,15 @@ - + - layout25 + tqlayout25 unnamed - + textLabel9 @@ -403,7 +403,7 @@ Line width - + textLabel8_2 @@ -413,15 +413,15 @@ - + - layout26 + tqlayout26 unnamed - + textLabel8_4 @@ -446,7 +446,7 @@ Enter the length of a tic line. - + textLabel8_3 @@ -456,15 +456,15 @@ - + - layout22 + tqlayout22 unnamed - + kcfg_ShowArrows @@ -481,7 +481,7 @@ Check this if the axes should have arrows at their ends. - + kcfg_ShowLabel @@ -498,7 +498,7 @@ Check this if the axes' tics should be labeled. - + kcfg_ShowExtraFrame @@ -515,7 +515,7 @@ Check this if the plot area should be framed by an extra line. - + kcfg_ShowAxes @@ -544,7 +544,7 @@ Expanding - + 20 30 @@ -553,7 +553,7 @@ - + tab @@ -564,7 +564,7 @@ unnamed - + kcfg_GridStyle @@ -578,7 +578,7 @@ unnamed - + radioButton11 @@ -589,7 +589,7 @@ No Grid will be plotted. - + radioButton12 @@ -600,7 +600,7 @@ A line for every tic. - + radioButton13 @@ -611,7 +611,7 @@ Only little crosses in the plot area. - + radioButton14 @@ -624,15 +624,15 @@ - + - layout24 + tqlayout24 unnamed - + textLabel5 @@ -657,7 +657,7 @@ Enter the width of the grid lines. - + textLabel6 @@ -677,7 +677,7 @@ Expanding - + 20 40 @@ -751,7 +751,7 @@ radioButton14 kcfg_GridLineWidth - + klineedit.h klineedit.h diff --git a/kmplot/kmplot/settingspagefonts.ui b/kmplot/kmplot/settingspagefonts.ui index e5f80ccd..6379babc 100644 --- a/kmplot/kmplot/settingspagefonts.ui +++ b/kmplot/kmplot/settingspagefonts.ui @@ -1,10 +1,10 @@ SettingsPageFonts - + SettingsPageFonts - + 0 0 @@ -26,14 +26,14 @@ Expanding - + 20 110 - + textLabel11 @@ -44,7 +44,7 @@ kcfg_HeaderTableFont - + textLabel10 @@ -63,7 +63,7 @@ kcfg_AxesFont - + textLabel10_2 @@ -119,7 +119,7 @@ - + kfontcombo.h knuminput.h diff --git a/kmplot/kmplot/settingspageprecision.ui b/kmplot/kmplot/settingspageprecision.ui index 25f732ce..6f453aae 100644 --- a/kmplot/kmplot/settingspageprecision.ui +++ b/kmplot/kmplot/settingspageprecision.ui @@ -1,10 +1,10 @@ SettingsPagePrecision - + SettingsPagePrecision - + 0 0 @@ -26,14 +26,14 @@ Expanding - + 20 29 - + groupBox3 @@ -44,7 +44,7 @@ unnamed - + textLabel1_2 @@ -55,7 +55,7 @@ kcfg_zoomStep - + textLabel1_2_2 @@ -114,7 +114,7 @@ - + groupBox2 @@ -149,7 +149,7 @@ Expanding - + 81 20 @@ -158,7 +158,7 @@ - + kcfg_anglemode @@ -169,7 +169,7 @@ unnamed - + radioButton1 @@ -183,7 +183,7 @@ Check this button to use radian mode to measure angles. This is important for trigonometric functions only. - + radioButton2 @@ -199,7 +199,7 @@ - + groupBox1 @@ -210,15 +210,15 @@ unnamed - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -248,7 +248,7 @@ - + kcfg_useRelativeStepWidth @@ -268,7 +268,7 @@ - + knuminput.h knuminput.h diff --git a/kmplot/kmplot/settingspagescaling.ui b/kmplot/kmplot/settingspagescaling.ui index 222359ba..a9f02243 100644 --- a/kmplot/kmplot/settingspagescaling.ui +++ b/kmplot/kmplot/settingspagescaling.ui @@ -1,10 +1,10 @@ SettingsPageScaling - + SettingsPageScaling - + 0 0 @@ -16,15 +16,15 @@ unnamed - + - layout35 + tqlayout35 unnamed - + groupBox1 @@ -35,7 +35,7 @@ unnamed - + textLabel13 @@ -57,7 +57,7 @@ Horizontal - + textLabel13_2 @@ -65,7 +65,7 @@ Printing: - + textLabel12 @@ -76,7 +76,7 @@ kcfg_XScaling - + textLabel12_2 @@ -138,7 +138,7 @@ This is similar to the setting above, but this sets the distance between two x-axis-grids when printing or drawing on the screen. - + textLabel14 @@ -204,7 +204,7 @@ - + groupBox1_2 @@ -215,7 +215,7 @@ unnamed - + textLabel13_3 @@ -237,7 +237,7 @@ Horizontal - + textLabel13_2_2 @@ -245,7 +245,7 @@ Printing: - + textLabel12_3 @@ -256,7 +256,7 @@ kcfg_YScaling - + textLabel12_2_2 @@ -318,7 +318,7 @@ This is similar to the setting above, but this sets the distance between two y-axis-grids when printing or drawing on the screen. - + textLabel14_2 @@ -396,7 +396,7 @@ Expanding - + 21 91 @@ -411,5 +411,5 @@ kcfg_YScaling kcfg_YPrinting - + diff --git a/kmplot/kmplot/sliderwindow.ui b/kmplot/kmplot/sliderwindow.ui index deff716a..905c1d1c 100644 --- a/kmplot/kmplot/sliderwindow.ui +++ b/kmplot/kmplot/sliderwindow.ui @@ -1,10 +1,10 @@ SliderWindow - + SliderWindow - + 0 0 @@ -19,11 +19,11 @@ unnamed - + slider - + 200 0 @@ -48,7 +48,7 @@ 10 - + value @@ -60,7 +60,7 @@ 0 - + 45 0 @@ -69,7 +69,7 @@ 0 - + AlignVCenter|AlignRight @@ -83,5 +83,5 @@ setNum(int) - + diff --git a/kmplot/kmplot/xparser.cpp b/kmplot/kmplot/xparser.cpp index 18d9a3b3..6e1204fa 100644 --- a/kmplot/kmplot/xparser.cpp +++ b/kmplot/kmplot/xparser.cpp @@ -50,13 +50,13 @@ bool XParser::getext( Ufkt *item, const TQString fstr ) int p1, p2, p3, pe; TQString tstr; pe = fstr.length(); - if ( fstr.find( 'N' ) != -1 ) + if ( fstr.tqfind( 'N' ) != -1 ) item->f_mode = false; else { - if ( fstr.find( "A1" ) != -1 ) + if ( fstr.tqfind( "A1" ) != -1 ) item->f1_mode = true; - if ( fstr.find( "A2" ) != -1 ) + if ( fstr.tqfind( "A2" ) != -1 ) item->f2_mode = true; } switch ( fstr[0].latin1() ) @@ -67,13 +67,13 @@ bool XParser::getext( Ufkt *item, const TQString fstr ) item->f1_mode = item->f2_mode = false; } - p1 = fstr.find( "D[" ); + p1 = fstr.tqfind( "D[" ); if ( p1 != -1 ) { p1 += 2; const TQString str = fstr.mid( p1, pe - p1); - p2 = str.find(','); - p3 = str.find(']'); + p2 = str.tqfind(','); + p3 = str.tqfind(']'); if ( p2 > 0 && p2 < p3 ) { tstr = str.left( p2 ); @@ -90,16 +90,16 @@ bool XParser::getext( Ufkt *item, const TQString fstr ) else errflg = true; } - p1 = fstr.find( "P[" ); + p1 = fstr.tqfind( "P[" ); if ( p1 != -1 ) { int i = 0; p1 += 2; TQString str = fstr.mid( p1, 1000); - p3 = str.find( ']' ); + p3 = str.tqfind( ']' ); do { - p2 = str.find( ',' ); + p2 = str.tqfind( ',' ); if ( p2 == -1 || p2 > p3 ) p2 = p3; tstr = str.left( p2++ ); @@ -148,7 +148,7 @@ void XParser::findFunctionName(TQString &function_name, int const id, int const for (bool ok=true; last_character<'x'; ++last_character) { if ( pos==0 && last_character == 'r') continue; - function_name.at(pos)=last_character; + function_name.tqat(pos)=last_character; for( TQValueVector::iterator it = ufkt.begin(); it != ufkt.end(); ++it) { if (it == ufkt.begin() && it->fname.isEmpty() ) continue; @@ -162,7 +162,7 @@ void XParser::findFunctionName(TQString &function_name, int const id, int const } ok = true; } - function_name.at(pos)='f'; + function_name.tqat(pos)='f'; function_name.append('f'); } function_name = "e"; //this should never happen @@ -179,8 +179,8 @@ void XParser::fixFunctionName( TQString &str, int const type, int const id) str.prepend( function_name ); } - int p1=str.find('('); - int p2=str.find(')'); + int p1=str.tqfind('('); + int p2=str.tqfind(')'); if( p1>=0 && str.at(p2+1)=='=') { if ( type == XParser::Polar && str.at(0)!='r' ) @@ -242,7 +242,7 @@ double XParser::euler_method(const double x, const TQValueVector::iterator return y; } -QRgb XParser::defaultColor(int function) +TQRgb XParser::defaultColor(int function) { switch ( function%10 ) { @@ -641,14 +641,14 @@ bool XParser::functionRemoveParameter(const TQString &remove_parameter, uint id) int XParser::addFunction(const TQString &f_str) { TQString added_function(f_str); - int const pos = added_function.find(';'); + int const pos = added_function.tqfind(';'); if (pos!=-1) added_function = added_function.left(pos); fixFunctionName(added_function); if ( added_function.at(0)== 'x' || added_function.at(0)== 'y') //TODO: Make it possible to define parametric functions return -1; - if ( added_function.contains('y') != 0) + if ( added_function.tqcontains('y') != 0) return -1; int const id = addfkt( added_function ); if (id==-1) @@ -664,10 +664,10 @@ int XParser::addFunction(const TQString &f_str) return id; } -bool XParser::addFunction(const TQString &fstr_const, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider) +bool XParser::addFunction(const TQString &fstr_const, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, TQRgb color, TQRgb f1_color, TQRgb f2_color, TQRgb integral_color, TQStringList str_parameter, int use_slider) { TQString fstr(fstr_const); - switch ( fstr.at(0).latin1() ) + switch ( fstr.tqat(0).latin1() ) { case 'r': { @@ -745,7 +745,7 @@ bool XParser::setFunctionExpression(const TQString &f_str, uint id) return false; Ufkt *tmp_ufkt = &ufkt[ix]; TQString const old_fstr = tmp_ufkt->fstr; - TQString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.find('=')+1); + TQString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.tqfind('=')+1); tmp_ufkt->fstr = fstr_begin+f_str; reparse(tmp_ufkt); if ( parserError(false) != 0) @@ -801,7 +801,7 @@ bool XParser::sendFunction(int id, const TQString &dcopclient_target) arg << item->fstr << item->f_mode << item->f1_mode << item->f2_mode << item->integral_mode << item->integral_use_precision << item->linewidth << item->f1_linewidth << item->f2_linewidth << item->integral_linewidth << str_dmin << str_dmax << item->str_startx << item->str_starty << item->integral_precision << item->color << item->f1_color << item->f2_color << item->integral_color << str_parameters << item->use_slider; TQByteArray replay_data; TQCString replay_type; - bool ok = kapp->dcopClient()->call( str_result.utf8(), "Parser", "addFunction(TQString,bool,bool,bool,bool,bool,int,int,int,int,TQString,TQString,TQString,TQString,double,QRgb,QRgb,QRgb,QRgb,TQStringList,int)", parameters, replay_type, replay_data, false); + bool ok = kapp->dcopClient()->call( str_result.utf8(), "Parser", "addFunction(TQString,bool,bool,bool,bool,bool,int,int,int,int,TQString,TQString,TQString,TQString,double,TQRgb,TQRgb,TQRgb,TQRgb,TQStringList,int)", parameters, replay_type, replay_data, false); if (!ok) { KMessageBox::error(0, i18n("An error appeared during the transfer")); diff --git a/kmplot/kmplot/xparser.h b/kmplot/kmplot/xparser.h index d54b3506..5f4f05d5 100644 --- a/kmplot/kmplot/xparser.h +++ b/kmplot/kmplot/xparser.h @@ -28,7 +28,7 @@ #define SLIDER_COUNT 4 -// Qt includes +// TQt includes #include // local includes @@ -55,7 +55,7 @@ public: /// Line width default int linewidth0; - QRgb defaultColor(int function); + TQRgb defaultColor(int function); enum { Function, Polar, ParametricX, ParametricY }; ///types of functions ///Returns an unused function name if it is needed @@ -119,7 +119,7 @@ public: bool functionAddParameter(const TQString &new_parameter, uint id); bool functionRemoveParameter(const TQString &remove_parameter, uint id); int addFunction(const TQString &f_str); - bool addFunction(const TQString &extstr, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider); + bool addFunction(const TQString &extstr, bool f_mode, bool f1_mode, bool f2_mode, bool integral_mode, bool integral_use_precision, int linewidth, int f1_linewidth, int f2_linewidth, int integral_linewidth, const TQString &str_dmin, const TQString &str_dmax, const TQString &str_startx, const TQString &str_starty, double integral_precision, TQRgb color, TQRgb f1_color, TQRgb f2_color, TQRgb integral_color, TQStringList str_parameter, int use_slider); bool setFunctionExpression(const TQString &f_str, uint id); /// Get the min and max value of a graph -- cgit v1.2.1