summaryrefslogtreecommitdiffstats
path: root/kmplot
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kmplot
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmplot')
-rw-r--r--kmplot/kmplot/FktDlg.cpp94
-rw-r--r--kmplot/kmplot/FktDlg.h14
-rw-r--r--kmplot/kmplot/MainDlg.cpp172
-rw-r--r--kmplot/kmplot/MainDlg.h16
-rw-r--r--kmplot/kmplot/View.cpp240
-rw-r--r--kmplot/kmplot/View.h72
-rw-r--r--kmplot/kmplot/coordsconfigdialog.cpp4
-rw-r--r--kmplot/kmplot/coordsconfigdialog.h2
-rw-r--r--kmplot/kmplot/diagr.cpp78
-rw-r--r--kmplot/kmplot/diagr.h20
-rw-r--r--kmplot/kmplot/editfunction.cpp40
-rw-r--r--kmplot/kmplot/editfunction.h6
-rw-r--r--kmplot/kmplot/kconstanteditor.cpp48
-rw-r--r--kmplot/kmplot/kconstanteditor.h8
-rw-r--r--kmplot/kmplot/keditconstant.cpp14
-rw-r--r--kmplot/kmplot/keditconstant.h4
-rw-r--r--kmplot/kmplot/keditparametric.cpp22
-rw-r--r--kmplot/kmplot/keditparametric.h8
-rw-r--r--kmplot/kmplot/keditpolar.cpp14
-rw-r--r--kmplot/kmplot/keditpolar.h2
-rw-r--r--kmplot/kmplot/kminmax.cpp120
-rw-r--r--kmplot/kmplot/kminmax.h8
-rw-r--r--kmplot/kmplot/kmplot.cpp40
-rw-r--r--kmplot/kmplot/kmplot.h2
-rw-r--r--kmplot/kmplot/kmplotIface.h2
-rw-r--r--kmplot/kmplot/kmplotio.cpp124
-rw-r--r--kmplot/kmplot/kmplotio.h20
-rw-r--r--kmplot/kmplot/kmplotprogress.cpp6
-rw-r--r--kmplot/kmplot/kmplotprogress.h4
-rw-r--r--kmplot/kmplot/kparametereditor.cpp64
-rw-r--r--kmplot/kmplot/kparametereditor.h10
-rw-r--r--kmplot/kmplot/kprinterdlg.cpp16
-rw-r--r--kmplot/kmplot/kprinterdlg.h14
-rw-r--r--kmplot/kmplot/ksliderwindow.cpp32
-rw-r--r--kmplot/kmplot/ksliderwindow.h6
-rw-r--r--kmplot/kmplot/parser.cpp82
-rw-r--r--kmplot/kmplot/parser.h42
-rw-r--r--kmplot/kmplot/parseriface.h54
-rw-r--r--kmplot/kmplot/qconstanteditor.ui.h4
-rw-r--r--kmplot/kmplot/xparser.cpp144
-rw-r--r--kmplot/kmplot/xparser.h58
41 files changed, 865 insertions, 865 deletions
diff --git a/kmplot/kmplot/FktDlg.cpp b/kmplot/kmplot/FktDlg.cpp
index aef0b3f4..ac3d84f1 100644
--- a/kmplot/kmplot/FktDlg.cpp
+++ b/kmplot/kmplot/FktDlg.cpp
@@ -24,8 +24,8 @@
*/
// Qt includes
-// #include <qpushbutton.h>
-// #include <qpopupmenu.h>
+// #include <tqpushbutton.h>
+// #include <tqpopupmenu.h>
// KDE includes
#include <kapplication.h>
@@ -33,9 +33,9 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
-#include <qcstring.h>
-#include <qcursor.h>
-#include <qheader.h>
+#include <tqcstring.h>
+#include <tqcursor.h>
+#include <tqheader.h>
// locale includes
#include "FktDlg.h"
@@ -49,17 +49,17 @@
#include <kdebug.h>
-FktDlg::FktDlg( QWidget* parent, View *view ) : FktDlgData( parent, "editPlots" ), m_view(view)
+FktDlg::FktDlg( TQWidget* parent, View *view ) : FktDlgData( parent, "editPlots" ), m_view(view)
{
- connect( cmdCopyFunction, SIGNAL( clicked() ), this, SLOT( slotCopyFunction()) );
- connect( cmdMoveFunction, SIGNAL( clicked() ), this, SLOT( slotMoveFunction()) );
- connect( lb_fktliste, SIGNAL( doubleClicked(QListViewItem *, const QPoint &, int)), this, SLOT(lb_fktliste_doubleClicked(QListViewItem *, const QPoint &, int)) );
- connect( lb_fktliste, SIGNAL( clicked(QListViewItem *)), this, SLOT(lb_fktliste_clicked(QListViewItem *)));
- connect( lb_fktliste, SIGNAL( spacePressed(QListViewItem *)), this, SLOT(lb_fktliste_spacePressed(QListViewItem *)));
+ connect( cmdCopyFunction, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopyFunction()) );
+ connect( cmdMoveFunction, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveFunction()) );
+ connect( lb_fktliste, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(lb_fktliste_doubleClicked(TQListViewItem *, const TQPoint &, int)) );
+ connect( lb_fktliste, TQT_SIGNAL( clicked(TQListViewItem *)), this, TQT_SLOT(lb_fktliste_clicked(TQListViewItem *)));
+ connect( lb_fktliste, TQT_SIGNAL( spacePressed(TQListViewItem *)), this, TQT_SLOT(lb_fktliste_spacePressed(TQListViewItem *)));
lb_fktliste->addColumn( "" );
lb_fktliste->header()->hide();
- lb_fktliste->setResizeMode( QListView::LastColumn );
+ lb_fktliste->setResizeMode( TQListView::LastColumn );
}
FktDlg::~FktDlg()
@@ -70,7 +70,7 @@ void FktDlg::slotDelete()
{
if ( lb_fktliste->currentItem() == 0)
return;
- QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
+ TQCheckListItem *currentItem = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
if( currentItem->text()[0] == 'x' )
{
// Delete pair of parametric function
@@ -93,18 +93,18 @@ void FktDlg::slotDelete()
PushButtonDel->setEnabled(false);
}
-void FktDlg::lb_fktliste_doubleClicked( QListViewItem *, const QPoint &, int )
+void FktDlg::lb_fktliste_doubleClicked( TQListViewItem *, const TQPoint &, int )
{
- if ( mapFromGlobal(QCursor::pos()).x() <= 40 )
+ if ( mapFromGlobal(TQCursor::pos()).x() <= 40 )
return;
slotEdit();
}
-void FktDlg::lb_fktliste_spacePressed( QListViewItem *item)
+void FktDlg::lb_fktliste_spacePressed( TQListViewItem *item)
{
if ( !item )
return;
- QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(item);
+ TQCheckListItem *currentItem = dynamic_cast<TQCheckListItem *>(item);
int id;
if ( currentItem->text()[0] == 'x' )
id = getParamId(currentItem->text());
@@ -118,9 +118,9 @@ void FktDlg::lb_fktliste_spacePressed( QListViewItem *item)
updateView();
}
-void FktDlg::lb_fktliste_clicked( QListViewItem * item )
+void FktDlg::lb_fktliste_clicked( TQListViewItem * item )
{
- if ( mapFromGlobal(QCursor::pos()).x() > 40 )
+ if ( mapFromGlobal(TQCursor::pos()).x() > 40 )
return;
lb_fktliste_spacePressed(item);
}
@@ -128,7 +128,7 @@ void FktDlg::lb_fktliste_clicked( QListViewItem * item )
void FktDlg::slotEdit()
{
- QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
+ TQCheckListItem *currentItem = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
if ( currentItem == 0 )
{
PushButtonEdit->setEnabled(false);
@@ -147,9 +147,9 @@ void FktDlg::slotEdit()
slotEditFunction( id );
}
-int FktDlg::getId( const QString &f_str )
+int FktDlg::getId( const TQString &f_str )
{
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if ( it->fstr == f_str )
return it->id;
@@ -157,10 +157,10 @@ int FktDlg::getId( const QString &f_str )
return -1;
}
-int FktDlg::getParamId( const QString &f_str)
+int FktDlg::getParamId( const TQString &f_str)
{
- QString const fname = f_str.section( "(", 0, 0 );
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ TQString const fname = f_str.section( "(", 0, 0 );
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if ( it->fname == fname )
return it->id;
@@ -188,15 +188,15 @@ void FktDlg::slotEditFunction( int id )
if ( id==-1 ) editFunction->setCaption(i18n( "New Function Plot" ));
else editFunction->setCaption(i18n( "Edit Function Plot" ));
editFunction->initDialog( id );
- if( editFunction->exec() == QDialog::Accepted )
+ if( editFunction->exec() == TQDialog::Accepted )
{
Ufkt *function = editFunction->functionItem();
- QCheckListItem *item;
+ TQCheckListItem *item;
if( id == -1 ) //a new function
- item = new QCheckListItem(lb_fktliste, function->fstr, QCheckListItem::CheckBox); //a new function
+ item = new TQCheckListItem(lb_fktliste, function->fstr, TQCheckListItem::CheckBox); //a new function
else //change a function
{
- item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
+ item = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function->fstr );
}
item->setOn(function->f_mode);
@@ -212,18 +212,18 @@ void FktDlg::slotEditParametric( int x_id, int y_id)
if ( x_id==-1 && y_id==-1)
editParametric->setCaption(i18n( "New Parametric Plot" ));
editParametric->initDialog( x_id, y_id );
- if( editParametric->exec() == QDialog::Accepted )
+ if( editParametric->exec() == TQDialog::Accepted )
{
Ufkt *function_y = editParametric->functionItem();
Ufkt *function_x = &m_view->parser()->ufkt[m_view->parser()->ixValue(function_y->id - 1)]; //get the x-function
- QCheckListItem *item;
+ TQCheckListItem *item;
if( x_id == -1 ) //a new function
{
- item = new QCheckListItem(lb_fktliste, function_x->fstr+";"+function_y->fstr, QCheckListItem::CheckBox);
+ item = new TQCheckListItem(lb_fktliste, function_x->fstr+";"+function_y->fstr, TQCheckListItem::CheckBox);
}
else //change a function
{
- item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
+ item = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function_x->fstr+";"+function_y->fstr );
}
item->setOn(function_y->f_mode);
@@ -238,17 +238,17 @@ void FktDlg::slotEditPolar( int id )
KEditPolar* editPolar = new KEditPolar( m_view->parser(), this );
if ( id==-1) editPolar->setCaption(i18n( "New Polar Plot" ));
editPolar->initDialog( id );
- if( editPolar->exec() == QDialog::Accepted )
+ if( editPolar->exec() == TQDialog::Accepted )
{
Ufkt *function = editPolar->functionItem();
- QCheckListItem *item;
+ TQCheckListItem *item;
if( id == -1 ) // a new function
{
- item = new QCheckListItem(lb_fktliste, function->fstr, QCheckListItem::CheckBox);
+ item = new TQCheckListItem(lb_fktliste, function->fstr, TQCheckListItem::CheckBox);
}
else //change a function
{
- item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
+ item = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function->fstr );
}
item->setOn(function->f_mode);
@@ -278,18 +278,18 @@ void FktDlg::getPlots()
lb_fktliste->clear();
// adding all yet added functions
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if( it->fname.isEmpty() || it->fstr[0] == 'y' ) continue;
- QCheckListItem *item;
+ TQCheckListItem *item;
if( it->fstr[0] == 'x' )
{
- QString y = it->fstr;
+ TQString y = it->fstr;
++it;
- item = new QCheckListItem( lb_fktliste, y + ";" + it->fstr, QCheckListItem::CheckBox );
+ item = new TQCheckListItem( lb_fktliste, y + ";" + it->fstr, TQCheckListItem::CheckBox );
}
else
- item = new QCheckListItem(lb_fktliste, it->fstr, QCheckListItem::CheckBox);
+ item = new TQCheckListItem(lb_fktliste, it->fstr, TQCheckListItem::CheckBox);
item->setOn(it->f_mode);
}
lb_fktliste->sort();
@@ -305,7 +305,7 @@ bool FktDlg::isChanged()
return changed;
}
-void FktDlg::showEvent ( QShowEvent * )
+void FktDlg::showEvent ( TQShowEvent * )
{
changed = false;
}
@@ -317,8 +317,8 @@ void FktDlg::slotCopyFunction()
cmdCopyFunction->setEnabled(false);
return;
}
- QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
- QString const fstr = currentItem->text();
+ TQCheckListItem *currentItem = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
+ TQString const fstr = currentItem->text();
m_view->parser()->sendFunction(getId(fstr));
}
@@ -329,8 +329,8 @@ void FktDlg::slotMoveFunction()
cmdCopyFunction->setEnabled(false);
return;
}
- QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
- QString const fstr = currentItem->text();
+ TQCheckListItem *currentItem = dynamic_cast<TQCheckListItem *>(lb_fktliste->currentItem());
+ TQString const fstr = currentItem->text();
if ( !m_view->parser()->sendFunction(getId( currentItem->text()) ) )
return;
slotDelete();
diff --git a/kmplot/kmplot/FktDlg.h b/kmplot/kmplot/FktDlg.h
index 84908316..8275b03f 100644
--- a/kmplot/kmplot/FktDlg.h
+++ b/kmplot/kmplot/FktDlg.h
@@ -52,7 +52,7 @@ public:
* @param parent Parent widget.
* @param view points to the current view instance.
*/
- FktDlg( QWidget* parent, View* view );
+ FktDlg( TQWidget* parent, View* view );
/// Empty destructor.
virtual ~FktDlg();
/// Fill the widgets with plots contained in the parser instance.
@@ -72,9 +72,9 @@ protected slots:
void slotEdit();
/// Enables/disables actions if the list has a/no selection.
void slotHasSelection();
- void lb_fktliste_doubleClicked(QListViewItem *, const QPoint &, int);
- void lb_fktliste_clicked(QListViewItem * item);
- void lb_fktliste_spacePressed(QListViewItem * item);
+ void lb_fktliste_doubleClicked(TQListViewItem *, const TQPoint &, int);
+ void lb_fktliste_clicked(TQListViewItem * item);
+ void lb_fktliste_spacePressed(TQListViewItem * item);
/// Edit a function plot.
/// @param id Id of the function plot to edit
@@ -100,13 +100,13 @@ protected slots:
private:
/// Looks up the id of \a f_str in the parser instance.
- int getId( const QString &f_str );
+ int getId( const TQString &f_str );
/// Looks up the indices of the parametric pair of function.
- int getParamId( const QString &f_str );
+ int getParamId( const TQString &f_str );
/// Update the view of the main window.
void updateView();
/// Called when the dialog is showed
- void showEvent ( QShowEvent * );
+ void showEvent ( TQShowEvent * );
// /// Send a function to an other instance of Kmplot. Returns true if it success, otherwise false
// bool sendFunction();
diff --git a/kmplot/kmplot/MainDlg.cpp b/kmplot/kmplot/MainDlg.cpp
index c148d3a2..e8916f93 100644
--- a/kmplot/kmplot/MainDlg.cpp
+++ b/kmplot/kmplot/MainDlg.cpp
@@ -24,8 +24,8 @@
*/
// Qt includes
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
// KDE includes
#include <dcopclient.h>
@@ -63,13 +63,13 @@ class KmPlotIO;
bool MainDlg::oldfileversion;
-MainDlg::MainDlg(QWidget *parentWidget, const char *, QObject *parent, const char *name) : DCOPObject( "MainDlg" ), KParts::ReadOnlyPart( parent, name ), m_recentFiles( 0 ), m_modified(false), m_parent(parentWidget)
+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)
{
// we need an instance
setInstance( KmPlotPartFactory::instance() );
kdDebug() << "parentWidget->name():" << parentWidget->name() << endl;
- if ( QString(parentWidget->name()).startsWith("KmPlot") )
+ if ( TQString(parentWidget->name()).startsWith("KmPlot") )
{
setXMLFile("kmplot_part.rc");
m_readonly = false;
@@ -84,14 +84,14 @@ MainDlg::MainDlg(QWidget *parentWidget, const char *, QObject *parent, const cha
coordsDialog = 0;
m_popupmenu = new KPopupMenu(parentWidget);
view = new View( m_readonly, m_modified, m_popupmenu, parentWidget );
- connect( view, SIGNAL( setStatusBarText(const QString &)), this, SLOT( setReadOnlyStatusBarText(const QString &) ) );
+ connect( view, TQT_SIGNAL( setStatusBarText(const TQString &)), this, TQT_SLOT( setReadOnlyStatusBarText(const TQString &) ) );
setWidget( view );
- view->setFocusPolicy(QWidget::ClickFocus);
+ view->setFocusPolicy(TQWidget::ClickFocus);
minmaxdlg = new KMinMax(view, m_parent);
view->setMinMaxDlg(minmaxdlg);
m_quickEdit = new KLineEdit( parentWidget );
m_quickEdit->setFocus();
- QToolTip::add( m_quickEdit, i18n( "Enter a function equation, for example: f(x)=x^2" ) );
+ TQToolTip::add( m_quickEdit, i18n( "Enter a function equation, for example: f(x)=x^2" ) );
setupActions();
loadConstants();
kmplotio = new KmPlotIO(view->parser());
@@ -109,8 +109,8 @@ MainDlg::MainDlg(QWidget *parentWidget, const char *, QObject *parent, const cha
m_settingsDialog->addPage( m_constantsSettings, i18n("Constants"), "editconstants", i18n("Constants") );
// User edited the configuration - update your local copies of the
// configuration data
- connect( m_settingsDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
- connect( view, SIGNAL( resetZoom() ), this, SLOT(resetZoom() ) );
+ connect( m_settingsDialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT(updateSettings() ) );
+ connect( view, TQT_SIGNAL( resetZoom() ), this, TQT_SLOT(resetZoom() ) );
}
MainDlg::~MainDlg()
@@ -123,29 +123,29 @@ MainDlg::~MainDlg()
void MainDlg::setupActions()
{
// standard actions
- m_recentFiles = KStdAction::openRecent( this, SLOT( slotOpenRecent( const KURL& ) ), actionCollection(),"file_openrecent");
- KStdAction::print( this, SLOT( slotPrint() ), actionCollection(),"file_print" );
- KStdAction::save( this, SLOT( slotSave() ), actionCollection() );
- KStdAction::saveAs( this, SLOT( slotSaveas() ), actionCollection() );
- connect( kapp, SIGNAL( lastWindowClosed() ), kapp, SLOT( quit() ) );
+ m_recentFiles = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL& ) ), actionCollection(),"file_openrecent");
+ KStdAction::print( this, TQT_SLOT( slotPrint() ), actionCollection(),"file_print" );
+ KStdAction::save( this, TQT_SLOT( slotSave() ), actionCollection() );
+ KStdAction::saveAs( this, TQT_SLOT( slotSaveas() ), actionCollection() );
+ connect( kapp, TQT_SIGNAL( lastWindowClosed() ), kapp, TQT_SLOT( quit() ) );
- KAction *prefs = KStdAction::preferences( this, SLOT( slotSettings() ), actionCollection());
+ KAction *prefs = KStdAction::preferences( this, TQT_SLOT( slotSettings() ), actionCollection());
prefs->setText( i18n( "Configure KmPlot..." ) );
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
// KmPlot specific actions
// file menu
- ( void ) new KAction( i18n( "E&xport..." ), 0, this, SLOT( slotExport() ), actionCollection(), "export");
+ ( 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, SLOT( mnuNoZoom_clicked() ),actionCollection(),"no_zoom" );
- KRadioAction * mnuRectangular = new KRadioAction(i18n("Zoom &Rectangular"), "viewmagfit", "CTRL+1",view, SLOT( mnuRectangular_clicked() ),actionCollection(),"zoom_rectangular" );
- KRadioAction * mnuZoomIn = new KRadioAction(i18n("Zoom &In"), "viewmag+", "CTRL+2",view, SLOT( mnuZoomIn_clicked() ),actionCollection(),"zoom_in" );
- KRadioAction * mnuZoomOut = new KRadioAction(i18n("Zoom &Out"), "viewmag-", "CTRL+3",view, SLOT( mnuZoomOut_clicked() ),actionCollection(),"zoom_out" );
- KRadioAction * mnuZoomCenter = new KRadioAction(i18n("&Center Point") ,"CTRL+4",view, SLOT( mnuCenter_clicked() ),actionCollection(),"zoom_center" );
- (void ) new KAction(i18n("&Fit Widget to Trigonometric Functions") ,0,view, SLOT( mnuTrig_clicked() ),actionCollection(),"zoom_trig" );
+ 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->setExclusiveGroup("zoom_modes");
m_mnuNoZoom->setChecked(true);
mnuRectangular->setExclusiveGroup("zoom_modes");
@@ -154,52 +154,52 @@ void MainDlg::setupActions()
mnuZoomCenter->setExclusiveGroup("zoom_modes");
// help menu
- ( void ) new KAction( i18n( "Predefined &Math Functions" ), "functionhelp", 0, this, SLOT( slotNames() ), actionCollection(), "names" );
+ ( void ) new KAction( i18n( "Predefined &Math Functions" ), "functionhelp", 0, this, TQT_SLOT( slotNames() ), actionCollection(), "names" );
// edit menu
- ( void ) new KAction( i18n( "&Colors..." ), "colorize.png", 0, this, SLOT( editColors() ), actionCollection(), "editcolors" );
- ( void ) new KAction( i18n( "&Coordinate System..." ), "coords.png", 0, this, SLOT( editAxes() ), actionCollection(), "editaxes" );
- // ( void ) new KAction( i18n( "&Grid..." ), "coords.png", 0, this, SLOT( editGrid() ), actionCollection(), "editgrid" );
- ( void ) new KAction( i18n( "&Scaling..." ), "scaling", 0, this, SLOT( editScaling() ), actionCollection(), "editscaling" );
- ( void ) new KAction( i18n( "&Fonts..." ), "fonts", 0, this, SLOT( editFonts() ), actionCollection(), "editfonts" );
+ ( void ) new KAction( i18n( "&Colors..." ), "colorize.png", 0, this, TQT_SLOT( editColors() ), actionCollection(), "editcolors" );
+ ( void ) new KAction( i18n( "&Coordinate System..." ), "coords.png", 0, this, TQT_SLOT( editAxes() ), actionCollection(), "editaxes" );
+ // ( void ) new KAction( i18n( "&Grid..." ), "coords.png", 0, this, TQT_SLOT( editGrid() ), actionCollection(), "editgrid" );
+ ( void ) new KAction( i18n( "&Scaling..." ), "scaling", 0, this, TQT_SLOT( editScaling() ), actionCollection(), "editscaling" );
+ ( void ) new KAction( i18n( "&Fonts..." ), "fonts", 0, this, TQT_SLOT( editFonts() ), actionCollection(), "editfonts" );
- ( void ) new KAction( i18n( "Coordinate System I" ), "ksys1.png", 0, this, SLOT( slotCoord1() ), actionCollection(), "coord_i" );
- ( void ) new KAction( i18n( "Coordinate System II" ), "ksys2.png", 0, this, SLOT( slotCoord2() ), actionCollection(), "coord_ii" );
- ( void ) new KAction( i18n( "Coordinate System III" ), "ksys3.png", 0, this, SLOT( slotCoord3() ), actionCollection(), "coord_iii" );
+ ( void ) new KAction( i18n( "Coordinate System I" ), "ksys1.png", 0, this, TQT_SLOT( slotCoord1() ), actionCollection(), "coord_i" );
+ ( void ) new KAction( i18n( "Coordinate System II" ), "ksys2.png", 0, this, TQT_SLOT( slotCoord2() ), actionCollection(), "coord_ii" );
+ ( void ) new KAction( i18n( "Coordinate System III" ), "ksys3.png", 0, this, TQT_SLOT( slotCoord3() ), actionCollection(), "coord_iii" );
// plot menu
- ( void ) new KAction( i18n( "&New Function Plot..." ), "newfunction", 0, this, SLOT( newFunction() ), actionCollection(), "newfunction" );
- ( void ) new KAction( i18n( "New Parametric Plot..." ), "newparametric", 0, this, SLOT( newParametric() ), actionCollection(), "newparametric" );
- ( void ) new KAction( i18n( "New Polar Plot..." ), "newpolar", 0, this, SLOT( newPolar() ), actionCollection(), "newpolar" );
- ( void ) new KAction( i18n( "Edit Plots..." ), "editplots", 0, this, SLOT( slotEditPlots() ), actionCollection(), "editplots" );
+ ( void ) new KAction( i18n( "&New Function Plot..." ), "newfunction", 0, this, TQT_SLOT( newFunction() ), actionCollection(), "newfunction" );
+ ( void ) new KAction( i18n( "New Parametric Plot..." ), "newparametric", 0, this, TQT_SLOT( newParametric() ), actionCollection(), "newparametric" );
+ ( void ) new KAction( i18n( "New Polar Plot..." ), "newpolar", 0, this, TQT_SLOT( newPolar() ), actionCollection(), "newpolar" );
+ ( void ) new KAction( i18n( "Edit Plots..." ), "editplots", 0, this, TQT_SLOT( slotEditPlots() ), actionCollection(), "editplots" );
// tools menu
- KAction *mnuYValue = new KAction( i18n( "&Get y-Value..." ), 0, this, SLOT( getYValue() ), actionCollection(), "yvalue" );
- KAction *mnuMinValue = new KAction( i18n( "&Search for Minimum Value..." ), "minimum", 0, this, SLOT( findMinimumValue() ), actionCollection(), "minimumvalue" );
- KAction *mnuMaxValue = new KAction( i18n( "&Search for Maximum Value..." ), "maximum", 0, this, SLOT( findMaximumValue() ), actionCollection(), "maximumvalue" );
- KAction *mnuArea = new KAction( i18n( "&Calculate Integral" ), 0, this, SLOT( graphArea() ), actionCollection(), "grapharea" );
+ KAction *mnuYValue = new KAction( i18n( "&Get y-Value..." ), 0, this, TQT_SLOT( getYValue() ), actionCollection(), "yvalue" );
+ KAction *mnuMinValue = new KAction( i18n( "&Search for Minimum Value..." ), "minimum", 0, this, TQT_SLOT( findMinimumValue() ), actionCollection(), "minimumvalue" );
+ KAction *mnuMaxValue = new KAction( i18n( "&Search for Maximum Value..." ), "maximum", 0, this, TQT_SLOT( findMaximumValue() ), actionCollection(), "maximumvalue" );
+ KAction *mnuArea = new KAction( i18n( "&Calculate Integral" ), 0, this, TQT_SLOT( graphArea() ), actionCollection(), "grapharea" );
- connect( m_quickEdit, SIGNAL( returnPressed( const QString& ) ), this, SLOT( slotQuickEdit( const QString& ) ) );
+ connect( m_quickEdit, TQT_SIGNAL( returnPressed( const TQString& ) ), this, TQT_SLOT( slotQuickEdit( const TQString& ) ) );
KWidgetAction* quickEditAction = new KWidgetAction( m_quickEdit, i18n( "Quick Edit" ), 0, this, 0, actionCollection(), "quickedit" );
quickEditAction->setWhatsThis( i18n( "Enter a simple function equation here.\n"
"For instance: f(x)=x^2\nFor more options use Functions->Edit Plots... menu." ) );
- view->mnuSliders[0] = new KToggleAction( i18n( "Show Slider 1" ), 0, this, SLOT( toggleShowSlider0() ), actionCollection(), QString( "options_configure_show_slider_0" ).latin1() );
- view->mnuSliders[1] = new KToggleAction( i18n( "Show Slider 2" ), 0, this, SLOT( toggleShowSlider1() ), actionCollection(), QString( "options_configure_show_slider_1" ).latin1() );
- view->mnuSliders[2] = new KToggleAction( i18n( "Show Slider 3" ), 0, this, SLOT( toggleShowSlider2() ), actionCollection(), QString( "options_configure_show_slider_2" ).latin1() );
- view->mnuSliders[3] = new KToggleAction( i18n( "Show Slider 4" ), 0, this, SLOT( toggleShowSlider3() ), actionCollection(), QString( "options_configure_show_slider_3" ).latin1() );
+ view->mnuSliders[0] = new KToggleAction( i18n( "Show Slider 1" ), 0, this, TQT_SLOT( toggleShowSlider0() ), actionCollection(), TQString( "options_configure_show_slider_0" ).latin1() );
+ view->mnuSliders[1] = new KToggleAction( i18n( "Show Slider 2" ), 0, this, TQT_SLOT( toggleShowSlider1() ), actionCollection(), TQString( "options_configure_show_slider_1" ).latin1() );
+ view->mnuSliders[2] = new KToggleAction( i18n( "Show Slider 3" ), 0, this, TQT_SLOT( toggleShowSlider2() ), actionCollection(), TQString( "options_configure_show_slider_2" ).latin1() );
+ 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, SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" );
+ KAction *mnuHide = new KAction(i18n("&Hide") ,0,view, TQT_SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" );
mnuHide->plug(m_popupmenu);
- KAction *mnuRemove = new KAction(i18n("&Remove"),"editdelete", 0,view, SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" );
+ KAction *mnuRemove = new KAction(i18n("&Remove"),"editdelete", 0,view, TQT_SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" );
mnuRemove->plug(m_popupmenu);
- KAction *mnuEdit = new KAction(i18n("&Edit"),"editplots", 0,view, SLOT( mnuEdit_clicked() ),actionCollection(),"mnuedit" );
+ KAction *mnuEdit = new KAction(i18n("&Edit"),"editplots", 0,view, TQT_SLOT( mnuEdit_clicked() ),actionCollection(),"mnuedit" );
mnuEdit->plug(m_popupmenu);
m_popupmenu->insertSeparator();
- KAction *mnuCopy = new KAction(i18n("&Copy"), 0,view, SLOT( mnuCopy_clicked() ),actionCollection(),"mnucopy" );
+ KAction *mnuCopy = new KAction(i18n("&Copy"), 0,view, TQT_SLOT( mnuCopy_clicked() ),actionCollection(),"mnucopy" );
mnuCopy->plug(m_popupmenu);
- KAction *mnuMove = new KAction(i18n("&Move"), 0,view, SLOT( mnuMove_clicked() ),actionCollection(),"mnumove" );
+ KAction *mnuMove = new KAction(i18n("&Move"), 0,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?" ), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
+ "Do you want to save it?" ), TQString::null, 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?" ), QString::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::null, i18n("Save New Format") ) == KMessageBox::Cancel)
return;
}
kmplotio->save( m_url.url() );
@@ -263,7 +263,7 @@ void MainDlg::slotSaveas()
{
if (m_readonly)
return;
- const KURL url = KFileDialog::getSaveURL( QDir::currentDirPath(), i18n( "*.fkt|KmPlot Files (*.fkt)\n*|All Files" ), m_parent, i18n( "Save As" ) );
+ const KURL url = KFileDialog::getSaveURL( TQDir::currentDirPath(), i18n( "*.fkt|KmPlot Files (*.fkt)\n*|All Files" ), m_parent, i18n( "Save As" ) );
if ( !url.isEmpty() )
{
@@ -286,7 +286,7 @@ void MainDlg::slotSaveas()
void MainDlg::slotExport()
{
- KURL const url = KFileDialog::getSaveURL(QDir::currentDirPath(),
+ KURL const url = KFileDialog::getSaveURL(TQDir::currentDirPath(),
i18n("*.svg|Scalable Vector Graphics (*.svg)\n"
"*.bmp|Bitmap 180dpi (*.bmp)\n"
"*.png|Bitmap 180dpi (*.png)"), m_parent, i18n("Export") );
@@ -297,7 +297,7 @@ void MainDlg::slotExport()
if( url.fileName().right(4).lower()==".svg")
{
- QPicture pic;
+ TQPicture pic;
view->draw(&pic, 2);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "SVG");
@@ -313,7 +313,7 @@ void MainDlg::slotExport()
else if( url.fileName().right(4).lower()==".bmp")
{
- QPixmap pic(100, 100);
+ TQPixmap pic(100, 100);
view->draw(&pic, 3);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "BMP");
@@ -329,7 +329,7 @@ void MainDlg::slotExport()
else if( url.fileName().right(4).lower()==".png")
{
- QPixmap pic(100, 100);
+ TQPixmap pic(100, 100);
view->draw(&pic, 3);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "PNG");
@@ -366,8 +366,8 @@ void MainDlg::slotOpenRecent( const KURL &url )
{
if( isModified() || !m_url.isEmpty() ) // open the file in a new window
{
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << url;
KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","openFileInNewWindow(KURL)", data);
return;
@@ -389,7 +389,7 @@ void MainDlg::slotOpenRecent( const KURL &url )
void MainDlg::slotPrint()
{
- KPrinter prt( QPrinter::PrinterResolution );
+ KPrinter prt( TQPrinter::PrinterResolution );
prt.setResolution( 72 );
prt.addDialogPage( new KPrinterDlg( m_parent, "KmPlot page" ) );
if ( prt.setup( m_parent, i18n( "Print Plot" ) ) )
@@ -408,7 +408,7 @@ void MainDlg::editColors()
// User edited the configuration - update your local copies of the
// configuration data
- connect( colorsDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
+ connect( colorsDialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT(updateSettings() ) );
colorsDialog->show();
}
@@ -420,7 +420,7 @@ void MainDlg::editAxes()
coordsDialog = new CoordsConfigDialog( view->parser(), m_parent);
// User edited the configuration - update your local copies of the
// configuration data
- connect( coordsDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
+ connect( coordsDialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT(updateSettings() ) );
}
coordsDialog->show();
}
@@ -433,7 +433,7 @@ void MainDlg::editScaling()
scalingDialog->addPage( new SettingsPageScaling( 0, "scalingSettings" ), i18n( "Scale" ), "scaling", i18n( "Edit Scaling" ) );
// User edited the configuration - update your local copies of the
// configuration data
- connect( scalingDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
+ connect( scalingDialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT(updateSettings() ) );
scalingDialog->show();
}
@@ -445,7 +445,7 @@ void MainDlg::editFonts()
fontsDialog->addPage( new SettingsPageFonts( 0, "fontsSettings" ), i18n( "Fonts" ), "fonts", i18n( "Edit Fonts" ) );
// User edited the configuration - update your local copies of the
// configuration data
- connect( fontsDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
+ connect( fontsDialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT(updateSettings() ) );
fontsDialog->show();
}
@@ -465,7 +465,7 @@ void MainDlg::newFunction()
EditFunction* editFunction = new EditFunction( view->parser(), m_parent );
editFunction->setCaption(i18n( "New Function Plot" ) );
editFunction->initDialog();
- if ( editFunction->exec() == QDialog::Accepted )
+ if ( editFunction->exec() == TQDialog::Accepted )
{
m_modified = true;
view->updateSliders();
@@ -478,7 +478,7 @@ void MainDlg::newParametric()
KEditParametric* editParametric = new KEditParametric( view->parser(), m_parent );
editParametric->setCaption(i18n( "New Parametric Plot"));
editParametric->initDialog();
- if ( editParametric->exec() == QDialog::Accepted )
+ if ( editParametric->exec() == TQDialog::Accepted )
{
m_modified = true;
view->drawPlot();
@@ -491,7 +491,7 @@ void MainDlg::newPolar()
KEditPolar* editPolar = new KEditPolar( view->parser(), m_parent );
editPolar->setCaption(i18n( "New Polar Plot"));
editPolar->initDialog();
- if ( editPolar->exec() == QDialog::Accepted )
+ if ( editPolar->exec() == TQDialog::Accepted )
{
m_modified = true;
view->drawPlot();
@@ -505,7 +505,7 @@ void MainDlg::slotEditPlots()
fdlg->getPlots();
KTempFile tmpfile;
kmplotio->save( tmpfile.name() );
- if( fdlg->exec() == QDialog::Rejected )
+ if( fdlg->exec() == TQDialog::Rejected )
{
if ( fdlg->isChanged() )
{
@@ -522,10 +522,10 @@ void MainDlg::slotEditPlots()
tmpfile.unlink();
}
-void MainDlg::slotQuickEdit(const QString& f_str_const )
+void MainDlg::slotQuickEdit(const TQString& f_str_const )
{
//creates a valid name for the function if the user has forgotten that
- QString f_str( f_str_const );
+ TQString f_str( f_str_const );
int const pos = f_str_const.find(';');
if (pos!=-1)
f_str = f_str.left(pos);
@@ -557,7 +557,7 @@ void MainDlg::slotQuickEdit(const QString& f_str_const )
Ufkt *ufkt = &view->parser()->ufkt.last();
view->parser()->prepareAddingFunction(ufkt);
- if ( pos!=-1 && !view->parser()->getext(ufkt, QString(f_str_const)))
+ if ( pos!=-1 && !view->parser()->getext(ufkt, TQString(f_str_const)))
{
m_quickEdit->setFocus();
m_quickEdit->selectAll();
@@ -613,9 +613,9 @@ void MainDlg::loadConstants()
{
KSimpleConfig conf ("kcalcrc");
conf.setGroup("UserConstants");
- QString tmp;
- QString tmp_constant;
- QString tmp_value;
+ TQString tmp;
+ TQString tmp_constant;
+ TQString tmp_value;
char constant;
double value;
for( int i=0; ;i++)
@@ -644,7 +644,7 @@ void MainDlg::loadConstants()
while (!copy_found)
{
// go through the constant list
- QValueVector<Constant>::iterator it = view->parser()->constant.begin();
+ TQValueVector<Constant>::iterator it = view->parser()->constant.begin();
while (it!= view->parser()->constant.end() && !copy_found)
{
if (constant == it->constant )
@@ -677,11 +677,11 @@ void MainDlg::saveConstants()
KSimpleConfig conf ("kcalcrc");
conf.deleteGroup("Constants");
conf.setGroup("UserConstants");
- QString tmp;
+ TQString tmp;
for( int i = 0; i< (int)view->parser()->constant.size();i++)
{
tmp.setNum(i);
- conf.writeEntry("nameConstant"+tmp, QString( QChar(view->parser()->constant[i].constant) ) ) ;
+ conf.writeEntry("nameConstant"+tmp, TQString( TQChar(view->parser()->constant[i].constant) ) ) ;
conf.writeEntry("valueConstant"+tmp, view->parser()->constant[i].value);
}
}
@@ -736,8 +736,8 @@ void MainDlg::toggleShowSlider(int const num)
if ( view->sliders[ num ] == 0 )
{
view->sliders[ num ] = new KSliderWindow( view, num);
- connect( view->sliders[num]->slider, SIGNAL( valueChanged( int ) ), view, SLOT( drawPlot() ) );
- connect( view->sliders[num], SIGNAL( windowClosed( int ) ), view, SLOT( sliderWindowClosed(int) ) );
+ connect( view->sliders[num]->slider, TQT_SIGNAL( valueChanged( int ) ), view, TQT_SLOT( drawPlot() ) );
+ connect( view->sliders[num], TQT_SIGNAL( windowClosed( int ) ), view, TQT_SLOT( sliderWindowClosed(int) ) );
}
if ( !view->sliders[ num ]->isShown() )
view->sliders[ num ]->show();
@@ -745,19 +745,19 @@ void MainDlg::toggleShowSlider(int const num)
view->sliders[ num ]->hide();
}
-void MainDlg::setReadOnlyStatusBarText(const QString &text)
+void MainDlg::setReadOnlyStatusBarText(const TQString &text)
{
setStatusBarText(text);
}
void MainDlg::optionsConfigureKeys()
{
- KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureKeys()", QByteArray());
+ KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureKeys()", TQByteArray());
}
void MainDlg::optionsConfigureToolbars()
{
- KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureToolbars()", QByteArray());
+ KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureToolbars()", TQByteArray());
}
void MainDlg::resetZoom()
@@ -785,9 +785,9 @@ KmPlotPartFactory::~KmPlotPartFactory()
s_instance = 0L;
}
-KParts::Part* KmPlotPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *, const QStringList & )
+KParts::Part* KmPlotPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *, const TQStringList & )
{
// Create an instance of our Part
MainDlg* obj = new MainDlg( parentWidget, widgetName, parent, name );
diff --git a/kmplot/kmplot/MainDlg.h b/kmplot/kmplot/MainDlg.h
index dd3a9916..7b4d83bf 100644
--- a/kmplot/kmplot/MainDlg.h
+++ b/kmplot/kmplot/MainDlg.h
@@ -29,7 +29,7 @@
#define MainDlg_included
// Qt includes
-#include <qpicture.h>
+#include <tqpicture.h>
// KDE includes
#include <kaction.h>
@@ -77,7 +77,7 @@ public:
* @param parent parent object
* @param name name of this dialog
*/
- MainDlg(QWidget *parentWidget, const char *, QObject *parent, const char *name);
+ MainDlg(TQWidget *parentWidget, const char *, TQObject *parent, const char *name);
/// Cleaning up a bit.
virtual ~MainDlg();
/// This class needs access to private members, too.
@@ -185,7 +185,7 @@ private:
/// Set to true if the application is readonly
bool m_readonly;
/// MainDlg's parent widget
- QWidget *m_parent;
+ TQWidget *m_parent;
/// Current file
KURL m_currentfile;
/// The axes config dialogs
@@ -204,9 +204,9 @@ protected slots:
* Manages the LineEdit content after returnPressed() is emitted.
* @param f_str_const the content of the KLineEdit
*/
- void slotQuickEdit( const QString& f_str_const );
+ void slotQuickEdit( const TQString& f_str_const );
- void setReadOnlyStatusBarText(const QString &);
+ void setReadOnlyStatusBarText(const TQString &);
/// slots for the settings-menu
void optionsConfigureKeys();
@@ -219,9 +219,9 @@ class KmPlotPartFactory : public KParts::Factory
public:
KmPlotPartFactory();
virtual ~KmPlotPartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private:
diff --git a/kmplot/kmplot/View.cpp b/kmplot/kmplot/View.cpp
index 2df9647d..0d45fd2c 100644
--- a/kmplot/kmplot/View.cpp
+++ b/kmplot/kmplot/View.cpp
@@ -24,13 +24,13 @@
*/
// Qt includes
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qdatastream.h>
-#include <qpicture.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqdatastream.h>
+#include <tqpicture.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
// KDE includes
#include <kaction.h>
@@ -56,7 +56,7 @@ double View::xmin = 0;
double View::xmax = 0;
-View::View(bool const r, bool &mo, KPopupMenu *p, QWidget* parent, const char* name ) : DCOPObject("View"), QWidget( 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* 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())
{
csmode = csparam = -1;
cstype = 0;
@@ -115,12 +115,12 @@ XParser* View::parser()
return m_parser;
}
-void View::draw(QPaintDevice *dev, int form)
+void View::draw(TQPaintDevice *dev, int form)
{
int lx, ly;
float sf;
- QRect rc;
- QPainter DC; // our painter
+ TQRect rc;
+ TQPainter DC; // our painter
DC.begin(dev); // start painting widget
rc=DC.viewport();
w=rc.width();
@@ -131,23 +131,23 @@ void View::draw(QPaintDevice *dev, int form)
if(form==0) // screen
{
- ref=QPoint(120, 100);
+ ref=TQPoint(120, 100);
lx=(int)((xmax-xmin)*100.*drskalx/tlgx);
ly=(int)((ymax-ymin)*100.*drskaly/tlgy);
DC.scale((float)h/(float)(ly+2*ref.y()), (float)h/(float)(ly+2*ref.y()));
- if(DC.xForm(QPoint(lx+2*ref.x(), ly)).x() > DC.viewport().right())
+ if(DC.xForm(TQPoint(lx+2*ref.x(), ly)).x() > DC.viewport().right())
{
DC.resetXForm();
DC.scale((float)w/(float)(lx+2*ref.x()), (float)w/(float)(lx+2*ref.x()));
}
wm=DC.worldMatrix();
- s=DC.xForm(QPoint(1000, 0)).x()/1000.;
+ s=DC.xForm(TQPoint(1000, 0)).x()/1000.;
dgr.Create( ref, lx, ly, xmin, xmax, ymin, ymax );
}
else if(form==1) // printer
{
sf=72./254.; // 72dpi
- ref=QPoint(100, 100);
+ ref=TQPoint(100, 100);
lx=(int)((xmax-xmin)*100.*drskalx/tlgx);
ly=(int)((ymax-ymin)*100.*drskaly/tlgy);
DC.scale(sf, sf);
@@ -158,12 +158,12 @@ void View::draw(QPaintDevice *dev, int form)
if ( ( (KPrinter* )dev )->option( "app-kmplot-printbackground" ) == "-1" )
DC.fillRect( dgr.GetFrame(), backgroundcolor); //draw a colored background
//DC.end();
- //((QPixmap *)dev)->fill(QColor("#FF00FF"));
+ //((TQPixmap *)dev)->fill(TQColor("#FF00FF"));
//DC.begin(dev);
}
else if(form==2) // svg
{
- ref=QPoint(0, 0);
+ ref=TQPoint(0, 0);
lx=(int)((xmax-xmin)*100.*drskalx/tlgx);
ly=(int)((ymax-ymin)*100.*drskaly/tlgy);
dgr.Create( ref, lx, ly, xmin, xmax, ymin, ymax );
@@ -173,13 +173,13 @@ void View::draw(QPaintDevice *dev, int form)
else if(form==3) // bmp, png
{
sf=180./254.; // 180dpi
- ref=QPoint(0, 0);
+ ref=TQPoint(0, 0);
lx=(int)((xmax-xmin)*100.*drskalx/tlgx);
ly=(int)((ymax-ymin)*100.*drskaly/tlgy);
dgr.Create( ref, lx, ly, xmin, xmax, ymin, ymax );
DC.end();
- ((QPixmap *)dev)->resize((int)(dgr.GetFrame().width()*sf), (int)(dgr.GetFrame().height()*sf));
- ((QPixmap *)dev)->fill(backgroundcolor);
+ ((TQPixmap *)dev)->resize((int)(dgr.GetFrame().width()*sf), (int)(dgr.GetFrame().height()*sf));
+ ((TQPixmap *)dev)->fill(backgroundcolor);
DC.begin(dev);
DC.translate(-dgr.GetFrame().left()*sf, -dgr.GetFrame().top()*sf);
DC.scale(sf, sf);
@@ -213,7 +213,7 @@ void View::draw(QPaintDevice *dev, int form)
isDrawing=true;
setCursor(Qt::WaitCursor );
stop_calculating = false;
- for(QValueVector<Ufkt>::iterator ufkt=m_parser->ufkt.begin(); ufkt!=m_parser->ufkt.end() && !stop_calculating; ++ufkt)
+ for(TQValueVector<Ufkt>::iterator ufkt=m_parser->ufkt.begin(); ufkt!=m_parser->ufkt.end() && !stop_calculating; ++ufkt)
if ( !ufkt->fname.isEmpty() )
plotfkt(ufkt, &DC);
@@ -224,13 +224,13 @@ void View::draw(QPaintDevice *dev, int form)
}
-void View::plotfkt(Ufkt *ufkt, QPainter *pDC)
+void View::plotfkt(Ufkt *ufkt, TQPainter *pDC)
{
char p_mode;
int iy, k, ke, mflg;
double x, y, dmin, dmax;
- QPoint p1, p2;
- QPen pen;
+ TQPoint p1, p2;
+ TQPen pen;
pen.setCapStyle(Qt::RoundCap);
iy=0;
y=0.0;
@@ -440,18 +440,18 @@ void View::plotfkt(Ufkt *ufkt, QPainter *pDC)
KMessageBox::error(this,i18n("The drawing was cancelled by the user."));
}
-void View::drawHeaderTable(QPainter *pDC)
+void View::drawHeaderTable(TQPainter *pDC)
{
- QString alx, aly, atx, aty, dfx, dfy;
+ TQString alx, aly, atx, aty, dfx, dfy;
if( m_printHeaderTable )
{
pDC->translate(250., 150.);
- pDC->setPen(QPen(black, (int)(5.*s)));
- pDC->setFont(QFont( Settings::headerTableFont(), 30) );
+ pDC->setPen(TQPen(black, (int)(5.*s)));
+ pDC->setFont(TQFont( Settings::headerTableFont(), 30) );
puts( Settings::headerTableFont().latin1() );
- QString minStr = Settings::xMin();
- QString maxStr = Settings::xMax();
+ TQString minStr = Settings::xMin();
+ TQString maxStr = Settings::xMax();
getMinMax( Settings::xRange(), minStr, maxStr);
alx="[ "+minStr+" | "+maxStr+" ]";
minStr = Settings::yMin();
@@ -492,7 +492,7 @@ void View::drawHeaderTable(QPainter *pDC)
pDC->Lineh(0, 320, 700);
int ypos = 380;
//for(uint ix=0; ix<m_parser->countFunctions() && !stop_calculating; ++ix)
- for(QValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end() && !stop_calculating; ++it)
+ for(TQValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end() && !stop_calculating; ++it)
{
pDC->drawText(100, ypos, it->fstr);
ypos+=60;
@@ -503,7 +503,7 @@ void View::drawHeaderTable(QPainter *pDC)
}
-void View::getMinMax( int koord, QString &mini, QString &maxi )
+void View::getMinMax( int koord, TQString &mini, TQString &maxi )
{
switch(koord)
{
@@ -526,10 +526,10 @@ void View::getMinMax( int koord, QString &mini, QString &maxi )
}
-void View::setpi(QString *s)
+void View::setpi(TQString *s)
{
int i;
- QChar c(960);
+ TQChar c(960);
while((i=s->find('p')) != -1) s->replace(i, 2, &c, 1);
}
@@ -570,15 +570,15 @@ bool View::root(double *x0, Ufkt *it)
}
}
-void View::paintEvent(QPaintEvent *)
+void View::paintEvent(TQPaintEvent *)
{
- QPainter p;
+ TQPainter p;
p.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
p.end();
}
-void View::resizeEvent(QResizeEvent *)
+void View::resizeEvent(TQResizeEvent *)
{
if (isDrawing) //stop drawing integrals
{
@@ -595,28 +595,28 @@ void View::drawPlot()
m_minmax->updateFunctions();
buffer.fill(backgroundcolor);
draw(&buffer, 0);
- QPainter p;
+ TQPainter p;
p.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
p.end();
}
-void View::mouseMoveEvent(QMouseEvent *e)
+void View::mouseMoveEvent(TQMouseEvent *e)
{
if ( isDrawing)
return;
if (zoom_mode==4 && e->stateAfter() != Qt::NoButton)
{
- QPainter p;
+ TQPainter p;
p.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
p.end();
- QPainter painter(this);
- QPen pen(Qt::white, 1, Qt::DotLine);
+ TQPainter painter(this);
+ TQPen pen(Qt::white, 1, Qt::DotLine);
painter.setRasterOp (Qt::XorROP);
painter.setPen(pen);
- painter.setBackgroundMode (QPainter::OpaqueMode);
+ painter.setBackgroundMode (TQPainter::OpaqueMode);
painter.setBackgroundColor (Qt::blue);
painter.drawRect(rectangle_point.x(), rectangle_point.y(), e->pos().x()-rectangle_point.x(), e->pos().y()-rectangle_point.y());
@@ -641,8 +641,8 @@ void View::mouseMoveEvent(QMouseEvent *e)
if(area.contains(e->pos()) || (e->button()==Qt::LeftButton && e->state()==Qt::LeftButton && csxpos>xmin && csxpos<xmax))
{
- QPoint ptd, ptl;
- QPainter DC;
+ TQPoint ptd, ptl;
+ TQPainter DC;
bool out_of_bounds = false;
DC.begin(this);
@@ -677,9 +677,9 @@ void View::mouseMoveEvent(QMouseEvent *e)
double x0;
if(root(&x0, it))
{
- QString str=" ";
+ TQString str=" ";
str+=i18n("root");
- setStatusBar(str+QString().sprintf(": x0= %+.5f", x0), 3);
+ setStatusBar(str+TQString().sprintf(": x0= %+.5f", x0), 3);
rootflg=true;
}
}
@@ -703,7 +703,7 @@ void View::mouseMoveEvent(QMouseEvent *e)
}
ptd=DC.xForm(ptl);
DC.end();
- QString sx, sy;
+ TQString sx, sy;
if (out_of_bounds)
{
sx = sy = "";
@@ -718,7 +718,7 @@ void View::mouseMoveEvent(QMouseEvent *e)
bitBlt(&hline, 0, 0, this, area.left(), fcy=ptd.y(), area.width(), 1);
bitBlt(&vline, 0, 0, this, fcx=ptd.x(), area.top(), 1, area.height());
// Fadenkreuz zeichnen
- QPen pen;
+ TQPen pen;
if ( csmode == -1)
pen.setColor(inverted_backgroundcolor);
else
@@ -766,7 +766,7 @@ void View::mouseMoveEvent(QMouseEvent *e)
}
-void View::mousePressEvent(QMouseEvent *e)
+void View::mousePressEvent(TQMouseEvent *e)
{
if ( m_popupmenushown>0)
return;
@@ -785,7 +785,7 @@ void View::mousePressEvent(QMouseEvent *e)
}
else if ( zoom_mode==Z_ZoomIn ) //zoom in
{
- QPainter DC;
+ TQPainter DC;
DC.begin(this);
DC.setWindow(0, 0, w, h);
DC.setWorldMatrix(wm);
@@ -812,7 +812,7 @@ void View::mousePressEvent(QMouseEvent *e)
}
else if ( zoom_mode==3 ) //zoom out
{
- QPainter DC;
+ TQPainter DC;
DC.begin(this);
DC.setWindow(0, 0, w, h);
DC.setWorldMatrix(wm);
@@ -839,7 +839,7 @@ void View::mousePressEvent(QMouseEvent *e)
}
else if ( zoom_mode==5 ) //center
{
- QPainter DC;
+ TQPainter DC;
DC.begin(this);
DC.setWindow(0, 0, w, h);
DC.setWorldMatrix(wm);
@@ -865,7 +865,7 @@ void View::mousePressEvent(QMouseEvent *e)
if( !m_readonly && e->button()==RightButton) //clicking with the right mouse button
{
char function_type;
- for( QValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
{
function_type = it->fstr[0].latin1();
if ( function_type=='y' || function_type=='r' || it->fname.isEmpty()) continue;
@@ -889,7 +889,7 @@ void View::mousePressEvent(QMouseEvent *e)
if ( function_type=='x' && fabs(csxpos-m_parser->fkt(it, csxpos))< g && it->fstr.contains('t')==1) //parametric plot
{
- QValueVector<Ufkt>::iterator ufkt_y = it+1;
+ TQValueVector<Ufkt>::iterator ufkt_y = it+1;
if ( fabs(csypos-m_parser->fkt(ufkt_y, csxpos)<g) && ufkt_y->fstr.contains('t')==1)
{
if ( csmode == -1)
@@ -901,13 +901,13 @@ void View::mousePressEvent(QMouseEvent *e)
}
else
m_popupmenushown = 2;
- QString y_name( ufkt_y->fstr );
+ TQString y_name( ufkt_y->fstr );
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-1),false);
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-2),false);
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-3),false);
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-4),false);
m_popupmenu->changeTitle(10,ufkt_y->fstr+";"+y_name);
- m_popupmenu->exec(QCursor::pos());
+ m_popupmenu->exec(TQCursor::pos());
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-1),true);
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-2),true);
m_popupmenu->setItemEnabled(m_popupmenu->idAt(m_popupmenu->count()-3),true);
@@ -927,7 +927,7 @@ void View::mousePressEvent(QMouseEvent *e)
else
m_popupmenushown = 2;
m_popupmenu->changeTitle(10, it->fstr);
- m_popupmenu->exec(QCursor::pos());
+ m_popupmenu->exec(TQCursor::pos());
return;
}
else if(fabs(csypos-m_parser->a1fkt( it, csxpos))< g && it->f1_mode)
@@ -941,10 +941,10 @@ void View::mousePressEvent(QMouseEvent *e)
}
else
m_popupmenushown = 2;
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + '\'';
m_popupmenu->changeTitle(10, function);
- m_popupmenu->exec(QCursor::pos());
+ m_popupmenu->exec(TQCursor::pos());
return;
}
else if(fabs(csypos-m_parser->a2fkt(it, csxpos))< g && it->f2_mode)
@@ -958,10 +958,10 @@ void View::mousePressEvent(QMouseEvent *e)
}
else
m_popupmenushown = 2;
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + "\'\'";
m_popupmenu->changeTitle(10, function);
- m_popupmenu->exec(QCursor::pos());
+ m_popupmenu->exec(TQCursor::pos());
return;
}
}
@@ -978,7 +978,7 @@ void View::mousePressEvent(QMouseEvent *e)
mouseMoveEvent(e);
return ;
}
- for( QValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
{
if (it->fname.isEmpty() )
continue;
@@ -1018,7 +1018,7 @@ void View::mousePressEvent(QMouseEvent *e)
cstype=1;
csparam = k;
m_minmax->selectItem();
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + '\'';
setStatusBar(function,4);
mouseMoveEvent(e);
@@ -1030,7 +1030,7 @@ void View::mousePressEvent(QMouseEvent *e)
cstype=2;
csparam = k;
m_minmax->selectItem();
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + "\'\'";
setStatusBar(function,4);
mouseMoveEvent(e);
@@ -1044,7 +1044,7 @@ void View::mousePressEvent(QMouseEvent *e)
}
-void View::mouseReleaseEvent ( QMouseEvent * e )
+void View::mouseReleaseEvent ( TQMouseEvent * e )
{
if ( zoom_mode == Z_Center )
{
@@ -1055,13 +1055,13 @@ void View::mouseReleaseEvent ( QMouseEvent * e )
update();
return;
}
- QPainter DC;
+ TQPainter DC;
DC.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
DC.setWindow(0, 0, w, h);
DC.setWorldMatrix(wm);
- QPoint p=DC.xFormDev(e->pos());
+ TQPoint p=DC.xFormDev(e->pos());
double real1x = dgr.Transx(p.x() ) ;
double real1y = dgr.Transy(p.y() ) ;
p=DC.xFormDev(rectangle_point);
@@ -1109,7 +1109,7 @@ void View::mouseReleaseEvent ( QMouseEvent * e )
}
}
-void View::coordToMinMax( const int koord, const QString &minStr, const QString &maxStr,
+void View::coordToMinMax( const int koord, const TQString &minStr, const TQString &maxStr,
double &min, double &max )
{
switch ( koord )
@@ -1144,7 +1144,7 @@ void View::setPlotRange()
void View::setScaling()
{
- QString units[ 9 ] = { "10", "5", "2", "1", "0.5", "pi/2", "pi/3", "pi/4",i18n("automatic") };
+ TQString units[ 9 ] = { "10", "5", "2", "1", "0.5", "pi/2", "pi/3", "pi/4",i18n("automatic") };
if( Settings::xScaling() == 8) //automatic x-scaling
{
@@ -1187,7 +1187,7 @@ void View::getSettings()
void View::init()
{
getSettings();
- QValueVector<Ufkt>::iterator it = m_parser->ufkt.begin();
+ TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin();
it->fname="";
while ( m_parser->ufkt.count() > 1)
m_parser->Parser::delfkt( &m_parser->ufkt.last() );
@@ -1200,7 +1200,7 @@ void View::stopDrawing()
stop_calculating = true;
}
-void View::findMinMaxValue(Ufkt *ufkt, char p_mode, bool minimum, double &dmin, double &dmax, const QString &str_parameter)
+void View::findMinMaxValue(Ufkt *ufkt, char p_mode, bool minimum, double &dmin, double &dmax, const TQString &str_parameter)
{
double x, y = 0;
double result_x = 0;
@@ -1210,7 +1210,7 @@ void View::findMinMaxValue(Ufkt *ufkt, char p_mode, bool minimum, double &dmin,
// TODO: parameter sliders
if ( !ufkt->parameters.isEmpty() )
{
- for ( QValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
+ for ( TQValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
@@ -1354,12 +1354,12 @@ void View::findMinMaxValue(Ufkt *ufkt, char p_mode, bool minimum, double &dmin,
}
}
-void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const QString &str_parameter)
+void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const TQString &str_parameter)
{
// TODO: parameter sliders
if ( !ufkt->parameters.isEmpty() )
{
- for ( QValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
+ for ( TQValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
@@ -1447,7 +1447,7 @@ void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const QStrin
}
}
-void View::keyPressEvent( QKeyEvent * e)
+void View::keyPressEvent( TQKeyEvent * e)
{
if ( zoom_mode != Z_Normal && e->key() == Qt::Key_Escape )
{
@@ -1469,14 +1469,14 @@ void View::keyPressEvent( QKeyEvent * e)
if (csmode==-1 ) return;
- QMouseEvent *event;
+ TQMouseEvent *event;
if (e->key() == Qt::Key_Left )
- event = new QMouseEvent(QEvent::MouseMove,QPoint(fcx-1,fcy-1),Qt::LeftButton,Qt::LeftButton);
+ event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx-1,fcy-1),Qt::LeftButton,Qt::LeftButton);
else if (e->key() == Qt::Key_Right )
- event = new QMouseEvent(QEvent::MouseMove,QPoint(fcx+1,fcy+1),Qt::LeftButton,Qt::LeftButton);
+ 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
{
- QValueVector<Ufkt>::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)];
+ TQValueVector<Ufkt>::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)];
int const ke=it->parameters.count();
if (ke>0)
{
@@ -1560,31 +1560,31 @@ void View::keyPressEvent( QKeyEvent * e)
break;
case 1:
{
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + '\'';
setStatusBar(function,4);
break;
}
case 2:
{
- QString function = it->fstr;
+ TQString function = it->fstr;
function = function.left(function.find('(')) + "\'\'";
setStatusBar(function,4);
break;
}
}
- event = new QMouseEvent(QEvent::MouseMove,QPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton);
+ event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton);
}
else if ( e->key() == Qt::Key_Space )
{
- event = new QMouseEvent(QEvent::MouseButtonPress,QCursor::pos(),Qt::RightButton,Qt::RightButton);
+ event = new TQMouseEvent(TQEvent::MouseButtonPress,TQCursor::pos(),Qt::RightButton,Qt::RightButton);
mousePressEvent(event);
delete event;
return;
}
else
{
- event = new QMouseEvent(QEvent::MouseButtonPress,QPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton);
+ event = new TQMouseEvent(TQEvent::MouseButtonPress,TQPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton);
mousePressEvent(event);
delete event;
return;
@@ -1593,14 +1593,14 @@ void View::keyPressEvent( QKeyEvent * e)
delete event;
}
-void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double &dmax, const QString &str_parameter, QPainter *DC )
+void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double &dmax, const TQString &str_parameter, TQPainter *DC )
{
double x, y = 0;
float calculated_area=0;
int rectheight;
areaMin = dmin;
- QPoint p;
- QColor color;
+ TQPoint p;
+ TQColor color;
switch(p_mode)
{
case 0:
@@ -1620,7 +1620,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double
{
int ly;
buffer.fill(backgroundcolor);
- DC = new QPainter(&buffer);
+ DC = new TQPainter(&buffer);
ly=(int)((ymax-ymin)*100.*drskaly/tlgy);
DC->scale((float)h/(float)(ly+2*ref.y()), (float)h/(float)(ly+2*ref.y()));
}
@@ -1634,7 +1634,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double
// TODO: parameter sliders
if ( !ufkt->parameters.isEmpty() )
{
- for ( QValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
+ for ( TQValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
@@ -1657,7 +1657,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double
ufkt->oldyprim = ufkt->integral_precision;
//paintEvent(0);
- /*QPainter p;
+ /*TQPainter p;
p.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
p.end();*/
@@ -1832,7 +1832,7 @@ void View::updateSliders()
}
}
- for(QValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end(); ++it)
+ for(TQValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end(); ++it)
{
if (it->fname.isEmpty() ) continue;
if( it->use_slider > -1 && (it->f_mode || it->f1_mode || it->f2_mode || it->integral_mode))
@@ -1841,8 +1841,8 @@ void View::updateSliders()
if ( sliders[ it->use_slider ] == 0 )
{
sliders[ it->use_slider ] = new KSliderWindow( this, it->use_slider);
- connect( sliders[ it->use_slider ]->slider, SIGNAL( valueChanged( int ) ), this, SLOT( drawPlot() ) );
- connect( sliders[ it->use_slider ], SIGNAL( windowClosed( int ) ), this , SLOT( sliderWindowClosed(int) ) );
+ connect( sliders[ it->use_slider ]->slider, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( drawPlot() ) );
+ connect( sliders[ it->use_slider ], TQT_SIGNAL( windowClosed( int ) ), this , TQT_SLOT( sliderWindowClosed(int) ) );
mnuSliders[ it->use_slider ]->setChecked(true); //set the slider-item in the menu
}
sliders[ it->use_slider ]->show();
@@ -1876,14 +1876,14 @@ void View::mnuHide_clicked()
if ( !ufkt->f_mode && !ufkt->f1_mode && !ufkt->f2_mode) //all graphs for the function are hidden
{
csmode=-1;
- QMouseEvent *event = new QMouseEvent(QMouseEvent::KeyPress,QCursor::pos(),Qt::LeftButton,Qt::LeftButton);
+ TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),Qt::LeftButton,Qt::LeftButton);
mousePressEvent(event); //leave trace mode
delete event;
return;
}
else
{
- QKeyEvent *event = new QKeyEvent(QKeyEvent::KeyPress,Qt::Key_Up ,Qt::Key_Up ,0);
+ TQKeyEvent *event = new TQKeyEvent(TQKeyEvent::KeyPress,Qt::Key_Up ,Qt::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?"), QString::null, KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this,i18n("Are you sure you want to remove this function?"), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue )
{
Ufkt *ufkt = &m_parser->ufkt[m_parser->ixValue(csmode)];
char const function_type = ufkt->fstr[0].latin1();
@@ -1904,7 +1904,7 @@ void View::mnuRemove_clicked()
if (csmode!=-1) // if trace mode is enabled
{
csmode=-1;
- QMouseEvent *event = new QMouseEvent(QMouseEvent::KeyPress,QCursor::pos(),Qt::LeftButton,Qt::LeftButton);
+ TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),Qt::LeftButton,Qt::LeftButton);
mousePressEvent(event); //leave trace mode
delete event;
}
@@ -1927,7 +1927,7 @@ void View::mnuEdit_clicked()
KEditParametric* editParametric = new KEditParametric( m_parser, this );
editParametric->setCaption(i18n( "New Parametric Plot" ));
editParametric->initDialog( csmode,y_index );
- if( editParametric->exec() == QDialog::Accepted )
+ if( editParametric->exec() == TQDialog::Accepted )
{
drawPlot();
m_modified = true;
@@ -1939,7 +1939,7 @@ void View::mnuEdit_clicked()
EditFunction* editFunction = new EditFunction( m_parser, this );
editFunction->setCaption(i18n( "Edit Function Plot" ));
editFunction->initDialog( csmode );
- if( editFunction->exec() == QDialog::Accepted )
+ if( editFunction->exec() == TQDialog::Accepted )
{
drawPlot();
updateSliders();
@@ -1993,7 +1993,7 @@ void View::mnuZoomIn_clicked()
resetZoom();
else
{
- setCursor( QCursor( SmallIcon( "magnify", 32), 10, 10 ) );
+ setCursor( TQCursor( SmallIcon( "magnify", 32), 10, 10 ) );
zoom_mode = Z_ZoomIn;
}
}
@@ -2004,7 +2004,7 @@ void View::mnuZoomOut_clicked()
resetZoom();
else
{
- setCursor( QCursor( SmallIcon( "lessen", 32), 10, 10 ) );
+ setCursor( TQCursor( SmallIcon( "lessen", 32), 10, 10 ) );
zoom_mode = Z_ZoomOut;
}
}
@@ -2037,7 +2037,7 @@ void View::mnuTrig_clicked()
Settings::setYRange(4); //custom y-range
drawPlot(); //update all graphs
}
-void View::invertColor(QColor &org, QColor &inv)
+void View::invertColor(TQColor &org, TQColor &inv)
{
int r = org.red()-255;
if ( r<0) r=r*-1;
@@ -2059,10 +2059,10 @@ void View::restoreCursor()
setCursor(Qt::CrossCursor);
break;
case Z_ZoomIn: //zoom in
- setCursor( QCursor( SmallIcon( "magnify", 32), 10, 10 ) );
+ setCursor( TQCursor( SmallIcon( "magnify", 32), 10, 10 ) );
break;
case Z_ZoomOut: //zoom out
- setCursor( QCursor( SmallIcon( "lessen", 32), 10, 10 ) );
+ setCursor( TQCursor( SmallIcon( "lessen", 32), 10, 10 ) );
break;
case Z_Center: //center a point
setCursor(Qt::PointingHandCursor);
@@ -2070,17 +2070,17 @@ void View::restoreCursor()
}
}
-bool View::event( QEvent * e )
+bool View::event( TQEvent * e )
{
- if ( e->type() == QEvent::WindowDeactivate && isDrawing)
+ if ( e->type() == TQEvent::WindowDeactivate && isDrawing)
{
stop_calculating = true;
return true;
}
- return QWidget::event(e); //send the information further
+ return TQWidget::event(e); //send the information further
}
-void View::setStatusBar(const QString &text, const int id)
+void View::setStatusBar(const TQString &text, const int id)
{
if ( m_readonly) //if KmPlot is shown as a KPart with e.g Konqueror, it is only possible to change the status bar in one way: to call setStatusBarText
{
@@ -2101,7 +2101,7 @@ void View::setStatusBar(const QString &text, const int id)
default:
return;
}
- QString statusbartext = m_statusbartext1;
+ TQString statusbartext = m_statusbartext1;
if ( !m_statusbartext1.isEmpty() && !m_statusbartext2.isEmpty() )
statusbartext.append(" | ");
statusbartext.append(m_statusbartext2);
@@ -2115,32 +2115,32 @@ void View::setStatusBar(const QString &text, const int id)
}
else
{
- QByteArray parameters;
- QDataStream arg( parameters, IO_WriteOnly);
+ TQByteArray parameters;
+ TQDataStream arg( parameters, IO_WriteOnly);
arg << text << id;
- m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","setStatusBarText(QString,int)", parameters);
+ m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","setStatusBarText(TQString,int)", parameters);
}
}
void View::startProgressBar(int steps)
{
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << steps;
m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","startProgressBar(int)", data);
}
bool View::stopProgressBar()
{
- QCString replyType;
- QByteArray replyData;
- m_dcop_client->call(m_dcop_client->appId(), "KmPlotShell","stopProgressBar()", QByteArray(), replyType, replyData);
+ TQCString replyType;
+ TQByteArray replyData;
+ m_dcop_client->call(m_dcop_client->appId(), "KmPlotShell","stopProgressBar()", TQByteArray(), replyType, replyData);
bool result;
- QDataStream stream(replyData, IO_ReadOnly);
+ TQDataStream stream(replyData, IO_ReadOnly);
stream >> result;
return result;
}
void View::increaseProgressBar()
{
- m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","increaseProgressBar()", QByteArray());
+ m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","increaseProgressBar()", TQByteArray());
}
void View::sliderWindowClosed(int num)
diff --git a/kmplot/kmplot/View.h b/kmplot/kmplot/View.h
index a3079c92..a28aadbc 100644
--- a/kmplot/kmplot/View.h
+++ b/kmplot/kmplot/View.h
@@ -28,7 +28,7 @@
#undef GrayScale
// Qt includes
-#include <qpixmap.h>
+#include <tqpixmap.h>
// KDE includes
#include <dcopclient.h>
@@ -64,28 +64,28 @@ enum ZoomMode
* It is the central widget of MainDlg.
* @see MainDlg, MainDlg::view
*/
-class View : public QWidget, virtual public ViewIface
+class View : public TQWidget, virtual public ViewIface
{
Q_OBJECT
public:
/// Contructor sets up the parser, too.
- View(bool, bool &, KPopupMenu *, QWidget* parent=NULL, const char* name=NULL );
+ View(bool, bool &, KPopupMenu *, TQWidget* parent=NULL, const char* name=NULL );
void setMinMaxDlg(KMinMax *);
virtual ~View();
/// Reimplemented to draw all stuff to the view.
- void draw(QPaintDevice *, int const);
+ void draw(TQPaintDevice *, int const);
/// Getting all relevant settings using KConfig XT class Settings.
void getSettings();
/// Clears all functions in the parser and gets default settings.
/// @see getSettings
void init();
/// Finding the minimum or maximum value
- void findMinMaxValue(Ufkt *, char, bool, double &, double &,const QString &);
+ void findMinMaxValue(Ufkt *, char, bool, double &, double &,const TQString &);
/// get a y-value from a x-value
- void getYValue(Ufkt * , char, double , double &,const QString &);
+ void getYValue(Ufkt * , char, double , double &,const TQString &);
/// draw and calculate the area between the graph and the x-axis.
- void areaUnderGraph(Ufkt *, char const, double &, double &, const QString &, QPainter* );
+ void areaUnderGraph(Ufkt *, char const, double &, double &, const TQString &, TQPainter* );
/// the calculation was cancelled by the user
bool isCalculationStopped();
@@ -106,7 +106,7 @@ public:
Ufkt * areaUfkt;
char areaPMode;
double areaMin, areaMax;
- QString areaParameter;
+ TQString areaParameter;
/// Slider controlling parameter values
KSliderWindow* sliders[ SLIDER_COUNT ];
@@ -137,39 +137,39 @@ public slots:
void mnuTrig_clicked();
protected slots:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
/// Updating the cross hair.
- void mouseMoveEvent(QMouseEvent *);
+ void mouseMoveEvent(TQMouseEvent *);
/// Toggles the trace mode if the cursor is near to a plot.
- void mousePressEvent(QMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
/// when a key is pressed and the graph widget has focus
- void keyPressEvent(QKeyEvent * );
+ void keyPressEvent(TQKeyEvent * );
/// called when a mouse key is released
- void mouseReleaseEvent ( QMouseEvent * e );
+ void mouseReleaseEvent ( TQMouseEvent * e );
/// Is needed to be reimplement so that the user can stop a preview-drawing
- bool event( QEvent * e );
+ bool event( TQEvent * e );
signals:
- void setStatusBarText(const QString &);
+ void setStatusBarText(const TQString &);
void resetZoom();
private:
/// Print out table with additional information.
/// Only for printing.
- void drawHeaderTable(QPainter *);
+ void drawHeaderTable(TQPainter *);
/// Draw the function plots.
- void plotfkt(Ufkt *ufkt, QPainter*);
+ void plotfkt(Ufkt *ufkt, TQPainter*);
/// Gets the greek pi symbol.
- void setpi(QString *);
+ void setpi(TQString *);
/// in trace mode checks, if the function is (near by) zero
bool root(double *, Ufkt *);
///return the inverted color
- void invertColor(QColor &, QColor &);
+ void invertColor(TQColor &, TQColor &);
/// Restore the mouse cursor when a drawing is finished
void restoreCursor();
/// Changes the text in the statusbar
- void setStatusBar(const QString &text, const int id);
+ void setStatusBar(const TQString &text, const int id);
/// Functions for the progressbar
bool stopProgressBar();
void startProgressBar(int);
@@ -195,15 +195,15 @@ private:
bool rootflg;
CDiagr dgr; ///< Coordinate system
- QPoint ref;
- QRect area,
+ TQPoint ref;
+ TQRect area,
PlotArea;
- QPixmap hline,
+ TQPixmap hline,
vline;
- QWMatrix wm;
+ TQWMatrix wm;
double tlgx, tlgy, drskalx, drskaly;
- QString tlgxstr, tlgystr, drskalxstr, drskalystr;
+ TQString tlgxstr, tlgystr, drskalxstr, drskalystr;
double stepWidth; ///< Absolute step width
/** @name Plotrange
@@ -216,14 +216,14 @@ private:
*/
//@{
///Convert axes range predefinition index to boundaries.
- void getMinMax(int koord, QString &mini, QString &maxi);
+ void getMinMax(int koord, TQString &mini, TQString &maxi);
/** Handle predefiend axes ranges.
*
* @p koord can have the values 0 to 4 which have the following meanings:
*
* In the last case @p minstr and @p maxstr are evaluated.
*/
- void coordToMinMax( const int koord, const QString &minStr, const QString &maxStr,
+ void coordToMinMax( const int koord, const TQString &minStr, const TQString &maxStr,
double &min, double &max );
/// Sets the plot range from Settings
void setPlotRange();
@@ -241,13 +241,13 @@ private:
/// if stop_calculating is true, the user has canceled drawing of an integral graph
bool stop_calculating;
/// the background color of the graph
- QColor backgroundcolor;
+ TQColor backgroundcolor;
/// the inverted background color used by the "Fadenkreuz"
- QColor inverted_backgroundcolor;
+ TQColor inverted_backgroundcolor;
/// pointer to KMinMax
KMinMax *m_minmax;
///buffer the current window so all functions don't need to be re-drawed
- QPixmap buffer;
+ TQPixmap buffer;
/// the popup menu
KPopupMenu *m_popupmenu;
/// is set to true if an integral is calculated
@@ -255,7 +255,7 @@ private:
///status of the popup menu
char m_popupmenushown; /// 0==no popup 1==popup 2==popup+trace mode before
/// for zoom-mode
- QPoint rectangle_point;
+ TQPoint rectangle_point;
/*char zoom_mode;*/ ///0=normal 1=rectangular zoom, 2=zoom in, 3=zoom out ,4=drawing a rectangle, 5=center
ZoomMode zoom_mode;
/// true == modifications not saved
@@ -264,10 +264,10 @@ private:
bool const m_readonly;
DCOPClient *m_dcop_client;
- QString m_statusbartext1;
- QString m_statusbartext2;
- QString m_statusbartext3;
- QString m_statusbartext4;
+ TQString m_statusbartext1;
+ TQString m_statusbartext2;
+ TQString m_statusbartext3;
+ TQString m_statusbartext4;
};
#endif // View_included
diff --git a/kmplot/kmplot/coordsconfigdialog.cpp b/kmplot/kmplot/coordsconfigdialog.cpp
index bc6df41e..37e92b16 100644
--- a/kmplot/kmplot/coordsconfigdialog.cpp
+++ b/kmplot/kmplot/coordsconfigdialog.cpp
@@ -26,13 +26,13 @@
#include <klocale.h>
#include <klineedit.h>
#include <kmessagebox.h>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include "settings.h"
#include "settingspagecoords.h"
#include "coordsconfigdialog.h"
-CoordsConfigDialog::CoordsConfigDialog(XParser *p, QWidget *parent)
+CoordsConfigDialog::CoordsConfigDialog(XParser *p, TQWidget *parent)
: KConfigDialog(parent, "coords", Settings::self()), m_parser(p)
{
configAxesDialog = new SettingsPageCoords( 0, "coordsSettings" );
diff --git a/kmplot/kmplot/coordsconfigdialog.h b/kmplot/kmplot/coordsconfigdialog.h
index f7f8cc48..9fe15490 100644
--- a/kmplot/kmplot/coordsconfigdialog.h
+++ b/kmplot/kmplot/coordsconfigdialog.h
@@ -40,7 +40,7 @@ class CoordsConfigDialog : public KConfigDialog
{
Q_OBJECT
public:
- CoordsConfigDialog(XParser *p, QWidget *parent = 0);
+ CoordsConfigDialog(XParser *p, TQWidget *parent = 0);
~CoordsConfigDialog();
protected slots:
virtual void slotOk();
diff --git a/kmplot/kmplot/diagr.cpp b/kmplot/kmplot/diagr.cpp
index ba438c7b..ba65fce8 100644
--- a/kmplot/kmplot/diagr.cpp
+++ b/kmplot/kmplot/diagr.cpp
@@ -61,7 +61,7 @@ CDiagr::CDiagr()
CDiagr::~CDiagr()
{}
-void CDiagr::Create(QPoint Ref, // Bezugspunkt links unten
+void CDiagr::Create(TQPoint Ref, // Bezugspunkt links unten
int lx, int ly, // Achsenl�gen
double xmin, double xmax, // x-Wertebereich
double ymin, double ymax) // y-Wertebereich
@@ -105,9 +105,9 @@ void CDiagr::Skal( double ex, double ey )
}
-void CDiagr::Plot(QPainter* pDC)
+void CDiagr::Plot(TQPainter* pDC)
{
- QPen pen(frameColor, borderThickness);
+ TQPen pen(frameColor, borderThickness);
if( g_mode != GRID_NONE )
drawGrid( pDC ); // draw the grid
@@ -221,13 +221,13 @@ double CDiagr::Transy(int y) // Bildschirmkoordinate
}
-void CDiagr::drawAxes( QPainter* pDC ) // draw axes
+void CDiagr::drawAxes( TQPainter* pDC ) // draw axes
{ int a, b, tl;
double d, da, db;
if( Settings::showAxes() )
{
- pDC->setPen( QPen( axesColor, axesLineWidth ) );
+ pDC->setPen( TQPen( axesColor, axesLineWidth ) );
b = Transy(0.);
a = PlotArea.right();
pDC->Lineh(PlotArea.left(), b, a); // x-Achse
@@ -249,7 +249,7 @@ void CDiagr::drawAxes( QPainter* pDC ) // draw axes
}
}
- pDC->setPen( QPen( axesColor, ticWidth ) );
+ pDC->setPen( TQPen( axesColor, ticWidth ) );
if( Settings::showAxes() )
{
da=oy-ticLength;
@@ -328,11 +328,11 @@ void CDiagr::drawAxes( QPainter* pDC ) // draw axes
}
-void CDiagr::drawGrid( QPainter* pDC )
+void CDiagr::drawGrid( TQPainter* pDC )
{
int a, b;
double d, x, y;
- QPen pen( gridColor, gridLineWidth );
+ TQPen pen( gridColor, gridLineWidth );
pDC->setPen(pen);
if( g_mode==GRID_LINES )
@@ -370,7 +370,7 @@ void CDiagr::drawGrid( QPainter* pDC )
{
int y2;
double w;
- QRect const rc=PlotArea;
+ TQRect const rc=PlotArea;
pDC->setClipRect(pDC->xForm(rc));
double const c=hypot(xmd*skx, ymd*sky);
@@ -404,21 +404,21 @@ void CDiagr::drawGrid( QPainter* pDC )
}
-void CDiagr::drawLabels(QPainter* pDC)
+void CDiagr::drawLabels(TQPainter* pDC)
{
int const dx=15;
int const dy=40;
- QFont const font=QFont( Settings::axesFont(), Settings::axesFontSize() );
+ TQFont const font=TQFont( Settings::axesFont(), Settings::axesFontSize() );
pDC->setFont(font);
int const x=Transx(0.);
int const y=Transy(0.);
double d;
int n;
- QString s;
+ TQString s;
//pDC->drawText(x-dx, y+dy, 0, 0, Qt::AlignRight|Qt::AlignVCenter|Qt::DontClip, "0");
char draw_next=0;
- QFontMetrics const test(font);
+ TQFontMetrics const test(font);
int swidth=0;
for(d=tsx, n=(int)ceil(xmin/ex); d<xmd; d+=ex, ++n)
@@ -434,15 +434,15 @@ void CDiagr::drawLabels(QPainter* pDC)
if(fabs(ex-M_PI/2.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/2";//s+=QChar(960)+QString("/2");
+ s+="pi/2";//s+=TQChar(960)+TQString("/2");
else if(n%2 == 0)
{
if(n==-2 || n==2)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/2);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/2);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -468,15 +468,15 @@ void CDiagr::drawLabels(QPainter* pDC)
else if(fabs(ex-M_PI/3.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/3";//s+=QChar(960)+QString("/3");
+ s+="pi/3";//s+=TQChar(960)+TQString("/3");
else if(n%3==0)
{
if(n==-3 || n==3)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/3);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/3);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -502,15 +502,15 @@ void CDiagr::drawLabels(QPainter* pDC)
else if(fabs(ex-M_PI/4.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/4";//s+=QChar(960)+QString("/4");
+ s+="pi/4";//s+=TQChar(960)+TQString("/4");
else if(n%4==0)
{
if(n==-4 || n==4)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/4);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/4);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -535,7 +535,7 @@ void CDiagr::drawLabels(QPainter* pDC)
}
else if((n%5==0 || n==1 || n==-1 || draw_next))
{
- s=QString().sprintf("%+0.3g", n*ex);
+ s=TQString().sprintf("%+0.3g", n*ex);
swidth = test.width(s);
if ( Transx(d)-x<swidth && Transx(d)-x>-swidth && draw_next==0)
{
@@ -574,15 +574,15 @@ void CDiagr::drawLabels(QPainter* pDC)
if(fabs(ey-M_PI/2.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/2";//s+=QChar(960)+QString("/2");
+ s+="pi/2";//s+=TQChar(960)+TQString("/2");
else if(n%2==0)
{
if(n==-2 || n==2)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/2);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/2);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -595,15 +595,15 @@ void CDiagr::drawLabels(QPainter* pDC)
else if(fabs(ey-M_PI/3.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/3";//s+=QChar(960)+QString("/3");
+ s+="pi/3";//s+=TQChar(960)+TQString("/3");
else if(n%3==0)
{
if(n==-3 || n==3)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/3);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/3);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -616,15 +616,15 @@ void CDiagr::drawLabels(QPainter* pDC)
else if(fabs(ey-M_PI/4.)<1e-3)
{
if(n==-1 || n==1)
- s+="pi/4";//s+=QChar(960)+QString("/4");
+ s+="pi/4";//s+=TQChar(960)+TQString("/4");
else if(n%4==0)
{
if(n==-4 || n==4)
- s+="pi";//s+=QChar(960);
+ s+="pi";//s+=TQChar(960);
else
{
- s=QString().sprintf("%+d", n/4);
- s+="pi";//s+=QChar(960);
+ s=TQString().sprintf("%+d", n/4);
+ s+="pi";//s+=TQChar(960);
}
}
else
@@ -636,7 +636,7 @@ void CDiagr::drawLabels(QPainter* pDC)
}
else if((n%5==0 || n==1 || n==-1))
{
- s=QString().sprintf("%+0.3g", n*ey);
+ 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);
else
diff --git a/kmplot/kmplot/diagr.h b/kmplot/kmplot/diagr.h
index 45cae5a6..23375821 100644
--- a/kmplot/kmplot/diagr.h
+++ b/kmplot/kmplot/diagr.h
@@ -33,7 +33,7 @@
#include <stdio.h>
// Qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//@{
/// Some abbreviations for horizontal and vertical lines.
@@ -61,18 +61,18 @@ public:
~CDiagr();
/// Sets all members to current values.
- void Create( QPoint Ref,
+ void Create( TQPoint Ref,
int lx, int ly,
double xmin, double xmax,
double ymin, double ymax );
/// Sets the current values for the scaling factors
void Skal( double ex, double ey );
/// Draws all requested parts of the diagram (axes, labels, grid e.g.)
- void Plot( QPainter* pDC );
+ void Plot( TQPainter* pDC );
/// Returns the rectangle around the core of the plot area.
- QRect GetPlotArea() { return PlotArea; }
+ TQRect GetPlotArea() { return PlotArea; }
/// Returns the rectangle for the frame around the plot. Extra frame is bigger.
- QRect GetFrame() { return m_frame; }
+ TQRect GetFrame() { return m_frame; }
/** @name Transformations */
//@{
@@ -104,11 +104,11 @@ public:
private:
/// Draw the coordinate axes.
- void drawAxes(QPainter*);
+ void drawAxes(TQPainter*);
/// Draw the grid.
- void drawGrid( QPainter* );
+ void drawGrid( TQPainter* );
/// Write labels.
- void drawLabels(QPainter*);
+ void drawLabels(TQPainter*);
/// Current grid style.
int g_mode;
@@ -138,8 +138,8 @@ private:
double skx, sky;
//@}
- QRect PlotArea; ///< plot area
- QRect m_frame; ///< frame around the plot
+ TQRect PlotArea; ///< plot area
+ TQRect m_frame; ///< frame around the plot
};
#endif // diagr_included
diff --git a/kmplot/kmplot/editfunction.cpp b/kmplot/kmplot/editfunction.cpp
index 60786d21..2d75cc49 100644
--- a/kmplot/kmplot/editfunction.cpp
+++ b/kmplot/kmplot/editfunction.cpp
@@ -24,15 +24,15 @@
*/
// Qt includes
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qstringlist.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
// KDE includes
@@ -56,23 +56,23 @@
#include "editintegralpage.h"
#include "kparametereditor.h"
-EditFunction::EditFunction( XParser* parser, QWidget* parent, const char* name ) :
+EditFunction::EditFunction( XParser* parser, TQWidget* parent, const char* name ) :
KDialogBase( IconList, "Caption", Help|Ok|Cancel, Ok, parent, name ), m_parser(parser)
{
- QVBox *page0 = addVBoxPage( i18n("Function"), i18n( "Function" ), SmallIcon( "func", 32 ) );
+ TQVBox *page0 = addVBoxPage( i18n("Function"), i18n( "Function" ), SmallIcon( "func", 32 ) );
editfunctionpage = new EditFunctionPage( page0 );
- QVBox *page1 = addVBoxPage( i18n("Derivatives"), i18n( "Derivatives" ), SmallIcon( "deriv_func", 32 ) );
+ TQVBox *page1 = addVBoxPage( i18n("Derivatives"), i18n( "Derivatives" ), SmallIcon( "deriv_func", 32 ) );
editderivativespage = new EditDerivativesPage( page1 );
- QVBox *page2 = addVBoxPage( i18n("Integral"), i18n( "Integral" ), SmallIcon( "integral_func", 32 ) );
+ TQVBox *page2 = addVBoxPage( i18n("Integral"), i18n( "Integral" ), SmallIcon( "integral_func", 32 ) );
editintegralpage = new EditIntegralPage( page2 );
for( int number = 0; number < SLIDER_COUNT; number++ )
{
editfunctionpage->listOfSliders->insertItem( i18n( "Slider No. %1" ).arg( number +1) );
}
- connect( editfunctionpage->cmdParameter, SIGNAL ( clicked() ), this, SLOT( cmdParameter_clicked() ) );
- connect( editfunctionpage->useNoParameter, SIGNAL ( toggled(bool) ), this, SLOT( noParameter_toggled(bool) ) );
- connect( editfunctionpage->customMinRange, SIGNAL ( toggled(bool) ), this, SLOT( customMinRange_toggled(bool) ) );
- connect( editfunctionpage->customMaxRange, SIGNAL ( toggled(bool) ), this, SLOT( customMaxRange_toggled(bool) ) );
+ connect( editfunctionpage->cmdParameter, TQT_SIGNAL ( clicked() ), this, TQT_SLOT( cmdParameter_clicked() ) );
+ connect( editfunctionpage->useNoParameter, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( noParameter_toggled(bool) ) );
+ connect( editfunctionpage->customMinRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMinRange_toggled(bool) ) );
+ connect( editfunctionpage->customMaxRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMaxRange_toggled(bool) ) );
m_updatedfunction = 0;
}
@@ -169,7 +169,7 @@ void EditFunction::setWidgets()
void EditFunction::accept()
{
- QString f_str( editfunctionpage->equation->text() );
+ TQString f_str( editfunctionpage->equation->text() );
if ( m_id!=-1 )
m_parser->fixFunctionName(f_str, XParser::Function, m_id);
@@ -312,7 +312,7 @@ void EditFunction::accept()
return;
}
added_ufkt = &m_parser->ufkt[ix];
- QString const old_fstr = added_ufkt->fstr;
+ TQString const old_fstr = added_ufkt->fstr;
if(( (!m_parameter.isEmpty() && editfunctionpage->useList->isChecked() ) || editfunctionpage->useSlider->isChecked() ) && !functionHas2Arguments() )
fixFunctionArguments(f_str); //adding an extra argument for the parameter value
added_ufkt->fstr = f_str;
@@ -426,7 +426,7 @@ void EditFunction::customMaxRange_toggled(bool status)
editfunctionpage->max->setEnabled(false);
}
-void EditFunction::fixFunctionArguments(QString &f_str)
+void EditFunction::fixFunctionArguments(TQString &f_str)
{
int const openBracket = f_str.find( "(" );
int const closeBracket = f_str.find( ")" );
diff --git a/kmplot/kmplot/editfunction.h b/kmplot/kmplot/editfunction.h
index 9ef8ee05..308beadf 100644
--- a/kmplot/kmplot/editfunction.h
+++ b/kmplot/kmplot/editfunction.h
@@ -43,7 +43,7 @@ class EditFunction : public KDialogBase
/// @param parser points to the parser instance.
/// @param parent points to the parent widget.
/// @param name of this instance.
- EditFunction( XParser* parser, QWidget* parent = NULL, const char* name = NULL );
+ EditFunction( XParser* parser, TQWidget* parent = 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.
@@ -73,13 +73,13 @@ class EditFunction : public KDialogBase
/// Check, if the function has 2 arguments (function group)
bool functionHas2Arguments();
/// Adding an extra argument
- void fixFunctionArguments(QString &);
+ void fixFunctionArguments(TQString &);
/// Pointer to the parser instance
XParser* m_parser;
/// Current function index
int m_id;
- QValueList<ParameterValueItem> m_parameter;
+ TQValueList<ParameterValueItem> m_parameter;
EditFunctionPage* editfunctionpage;
EditDerivativesPage* editderivativespage;
diff --git a/kmplot/kmplot/kconstanteditor.cpp b/kmplot/kmplot/kconstanteditor.cpp
index 6014c82b..c2017c8a 100644
--- a/kmplot/kmplot/kconstanteditor.cpp
+++ b/kmplot/kmplot/kconstanteditor.cpp
@@ -31,24 +31,24 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qdom.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqdom.h>
#include "kmplotio.h"
#include "kconstanteditor.h"
-KConstantEditor::KConstantEditor(View *v, QWidget *parent, const char *name)
+KConstantEditor::KConstantEditor(View *v, TQWidget *parent, const char *name)
: QConstantEditor(parent,name), m_view(v)
{
- QString str_value;
- QValueVector<Constant>::iterator it;
+ TQString str_value;
+ TQValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end() ;++it)
{
str_value.setNum(it->value);
- (void) new QListViewItem(varlist, QChar(it->constant), str_value);
+ (void) new TQListViewItem(varlist, TQChar(it->constant), str_value);
}
}
@@ -61,7 +61,7 @@ void KConstantEditor::cmdNew_clicked()
{
constant = '0';
KEditConstant *dlg = new KEditConstant(m_view->parser(), constant, value);
- connect( dlg, SIGNAL( finished() ), this,SLOT(newConstantSlot() ) );
+ connect( dlg, TQT_SIGNAL( finished() ), this,TQT_SLOT(newConstantSlot() ) );
dlg->show();
}
@@ -73,7 +73,7 @@ void KConstantEditor::cmdEdit_clicked()
value = varlist->currentItem()->text(1);
KEditConstant *dlg = new KEditConstant(m_view->parser(), constant, value);
- connect( dlg, SIGNAL( finished() ), this,SLOT(editConstantSlot() ) );
+ connect( dlg, TQT_SIGNAL( finished() ), this,TQT_SLOT(editConstantSlot() ) );
dlg->show();
}
@@ -84,9 +84,9 @@ void KConstantEditor::cmdDelete_clicked()
constant = varlist->currentItem()->text(0).at(0).latin1();
value = varlist->currentItem()->text(1);
- QString str;
+ TQString str;
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
str = it->fstr;
for (int i=str.find(')'); (uint)i<str.length();i++)
@@ -96,7 +96,7 @@ void KConstantEditor::cmdDelete_clicked()
return;
}
}
- QValueVector<Constant>::iterator it;
+ TQValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end(); ++it)
{
if ( it->constant == constant)
@@ -113,10 +113,10 @@ void KConstantEditor::cmdDelete_clicked()
}
}
- delete varlist->findItem(QChar(constant), 0); //removes the item from the constant list
+ delete varlist->findItem(TQChar(constant), 0); //removes the item from the constant list
}
-void KConstantEditor::varlist_clicked( QListViewItem * item )
+void KConstantEditor::varlist_clicked( TQListViewItem * item )
{
if (item)
{
@@ -139,12 +139,12 @@ void KConstantEditor::cmdDuplicate_clicked()
constant = varlist->currentItem()->text(0).at(0).latin1();
value = varlist->currentItem()->text(1);
- QStringList list;
+ TQStringList list;
bool found;
for (char i='A'; i<'Z';i++)
{
found = false;
- QValueVector<Constant>::iterator it;
+ TQValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end() && !found;++it)
{
if ( it->constant == i || i == constant)
@@ -153,9 +153,9 @@ void KConstantEditor::cmdDuplicate_clicked()
}
}
if (!found)
- list.append(QChar(i));
+ list.append(TQChar(i));
}
- QStringList result = KInputDialog::getItemList(i18n("Choose Name"),i18n("Choose a name for the constant:"),list, QStringList(), false, &found);
+ 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();
@@ -168,7 +168,7 @@ void KConstantEditor::newConstantSlot()
{
double dvalue = m_view->parser()->eval(value);
m_view->parser()->constant.append( Constant(constant, dvalue) );
- (void) new QListViewItem(varlist, QChar( constant ), value);
+ (void) new TQListViewItem(varlist, TQChar( constant ), value);
varlist->sort();
}
@@ -176,7 +176,7 @@ void KConstantEditor::editConstantSlot()
{
double dvalue = m_view->parser()->eval(value);
bool found = false;
- QValueVector<Constant>::iterator it;
+ TQValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end() && !found;++it)
{
if ( it->constant == constant)
@@ -191,13 +191,13 @@ void KConstantEditor::editConstantSlot()
return;
}
- QListViewItem *item = varlist->findItem(QChar(constant), 0);
+ TQListViewItem *item = varlist->findItem(TQChar(constant), 0);
if (item!=0)
item->setText(1,value);
int index = 0;
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if( it->fstr.contains(constant)!=0 )
m_view->parser()->reparse(index); //reparsing the function
@@ -207,7 +207,7 @@ void KConstantEditor::editConstantSlot()
m_view->drawPlot();
}
-void KConstantEditor::varlist_doubleClicked( QListViewItem * )
+void KConstantEditor::varlist_doubleClicked( TQListViewItem * )
{
cmdEdit_clicked();
}
diff --git a/kmplot/kmplot/kconstanteditor.h b/kmplot/kmplot/kconstanteditor.h
index 5f801891..93343ac3 100644
--- a/kmplot/kmplot/kconstanteditor.h
+++ b/kmplot/kmplot/kconstanteditor.h
@@ -38,7 +38,7 @@ class KConstantEditor : public QConstantEditor
{
Q_OBJECT
public:
- KConstantEditor(View *, QWidget *parent = 0, const char *name = 0);
+ KConstantEditor(View *, TQWidget *parent = 0, const char *name = 0);
~KConstantEditor();
public slots:
@@ -49,8 +49,8 @@ public slots:
void cmdDuplicate_clicked();
///actions for the visible constant list
- void varlist_clicked( QListViewItem * item );
- void varlist_doubleClicked( QListViewItem * );
+ void varlist_clicked( TQListViewItem * item );
+ void varlist_doubleClicked( TQListViewItem * );
/// called when a user pressed OK the the new-constant-dialog
void newConstantSlot();
@@ -60,7 +60,7 @@ public slots:
private:
char constant;
- QString value;
+ TQString value;
View *m_view;
};
diff --git a/kmplot/kmplot/keditconstant.cpp b/kmplot/kmplot/keditconstant.cpp
index e7a724ac..4f4ab040 100644
--- a/kmplot/kmplot/keditconstant.cpp
+++ b/kmplot/kmplot/keditconstant.cpp
@@ -27,24 +27,24 @@
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "keditconstant.h"
-KEditConstant::KEditConstant(XParser *p, char &c, QString &v, QWidget *parent, const char *name)
+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)
{
if ( constant != '0' )
{
txtConstant->setEnabled(false);
- txtConstant->setText(QChar(constant));
+ txtConstant->setText(TQChar(constant));
txtValue->setText(value);
txtValue->setFocus();
txtValue->selectAll();
}
- connect( cmdCancel, SIGNAL( clicked() ), this, SLOT( deleteLater() ));
- connect( cmdOK, SIGNAL( clicked() ), this, SLOT( cmdOK_clicked() ));
+ connect( cmdCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteLater() ));
+ connect( cmdOK, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdOK_clicked() ));
}
@@ -67,7 +67,7 @@ void KEditConstant::cmdOK_clicked()
if ( txtConstant->isEnabled() ) //creating, not edit a constant
{
bool found= false;
- QValueVector<Constant>::iterator it;
+ TQValueVector<Constant>::iterator it;
for(it = m_parser->constant.begin(); it!= m_parser->constant.end() && !found;++it)
{
if ( it->constant == constant)
@@ -88,7 +88,7 @@ void KEditConstant::cmdOK_clicked()
}
emit finished();
- QDialog::accept();
+ TQDialog::accept();
}
void KEditConstant::txtVariable_lostFocus()
diff --git a/kmplot/kmplot/keditconstant.h b/kmplot/kmplot/keditconstant.h
index dcce75cd..e6d19d20 100644
--- a/kmplot/kmplot/keditconstant.h
+++ b/kmplot/kmplot/keditconstant.h
@@ -37,7 +37,7 @@ class KEditConstant : public QEditConstant
{
Q_OBJECT
public:
- KEditConstant(XParser *p, char &, QString &,QWidget *parent = 0, const char *name = 0);
+ KEditConstant(XParser *p, char &, TQString &,TQWidget *parent = 0, const char *name = 0);
~KEditConstant();
public slots:
@@ -50,7 +50,7 @@ signals:
private:
char &constant;
- QString &value;
+ TQString &value;
XParser *m_parser;
diff --git a/kmplot/kmplot/keditparametric.cpp b/kmplot/kmplot/keditparametric.cpp
index 06b9d359..67ee0421 100644
--- a/kmplot/kmplot/keditparametric.cpp
+++ b/kmplot/kmplot/keditparametric.cpp
@@ -23,7 +23,7 @@
*
*/
// Qt includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// KDE includes
#include <kapplication.h>
@@ -41,11 +41,11 @@
#include "xparser.h"
#include "View.h"
-KEditParametric::KEditParametric( XParser* parser, QWidget* parent, const char* name ) :
+KEditParametric::KEditParametric( XParser* parser, TQWidget* parent, const char* name ) :
QEditParametric( parent, name ), m_parser(parser)
{
- connect( customMinRange, SIGNAL ( toggled(bool) ), this, SLOT( customMinRange_toggled(bool) ) );
- connect( customMaxRange, SIGNAL ( toggled(bool) ), this, SLOT( customMaxRange_toggled(bool) ) );
+ connect( customMinRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMinRange_toggled(bool) ) );
+ connect( customMaxRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMaxRange_toggled(bool) ) );
m_updatedfunction = 0;
}
@@ -74,7 +74,7 @@ void KEditParametric::clearWidgets()
void KEditParametric::setWidgets()
{
Ufkt *ufkt = &m_parser->ufkt[ m_parser->ixValue(m_x_id) ];
- QString name, expression;
+ TQString name, expression;
splitEquation( ufkt->fstr, name, expression );
kLineEditName->setText( name );
kLineEditXFunction->setText( expression );
@@ -114,7 +114,7 @@ void KEditParametric::accept()
// find a name not already used
if( kLineEditName->text().isEmpty() )
{
- QString fname;
+ TQString fname;
m_parser->fixFunctionName(fname, XParser::ParametricX, m_x_id);
int const pos = fname.find('(');
kLineEditName->setText(fname.mid(1,pos-1));
@@ -178,7 +178,7 @@ void KEditParametric::accept()
return;
}
added_ufkt = &m_parser->ufkt[ix];
- QString old_fstr = added_ufkt->fstr;
+ TQString old_fstr = added_ufkt->fstr;
added_ufkt->fstr = xFunction();
m_parser->reparse(added_ufkt); //reparse the funcion
if ( m_parser->parserError() != 0)
@@ -237,7 +237,7 @@ void KEditParametric::accept()
if( m_y_id != -1 ) //when editing a function:
{
added_ufkt = &m_parser->ufkt[m_parser->ixValue(m_y_id)];
- QString old_fstr = added_ufkt->fstr;
+ TQString old_fstr = added_ufkt->fstr;
added_ufkt->fstr = yFunction();
m_parser->reparse(added_ufkt); //reparse the funcion
if ( m_parser->parserError() != 0) //when something went wrong:
@@ -299,12 +299,12 @@ void KEditParametric::accept()
QEditParametric::accept(); //update the function name in FktDlg
}
-QString KEditParametric::xFunction()
+TQString KEditParametric::xFunction()
{
return "x" + kLineEditName->text() + "(t)=" + kLineEditXFunction->text();
}
-void KEditParametric::splitEquation( const QString equation, QString &name, QString &expression )
+void KEditParametric::splitEquation( const TQString equation, TQString &name, TQString &expression )
{
int start = 0;
if( equation[ 0 ] == 'x' || equation[ 0 ] == 'y' ) start++;
@@ -314,7 +314,7 @@ void KEditParametric::splitEquation( const QString equation, QString &name, QStr
expression = equation.section( '=', 1, 1 );
}
-QString KEditParametric::yFunction()
+TQString KEditParametric::yFunction()
{
return "y" + kLineEditName->text() + "(t)=" + kLineEditYFunction->text();
}
diff --git a/kmplot/kmplot/keditparametric.h b/kmplot/kmplot/keditparametric.h
index 0ce5b2d4..334d997a 100644
--- a/kmplot/kmplot/keditparametric.h
+++ b/kmplot/kmplot/keditparametric.h
@@ -40,7 +40,7 @@ class KEditParametric : public QEditParametric
/// @param parser points to the parser instance.
/// @param parent points to the parent widget.
/// @param name of this instance.
- KEditParametric( XParser* parser, QWidget* parent = NULL, const char* name = NULL );
+ KEditParametric( XParser* parser, TQWidget* parent = NULL, const char* name = NULL );
/// Nothing special to do.
virtual ~KEditParametric() {}
@@ -55,11 +55,11 @@ class KEditParametric : public QEditParametric
/// Fill the dialog's widgets with values from the parser
void setWidgets();
/// Returns the well formed function equation
- QString xFunction();
+ TQString xFunction();
/// Returns the well formed function equation
- QString yFunction();
+ TQString yFunction();
/// extract function \a name and \a expression from a given \a equation
- void splitEquation( const QString equation, QString &name, QString &expression );
+ void splitEquation( const TQString equation, TQString &name, TQString &expression );
/// Pointer to the parser instance.
XParser* m_parser;
//@{
diff --git a/kmplot/kmplot/keditpolar.cpp b/kmplot/kmplot/keditpolar.cpp
index 7499be1a..787e9e32 100644
--- a/kmplot/kmplot/keditpolar.cpp
+++ b/kmplot/kmplot/keditpolar.cpp
@@ -23,7 +23,7 @@
*
*/
// Qt includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// KDE includes
#include <kapplication.h>
@@ -42,11 +42,11 @@
#include "xparser.h"
#include "View.h"
-KEditPolar::KEditPolar( XParser* parser, QWidget* parent, const char* name ) :
+KEditPolar::KEditPolar( XParser* parser, TQWidget* parent, const char* name ) :
QEditPolar( parent, name ),m_parser(parser)
{
- connect( customMinRange, SIGNAL ( toggled(bool) ), this, SLOT( customMinRange_toggled(bool) ) );
- connect( customMaxRange, SIGNAL ( toggled(bool) ), this, SLOT( customMaxRange_toggled(bool) ) );
+ connect( customMinRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMinRange_toggled(bool) ) );
+ connect( customMaxRange, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT( customMaxRange_toggled(bool) ) );
m_updatedfunction = 0;
}
@@ -72,7 +72,7 @@ void KEditPolar::clearWidgets()
void KEditPolar::setWidgets()
{
Ufkt *ufkt = &m_parser->ufkt[ m_parser->ixValue(m_id) ];
- QString function = ufkt->fstr;
+ TQString function = ufkt->fstr;
function = function.right( function.length()-1 );
kLineEditYFunction->setText( function );
checkBoxHide->setChecked( !ufkt->f_mode);
@@ -98,7 +98,7 @@ void KEditPolar::setWidgets()
void KEditPolar::accept()
{
- QString f_str = /*"r" + */kLineEditYFunction->text();
+ TQString f_str = /*"r" + */kLineEditYFunction->text();
if ( m_id!=-1 )
m_parser->fixFunctionName(f_str, XParser::Polar, m_id);
@@ -161,7 +161,7 @@ void KEditPolar::accept()
return;
}
added_ufkt = &m_parser->ufkt[ix];
- QString const old_fstr = added_ufkt->fstr;
+ TQString const old_fstr = added_ufkt->fstr;
added_ufkt->fstr = f_str;
m_parser->reparse(added_ufkt); //reparse the funcion
if ( m_parser->parserError() != 0)
diff --git a/kmplot/kmplot/keditpolar.h b/kmplot/kmplot/keditpolar.h
index 4189450a..131f2475 100644
--- a/kmplot/kmplot/keditpolar.h
+++ b/kmplot/kmplot/keditpolar.h
@@ -40,7 +40,7 @@ class KEditPolar : public QEditPolar
/// @param parser points to the parser instance.
/// @param parent points to the parent widget.
/// @param name of this instance.
- KEditPolar( XParser* parser, QWidget* parent = NULL, const char* name = NULL );
+ KEditPolar( XParser* parser, TQWidget* parent = NULL, const char* name = NULL );
/// Nothing special to do.
virtual ~KEditPolar() {}
diff --git a/kmplot/kmplot/kminmax.cpp b/kmplot/kmplot/kminmax.cpp
index bf4e69a8..3f8db2c8 100644
--- a/kmplot/kmplot/kminmax.cpp
+++ b/kmplot/kmplot/kminmax.cpp
@@ -28,23 +28,23 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "kminmax.h"
#include "xparser.h"
-KMinMax::KMinMax(View *v, QWidget *parent, const char *name)
+KMinMax::KMinMax(View *v, TQWidget *parent, const char *name)
: QMinMax(parent, name), m_view(v)
{
m_mode=-1;
- connect( cmdClose, SIGNAL( clicked() ), this, SLOT( close() ));
- connect( cmdFind, SIGNAL( clicked() ), this, SLOT( cmdFind_clicked() ));
- connect( cmdParameter, SIGNAL( clicked() ), this, SLOT( cmdParameter_clicked() ));
- connect( list, SIGNAL( highlighted(QListBoxItem*) ), this, SLOT( list_highlighted(QListBoxItem*) ));
- connect( list, SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( list_doubleClicked(QListBoxItem *) ));
+ connect( cmdClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ));
+ connect( cmdFind, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdFind_clicked() ));
+ connect( cmdParameter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdParameter_clicked() ));
+ connect( list, TQT_SIGNAL( highlighted(TQListBoxItem*) ), this, TQT_SLOT( list_highlighted(TQListBoxItem*) ));
+ connect( list, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( list_doubleClicked(TQListBoxItem *) ));
parameter="";
}
@@ -63,7 +63,7 @@ void KMinMax::init(char m)
if ( m_mode < 2) //find minimum point
{
max->setReadOnly(false);
- QString range;
+ TQString range;
range.setNum(View::xmin);
min->setText( range);
range.setNum(View::xmax);
@@ -71,22 +71,22 @@ void KMinMax::init(char m)
lblMin->setText(i18n("Search between the x-value:"));
lblMax->setText(i18n("and:"));
cmdFind->setText(i18n("&Find"));
- QToolTip::add(min,i18n("Lower boundary of the plot range"));
- QWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
- QToolTip::add(max,i18n("Upper boundary of the plot range"));
- QWhatsThis::add(max,i18n("Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too."));
+ TQToolTip::add(min,i18n("Lower boundary of the plot range"));
+ TQWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
+ TQToolTip::add(max,i18n("Upper boundary of the plot range"));
+ TQWhatsThis::add(max,i18n("Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too."));
if ( m_mode == 1) //find maximum point
{
setCaption(i18n("Find Maximum Point"));
- QToolTip::add( cmdFind, i18n( "Search for the maximum point in the range you specified" ) );
- QWhatsThis::add(cmdFind,i18n("Search for the highest y-value in the x-range you specified and show the result in a message box."));
+ TQToolTip::add( cmdFind, i18n( "Search for the maximum point in the range you specified" ) );
+ TQWhatsThis::add(cmdFind,i18n("Search for the highest y-value in the x-range you specified and show the result in a message box."));
}
else
{
setCaption(i18n("Find Minimum Point"));
- QToolTip::add( cmdFind, i18n( "Search for the minimum point in the range you specified" ) );
- QWhatsThis::add(cmdFind,i18n("Search for the lowest y-value in the x-range you specified and show the result in a message box."));
+ TQToolTip::add( cmdFind, i18n( "Search for the minimum point in the range you specified" ) );
+ TQWhatsThis::add(cmdFind,i18n("Search for the lowest y-value in the x-range you specified and show the result in a message box."));
}
}
else if ( m_mode == 2) //get y-value
@@ -97,35 +97,35 @@ void KMinMax::init(char m)
max->setReadOnly(true);
min->setText("");
max->setText("");
- QToolTip::add(min,i18n("Lower boundary of the plot range"));
- QWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
- QToolTip::add(max,i18n("No returned y-value yet"));
- QWhatsThis::add(max,i18n("Here you will see the y-value which you got from the x-value in the textbox above. To calculate the y-value, press the Calculate button."));
+ TQToolTip::add(min,i18n("Lower boundary of the plot range"));
+ TQWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
+ TQToolTip::add(max,i18n("No returned y-value yet"));
+ TQWhatsThis::add(max,i18n("Here you will see the y-value which you got from the x-value in the textbox above. To calculate the y-value, press the Calculate button."));
cmdFind->setText(i18n("&Calculate"));
- QToolTip::add( cmdFind, i18n( "Get the y-value from the x-value you typed" ) );
- QWhatsThis::add(cmdFind,i18n("Get the y-value from the x-value you typed and show it in the y-value box."));
+ TQToolTip::add( cmdFind, i18n( "Get the y-value from the x-value you typed" ) );
+ TQWhatsThis::add(cmdFind,i18n("Get the y-value from the x-value you typed and show it in the y-value box."));
}
else if ( m_mode == 3) //area under a graph
{
max->setReadOnly(false);
- QString range;
+ TQString range;
range.setNum(View::xmin);
min->setText( range);
range.setNum(View::xmax);
max->setText(range);
- QToolTip::add(min,i18n("Lower boundary of the plot range"));
- QWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
- QToolTip::add(max,i18n("Upper boundary of the plot range"));
- QWhatsThis::add(max,i18n("Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too."));
+ TQToolTip::add(min,i18n("Lower boundary of the plot range"));
+ TQWhatsThis::add(min,i18n("Enter the lower boundary of the plot range. Expressions like 2*pi are allowed, too."));
+ TQToolTip::add(max,i18n("Upper boundary of the plot range"));
+ TQWhatsThis::add(max,i18n("Enter the upper boundary of the plot range. Expressions like 2*pi are allowed, too."));
setCaption(i18n("Calculate Integral"));
lblMin->setText(i18n("Calculate the integral between the x-values:"));
lblMax->setText(i18n("and:"));
cmdFind->setText(i18n("&Calculate"));
- QToolTip::add( cmdFind, i18n( "Calculate the integral between the x-values" ) );
- QWhatsThis::add(cmdFind,i18n("Calculate the numeric integral between the x-values and draw the result as an area."));
+ TQToolTip::add( cmdFind, i18n( "Calculate the integral between the x-values" ) );
+ TQWhatsThis::add(cmdFind,i18n("Calculate the numeric integral between the x-values and draw the result as an area."));
}
@@ -135,10 +135,10 @@ void KMinMax::init(char m)
void KMinMax::updateFunctions()
{
- QString const selected_item(list->currentText() );
+ TQString const selected_item(list->currentText() );
list->clear();
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if( it->fname[0] != 'x' && it->fname[0] != 'y' && it->fname[0] != 'r' && !it->fname.isEmpty())
{
@@ -147,7 +147,7 @@ void KMinMax::updateFunctions()
if ( it->f1_mode ) //1st derivative
{
- QString function (it->fstr);
+ TQString function (it->fstr);
int i= function.find('(');
function.truncate(i);
function +="\'";
@@ -155,7 +155,7 @@ void KMinMax::updateFunctions()
}
if ( it->f2_mode )//2nd derivative
{
- QString function (it->fstr);
+ TQString function (it->fstr);
int i= function.find('(');
function.truncate(i);
function +="\'\'";
@@ -163,7 +163,7 @@ void KMinMax::updateFunctions()
}
if ( it->integral_mode )//integral
{
- QString function (it->fstr);
+ TQString function (it->fstr);
int i= function.find('(');
function.truncate(i);
function = function.upper();
@@ -177,7 +177,7 @@ void KMinMax::updateFunctions()
else
cmdFind->setEnabled(true);
selectItem();
- QListBoxItem *found_item = list->findItem(selected_item,Qt::ExactMatch);
+ TQListBoxItem *found_item = list->findItem(selected_item,Qt::ExactMatch);
if ( found_item && m_view->csmode < 0)
list->setSelected(found_item,true);
}
@@ -189,7 +189,7 @@ void KMinMax::selectItem()
return;
//kdDebug() << "cstype: " << (int)m_view->cstype << endl;
Ufkt *ufkt = &m_view->parser()->ufkt[m_view->parser()->ixValue(m_view->csmode)];
- QString function = ufkt->fstr;
+ TQString function = ufkt->fstr;
if ( m_view->cstype == 2)
{
int i= function.find('(');
@@ -203,7 +203,7 @@ void KMinMax::selectItem()
function +="\'";
}
//kdDebug() << "function: " << function << endl;
- QListBoxItem *item = list->findItem(function,Qt::ExactMatch);
+ TQListBoxItem *item = list->findItem(function,Qt::ExactMatch);
list->setSelected(item,true);
if ( !ufkt->parameters.isEmpty() )
@@ -256,7 +256,7 @@ void KMinMax::cmdFind_clicked()
}
- QString function( list->currentText() );
+ TQString function( list->currentText() );
char p_mode = 0;
if ( function.contains('\'') == 1)
{
@@ -270,17 +270,17 @@ void KMinMax::cmdFind_clicked()
int pos = function.find('\'');
function.remove(pos,2);
}
- else if ( function.at(0).category() == QChar::Letter_Uppercase)
+ else if ( function.at(0).category() == TQChar::Letter_Uppercase)
{
p_mode = 3;
function.at(0) = function.at(0).lower();
}
- QString fname, fstr;
+ TQString fname, fstr;
Ufkt *ufkt = 0;
- QString sec_function = function.section('(',0,0);
+ TQString sec_function = function.section('(',0,0);
- for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if ( it->fstr.section('(',0,0) == sec_function)
{
@@ -321,12 +321,12 @@ void KMinMax::cmdFind_clicked()
m_view->getYValue(ufkt,p_mode,dmin,dmax,parameter);
if ( !m_view->isCalculationStopped() )
{
- QString tmp;
+ TQString tmp;
tmp.setNum(dmax);
max->setText(tmp);
}
- QToolTip::add(max,i18n("The returned y-value"));
- QWhatsThis::add(max,i18n("Here you see the result of the calculation: the returned y-value you got from the x-value in the textbox above"));
+ TQToolTip::add(max,i18n("The returned y-value"));
+ TQWhatsThis::add(max,i18n("Here you see the result of the calculation: the returned y-value you got from the x-value in the textbox above"));
}
else if ( m_mode == 3)
{
@@ -343,14 +343,14 @@ void KMinMax::cmdFind_clicked()
if ( m_view->isCalculationStopped() )
KMessageBox::error(this,i18n("The operation was cancelled by the user."));
}
-void KMinMax::list_highlighted(QListBoxItem* item)
+void KMinMax::list_highlighted(TQListBoxItem* item)
{
if ( !item)
{
cmdParameter->hide();
return;
}
- QString function( list->currentText() );
+ TQString function( list->currentText() );
char p_mode = 0;
if ( function.contains('\'') == 1)
{
@@ -364,13 +364,13 @@ void KMinMax::list_highlighted(QListBoxItem* item)
int pos = function.find('\'');
function.remove(pos,2);
}
- else if ( function.at(0).category() == QChar::Letter_Uppercase)
+ else if ( function.at(0).category() == TQChar::Letter_Uppercase)
{
p_mode = 3;
function.at(0) = function.at(0).lower();
}
- QString const sec_function = function.section('(',0,0);
- for(QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it!=m_view->parser()->ufkt.end(); ++it)
+ TQString const sec_function = function.section('(',0,0);
+ for(TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it!=m_view->parser()->ufkt.end(); ++it)
{
if ( it->fstr.section('(',0,0) == sec_function)
{
@@ -388,7 +388,7 @@ void KMinMax::list_highlighted(QListBoxItem* item)
}
void KMinMax::cmdParameter_clicked()
{
- QString function( list->currentText() );
+ TQString function( list->currentText() );
char p_mode = 0;
if ( function.contains('\'') == 1)
{
@@ -402,22 +402,22 @@ void KMinMax::cmdParameter_clicked()
int pos = function.find('\'');
function.remove(pos,2);
}
- else if ( function.at(0).category() == QChar::Letter_Uppercase)
+ else if ( function.at(0).category() == TQChar::Letter_Uppercase)
{
p_mode = 3;
function.at(0) = function.at(0).lower();
}
- QString const sec_function = function.section('(',0,0);
- for(QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin() ; it!=m_view->parser()->ufkt.end(); ++it)
+ TQString const sec_function = function.section('(',0,0);
+ for(TQValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin() ; it!=m_view->parser()->ufkt.end(); ++it)
{
if ( it->fstr.section('(',0,0) == sec_function)
{
- QStringList str_parameters;
- for ( QValueList<ParameterValueItem>::Iterator k = it->parameters.begin(); k != it->parameters.end(); ++k )
+ TQStringList str_parameters;
+ for ( TQValueList<ParameterValueItem>::Iterator k = it->parameters.begin(); k != it->parameters.end(); ++k )
str_parameters.append( (*k).expression);
bool ok;
- QStringList result = KInputDialog::getItemList( i18n("Choose Parameter"), i18n("Choose a parameter to use:"), str_parameters, QStringList(parameter),false,&ok,this );
+ TQStringList result = KInputDialog::getItemList( i18n("Choose Parameter"), i18n("Choose a parameter to use:"), str_parameters, TQStringList(parameter),false,&ok,this );
if ( ok)
parameter = result.first();
break;
@@ -425,7 +425,7 @@ void KMinMax::cmdParameter_clicked()
}
}
-void KMinMax::list_doubleClicked(QListBoxItem *)
+void KMinMax::list_doubleClicked(TQListBoxItem *)
{
if ( list->currentItem() == -1)
return;
diff --git a/kmplot/kmplot/kminmax.h b/kmplot/kmplot/kminmax.h
index 3b818758..e564b6f5 100644
--- a/kmplot/kmplot/kminmax.h
+++ b/kmplot/kmplot/kminmax.h
@@ -37,7 +37,7 @@ class KMinMax : public QMinMax
{
Q_OBJECT
public:
- KMinMax(View *, QWidget *parent = 0, const char *name = 0);
+ KMinMax(View *, TQWidget *parent = 0, const char *name = 0);
/// called every time the dialog is opened
void init(char);
/// update the list with functions
@@ -53,14 +53,14 @@ public slots:
/// 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();
/// the button for changing the selected parameter value
- void list_highlighted(QListBoxItem*);
+ void list_highlighted(TQListBoxItem*);
/// call cmdParameter_clicked() if parameter values is enabled for that function
- void list_doubleClicked(QListBoxItem *);
+ void list_doubleClicked(TQListBoxItem *);
private:
View *m_view;
char m_mode; //< 0 = minimum, 1 = maximum, 2 = y-point, 3=drawing area
- QString parameter;
+ TQString parameter;
};
diff --git a/kmplot/kmplot/kmplot.cpp b/kmplot/kmplot/kmplot.cpp
index 3b0e8b3c..e6f71013 100644
--- a/kmplot/kmplot/kmplot.cpp
+++ b/kmplot/kmplot/kmplot.cpp
@@ -82,7 +82,7 @@ KmPlot::KmPlot( KCmdLineArgs* args)
}
if (!initialGeometrySet())
- resize( QSize(450, 520).expandedTo(minimumSizeHint()));
+ resize( TQSize(450, 520).expandedTo(minimumSizeHint()));
// apply the saved mainwindow settings, if any, and ask the mainwindow
// to automatically save settings if changed: window size, toolbar
@@ -135,18 +135,18 @@ bool KmPlot::load(const KURL& url)
void KmPlot::setupActions()
{
- KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
m_fullScreen = KStdAction::fullScreen( NULL, NULL, actionCollection(), this, "fullscreen");
- connect( m_fullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool )));
+ connect( m_fullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool )));
}
void KmPlot::saveProperties(KConfig* /*config*/)
@@ -210,7 +210,7 @@ void KmPlot::optionsConfigureToolbars()
saveMainWindowSettings(KGlobal::config() );
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
@@ -224,7 +224,7 @@ void KmPlot::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- KURL const url = KFileDialog::getOpenURL( QDir::currentDirPath(),
+ KURL const url = KFileDialog::getOpenURL( TQDir::currentDirPath(),
i18n( "*.fkt|KmPlot Files (*.fkt)\n*.*|All Files" ), this, i18n( "Open" ) );
if ( !url.isEmpty())
@@ -263,22 +263,22 @@ void KmPlot::openFileInNewWindow(const KURL url)
bool KmPlot::checkModified()
{
- QCString replyType;
- QByteArray replyData;
- kapp->dcopClient()->call(kapp->dcopClient()->appId(), "MainDlg","checkModified()", QByteArray(), replyType, replyData, false);
+ TQCString replyType;
+ TQByteArray replyData;
+ kapp->dcopClient()->call(kapp->dcopClient()->appId(), "MainDlg","checkModified()", TQByteArray(), replyType, replyData, false);
bool result;
- QDataStream stream(replyData, IO_ReadOnly);
+ TQDataStream stream(replyData, IO_ReadOnly);
stream >> result;
return result;
}
bool KmPlot::isModified()
{
- QCString replyType;
- QByteArray replyData;
- kapp->dcopClient()->call(kapp->dcopClient()->appId(), "MainDlg","isModified()", QByteArray(), replyType, replyData, false);
+ TQCString replyType;
+ TQByteArray replyData;
+ kapp->dcopClient()->call(kapp->dcopClient()->appId(), "MainDlg","isModified()", TQByteArray(), replyType, replyData, false);
bool result;
- QDataStream stream(replyData, IO_ReadOnly);
+ TQDataStream stream(replyData, IO_ReadOnly);
stream >> result;
return result;
}
@@ -288,7 +288,7 @@ bool KmPlot::queryClose()
return checkModified();
}
-void KmPlot::setStatusBarText(const QString &text, int id)
+void KmPlot::setStatusBarText(const TQString &text, int id)
{
statusBar()->changeItem(text,id);
}
@@ -306,13 +306,13 @@ void KmPlot::setupStatusBar()
m_progressbar = new KmPlotProgress( statusBar() );
m_progressbar->setMaximumHeight( statusBar()->height()-10 );
- connect( m_progressbar->button, SIGNAL (clicked() ), this, SLOT( progressbar_clicked() ) );
+ connect( m_progressbar->button, TQT_SIGNAL (clicked() ), this, TQT_SLOT( progressbar_clicked() ) );
statusBar()->addWidget(m_progressbar);
}
void KmPlot::progressbar_clicked()
{
- kapp->dcopClient()->send(kapp->dcopClient()->appId(), "View","stopDrawing()", QByteArray());
+ kapp->dcopClient()->send(kapp->dcopClient()->appId(), "View","stopDrawing()", TQByteArray());
}
#include "kmplot.moc"
diff --git a/kmplot/kmplot/kmplot.h b/kmplot/kmplot/kmplot.h
index b2cf4242..bb861f49 100644
--- a/kmplot/kmplot/kmplot.h
+++ b/kmplot/kmplot/kmplot.h
@@ -96,7 +96,7 @@ private slots:
public slots:
/// Called when fullscren is enabled/disabled
void slotUpdateFullScreen(bool);
- void setStatusBarText(const QString &, int id);
+ void setStatusBarText(const TQString &, int id);
private:
void setupAccel();
diff --git a/kmplot/kmplot/kmplotIface.h b/kmplot/kmplot/kmplotIface.h
index b176b944..b640b5ce 100644
--- a/kmplot/kmplot/kmplotIface.h
+++ b/kmplot/kmplot/kmplotIface.h
@@ -39,7 +39,7 @@ class KmPlotIface : virtual public DCOPObject
K_DCOP
k_dcop:
virtual void fileOpen() = 0;
- virtual void setStatusBarText(const QString &text, int id) = 0;
+ virtual void setStatusBarText(const TQString &text, int id) = 0;
virtual void optionsConfigureKeys() = 0;
virtual void optionsConfigureToolbars() = 0;
virtual void openFileInNewWindow(const KURL url) = 0;
diff --git a/kmplot/kmplot/kmplotio.cpp b/kmplot/kmplot/kmplotio.cpp
index 1af28e25..9a5288a8 100644
--- a/kmplot/kmplot/kmplotio.cpp
+++ b/kmplot/kmplot/kmplotio.cpp
@@ -24,8 +24,8 @@
*/
// Qt includes
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
// KDE includes
#include <kio/netaccess.h>
@@ -54,14 +54,14 @@ KmPlotIO::~KmPlotIO()
bool KmPlotIO::save( const KURL &url )
{
// saving as xml by a QDomDocument
- QDomDocument doc( "kmpdoc" );
+ TQDomDocument doc( "kmpdoc" );
// the root tag
- QDomElement root = doc.createElement( "kmpdoc" );
+ TQDomElement root = doc.createElement( "kmpdoc" );
root.setAttribute( "version", "2" );
doc.appendChild( root );
// the axes tag
- QDomElement tag = doc.createElement( "axes" );
+ TQDomElement tag = doc.createElement( "axes" );
tag.setAttribute( "color", Settings::axesColor().name() );
tag.setAttribute( "width", Settings::axesLineWidth() );
@@ -74,14 +74,14 @@ bool KmPlotIO::save( const KURL &url )
addTag( doc, tag, "show-frame", Settings::showExtraFrame() ? "1" : "-1" );
addTag( doc, tag, "show-extra-frame", Settings::showExtraFrame() ? "1" : "-1" );
- addTag( doc, tag, "xcoord", QString::number( Settings::xRange() ) );
+ addTag( doc, tag, "xcoord", TQString::number( Settings::xRange() ) );
if( Settings::xRange() == 4 ) // custom plot range
{
addTag( doc, tag, "xmin", Settings::xMin() );
addTag( doc, tag, "xmax", Settings::xMax() );
}
- addTag( doc, tag, "ycoord", QString::number( Settings::yRange() ) );
+ addTag( doc, tag, "ycoord", TQString::number( Settings::yRange() ) );
if( Settings::yRange() == 4 ) // custom plot range
{
addTag( doc, tag, "ymin", Settings::yMin() );
@@ -95,13 +95,13 @@ bool KmPlotIO::save( const KURL &url )
tag.setAttribute( "color", Settings::gridColor().name() );
tag.setAttribute( "width", Settings::gridLineWidth() );
- addTag( doc, tag, "mode", QString::number( Settings::gridStyle() ) );
+ addTag( doc, tag, "mode", TQString::number( Settings::gridStyle() ) );
root.appendChild( tag );
tag = doc.createElement( "scale" );
- QString temp;
+ TQString temp;
temp.setNum(Settings::xScaling());
addTag( doc, tag, "tic-x", temp );
temp.setNum(Settings::yScaling());
@@ -114,7 +114,7 @@ bool KmPlotIO::save( const KURL &url )
root.appendChild( tag );
- for( QValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
{
if ( !it->fstr.isEmpty() )
{
@@ -122,28 +122,28 @@ bool KmPlotIO::save( const KURL &url )
//tag.setAttribute( "number", ix );
tag.setAttribute( "visible", it->f_mode );
- tag.setAttribute( "color", QColor( it->color ).name() );
+ tag.setAttribute( "color", TQColor( it->color ).name() );
tag.setAttribute( "width", it->linewidth );
tag.setAttribute( "use-slider", it->use_slider );
if ( it->f1_mode)
{
tag.setAttribute( "visible-deriv", it->f1_mode );
- tag.setAttribute( "deriv-color", QColor( it->f1_color ).name() );
+ tag.setAttribute( "deriv-color", TQColor( it->f1_color ).name() );
tag.setAttribute( "deriv-width", it->f1_linewidth );
}
if ( it->f2_mode)
{
tag.setAttribute( "visible-2nd-deriv", it->f2_mode );
- tag.setAttribute( "deriv2nd-color", QColor( it->f2_color ).name() );
+ tag.setAttribute( "deriv2nd-color", TQColor( it->f2_color ).name() );
tag.setAttribute( "deriv2nd-width", it->f2_linewidth );
}
if ( it->integral_mode)
{
tag.setAttribute( "visible-integral", "1" );
- tag.setAttribute( "integral-color", QColor( it->integral_color ).name() );
+ tag.setAttribute( "integral-color", TQColor( it->integral_color ).name() );
tag.setAttribute( "integral-width", it->integral_linewidth );
tag.setAttribute( "integral-use-precision", it->integral_use_precision );
tag.setAttribute( "integral-precision", it->integral_precision );
@@ -153,8 +153,8 @@ bool KmPlotIO::save( const KURL &url )
addTag( doc, tag, "equation", it->fstr );
- QStringList str_parameters;
- for ( QValueList<ParameterValueItem>::Iterator k = it->parameters.begin(); k != it->parameters.end(); ++k )
+ TQStringList str_parameters;
+ for ( TQValueList<ParameterValueItem>::Iterator k = it->parameters.begin(); k != it->parameters.end(); ++k )
str_parameters.append( (*k).expression);
if( !str_parameters.isEmpty() )
@@ -175,7 +175,7 @@ bool KmPlotIO::save( const KURL &url )
addTag( doc, tag, "header-table-font", Settings::headerTableFont() );
root.appendChild( tag );
- QFile xmlfile;
+ TQFile xmlfile;
if (!url.isLocalFile() )
{
KTempFile tmpfile;
@@ -185,7 +185,7 @@ bool KmPlotIO::save( const KURL &url )
tmpfile.unlink();
return false;
}
- QTextStream ts( &xmlfile );
+ TQTextStream ts( &xmlfile );
doc.save( ts, 4 );
xmlfile.close();
@@ -201,7 +201,7 @@ bool KmPlotIO::save( const KURL &url )
xmlfile.setName(url.prettyURL(0,KURL::StripFileProtocol) );
if (!xmlfile.open( IO_WriteOnly ) )
return false;
- QTextStream ts( &xmlfile );
+ TQTextStream ts( &xmlfile );
doc.save( ts, 4 );
xmlfile.close();
return true;
@@ -210,18 +210,18 @@ bool KmPlotIO::save( const KURL &url )
}
-void KmPlotIO::addTag( QDomDocument &doc, QDomElement &parentTag, const QString tagName, const QString tagValue )
+void KmPlotIO::addTag( TQDomDocument &doc, TQDomElement &parentTag, const TQString tagName, const TQString tagValue )
{
- QDomElement tag = doc.createElement( tagName );
- QDomText value = doc.createTextNode( tagValue );
+ TQDomElement tag = doc.createElement( tagName );
+ TQDomText value = doc.createTextNode( tagValue );
tag.appendChild( value );
parentTag.appendChild( tag );
}
bool KmPlotIO::load( const KURL &url )
{
- QDomDocument doc( "kmpdoc" );
- QFile f;
+ TQDomDocument doc( "kmpdoc" );
+ TQFile f;
if ( !url.isLocalFile() )
{
if( !KIO::NetAccess::exists( url, true, 0 ) )
@@ -229,7 +229,7 @@ bool KmPlotIO::load( const KURL &url )
KMessageBox::error(0,i18n("The file does not exist."));
return false;
}
- QString tmpfile;
+ TQString tmpfile;
if( !KIO::NetAccess::download( url, tmpfile, 0 ) )
{
KMessageBox::error(0,i18n("An error appeared when opening this file"));
@@ -253,12 +253,12 @@ bool KmPlotIO::load( const KURL &url )
}
f.close();
- QDomElement element = doc.documentElement();
- QString version = element.attribute( "version" );
+ TQDomElement element = doc.documentElement();
+ TQString version = element.attribute( "version" );
if ( version.isNull()) //an old kmplot-file
{
MainDlg::oldfileversion = true;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
if ( n.nodeName() == "axes" )
oldParseAxes( n.toElement() );
@@ -273,7 +273,7 @@ bool KmPlotIO::load( const KURL &url )
else if (version == "1" || version == "2")
{
MainDlg::oldfileversion = false;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() )
{
if ( n.nodeName() == "axes" )
parseAxes( n.toElement() );
@@ -293,10 +293,10 @@ bool KmPlotIO::load( const KURL &url )
return true;
}
-void KmPlotIO::parseAxes( const QDomElement &n )
+void KmPlotIO::parseAxes( const TQDomElement &n )
{
Settings::setAxesLineWidth( n.attribute( "width", "1" ).toInt() );
- Settings::setAxesColor( QColor( n.attribute( "color", "#000000" ) ) );
+ Settings::setAxesColor( TQColor( n.attribute( "color", "#000000" ) ) );
Settings::setTicWidth( n.attribute( "tic-width", "3" ).toInt() );
Settings::setTicLength( n.attribute( "tic-length", "10" ).toInt() );
@@ -313,17 +313,17 @@ void KmPlotIO::parseAxes( const QDomElement &n )
Settings::setYMax( n.namedItem( "ymax" ).toElement().text() );
}
-void KmPlotIO::parseGrid( const QDomElement & n )
+void KmPlotIO::parseGrid( const TQDomElement & n )
{
- Settings::setGridColor( QColor( n.attribute( "color", "#c0c0c0" ) ) );
+ Settings::setGridColor( TQColor( n.attribute( "color", "#c0c0c0" ) ) );
Settings::setGridLineWidth( n.attribute( "width", "1" ).toInt() );
Settings::setGridStyle( n.namedItem( "mode" ).toElement().text().toInt() );
}
-int unit2index( const QString unit )
+int unit2index( const TQString unit )
{
- QString units[ 9 ] = { "10", "5", "2", "1", "0.5", "pi/2", "pi/3", "pi/4",i18n("automatic") };
+ TQString units[ 9 ] = { "10", "5", "2", "1", "0.5", "pi/2", "pi/3", "pi/4",i18n("automatic") };
int index = 0;
while( ( index < 9 ) && ( unit!= units[ index ] ) ) index ++;
if( index == 9 ) index = -1;
@@ -331,7 +331,7 @@ int unit2index( const QString unit )
}
-void KmPlotIO::parseScale(const QDomElement & n )
+void KmPlotIO::parseScale(const TQDomElement & n )
{
Settings::setXScaling( n.namedItem( "tic-x" ).toElement().text().toInt() );
Settings::setYScaling( n.namedItem( "tic-y" ).toElement().text().toInt() );
@@ -339,15 +339,15 @@ void KmPlotIO::parseScale(const QDomElement & n )
Settings::setYPrinting( n.namedItem( "print-tic-y" ).toElement().text().toInt() );
}
-void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
+void KmPlotIO::parseFunction( XParser *m_parser, const TQDomElement & n )
{
- QString temp;
+ TQString temp;
Ufkt ufkt;
m_parser->prepareAddingFunction(&ufkt);
int const next_index=m_parser->getNextIndex()+1;
ufkt.f_mode = n.attribute( "visible" ).toInt();
- ufkt.color = QColor( n.attribute( "color" ) ).rgb();
+ ufkt.color = TQColor( n.attribute( "color" ) ).rgb();
ufkt.linewidth = n.attribute( "width" ).toInt();
ufkt.use_slider = n.attribute( "use-slider" ).toInt();
@@ -355,7 +355,7 @@ void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
if (!temp.isNull())
{
ufkt.f1_mode = temp.toInt();
- ufkt.f1_color = QColor(n.attribute( "deriv-color" )).rgb();
+ ufkt.f1_color = TQColor(n.attribute( "deriv-color" )).rgb();
ufkt.f1_linewidth = n.attribute( "deriv-width" ).toInt();
}
else
@@ -369,7 +369,7 @@ void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
if (!temp.isNull())
{
ufkt.f2_mode = temp.toInt();
- ufkt.f2_color = QColor(n.attribute( "deriv2nd-color" )).rgb();
+ ufkt.f2_color = TQColor(n.attribute( "deriv2nd-color" )).rgb();
ufkt.f2_linewidth = n.attribute( "deriv2nd-width" ).toInt();
}
else
@@ -383,7 +383,7 @@ void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
if (!temp.isNull())
{
ufkt.integral_mode = temp.toInt();
- ufkt.integral_color = QColor(n.attribute( "integral-color" )).rgb();
+ ufkt.integral_color = TQColor(n.attribute( "integral-color" )).rgb();
ufkt.integral_linewidth = n.attribute( "integral-width" ).toInt();
ufkt.integral_use_precision = n.attribute( "integral-use-precision" ).toInt();
ufkt.integral_precision = n.attribute( "integral-precision" ).toInt();
@@ -432,11 +432,11 @@ void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
else
parseParameters( m_parser, n, ufkt );
- QString fstr = ufkt.fstr;
+ TQString fstr = ufkt.fstr;
if ( !fstr.isEmpty() )
{
int const i = fstr.find( ';' );
- QString str;
+ TQString str;
if ( i == -1 )
str = fstr;
else
@@ -473,27 +473,27 @@ void KmPlotIO::parseFunction( XParser *m_parser, const QDomElement & n )
}
}
-void KmPlotIO::parseParameters( XParser *m_parser, const QDomElement &n, Ufkt &ufkt )
+void KmPlotIO::parseParameters( XParser *m_parser, const TQDomElement &n, Ufkt &ufkt )
{
- QStringList str_parameters;
- for ( QValueList<ParameterValueItem>::Iterator it = ufkt.parameters.begin(); it != ufkt.parameters.end(); ++it )
+ TQStringList str_parameters;
+ for ( TQValueList<ParameterValueItem>::Iterator it = ufkt.parameters.begin(); it != ufkt.parameters.end(); ++it )
str_parameters.append( (*it).expression);
- str_parameters = QStringList::split( ";", n.namedItem( "parameterlist" ).toElement().text() );
- for( QStringList::Iterator it = str_parameters.begin(); it != str_parameters.end(); ++it )
+ str_parameters = TQStringList::split( ";", n.namedItem( "parameterlist" ).toElement().text() );
+ for( TQStringList::Iterator it = str_parameters.begin(); it != str_parameters.end(); ++it )
ufkt.parameters.append( ParameterValueItem( *it, m_parser->eval( *it ) ));
}
-void KmPlotIO::parseThreeDotThreeParameters( XParser *m_parser, const QDomElement &n, Ufkt &ufkt )
+void KmPlotIO::parseThreeDotThreeParameters( XParser *m_parser, const TQDomElement &n, Ufkt &ufkt )
{
- QStringList str_parameters;
- for ( QValueList<ParameterValueItem>::Iterator it = ufkt.parameters.begin(); it != ufkt.parameters.end(); ++it )
+ TQStringList str_parameters;
+ for ( TQValueList<ParameterValueItem>::Iterator it = ufkt.parameters.begin(); it != ufkt.parameters.end(); ++it )
str_parameters.append( (*it).expression);
- str_parameters = QStringList::split( ",", n.namedItem( "parameterlist" ).toElement().text() );
- for( QStringList::Iterator it = str_parameters.begin(); it != str_parameters.end(); ++it )
+ str_parameters = TQStringList::split( ",", n.namedItem( "parameterlist" ).toElement().text() );
+ for( TQStringList::Iterator it = str_parameters.begin(); it != str_parameters.end(); ++it )
ufkt.parameters.append( ParameterValueItem( *it, m_parser->eval( *it ) ));
}
-void KmPlotIO::oldParseFunction( XParser *m_parser, const QDomElement & n )
+void KmPlotIO::oldParseFunction( XParser *m_parser, const TQDomElement & n )
{
kdDebug() << "parsing old function" << endl;
Ufkt ufkt;
@@ -505,7 +505,7 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const QDomElement & n )
ufkt.f2_mode = 0;
ufkt.linewidth = n.attribute( "width" ).toInt();
ufkt.use_slider = -1;
- ufkt.color = ufkt.f1_color = ufkt.f2_color = ufkt.integral_color = QColor( n.attribute( "color" ) ).rgb();
+ ufkt.color = ufkt.f1_color = ufkt.f2_color = ufkt.integral_color = TQColor( n.attribute( "color" ) ).rgb();
ufkt.str_dmin = n.namedItem( "arg-min" ).toElement().text();
if( ufkt.str_dmin.isEmpty() )
@@ -529,7 +529,7 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const QDomElement & n )
ufkt.usecustomxmax = false;
}
- const QString tmp_fstr = n.namedItem( "equation" ).toElement().text();
+ const TQString tmp_fstr = n.namedItem( "equation" ).toElement().text();
const int pos = tmp_fstr.find(';');
if ( pos == -1 )
ufkt.fstr = tmp_fstr;
@@ -543,11 +543,11 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const QDomElement & n )
}
}
- QString fstr = ufkt.fstr;
+ TQString fstr = ufkt.fstr;
if ( !fstr.isEmpty() )
{
int const i = fstr.find( ';' );
- QString str;
+ TQString str;
if ( i == -1 )
str = fstr;
else
@@ -584,10 +584,10 @@ void KmPlotIO::oldParseFunction( XParser *m_parser, const QDomElement & n )
}
}
-void KmPlotIO::oldParseAxes( const QDomElement &n )
+void KmPlotIO::oldParseAxes( const TQDomElement &n )
{
Settings::setAxesLineWidth( n.attribute( "width", "1" ).toInt() );
- Settings::setAxesColor( QColor( n.attribute( "color", "#000000" ) ) );
+ Settings::setAxesColor( TQColor( n.attribute( "color", "#000000" ) ) );
Settings::setTicWidth( n.attribute( "tic-width", "3" ).toInt() );
Settings::setTicLength( n.attribute( "tic-length", "10" ).toInt() );
@@ -604,7 +604,7 @@ void KmPlotIO::oldParseAxes( const QDomElement &n )
Settings::setYMax( n.namedItem( "ymax" ).toElement().text() );
}
-void KmPlotIO::oldParseScale( const QDomElement & n )
+void KmPlotIO::oldParseScale( const TQDomElement & n )
{
Settings::setXScaling( unit2index( n.namedItem( "tic-x" ).toElement().text() ) );
Settings::setYScaling( unit2index( n.namedItem( "tic-y" ).toElement().text() ) );
diff --git a/kmplot/kmplot/kmplotio.h b/kmplot/kmplot/kmplotio.h
index 837cf4ec..8fac662e 100644
--- a/kmplot/kmplot/kmplotio.h
+++ b/kmplot/kmplot/kmplotio.h
@@ -64,36 +64,36 @@ class KmPlotIO
* @param tagName The Name of the tag.
* @param tagValue The data between the opening and cloding tag.
*/
- void addTag( QDomDocument &doc, QDomElement &parentTag, const QString tagName, const QString tagValue );
+ void addTag( TQDomDocument &doc, TQDomElement &parentTag, const TQString tagName, const TQString tagValue );
/// Reads axes parameters from the node @a n.
/// @param n Node containing the options.
- void parseAxes( const QDomElement &n );
+ void parseAxes( const TQDomElement &n );
/// Reads grid parameters from the node @a n.
/// @param n Node containing the options.
- void parseGrid( const QDomElement &n );
+ void parseGrid( const TQDomElement &n );
/// Reads scale parameters from the node @a n.
/// @param n Node containing the options.
- void parseScale( const QDomElement &n );
+ void parseScale( const TQDomElement &n );
/// Reads function parameters from the node @a n.
/// @param parser points to the parser instance.
/// @param n Node containing the options.
- void parseFunction( XParser *parser, const QDomElement &n );
+ void parseFunction( XParser *parser, const TQDomElement &n );
/// Reads parameter values for a function from the node @a n.
/// @param parser points to the parser instance.
/// @param n Node containing the options.
/// @param ix Function index in the parser instance
- void parseParameters( XParser *parser, const QDomElement &n, Ufkt &ufkt);
+ void parseParameters( XParser *parser, const TQDomElement &n, Ufkt &ufkt);
/// For KDE 3.3
- void parseThreeDotThreeParameters( XParser *parser, const QDomElement &n, Ufkt &ufkt);
+ void parseThreeDotThreeParameters( XParser *parser, const TQDomElement &n, Ufkt &ufkt);
///For KDE <3.3
/// This is the same as parseScale but is made for old Kmplot-files
- void oldParseScale( const QDomElement & n );
+ void oldParseScale( const TQDomElement & n );
/// This is the same as parseFunction but is made for old Kmplot-files
- void oldParseFunction( XParser *parser, const QDomElement &n );
+ void oldParseFunction( XParser *parser, const TQDomElement &n );
/// This is the same as parseAxes but is made for old Kmplot-files
- void oldParseAxes( const QDomElement &n );
+ void oldParseAxes( const TQDomElement &n );
XParser *m_parser;
diff --git a/kmplot/kmplot/kmplotprogress.cpp b/kmplot/kmplot/kmplotprogress.cpp
index 721480e0..c470c8ba 100644
--- a/kmplot/kmplot/kmplotprogress.cpp
+++ b/kmplot/kmplot/kmplotprogress.cpp
@@ -29,15 +29,15 @@
#include "kmplotprogress.h"
//#include "kmplotprogress.moc.cpp"
-KmPlotProgress::KmPlotProgress( QWidget* parent, const char* name ) : QWidget( parent, name)
+KmPlotProgress::KmPlotProgress( TQWidget* parent, const char* name ) : TQWidget( parent, name)
{
button = new KPushButton(this);
button->setPixmap( SmallIcon( "cancel" ) );
- button->setGeometry( QRect( 0, 0, 30, 23 ) );
+ button->setGeometry( TQRect( 0, 0, 30, 23 ) );
button->setMaximumHeight(height()-10);
progress = new KProgress(this);
- progress->setGeometry( QRect( 30, 0, 124, 23 ) );
+ progress->setGeometry( TQRect( 30, 0, 124, 23 ) );
progress->setMaximumHeight(height()-10);
hide();
diff --git a/kmplot/kmplot/kmplotprogress.h b/kmplot/kmplot/kmplotprogress.h
index dc7bb166..c4a039f9 100644
--- a/kmplot/kmplot/kmplotprogress.h
+++ b/kmplot/kmplot/kmplotprogress.h
@@ -27,14 +27,14 @@
#include <kprogress.h>
#include <kpushbutton.h>
-#include <qwidget.h>
+#include <tqwidget.h>
/// The progress-widget in the statusbar which appears when drawing integrals
class KmPlotProgress: public QWidget
{
Q_OBJECT
public:
- KmPlotProgress( QWidget* parent = 0, const char* name = 0 );
+ KmPlotProgress( TQWidget* parent = 0, const char* name = 0 );
~KmPlotProgress();
void increase();
diff --git a/kmplot/kmplot/kparametereditor.cpp b/kmplot/kmplot/kparametereditor.cpp
index 95b4a0c5..325241e9 100644
--- a/kmplot/kmplot/kparametereditor.cpp
+++ b/kmplot/kmplot/kparametereditor.cpp
@@ -34,36 +34,36 @@
#include <kpushbutton.h>
#include <ktempfile.h>
#include <kurl.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
#include "kparametereditor.h"
class ParameterValueList;
-KParameterEditor::KParameterEditor(XParser *m, QValueList<ParameterValueItem> *l, QWidget *parent, const char *name)
+KParameterEditor::KParameterEditor(XParser *m, TQValueList<ParameterValueItem> *l, TQWidget *parent, const char *name)
: QParameterEditor(parent,name, true, Qt::WDestructiveClose), m_parameter(l), m_parser(m)
{
- for ( QValueList<ParameterValueItem>::Iterator it = m_parameter->begin(); it != m_parameter->end(); ++it )
+ for ( TQValueList<ParameterValueItem>::Iterator it = m_parameter->begin(); it != m_parameter->end(); ++it )
list->insertItem( (*it).expression );
list->sort();
- connect( cmdNew, SIGNAL( clicked() ), this, SLOT( cmdNew_clicked() ));
- connect( cmdEdit, SIGNAL( clicked() ), this, SLOT( cmdEdit_clicked() ));
- connect( cmdDelete, SIGNAL( clicked() ), this, SLOT( cmdDelete_clicked() ));
- connect( cmdImport, SIGNAL( clicked() ), this, SLOT( cmdImport_clicked() ));
- connect( cmdExport, SIGNAL( clicked() ), this, SLOT( cmdExport_clicked() ));
- connect( cmdClose, SIGNAL( clicked() ), this, SLOT( close() ));
- connect( list, SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( varlist_doubleClicked( QListBoxItem *) ));
- connect( list, SIGNAL( clicked ( QListBoxItem * ) ), this, SLOT( varlist_clicked(QListBoxItem * ) ));
+ connect( cmdNew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdNew_clicked() ));
+ connect( cmdEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdEdit_clicked() ));
+ connect( cmdDelete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdDelete_clicked() ));
+ connect( cmdImport, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdImport_clicked() ));
+ connect( cmdExport, TQT_SIGNAL( clicked() ), this, TQT_SLOT( cmdExport_clicked() ));
+ connect( cmdClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ));
+ connect( list, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( varlist_doubleClicked( TQListBoxItem *) ));
+ connect( list, TQT_SIGNAL( clicked ( TQListBoxItem * ) ), this, TQT_SLOT( varlist_clicked(TQListBoxItem * ) ));
}
KParameterEditor::~KParameterEditor()
{
m_parameter->clear();
- QString item_text;
+ TQString item_text;
for (int i = 0; (uint)i <= list->count();i++)
{
item_text = list->text(i);
@@ -74,7 +74,7 @@ KParameterEditor::~KParameterEditor()
void KParameterEditor::cmdNew_clicked()
{
- QString result="";
+ TQString result="";
while (1)
{
bool ok;
@@ -100,7 +100,7 @@ void KParameterEditor::cmdNew_clicked()
void KParameterEditor::cmdEdit_clicked()
{
- QString result=list->currentText();
+ TQString result=list->currentText();
while (1)
{
bool ok;
@@ -134,7 +134,7 @@ void KParameterEditor::cmdDelete_clicked()
void KParameterEditor::cmdImport_clicked()
{
- KURL url = KFileDialog::getOpenURL( QString::null,i18n("*.txt|Plain Text File "));
+ KURL url = KFileDialog::getOpenURL( TQString::null,i18n("*.txt|Plain Text File "));
if ( url.isEmpty() )
return;
@@ -145,8 +145,8 @@ void KParameterEditor::cmdImport_clicked()
}
bool verbose = false;
- QFile file;
- QString tmpfile;
+ TQFile file;
+ TQString tmpfile;
if ( !url.isLocalFile() )
{
if ( !KIO::NetAccess::download(url, tmpfile, this) )
@@ -161,8 +161,8 @@ void KParameterEditor::cmdImport_clicked()
if ( file.open(IO_ReadOnly) )
{
- QTextStream stream(&file);
- QString line;
+ TQTextStream stream(&file);
+ TQString line;
for( int i=1; !stream.atEnd();i++ )
{
line = stream.readLine();
@@ -185,7 +185,7 @@ void KParameterEditor::cmdImport_clicked()
KIO::NetAccess::removeTempFile( tmpfile );
return;
}
- else if (KMessageBox::warningYesNo(this,i18n("Would you like to be informed about other lines that cannot be read?"), QString::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::null, i18n("Get Informed"), i18n("Ignore Information") ) == KMessageBox::No)
verbose = true;
}
}
@@ -202,14 +202,14 @@ void KParameterEditor::cmdExport_clicked()
{
if ( !list->count() )
return;
- KURL url = KFileDialog::getSaveURL( QString::null,i18n("*.txt|Plain Text File "));
+ KURL url = KFileDialog::getSaveURL( TQString::null,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 )
{
- QString tmpfile;
- QFile file;
+ TQString tmpfile;
+ TQFile file;
if ( !url.isLocalFile() )
{
KTempFile tmpfile;
@@ -217,8 +217,8 @@ void KParameterEditor::cmdExport_clicked()
if (file.open( IO_WriteOnly ) )
{
- QTextStream stream(&file);
- QListBoxItem *it = list->firstItem();
+ TQTextStream stream(&file);
+ TQListBoxItem *it = list->firstItem();
while ( 1 )
{
stream << it->text();
@@ -246,8 +246,8 @@ void KParameterEditor::cmdExport_clicked()
file.setName(url.prettyURL(0,KURL::StripFileProtocol));
if (file.open( IO_WriteOnly ) )
{
- QTextStream stream(&file);
- QListBoxItem *it = list->firstItem();
+ TQTextStream stream(&file);
+ TQListBoxItem *it = list->firstItem();
while ( 1 )
{
stream << it->text();
@@ -267,7 +267,7 @@ void KParameterEditor::cmdExport_clicked()
}
-void KParameterEditor::varlist_clicked( QListBoxItem * item )
+void KParameterEditor::varlist_clicked( TQListBoxItem * item )
{
if (item)
{
@@ -282,12 +282,12 @@ void KParameterEditor::varlist_clicked( QListBoxItem * item )
}
-void KParameterEditor::varlist_doubleClicked( QListBoxItem * )
+void KParameterEditor::varlist_doubleClicked( TQListBoxItem * )
{
cmdEdit_clicked();
}
-bool KParameterEditor::checkTwoOfIt(const QString & text)
+bool KParameterEditor::checkTwoOfIt(const TQString & text)
{
if ( list->findItem(text,Qt::ExactMatch) == 0)
return false;
diff --git a/kmplot/kmplot/kparametereditor.h b/kmplot/kmplot/kparametereditor.h
index 223ce5b8..7c1d742d 100644
--- a/kmplot/kmplot/kparametereditor.h
+++ b/kmplot/kmplot/kparametereditor.h
@@ -39,7 +39,7 @@ class KParameterEditor : public QParameterEditor
{
Q_OBJECT
public:
- KParameterEditor(XParser *, QValueList<ParameterValueItem> *, QWidget *parent = 0, const char *name = 0);
+ KParameterEditor(XParser *, TQValueList<ParameterValueItem> *, TQWidget *parent = 0, const char *name = 0);
~KParameterEditor();
public slots:
@@ -48,14 +48,14 @@ public slots:
void cmdDelete_clicked();
void cmdImport_clicked();
void cmdExport_clicked();
- void varlist_clicked( QListBoxItem * );
- void varlist_doubleClicked( QListBoxItem * );
+ void varlist_clicked( TQListBoxItem * );
+ void varlist_doubleClicked( TQListBoxItem * );
private:
/// Check so that it doesn't exist two equal values
- bool checkTwoOfIt( const QString & text);
- QValueList<ParameterValueItem> *m_parameter;
+ bool checkTwoOfIt( const TQString & text);
+ TQValueList<ParameterValueItem> *m_parameter;
XParser *m_parser;
};
diff --git a/kmplot/kmplot/kprinterdlg.cpp b/kmplot/kmplot/kprinterdlg.cpp
index f17308e0..aa74a7b5 100644
--- a/kmplot/kmplot/kprinterdlg.cpp
+++ b/kmplot/kmplot/kprinterdlg.cpp
@@ -24,7 +24,7 @@
*/
// Qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
// KDE includes
#include <kdialog.h>
@@ -33,23 +33,23 @@
// local includes
#include "kprinterdlg.h"
-KPrinterDlg::KPrinterDlg( QWidget *parent, const char *name )
+KPrinterDlg::KPrinterDlg( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n( "KmPlot Options" ) );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setMargin( KDialog::marginHint() );
layout->setSpacing( KDialog::spacingHint() );
- printHeaderTable = new QCheckBox( i18n( "Print header table" ), this );
- transparent_background = new QCheckBox( i18n( "Transparent background" ), this );
+ 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 );
}
-void KPrinterDlg::getOptions( QMap<QString, QString>& opts, bool include_def )
+void KPrinterDlg::getOptions( TQMap<TQString, TQString>& opts, bool include_def )
{
if ( include_def || !printHeaderTable->isChecked() )
opts[ "app-kmplot-printtable" ] = ( printHeaderTable->isChecked() ? "1" : "-1" );
@@ -57,13 +57,13 @@ void KPrinterDlg::getOptions( QMap<QString, QString>& opts, bool include_def )
opts[ "app-kmplot-printbackground" ] = ( transparent_background->isChecked() ? "1" : "-1" );
}
-void KPrinterDlg::setOptions( const QMap<QString, QString>& opts )
+void KPrinterDlg::setOptions( const TQMap<TQString, TQString>& opts )
{
printHeaderTable->setChecked( opts[ "app-kmplot-printtable" ] != "-1" );
transparent_background->setChecked( opts[ "app-kmplot-printbackground" ] != "-1" );
}
-bool KPrinterDlg::isValid( const QString& )
+bool KPrinterDlg::isValid( const TQString& )
{
return true;
}
diff --git a/kmplot/kmplot/kprinterdlg.h b/kmplot/kmplot/kprinterdlg.h
index e875ee7a..46113efb 100644
--- a/kmplot/kmplot/kprinterdlg.h
+++ b/kmplot/kmplot/kprinterdlg.h
@@ -29,7 +29,7 @@
#define kprintdlg_included
// Qt includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// KDE includes
#include <kdeprint/kprintdialogpage.h>
@@ -44,17 +44,17 @@ class KPrinterDlg : public KPrintDialogPage
Q_OBJECT
public:
/// Getting the common arguments.
- KPrinterDlg( QWidget *parent = 0, const char *name = 0 );
+ KPrinterDlg( TQWidget *parent = 0, const char *name = 0 );
/// Reimplemented.
- void getOptions( QMap<QString, QString>& opts, bool include_def = false );
+ void getOptions( TQMap<TQString, TQString>& opts, bool include_def = false );
/// Reimplemented.
- void setOptions( const QMap<QString, QString>& opts );
+ void setOptions( const TQMap<TQString, TQString>& opts );
/// Reimplemented.
- bool isValid( const QString& msg );
+ bool isValid( const TQString& msg );
/// The check box for the option.
- QCheckBox *printHeaderTable;
- QCheckBox *transparent_background;
+ TQCheckBox *printHeaderTable;
+ TQCheckBox *transparent_background;
};
#endif //kprinterdlg_included
diff --git a/kmplot/kmplot/ksliderwindow.cpp b/kmplot/kmplot/ksliderwindow.cpp
index 675cb9d9..24c71994 100644
--- a/kmplot/kmplot/ksliderwindow.cpp
+++ b/kmplot/kmplot/ksliderwindow.cpp
@@ -23,10 +23,10 @@
*
*/
// Qt includes
-#include <qcursor.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcursor.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
// KDE includes
#include <kaction.h>
@@ -42,16 +42,16 @@
// local includes
#include "ksliderwindow.h"
-KSliderWindow::KSliderWindow(QWidget* parent, int num ) :
+KSliderWindow::KSliderWindow(TQWidget* parent, int num ) :
SliderWindow( parent, "", false, Qt::WStyle_Tool-Qt::WStyle_Maximize ), m_num(num)
{
setCaption(i18n( "Slider %1" ).arg( num+1 ) );
- QToolTip::add( slider, i18n( "Slider no. %1" ).arg( num+1 ));
- QWhatsThis::add( this, i18n( "Move slider to change the parameter of the function plot connected to this slider." ) );
+ TQToolTip::add( slider, i18n( "Slider no. %1" ).arg( 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
KConfig config( "kmplotrc" );
- config.setGroup( "slider" + QString::number(num) );
+ config.setGroup( "slider" + TQString::number(num) );
slider->setMinValue( config.readNumEntry( "min", 0) );
slider->setMaxValue( config.readNumEntry( "max", 100) );
slider->setValue( config.readNumEntry( "value", 50) );
@@ -61,9 +61,9 @@ KSliderWindow::KSliderWindow(QWidget* parent, int num ) :
installEventFilter(this);
m_popupmenu = new KPopupMenu(this);
- KAction *mnuMinValue = new KAction(i18n("&Change Minimum Value") ,0,this, SLOT( mnuMinValue_clicked() ),0);
+ KAction *mnuMinValue = new KAction(i18n("&Change Minimum Value") ,0,this, TQT_SLOT( mnuMinValue_clicked() ),0);
mnuMinValue->plug(m_popupmenu);
- KAction *mnuMaxValue = new KAction(i18n("&Change Maximum Value") ,0,this, SLOT( mnuMaxValue_clicked() ),0 );
+ KAction *mnuMaxValue = new KAction(i18n("&Change Maximum Value") ,0,this, TQT_SLOT( mnuMaxValue_clicked() ),0 );
mnuMaxValue->plug(m_popupmenu);
}
@@ -71,26 +71,26 @@ KSliderWindow::~KSliderWindow()
{
// save the min and max value + the current value
KConfig config( "kmplotrc" );
- config.setGroup( "slider" + QString::number(m_num) );
+ config.setGroup( "slider" + TQString::number(m_num) );
config.writeEntry( "min", slider->minValue() );
config.writeEntry( "max", slider->maxValue() );
config.writeEntry( "value", slider->value() );
}
-bool KSliderWindow::eventFilter( QObject *obj, QEvent *ev )
+bool KSliderWindow::eventFilter( TQObject *obj, TQEvent *ev )
{
- if (ev->type() == QEvent::MouseButtonPress)
+ if (ev->type() == TQEvent::MouseButtonPress)
{
- QMouseEvent *e = (QMouseEvent *)ev;
+ TQMouseEvent *e = (TQMouseEvent *)ev;
if (e->button() != Qt::RightButton)
return SliderWindow::eventFilter( obj, ev );
- m_popupmenu->exec(QCursor::pos());
+ m_popupmenu->exec(TQCursor::pos());
return true;
}
return SliderWindow::eventFilter( obj, ev );
}
-void KSliderWindow::closeEvent( QCloseEvent * e)
+void KSliderWindow::closeEvent( TQCloseEvent * e)
{
emit windowClosed(m_num);
e->accept();
diff --git a/kmplot/kmplot/ksliderwindow.h b/kmplot/kmplot/ksliderwindow.h
index 115c5010..ff4843c8 100644
--- a/kmplot/kmplot/ksliderwindow.h
+++ b/kmplot/kmplot/ksliderwindow.h
@@ -37,7 +37,7 @@ class KSliderWindow : public SliderWindow
public:
/// @param parent points to the parent widget.
/// @param num number of this instance.
- KSliderWindow(QWidget* parent, int num );
+ KSliderWindow(TQWidget* parent, int num );
virtual ~KSliderWindow();
private slots:
@@ -49,8 +49,8 @@ class KSliderWindow : public SliderWindow
void windowClosed(int);
private:
- bool eventFilter( QObject *obj, QEvent *ev );
- void closeEvent( QCloseEvent * );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
+ void closeEvent( TQCloseEvent * );
KPopupMenu *m_popupmenu;
int m_num;
};
diff --git a/kmplot/kmplot/parser.cpp b/kmplot/kmplot/parser.cpp
index 1f3fa011..ed064b85 100644
--- a/kmplot/kmplot/parser.cpp
+++ b/kmplot/kmplot/parser.cpp
@@ -135,7 +135,7 @@ void Parser::ps_init()
Parser::~Parser()
{
kdDebug() << "Exiting......" << endl;
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
kdDebug() << "Deleting something... :-)" << endl;
delete [](*it).mem;
@@ -150,7 +150,7 @@ void Parser::setAngleMode(int angle)
m_anglemode = M_PI/180;
}
-void Parser::setDecimalSymbol(const QString c)
+void Parser::setDecimalSymbol(const TQString c)
{
m_decimalsymbol = c;
}
@@ -168,7 +168,7 @@ uint Parser::getNewId()
while (1 )
{
found = false;
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if (it->id == i && !it->fname.isEmpty())
{
@@ -182,7 +182,7 @@ uint Parser::getNewId()
}
}
-double Parser::eval(QString str)
+double Parser::eval(TQString str)
{
stack=new double [STACKSIZE];
stkptr=stack;
@@ -197,7 +197,7 @@ double Parser::eval(QString str)
return 0;
}
for (uint i=0;i<str.length();i++ )
- if (str.at(i).category() == QChar::Letter_Uppercase)
+ if (str.at(i).category() == TQChar::Letter_Uppercase)
{
err=14;
delete []stack;
@@ -237,7 +237,7 @@ int Parser::idValue(int const ix)
int Parser::ixValue(uint const id)
{
int ix=0;
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if ( it->id ==id)
return ix;
@@ -248,7 +248,7 @@ int Parser::ixValue(uint const id)
double Parser::fkt(uint const id, double const x)
{
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if ( it->id == id)
return fkt(it,x);
@@ -322,7 +322,7 @@ double Parser::fkt(Ufkt *it, double const x)
{
puf=(uint*)it->mptr;
uint id = *puf++;
- for( QValueVector<Ufkt>::iterator ite = ufkt.begin(); ite != ufkt.end(); ++ite)
+ for( TQValueVector<Ufkt>::iterator ite = ufkt.begin(); ite != ufkt.end(); ++ite)
{
if ( ite->id == id)
{
@@ -341,9 +341,9 @@ double Parser::fkt(Ufkt *it, double const x)
}
}
-int Parser::addfkt(QString str)
+int Parser::addfkt(TQString str)
{
- QString const extstr = str;
+ TQString const extstr = str;
stkptr=stack=0;
err=0;
errpos=1;
@@ -390,7 +390,7 @@ int Parser::addfkt(QString str)
temp.mem=new unsigned char [MEMSIZE];
ufkt.append(temp );
}
- QString const fname = str.left(p1);
+ TQString const fname = str.left(p1);
Ufkt *temp = &ufkt.last();
temp->fstr=extstr;
temp->mptr = 0;
@@ -431,7 +431,7 @@ void Parser::reparse(int ix)
void Parser::reparse(Ufkt *item)
{
kdDebug() << "Reparsing: " << item->fstr << endl;
- QString str = item->fstr.latin1();
+ TQString str = item->fstr.latin1();
err=0;
errpos=1;
@@ -477,21 +477,21 @@ void Parser::reparse(Ufkt *item)
errpos=0;
}
-void Parser::fix_expression(QString &str, int const pos)
+void Parser::fix_expression(TQString &str, int const pos)
{
str.remove(" " );
//insert '*' when it is needed
- QChar ch;
+ TQChar ch;
bool function = false;
for(uint i=pos; i < str.length();i++)
{
ch = str.at(i);
- if ( str.at(i+1)=='(' && ch.category()==QChar::Letter_Lowercase )
+ if ( str.at(i+1)=='(' && ch.category()==TQChar::Letter_Lowercase )
{
- QString str_function(ch);
+ TQString str_function(ch);
int n=i-1;
- while (n>0 && str.at(n).category() == QChar::Letter_Lowercase )
+ while (n>0 && str.at(n).category() == TQChar::Letter_Lowercase )
{
str_function.prepend(str.at(n));
--n;
@@ -499,7 +499,7 @@ void Parser::fix_expression(QString &str, int const pos)
if (str_function == "tanh" || str_function == "tan" || str_function =="sqrt" || str_function =="sqr" || str_function =="sin" || str_function =="sinh" || str_function =="sign" || str_function =="sech" || str_function =="sec" || str_function =="log" || str_function =="ln" || str_function =="exp" || str_function =="coth" || str_function =="cot" || str_function =="cosh" || str_function =="cosech" || str_function =="cosec" || str_function =="cos" || str_function =="artanh" || str_function =="arsinh" || str_function =="arsech" || str_function =="arctan" || str_function =="arcsin" || str_function =="arcsec" || str_function =="arcoth" || str_function =="arcosh" || str_function =="arcosech" || str_function =="arccot" || str_function =="arccosec" || str_function =="arccos" || str_function =="abs" || str_function=="arctanh" || str_function=="arcsinh" || str_function=="arccosh")
function = true;
else
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
for ( int j=i; j>0 && (str.at(j).isLetter() || str.at(j).isNumber() ) ; --j)
{
@@ -511,15 +511,15 @@ void Parser::fix_expression(QString &str, int const pos)
else if (function)
function = false;
- if( (ch.isNumber() || ch.category()==QChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) || (ch.isLetter() && str.at(i-1)==')') )
+ if( (ch.isNumber() || ch.category()==TQChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) || (ch.isLetter() && str.at(i-1)==')') )
str.insert(i,'*');
- else if( (ch.isNumber() || ch == ')' || ch.category()==QChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) || (ch.isLetter() && str.at(i+1)=='(' && !function ) )
+ else if( (ch.isNumber() || ch == ')' || ch.category()==TQChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) || (ch.isLetter() && str.at(i+1)=='(' && !function ) )
{
str.insert(i+1,'*');
i++;
}
}
- QString str_end = str.mid(pos);
+ TQString str_end = str.mid(pos);
str_end = str_end.replace(m_decimalsymbol, "."); //replace the locale decimal symbol with a '.'
str.truncate(pos);
str.append(str_end);
@@ -534,11 +534,11 @@ bool Parser::delfkt( Ufkt *item)
KMessageBox::error(0,i18n("This function is depending on an other function"));
return false;
}
- for(QValueVector<Ufkt>::iterator it1=ufkt.begin(); it1!=ufkt.end(); ++it1)
+ for(TQValueVector<Ufkt>::iterator it1=ufkt.begin(); it1!=ufkt.end(); ++it1)
{
if (it1==item)
continue;
- for(QValueList<int>::iterator it2=it1->dep.begin(); it2!=it1->dep.end(); ++it2)
+ for(TQValueList<int>::iterator it2=it1->dep.begin(); it2!=it1->dep.end(); ++it2)
if ( (uint)*it2 == item->id )
it2 = it1->dep.erase(it2);
}
@@ -551,7 +551,7 @@ bool Parser::delfkt( Ufkt *item)
else
{
//kdDebug() << "Deleting something" << endl;
- QChar const extstr_c = item->fstr.at(0);
+ TQChar const extstr_c = item->fstr.at(0);
uint const id = item->id;
delete []item->mem;
ufkt.erase(item);
@@ -710,9 +710,9 @@ void Parser::primary()
return;
}
}
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
- if(QString(lptr)=="pi" || QString(lptr)=="e") continue;
+ if(TQString(lptr)=="pi" || TQString(lptr)=="e") continue;
if( match(it->fname.latin1()) )
{
@@ -931,7 +931,7 @@ void Parser::addfptr(uint id)
}
else
{
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
if ( it->id == id)
{
*stkptr=fkt(it, *stkptr);
@@ -941,9 +941,9 @@ void Parser::addfptr(uint id)
}
-int Parser::fnameToId(const QString &name)
+int Parser::fnameToId(const TQString &name)
{
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if(name==it->fname)
return it->id;
@@ -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(QString::number(errpos)), "KmPlot");
+ "Syntax error").arg(TQString::number(errpos)), "KmPlot");
break;
case 2: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Missing parenthesis").arg(QString::number(errpos)), "KmPlot");
+ "Missing parenthesis").arg(TQString::number(errpos)), "KmPlot");
break;
case 3: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Function name unknown").arg(QString::number(errpos)), "KmPlot");
+ "Function name unknown").arg(TQString::number(errpos)), "KmPlot");
break;
case 4: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Void function variable").arg(QString::number(errpos)), "KmPlot");
+ "Void function variable").arg(TQString::number(errpos)), "KmPlot");
break;
case 5: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Too many functions").arg(QString::number(errpos)), "KmPlot");
+ "Too many functions").arg(TQString::number(errpos)), "KmPlot");
break;
case 6: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Token-memory overflow").arg(QString::number(errpos)), "KmPlot");
+ "Token-memory overflow").arg(TQString::number(errpos)), "KmPlot");
break;
case 7: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Stack overflow").arg(QString::number(errpos)), "KmPlot");
+ "Stack overflow").arg(TQString::number(errpos)), "KmPlot");
break;
case 8: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "Name of function not free.").arg(QString::number(errpos)), "KmPlot");
+ "Name of function not free.").arg(TQString::number(errpos)), "KmPlot");
break;
case 9: KMessageBox::error(0, i18n("Parser error at position %1:\n"
- "recursive function not allowed.").arg(QString::number(errpos)), "KmPlot");
+ "recursive function not allowed.").arg(TQString::number(errpos)), "KmPlot");
break;
- case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1." ).arg(QString::number(errpos)),
+ case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1." ).arg(TQString::number(errpos)),
"KmPlot");
break;
case 11: KMessageBox::error(0, i18n("Empty function"), "KmPlot");
@@ -1003,9 +1003,9 @@ int Parser::parserError(bool showMessageBox)
// static
-QString Parser::number( double value )
+TQString Parser::number( double value )
{
- QString str = QString::number( value, 'g', 6 );
+ TQString str = TQString::number( value, 'g', 6 );
str.replace( 'e', "*10^" );
// kDebug() << "returning str="<<str<<endl;
return str;
diff --git a/kmplot/kmplot/parser.h b/kmplot/kmplot/parser.h
index 82111080..13098039 100644
--- a/kmplot/kmplot/parser.h
+++ b/kmplot/kmplot/parser.h
@@ -27,8 +27,8 @@
* \brief Contains the parser core class Parser. */
// Qt includes
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include "parseriface.h"
@@ -99,13 +99,13 @@ double arctan(double x);
class ParameterValueItem
{
public:
- ParameterValueItem(const QString &e, double v)
+ ParameterValueItem(const TQString &e, double v)
{
expression = e;
value = v;
}
ParameterValueItem() {;}
- QString expression;
+ TQString expression;
double value;
};
@@ -122,13 +122,13 @@ class Ufkt
uint id;
unsigned char *mem; ///< Pointer to the allocated memory for the tokens.
unsigned char *mptr; ///< Pointer to the token.
- QString fname; ///< Name of the function.
- QString fvar; ///< Dummy variable.
- QString fpar; ///< Parameter.
- QString fstr; ///< Function expression.
+ TQString fname; ///< Name of the function.
+ TQString fvar; ///< Dummy variable.
+ TQString fpar; ///< Parameter.
+ TQString fstr; ///< Function expression.
double k, ///< Function parameter.
oldy; ///< The last y-value needed for Euler's method
- QValueList<int> dep; /// A list with all functions this function depends on
+ TQValueList<int> dep; /// A list with all functions this function depends on
bool f_mode, ///< \a f_mode == 1: draw the plot.
f1_mode, ///< \a f1_mode == 1. draw the 1st derivative, too.
@@ -138,7 +138,7 @@ class Ufkt
int linewidth,f1_linewidth,f2_linewidth, integral_linewidth; ///< Line width.
/** Number of parameter values.
* @see FktExt::k_liste */
- QString str_dmin, str_dmax, str_startx, str_starty ; /// Plot range, input strings.
+ TQString str_dmin, str_dmax, str_startx, str_starty ; /// Plot range, input strings.
double dmin, ///< Custom plot range, lower boundage.
dmax, ///< Custom plot range, upper boundage.
/** List of parameter values.
@@ -151,7 +151,7 @@ class Ufkt
QRgb color, ///< current color.
f1_color, f2_color, integral_color;
int use_slider; ///< -1: none (use list), else: slider number
- QValueList<ParameterValueItem> parameters; ///< List with parameter for the function
+ TQValueList<ParameterValueItem> parameters; ///< List with parameter for the function
bool usecustomxmin, usecustomxmax;
// TODO double slider_min, slider_max; ///< extreme values of the slider
};
@@ -182,24 +182,24 @@ public:
/**
* @return A string that is safe to use as a number in a string to be
* parsed. This is needed as e.g. "1.2e-3" is not allowed (e is a
- * constant) - so cannot use the QString::number.
+ * constant) - so cannot use the TQString::number.
*/
- static QString number( double value );
+ static TQString number( double value );
/// Returns the result of a calculation
double fkt(Ufkt *it, double const x);
double fkt(uint id, double const x);
/// Evaluates the given expression.
- double eval(QString);
+ double eval(TQString);
/// Adds a user defined function with the given equation. The new function's ID-number is returned.
- int addfkt(QString);
+ int addfkt(TQString);
/// Removes the function with the given id.
bool delfkt(uint id);
bool delfkt( Ufkt *item);
/// Returns the ID-number of the function "name". If the function couldn't be found, -1 is returned.
- int fnameToId(const QString &name);
+ int fnameToId(const TQString &name);
/// Returns the current error value. If showMessageBox is true, an error message box will appear if an error was found
int parserError(bool showMessageBox=TRUE);
@@ -208,7 +208,7 @@ public:
/// Sets the angletype. TRUE is radians and FALSE degrees
void setAngleMode(int);
/// sets the decimal symbol
- void setDecimalSymbol(const QString );
+ void setDecimalSymbol(const TQString );
/// reparse the function. It also do a grammer check for the expression
void reparse(int ix);
@@ -219,8 +219,8 @@ public:
int ixValue(uint const id);/// Converts an ID-numer to an index-value
uint countFunctions(); /// Returns how many functions there are
- QValueVector<Constant> constant;
- QValueVector<Ufkt> ufkt;///< Points to the array of user defined functions.
+ TQValueVector<Constant> constant;
+ TQValueVector<Ufkt> ufkt;///< Points to the array of user defined functions.
private:
/** Mathematical function. */
@@ -254,7 +254,7 @@ private:
/// Position where the error occurred.
int errpos;
- void fix_expression(QString &, int const); ///adding extra *-characters, remove spaces and replace the locale .-character with '.'
+ void fix_expression(TQString &, int const); ///adding extra *-characters, remove spaces and replace the locale .-character with '.'
void ps_init(),
heir1(),
@@ -279,7 +279,7 @@ private:
double *stack, // Zeiger auf Stackanfang
*stkptr; // Stackpointer
static double m_anglemode;
- QString m_decimalsymbol;
+ TQString m_decimalsymbol;
};
#endif // parser_included
diff --git a/kmplot/kmplot/parseriface.h b/kmplot/kmplot/parseriface.h
index 07020ebb..eb20625f 100644
--- a/kmplot/kmplot/parseriface.h
+++ b/kmplot/kmplot/parseriface.h
@@ -27,8 +27,8 @@
#define XPARSERIFACE_H
#include <dcopobject.h>
-#include <qcolor.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
/**
@author Fredrik Edemar
@@ -38,14 +38,14 @@ class ParserIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual bool addFunction(const QString &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 QString &str_dmin, const QString &str_dmax, const QString &str_startx, const QString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, QStringList 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, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider) = 0;
- virtual int addFunction(const QString &f_str) = 0;
+ virtual int addFunction(const TQString &f_str) = 0;
virtual bool delfkt(uint id) = 0;
- virtual bool setFunctionExpression(const QString &f_str, uint id) = 0;
+ virtual bool setFunctionExpression(const TQString &f_str, uint id) = 0;
virtual uint countFunctions() = 0;
- virtual QStringList listFunctionNames() = 0;
- virtual int fnameToId(const QString &name) = 0;
+ virtual TQStringList listFunctionNames() = 0;
+ virtual int fnameToId(const TQString &name) = 0;
virtual double fkt(uint id, double x) = 0;
virtual bool functionFVisible(uint id) = 0;
virtual bool functionF1Visible(uint id) = 0;
@@ -55,15 +55,15 @@ k_dcop:
virtual bool setFunctionF1Visible(bool visible, uint id) = 0;
virtual bool setFunctionF2Visible(bool visible, uint id) = 0;
virtual bool setFunctionIntVisible(bool visible, uint id) = 0;
- virtual QString functionStr(uint id) = 0;
- virtual QColor functionFColor(uint id) = 0;
- virtual QColor functionF1Color(uint id) = 0;
- virtual QColor functionF2Color(uint id) = 0;
- virtual QColor functionIntColor(uint id) = 0;
- virtual bool setFunctionFColor(const QColor &color, uint id) = 0;
- virtual bool setFunctionF1Color(const QColor &color, uint id) = 0;
- virtual bool setFunctionF2Color(const QColor &color, uint id) = 0;
- virtual bool setFunctionIntColor(const QColor &color, uint id) = 0;
+ virtual TQString functionStr(uint id) = 0;
+ virtual TQColor functionFColor(uint id) = 0;
+ virtual TQColor functionF1Color(uint id) = 0;
+ virtual TQColor functionF2Color(uint id) = 0;
+ virtual TQColor functionIntColor(uint id) = 0;
+ virtual bool setFunctionFColor(const TQColor &color, uint id) = 0;
+ virtual bool setFunctionF1Color(const TQColor &color, uint id) = 0;
+ virtual bool setFunctionF2Color(const TQColor &color, uint id) = 0;
+ virtual bool setFunctionIntColor(const TQColor &color, uint id) = 0;
virtual int functionFLineWidth(uint id) = 0;
virtual int functionF1LineWidth(uint id) = 0;
virtual int functionF2LineWidth(uint id) = 0;
@@ -72,17 +72,17 @@ k_dcop:
virtual bool setFunctionF1LineWidth(int linewidth, uint id) = 0;
virtual bool setFunctionF2LineWidth(int linewidth, uint id) = 0;
virtual bool setFunctionIntLineWidth(int linewidth, uint id) = 0;
- virtual QStringList functionParameterList(uint id) = 0;
- virtual bool functionAddParameter(const QString &new_parameter, uint id) = 0;
- virtual bool functionRemoveParameter(const QString &remove_parameter, uint id) = 0;
- virtual QString functionMinValue(uint id) = 0;
- virtual QString functionMaxValue(uint id) = 0;
- virtual bool setFunctionMinValue(const QString &min, uint id) = 0;
- virtual bool setFunctionMaxValue(const QString &max, uint id) = 0;
- virtual QString functionStartXValue(uint id) = 0;
- virtual QString functionStartYValue(uint id) = 0;
- virtual bool setFunctionStartXValue(const QString &x, uint id) = 0;
- virtual bool setFunctionStartYValue(const QString &y, uint id) = 0;
+ virtual TQStringList functionParameterList(uint id) = 0;
+ virtual bool functionAddParameter(const TQString &new_parameter, uint id) = 0;
+ virtual bool functionRemoveParameter(const TQString &remove_parameter, uint id) = 0;
+ virtual TQString functionMinValue(uint id) = 0;
+ virtual TQString functionMaxValue(uint id) = 0;
+ virtual bool setFunctionMinValue(const TQString &min, uint id) = 0;
+ virtual bool setFunctionMaxValue(const TQString &max, uint id) = 0;
+ virtual TQString functionStartXValue(uint id) = 0;
+ virtual TQString functionStartYValue(uint id) = 0;
+ virtual bool setFunctionStartXValue(const TQString &x, uint id) = 0;
+ virtual bool setFunctionStartYValue(const TQString &y, uint id) = 0;
};
diff --git a/kmplot/kmplot/qconstanteditor.ui.h b/kmplot/kmplot/qconstanteditor.ui.h
index 3c174b76..00fd2554 100644
--- a/kmplot/kmplot/qconstanteditor.ui.h
+++ b/kmplot/kmplot/qconstanteditor.ui.h
@@ -23,7 +23,7 @@ void QConstantEditor::cmdDelete_clicked()
}
-void QConstantEditor::varlist_clicked( QListViewItem * )
+void QConstantEditor::varlist_clicked( TQListViewItem * )
{
}
@@ -38,7 +38,7 @@ void QConstantEditor::newNewConstantSlot()
}
-void QConstantEditor::varlist_doubleClicked( QListViewItem * )
+void QConstantEditor::varlist_doubleClicked( TQListViewItem * )
{
}
diff --git a/kmplot/kmplot/xparser.cpp b/kmplot/kmplot/xparser.cpp
index cc618e13..18d9a3b3 100644
--- a/kmplot/kmplot/xparser.cpp
+++ b/kmplot/kmplot/xparser.cpp
@@ -44,11 +44,11 @@ XParser::~XParser()
{
}
-bool XParser::getext( Ufkt *item, const QString fstr )
+bool XParser::getext( Ufkt *item, const TQString fstr )
{
bool errflg = false;
int p1, p2, p3, pe;
- QString tstr;
+ TQString tstr;
pe = fstr.length();
if ( fstr.find( 'N' ) != -1 )
item->f_mode = false;
@@ -71,7 +71,7 @@ bool XParser::getext( Ufkt *item, const QString fstr )
if ( p1 != -1 )
{
p1 += 2;
- const QString str = fstr.mid( p1, pe - p1);
+ const TQString str = fstr.mid( p1, pe - p1);
p2 = str.find(',');
p3 = str.find(']');
if ( p2 > 0 && p2 < p3 )
@@ -95,7 +95,7 @@ bool XParser::getext( Ufkt *item, const QString fstr )
{
int i = 0;
p1 += 2;
- QString str = fstr.mid( p1, 1000);
+ TQString str = fstr.mid( p1, 1000);
p3 = str.find( ']' );
do
{
@@ -134,7 +134,7 @@ double XParser::a2fkt( Ufkt *u_item, double x, double h )
return ( fkt( u_item, x + h + h ) - 2 * fkt( u_item, x + h ) + fkt( u_item, x ) ) / h / h;
}
-void XParser::findFunctionName(QString &function_name, int const id, int const type)
+void XParser::findFunctionName(TQString &function_name, int const id, int const type)
{
char last_character;
int pos;
@@ -149,7 +149,7 @@ void XParser::findFunctionName(QString &function_name, int const id, int const t
{
if ( pos==0 && last_character == 'r') continue;
function_name.at(pos)=last_character;
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
if (it == ufkt.begin() && it->fname.isEmpty() ) continue;
if ( it->fstr.startsWith(function_name+'(') && (int)it->id!=id) //check if the name is free
@@ -168,13 +168,13 @@ void XParser::findFunctionName(QString &function_name, int const id, int const t
function_name = "e"; //this should never happen
}
-void XParser::fixFunctionName( QString &str, int const type, int const id)
+void XParser::fixFunctionName( TQString &str, int const type, int const id)
{
if ( str.startsWith( "y=" ) ) //we find a free function name
{
str.remove( 0, 2 );
str.prepend("(x)=");
- QString function_name;
+ TQString function_name;
findFunctionName(function_name, id, type);
str.prepend( function_name );
}
@@ -195,13 +195,13 @@ void XParser::fixFunctionName( QString &str, int const type, int const id)
p1++;
p2++;
}
- QString const fname = str.left(p1);
- for ( QValueVector<Ufkt>::iterator it = ufkt.begin(); it!=ufkt.end(); ++it )
+ TQString const fname = str.left(p1);
+ for ( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it!=ufkt.end(); ++it )
{
if (it->fname == fname)
{
str = str.mid(p1,str.length()-1);
- QString function_name;
+ TQString function_name;
if ( type == XParser::Polar )
function_name = "rf";
else if ( type == XParser::ParametricX )
@@ -218,7 +218,7 @@ void XParser::fixFunctionName( QString &str, int const type, int const id)
}
else if ( p1==-1 || !str.at(p1+1).isLetter() || p2==-1 || str.at(p2+1 )!= '=')
{
- QString function_name;
+ TQString function_name;
if ( type == XParser::Polar )
function_name = "rf";
else if ( type == XParser::ParametricX )
@@ -233,7 +233,7 @@ void XParser::fixFunctionName( QString &str, int const type, int const id)
}
}
-double XParser::euler_method(const double x, const QValueVector<Ufkt>::iterator it)
+double XParser::euler_method(const double x, const TQValueVector<Ufkt>::iterator it)
{
double const y = it->oldy + ((x-it->oldx) * it->oldyprim);
it->oldy = y;
@@ -303,10 +303,10 @@ int XParser::getNextIndex()
return getNewId();
}
-QStringList XParser::listFunctionNames()
+TQStringList XParser::listFunctionNames()
{
- QStringList list;
- for( QValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
+ TQStringList list;
+ for( TQValueVector<Ufkt>::iterator it = ufkt.begin(); it != ufkt.end(); ++it)
{
list.append(it->fname);
}
@@ -379,7 +379,7 @@ bool XParser::setFunctionIntVisible(bool visible, uint id)
return true;
}
-QString XParser::functionStr(uint id)
+TQString XParser::functionStr(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -387,35 +387,35 @@ QString XParser::functionStr(uint id)
return ufkt[ix].fstr;
}
-QColor XParser::functionFColor(uint id)
+TQColor XParser::functionFColor(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
- return QColor();
- return QColor(ufkt[ix].color);
+ return TQColor();
+ return TQColor(ufkt[ix].color);
}
-QColor XParser::functionF1Color(uint id)
+TQColor XParser::functionF1Color(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
- return QColor();
- return QColor(ufkt[ix].f1_color);
+ return TQColor();
+ return TQColor(ufkt[ix].f1_color);
}
-QColor XParser::functionF2Color(uint id)
+TQColor XParser::functionF2Color(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
- return QColor();
- return QColor(ufkt[ix].f2_color);
+ return TQColor();
+ return TQColor(ufkt[ix].f2_color);
}
-QColor XParser::functionIntColor(uint id)
+TQColor XParser::functionIntColor(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
- return QColor();
- return QColor(ufkt[ix].integral_color);
+ return TQColor();
+ return TQColor(ufkt[ix].integral_color);
}
-bool XParser::setFunctionFColor(const QColor &color, uint id)
+bool XParser::setFunctionFColor(const TQColor &color, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -424,7 +424,7 @@ bool XParser::setFunctionFColor(const QColor &color, uint id)
m_modified = true;
return true;
}
-bool XParser::setFunctionF1Color(const QColor &color, uint id)
+bool XParser::setFunctionF1Color(const TQColor &color, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -433,7 +433,7 @@ bool XParser::setFunctionF1Color(const QColor &color, uint id)
m_modified = true;
return true;
}
-bool XParser::setFunctionF2Color(const QColor &color, uint id)
+bool XParser::setFunctionF2Color(const TQColor &color, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -442,7 +442,7 @@ bool XParser::setFunctionF2Color(const QColor &color, uint id)
m_modified = true;
return true;
}
-bool XParser::setFunctionIntColor(const QColor &color, uint id)
+bool XParser::setFunctionIntColor(const TQColor &color, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -517,7 +517,7 @@ bool XParser::setFunctionIntLineWidth(int linewidth, uint id)
return true;
}
-QString XParser::functionMinValue(uint id)
+TQString XParser::functionMinValue(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -525,7 +525,7 @@ QString XParser::functionMinValue(uint id)
return ufkt[ix].str_dmin;
}
-bool XParser::setFunctionMinValue(const QString &min, uint id)
+bool XParser::setFunctionMinValue(const TQString &min, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -535,7 +535,7 @@ bool XParser::setFunctionMinValue(const QString &min, uint id)
return true;
}
-QString XParser::functionMaxValue(uint id)
+TQString XParser::functionMaxValue(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -543,7 +543,7 @@ QString XParser::functionMaxValue(uint id)
return ufkt[ix].str_dmax;
}
-bool XParser::setFunctionMaxValue(const QString &max, uint id)
+bool XParser::setFunctionMaxValue(const TQString &max, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -553,7 +553,7 @@ bool XParser::setFunctionMaxValue(const QString &max, uint id)
return true;
}
-QString XParser::functionStartXValue(uint id)
+TQString XParser::functionStartXValue(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -561,7 +561,7 @@ QString XParser::functionStartXValue(uint id)
return ufkt[ix].str_startx;
}
-bool XParser::setFunctionStartXValue(const QString &x, uint id)
+bool XParser::setFunctionStartXValue(const TQString &x, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -571,7 +571,7 @@ bool XParser::setFunctionStartXValue(const QString &x, uint id)
return true;
}
-QString XParser::functionStartYValue(uint id)
+TQString XParser::functionStartYValue(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -579,7 +579,7 @@ QString XParser::functionStartYValue(uint id)
return ufkt[ix].str_starty;
}
-bool XParser::setFunctionStartYValue(const QString &y, uint id)
+bool XParser::setFunctionStartYValue(const TQString &y, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -589,24 +589,24 @@ bool XParser::setFunctionStartYValue(const QString &y, uint id)
return true;
}
-QStringList XParser::functionParameterList(uint id)
+TQStringList XParser::functionParameterList(uint id)
{
int const ix = ixValue(id);
if (ix==-1)
- return QStringList();
+ return TQStringList();
Ufkt *item = &ufkt[ix];
- QStringList str_parameter;
- for ( QValueList<ParameterValueItem>::iterator it = item->parameters.begin(); it != item->parameters.end(); ++it)
+ TQStringList str_parameter;
+ for ( TQValueList<ParameterValueItem>::iterator it = item->parameters.begin(); it != item->parameters.end(); ++it)
str_parameter.append( (*it).expression);
return str_parameter;
}
-bool XParser::functionAddParameter(const QString &new_parameter, uint id)
+bool XParser::functionAddParameter(const TQString &new_parameter, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
return false;
Ufkt *tmp_ufkt = &ufkt[ix];
- for ( QValueList<ParameterValueItem>::iterator it = tmp_ufkt->parameters.begin(); it != tmp_ufkt->parameters.end(); ++it)
+ for ( TQValueList<ParameterValueItem>::iterator it = tmp_ufkt->parameters.begin(); it != tmp_ufkt->parameters.end(); ++it)
if ( (*it).expression == new_parameter) //check if the parameter already exists
return false;
@@ -617,7 +617,7 @@ bool XParser::functionAddParameter(const QString &new_parameter, uint id)
m_modified = true;
return true;
}
-bool XParser::functionRemoveParameter(const QString &remove_parameter, uint id)
+bool XParser::functionRemoveParameter(const TQString &remove_parameter, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
@@ -625,7 +625,7 @@ bool XParser::functionRemoveParameter(const QString &remove_parameter, uint id)
Ufkt *tmp_ufkt = &ufkt[ix];
bool found = false;
- QValueList<ParameterValueItem>::iterator it;
+ TQValueList<ParameterValueItem>::iterator it;
for ( it = tmp_ufkt->parameters.begin(); it != tmp_ufkt->parameters.end(); ++it)
if ( (*it).expression == remove_parameter) //check if the parameter already exists
{
@@ -638,9 +638,9 @@ bool XParser::functionRemoveParameter(const QString &remove_parameter, uint id)
m_modified = true;
return true;
}
-int XParser::addFunction(const QString &f_str)
+int XParser::addFunction(const TQString &f_str)
{
- QString added_function(f_str);
+ TQString added_function(f_str);
int const pos = added_function.find(';');
if (pos!=-1)
added_function = added_function.left(pos);
@@ -664,9 +664,9 @@ int XParser::addFunction(const QString &f_str)
return id;
}
-bool XParser::addFunction(const QString &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 QString &str_dmin, const QString &str_dmax, const QString &str_startx, const QString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, QStringList 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, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, TQStringList str_parameter, int use_slider)
{
- QString fstr(fstr_const);
+ TQString fstr(fstr_const);
switch ( fstr.at(0).latin1() )
{
case 'r':
@@ -727,7 +727,7 @@ bool XParser::addFunction(const QString &fstr_const, bool f_mode, bool f1_mode,
added_function->f2_color = f2_color;
added_function->integral_color = integral_color;
added_function->use_slider = use_slider;
- for( QStringList::Iterator it = str_parameter.begin(); it != str_parameter.end(); ++it )
+ for( TQStringList::Iterator it = str_parameter.begin(); it != str_parameter.end(); ++it )
{
double result = eval(*it);
if ( parserError(false) != 0)
@@ -738,14 +738,14 @@ bool XParser::addFunction(const QString &fstr_const, bool f_mode, bool f1_mode,
return true;
}
-bool XParser::setFunctionExpression(const QString &f_str, uint id)
+bool XParser::setFunctionExpression(const TQString &f_str, uint id)
{
int const ix = ixValue(id);
if (ix==-1)
return false;
Ufkt *tmp_ufkt = &ufkt[ix];
- QString const old_fstr = tmp_ufkt->fstr;
- QString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.find('=')+1);
+ TQString const old_fstr = tmp_ufkt->fstr;
+ TQString const fstr_begin = tmp_ufkt->fstr.left(tmp_ufkt->fstr.find('=')+1);
tmp_ufkt->fstr = fstr_begin+f_str;
reparse(tmp_ufkt);
if ( parserError(false) != 0)
@@ -757,12 +757,12 @@ bool XParser::setFunctionExpression(const QString &f_str, uint id)
return true;
}
-bool XParser::sendFunction(int id, const QString &dcopclient_target)
+bool XParser::sendFunction(int id, const TQString &dcopclient_target)
{
QCStringList cstr_list = kapp->dcopClient()->registeredApplications();
- QStringList str_list;
+ TQStringList str_list;
for ( QCStringList::iterator it = cstr_list.begin(); it!=cstr_list.end();++it )
- if ( QString(*it).startsWith("kmplot") && *it!=kapp->dcopClient()->appId() )
+ if ( TQString(*it).startsWith("kmplot") && *it!=kapp->dcopClient()->appId() )
str_list.append(*it);
if ( str_list.isEmpty() )
{
@@ -772,7 +772,7 @@ bool XParser::sendFunction(int id, const QString &dcopclient_target)
Ufkt *item = &ufkt[ixValue(id)];
kdDebug() << "Transferring " << item->fname.latin1() << endl;
- QString str_result;
+ TQString str_result;
if ( dcopclient_target.isEmpty() && item->fname.at(0) == 'y' )
return false;
else if ( dcopclient_target.isEmpty() )
@@ -785,30 +785,30 @@ bool XParser::sendFunction(int id, const QString &dcopclient_target)
else
str_result = dcopclient_target;
- QByteArray parameters;
- QDataStream arg( parameters, IO_WriteOnly);
+ TQByteArray parameters;
+ TQDataStream arg( parameters, IO_WriteOnly);
- QString str_dmin;
+ TQString str_dmin;
if (!item->usecustomxmin)
str_dmin = item->str_dmin;
- QString str_dmax;
+ TQString str_dmax;
if (!item->usecustomxmax)
str_dmax = item->str_dmax;
- QStringList str_parameters;
- for ( QValueList<ParameterValueItem>::Iterator it = item->parameters.begin(); it != item->parameters.end(); ++it )
+ TQStringList str_parameters;
+ for ( TQValueList<ParameterValueItem>::Iterator it = item->parameters.begin(); it != item->parameters.end(); ++it )
str_parameters.append( (*it).expression);
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;
- QByteArray replay_data;
- QCString replay_type;
- bool ok = kapp->dcopClient()->call( str_result.utf8(), "Parser", "addFunction(QString,bool,bool,bool,bool,bool,int,int,int,int,QString,QString,QString,QString,double,QRgb,QRgb,QRgb,QRgb,QStringList,int)", parameters, replay_type, replay_data, false);
+ 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);
if (!ok)
{
KMessageBox::error(0, i18n("An error appeared during the transfer"));
return false;
}
- QDataStream replay_arg(replay_data, IO_ReadOnly);
+ TQDataStream replay_arg(replay_data, IO_ReadOnly);
bool result;
replay_arg >> result;
if (!result)
@@ -817,7 +817,7 @@ bool XParser::sendFunction(int id, const QString &dcopclient_target)
return false;
}
- kapp->dcopClient()->send(str_result.utf8(), "View","drawPlot()",QByteArray() ); //update the other window
+ kapp->dcopClient()->send(str_result.utf8(), "View","drawPlot()",TQByteArray() ); //update the other window
if (item->fname.at(0) == 'x') // a parametric function
return sendFunction(id+1, str_result);
diff --git a/kmplot/kmplot/xparser.h b/kmplot/kmplot/xparser.h
index 78c4463e..d54b3506 100644
--- a/kmplot/kmplot/xparser.h
+++ b/kmplot/kmplot/xparser.h
@@ -51,7 +51,7 @@ public:
/// Evaluates the 2nd dreivative of the function with intex \a ix
double a2fkt( Ufkt *, double, double h = 1e-3 );
/// calculate euler's method when drawing a numeric prime-function
- double euler_method(const double, const QValueVector<Ufkt>::iterator);
+ double euler_method(const double, const TQValueVector<Ufkt>::iterator);
/// Line width default
int linewidth0;
@@ -59,7 +59,7 @@ public:
enum { Function, Polar, ParametricX, ParametricY }; ///types of functions
///Returns an unused function name if it is needed
- void fixFunctionName(QString &, int const = XParser::Function , int const=-1);
+ void fixFunctionName(TQString &, int const = XParser::Function , int const=-1);
/// Returns the index for the next function.
int getNextIndex();
@@ -67,15 +67,15 @@ public:
void prepareAddingFunction(Ufkt *item);
/// Interpretates the extended function string (only used by the old file format)
- bool getext( Ufkt *, const QString );
+ bool getext( Ufkt *, const TQString );
/// Send a function to an other instance of Kmplot. Returns true if it success, otherwise false
- bool sendFunction(int id, const QString &dcopclient_target="");
+ bool sendFunction(int id, const TQString &dcopclient_target="");
/// Functions for the DCOP interface:
/// Returns a list with all functions
- QStringList listFunctionNames();
+ TQStringList listFunctionNames();
/// Returns true if the graph is visible, otherwise false.
bool functionFVisible(uint id);
@@ -89,19 +89,19 @@ public:
bool setFunctionIntVisible(bool visible, uint id);
/// Returns the function expression, or an empty string if the function couldn't be found
- QString functionStr(uint id);
+ TQString functionStr(uint id);
/// Returns the complete function string including the extensions of a function, or an empty string if the function couldn't be found
/// Get the color of a graph
- QColor functionFColor(uint id);
- QColor functionF1Color(uint id);
- QColor functionF2Color(uint id);
- QColor functionIntColor(uint id);
+ TQColor functionFColor(uint id);
+ TQColor functionF1Color(uint id);
+ TQColor functionF2Color(uint id);
+ TQColor functionIntColor(uint id);
/// Set the color of a graph. Returns true if it succeeds, otherwise false.
- bool setFunctionFColor(const QColor &color, uint id);
- bool setFunctionF1Color(const QColor &color, uint id);
- bool setFunctionF2Color(const QColor &color, uint id);
- bool setFunctionIntColor(const QColor &color, uint id);
+ bool setFunctionFColor(const TQColor &color, uint id);
+ bool setFunctionF1Color(const TQColor &color, uint id);
+ bool setFunctionF2Color(const TQColor &color, uint id);
+ bool setFunctionIntColor(const TQColor &color, uint id);
/// Get the line width of a graph
int functionFLineWidth(uint id);
@@ -115,30 +115,30 @@ public:
bool setFunctionIntLineWidth(int linewidth, uint id);
/// Returns the function's parameter list
- QStringList functionParameterList(uint id);
- bool functionAddParameter(const QString &new_parameter, uint id);
- bool functionRemoveParameter(const QString &remove_parameter, uint id);
- int addFunction(const QString &f_str);
- bool addFunction(const QString &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 QString &str_dmin, const QString &str_dmax, const QString &str_startx, const QString &str_starty, double integral_precision, QRgb color, QRgb f1_color, QRgb f2_color, QRgb integral_color, QStringList str_parameter, int use_slider);
- bool setFunctionExpression(const QString &f_str, uint id);
+ TQStringList functionParameterList(uint id);
+ 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 setFunctionExpression(const TQString &f_str, uint id);
/// Get the min and max value of a graph
- QString functionMinValue(uint id);
- QString functionMaxValue(uint id);
+ TQString functionMinValue(uint id);
+ TQString functionMaxValue(uint id);
/// Set the min and max values of a graph. Returns true if it succeeds, otherwise false.
- bool setFunctionMinValue(const QString &min, uint id);
- bool setFunctionMaxValue(const QString &max, uint id);
+ bool setFunctionMinValue(const TQString &min, uint id);
+ bool setFunctionMaxValue(const TQString &max, uint id);
/// Get the startx and starty value of a graph
- QString functionStartXValue(uint id);
- QString functionStartYValue(uint id);
+ TQString functionStartXValue(uint id);
+ TQString functionStartYValue(uint id);
/// Set the startx and starty values of a graph. Returns true if it succeeds, otherwise false.
- bool setFunctionStartXValue(const QString &x, uint id);
- bool setFunctionStartYValue(const QString &y, uint id);
+ bool setFunctionStartXValue(const TQString &x, uint id);
+ bool setFunctionStartYValue(const TQString &y, uint id);
private:
/// finds a free function name
- void findFunctionName(QString &, int const, int const);
+ void findFunctionName(TQString &, int const, int const);
/// indicates if the widget is changed
bool &m_modified;
};