Commit 83f6acc2 authored by Laurent Montel's avatar Laurent Montel 😁

Fix error

svn path=/trunk/KDE/kdeedu/kmplot/; revision=442183
parent c7b3df09
......@@ -33,9 +33,11 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
#include <qcstring.h>
#include <q3cstring.h>
#include <qcursor.h>
#include <qheader.h>
#include <q3header.h>
//Added by qt3to4:
#include <QShowEvent>
// locale includes
#include "FktDlg.h"
......@@ -53,13 +55,13 @@ FktDlg::FktDlg( QWidget* parent, View *view ) : FktDlgData( parent, "editPlots"
{
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( lb_fktliste, SIGNAL( doubleClicked(Q3ListViewItem *, const QPoint &, int)), this, SLOT(lb_fktliste_doubleClicked(Q3ListViewItem *, const QPoint &, int)) );
connect( lb_fktliste, SIGNAL( clicked(Q3ListViewItem *)), this, SLOT(lb_fktliste_clicked(Q3ListViewItem *)));
connect( lb_fktliste, SIGNAL( spacePressed(Q3ListViewItem *)), this, SLOT(lb_fktliste_spacePressed(Q3ListViewItem *)));
lb_fktliste->addColumn( "" );
lb_fktliste->header()->hide();
lb_fktliste->setResizeMode( QListView::LastColumn );
lb_fktliste->setResizeMode( Q3ListView::LastColumn );
}
FktDlg::~FktDlg()
......@@ -70,7 +72,7 @@ void FktDlg::slotDelete()
{
if ( lb_fktliste->currentItem() == 0)
return;
QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
Q3CheckListItem *currentItem = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
if( currentItem->text()[0] == 'x' )
{
// Delete pair of parametric function
......@@ -93,18 +95,18 @@ void FktDlg::slotDelete()
PushButtonDel->setEnabled(false);
}
void FktDlg::lb_fktliste_doubleClicked( QListViewItem *, const QPoint &, int )
void FktDlg::lb_fktliste_doubleClicked( Q3ListViewItem *, const QPoint &, int )
{
if ( mapFromGlobal(QCursor::pos()).x() <= 40 )
return;
slotEdit();
}
void FktDlg::lb_fktliste_spacePressed( QListViewItem *item)
void FktDlg::lb_fktliste_spacePressed( Q3ListViewItem *item)
{
if ( !item )
return;
QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(item);
Q3CheckListItem *currentItem = dynamic_cast<Q3CheckListItem *>(item);
int id;
if ( currentItem->text()[0] == 'x' )
id = getParamId(currentItem->text());
......@@ -118,7 +120,7 @@ void FktDlg::lb_fktliste_spacePressed( QListViewItem *item)
updateView();
}
void FktDlg::lb_fktliste_clicked( QListViewItem * item )
void FktDlg::lb_fktliste_clicked( Q3ListViewItem * item )
{
if ( mapFromGlobal(QCursor::pos()).x() > 40 )
return;
......@@ -128,7 +130,7 @@ void FktDlg::lb_fktliste_clicked( QListViewItem * item )
void FktDlg::slotEdit()
{
QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
Q3CheckListItem *currentItem = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
if ( currentItem == 0 )
{
PushButtonEdit->setEnabled(false);
......@@ -149,7 +151,7 @@ void FktDlg::slotEdit()
int FktDlg::getId( const QString &f_str )
{
for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
for( Q3ValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if ( it->fstr == f_str )
return it->id;
......@@ -160,7 +162,7 @@ int FktDlg::getId( const QString &f_str )
int FktDlg::getParamId( const QString &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)
for( Q3ValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
{
if ( it->fname == fname )
return it->id;
......@@ -191,12 +193,12 @@ void FktDlg::slotEditFunction( int id )
if( editFunction->exec() == QDialog::Accepted )
{
Ufkt *function = editFunction->functionItem();
QCheckListItem *item;
Q3CheckListItem *item;
if( id == -1 ) //a new function
item = new QCheckListItem(lb_fktliste, function->fstr, QCheckListItem::CheckBox); //a new function
item = new Q3CheckListItem(lb_fktliste, function->fstr, Q3CheckListItem::CheckBox); //a new function
else //change a function
{
item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
item = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function->fstr );
}
item->setOn(function->f_mode);
......@@ -216,14 +218,14 @@ void FktDlg::slotEditParametric( int x_id, int y_id)
{
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;
Q3CheckListItem *item;
if( x_id == -1 ) //a new function
{
item = new QCheckListItem(lb_fktliste, function_x->fstr+";"+function_y->fstr, QCheckListItem::CheckBox);
item = new Q3CheckListItem(lb_fktliste, function_x->fstr+";"+function_y->fstr, Q3CheckListItem::CheckBox);
}
else //change a function
{
item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
item = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function_x->fstr+";"+function_y->fstr );
}
item->setOn(function_y->f_mode);
......@@ -241,14 +243,14 @@ void FktDlg::slotEditPolar( int id )
if( editPolar->exec() == QDialog::Accepted )
{
Ufkt *function = editPolar->functionItem();
QCheckListItem *item;
Q3CheckListItem *item;
if( id == -1 ) // a new function
{
item = new QCheckListItem(lb_fktliste, function->fstr, QCheckListItem::CheckBox);
item = new Q3CheckListItem(lb_fktliste, function->fstr, Q3CheckListItem::CheckBox);
}
else //change a function
{
item = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
item = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
item->setText(0, function->fstr );
}
item->setOn(function->f_mode);
......@@ -278,18 +280,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( Q3ValueVector<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;
Q3CheckListItem *item;
if( it->fstr[0] == 'x' )
{
QString y = it->fstr;
++it;
item = new QCheckListItem( lb_fktliste, y + ";" + it->fstr, QCheckListItem::CheckBox );
item = new Q3CheckListItem( lb_fktliste, y + ";" + it->fstr, Q3CheckListItem::CheckBox );
}
else
item = new QCheckListItem(lb_fktliste, it->fstr, QCheckListItem::CheckBox);
item = new Q3CheckListItem(lb_fktliste, it->fstr, Q3CheckListItem::CheckBox);
item->setOn(it->f_mode);
}
lb_fktliste->sort();
......@@ -317,7 +319,7 @@ void FktDlg::slotCopyFunction()
cmdCopyFunction->setEnabled(false);
return;
}
QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
Q3CheckListItem *currentItem = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
QString const fstr = currentItem->text();
m_view->parser()->sendFunction(getId(fstr));
}
......@@ -329,7 +331,7 @@ void FktDlg::slotMoveFunction()
cmdCopyFunction->setEnabled(false);
return;
}
QCheckListItem *currentItem = dynamic_cast<QCheckListItem *>(lb_fktliste->currentItem());
Q3CheckListItem *currentItem = dynamic_cast<Q3CheckListItem *>(lb_fktliste->currentItem());
QString const fstr = currentItem->text();
if ( !m_view->parser()->sendFunction(getId( currentItem->text()) ) )
return;
......
......@@ -33,6 +33,8 @@
// locale includes
#include "FktDlgData.h"
#include "View.h"
//Added by qt3to4:
#include <QShowEvent>
class XParser;
......@@ -72,9 +74,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(Q3ListViewItem *, const QPoint &, int);
void lb_fktliste_clicked(Q3ListViewItem * item);
void lb_fktliste_spacePressed(Q3ListViewItem * item);
/// Edit a function plot.
/// @param id Id of the function plot to edit
......
......@@ -26,6 +26,8 @@
// Qt includes
#include <qslider.h>
#include <qtooltip.h>
//Added by qt3to4:
#include <QPixmap>
// KDE includes
#include <dcopclient.h>
......@@ -296,7 +298,7 @@ void MainDlg::slotExport()
if( url.fileName().right(4).lower()==".svg")
{
QPicture pic;
Q3Picture pic;
view->draw(&pic, 2);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "SVG");
......@@ -366,7 +368,7 @@ 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);
QDataStream stream(data, QIODevice::WriteOnly);
stream << url;
KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","openFileInNewWindow(KURL)", data);
return;
......@@ -643,7 +645,7 @@ void MainDlg::loadConstants()
while (!copy_found)
{
// go through the constant list
QValueVector<Constant>::iterator it = view->parser()->constant.begin();
Q3ValueVector<Constant>::iterator it = view->parser()->constant.begin();
while (it!= view->parser()->constant.end() && !copy_found)
{
if (constant == it->constant )
......
......@@ -29,7 +29,7 @@
#define MainDlg_included
// Qt includes
#include <qpicture.h>
#include <q3picture.h>
// KDE includes
#include <kaction.h>
......
......@@ -27,10 +27,19 @@
#include <qbitmap.h>
#include <qcursor.h>
#include <qdatastream.h>
#include <qpicture.h>
#include <q3picture.h>
#include <qslider.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <q3whatsthis.h>
//Added by qt3to4:
#include <QPixmap>
#include <Q3CString>
#include <QPaintEvent>
#include <QKeyEvent>
#include <QEvent>
#include <Q3ValueList>
#include <QResizeEvent>
#include <QMouseEvent>
// KDE includes
#include <kaction.h>
......@@ -56,7 +65,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, QWidget* parent, const char* name ) : DCOPObject("View"), QWidget( parent, name , Qt::WStaticContents ), buffer( width(), height() ), m_popupmenu(p), m_modified(mo), m_readonly(r), m_dcop_client(KApplication::kApplication()->dcopClient())
{
m_parser = new XParser(mo);
init();
......@@ -190,7 +199,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(Q3ValueVector<Ufkt>::iterator ufkt=m_parser->ufkt.begin(); ufkt!=m_parser->ufkt.end() && !stop_calculating; ++ufkt)
if ( !ufkt->fname.isEmpty() )
plotfkt(ufkt, &DC);
......@@ -462,7 +471,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(Q3ValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end() && !stop_calculating; ++it)
{
pDC->drawText(100, ypos, it->fstr);
ypos+=60;
......@@ -847,7 +856,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( Q3ValueVector<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;
......@@ -868,7 +877,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;
Q3ValueVector<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)
......@@ -957,7 +966,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( Q3ValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
{
if (it->fname.isEmpty() )
continue;
......@@ -1172,7 +1181,7 @@ void View::getSettings()
void View::init()
{
getSettings();
QValueVector<Ufkt>::iterator it = m_parser->ufkt.begin();
Q3ValueVector<Ufkt>::iterator it = m_parser->ufkt.begin();
it->fname="";
while ( m_parser->ufkt.count() > 1)
m_parser->Parser::delfkt( &m_parser->ufkt.last() );
......@@ -1195,7 +1204,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 ( Q3ValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
......@@ -1344,7 +1353,7 @@ void View::getYValue(Ufkt *ufkt, char p_mode, double x, double &y, const QStrin
// TODO: parameter sliders
if ( !ufkt->parameters.isEmpty() )
{
for ( QValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
for ( Q3ValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
......@@ -1456,7 +1465,7 @@ void View::keyPressEvent( QKeyEvent * e)
event = new QMouseEvent(QEvent::MouseMove,QPoint(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)];
Q3ValueVector<Ufkt>::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)];
int const ke=it->parameters.count();
if (ke>0)
{
......@@ -1614,7 +1623,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 ( Q3ValueList<ParameterValueItem>::Iterator it = ufkt->parameters.begin(); it != ufkt->parameters.end(); ++it )
{
if ( (*it).expression == str_parameter)
{
......@@ -1804,7 +1813,7 @@ void View::updateSliders()
}
}
for(QValueVector<Ufkt>::iterator it=m_parser->ufkt.begin(); it!=m_parser->ufkt.end(); ++it)
for(Q3ValueVector<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))
......@@ -2054,7 +2063,7 @@ void View::setStatusBar(const QString &text, const int id)
else
{
QByteArray parameters;
QDataStream arg( parameters, IO_WriteOnly);
QDataStream arg( parameters, QIODevice::WriteOnly);
arg << text << id;
m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","setStatusBarText(QString,int)", parameters);
}
......@@ -2062,17 +2071,17 @@ void View::setStatusBar(const QString &text, const int id)
void View::startProgressBar(int steps)
{
QByteArray data;
QDataStream stream(data, IO_WriteOnly);
QDataStream stream(data, QIODevice::WriteOnly);
stream << steps;
m_dcop_client->send(m_dcop_client->appId(), "KmPlotShell","startProgressBar(int)", data);
}
bool View::stopProgressBar()
{
QCString replyType;
Q3CString replyType;
QByteArray replyData;
m_dcop_client->call(m_dcop_client->appId(), "KmPlotShell","stopProgressBar()", QByteArray(), replyType, replyData);
bool result;
QDataStream stream(replyData, IO_ReadOnly);
QDataStream stream(replyData, QIODevice::ReadOnly);
stream >> result;
return result;
}
......
......@@ -29,6 +29,12 @@
// Qt includes
#include <qpixmap.h>
//Added by qt3to4:
#include <QMouseEvent>
#include <QResizeEvent>
#include <QKeyEvent>
#include <QEvent>
#include <QPaintEvent>
// KDE includes
#include <dcopclient.h>
......@@ -190,7 +196,7 @@ private:
PlotArea;
QPixmap hline,
vline;
QWMatrix wm;
QMatrix wm;
double tlgx, tlgy, drskalx, drskaly;
QString tlgxstr, tlgystr, drskalxstr, drskalystr;
......
......@@ -27,12 +27,12 @@
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qdialog.h>
#include <qframe.h>
#include <q3frame.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qradiobutton.h>
#include <qstringlist.h>
#include <qvbox.h>
#include <q3vbox.h>
// KDE includes
......@@ -59,11 +59,11 @@
EditFunction::EditFunction( XParser* parser, QWidget* 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 ) );
Q3VBox *page0 = addVBoxPage( i18n("Function"), i18n( "Function" ), SmallIcon( "func", 32 ) );
editfunctionpage = new EditFunctionPage( page0 );
QVBox *page1 = addVBoxPage( i18n("Derivatives"), i18n( "Derivatives" ), SmallIcon( "deriv_func", 32 ) );
Q3VBox *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 ) );
Q3VBox *page2 = addVBoxPage( i18n("Integral"), i18n( "Integral" ), SmallIcon( "integral_func", 32 ) );
editintegralpage = new EditIntegralPage( page2 );
for( int number = 0; number < SLIDER_COUNT; number++ )
{
......
......@@ -29,6 +29,8 @@
#include <kdialogbase.h>
#include "xparser.h"
//Added by qt3to4:
#include <Q3ValueList>
class XParser;
class EditFunctionPage;
......@@ -79,7 +81,7 @@ class EditFunction : public KDialogBase
XParser* m_parser;
/// Current function index
int m_id;
QValueList<ParameterValueItem> m_parameter;
Q3ValueList<ParameterValueItem> m_parameter;
EditFunctionPage* editfunctionpage;
EditDerivativesPage* editderivativespage;
......
......@@ -33,7 +33,7 @@
#include <kstandarddirs.h>
#include <qpushbutton.h>
#include <qstringlist.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <qdom.h>
#include "kmplotio.h"
......@@ -44,11 +44,11 @@ KConstantEditor::KConstantEditor(View *v, QWidget *parent, const char *name)
: QConstantEditor(parent,name), m_view(v)
{
QString str_value;
QValueVector<Constant>::iterator it;
Q3ValueVector<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 Q3ListViewItem(varlist, QChar(it->constant), str_value);
}
}
......@@ -86,7 +86,7 @@ void KConstantEditor::cmdDelete_clicked()
value = varlist->currentItem()->text(1);
QString str;
for( QValueVector<Ufkt>::iterator it = m_view->parser()->ufkt.begin(); it != m_view->parser()->ufkt.end(); ++it)
for( Q3ValueVector<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;
Q3ValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end(); ++it)
{
if ( it->constant == constant)
......@@ -116,7 +116,7 @@ void KConstantEditor::cmdDelete_clicked()
delete varlist->findItem(QChar(constant), 0); //removes the item from the constant list
}
void KConstantEditor::varlist_clicked( QListViewItem * item )
void KConstantEditor::varlist_clicked( Q3ListViewItem * item )
{
if (item)
{
......@@ -144,7 +144,7 @@ void KConstantEditor::cmdDuplicate_clicked()
for (char i='A'; i<'Z';i++)
{
found = false;
QValueVector<Constant>::iterator it;
Q3ValueVector<Constant>::iterator it;
for(it = m_view->parser()->constant.begin(); it!= m_view->parser()->constant.end() && !found;++it)
{
if ( it->constant == i || i == constant)
......@@ -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 Q3ListViewItem(varlist, QChar( 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;
Q3ValueVector<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);
Q3ListViewItem *item = varlist->findItem(QChar(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( Q3ValueVector<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( Q3ListViewItem * )
{
cmdEdit_clicked();
}
......
......@@ -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( Q3ListViewItem * item );
void varlist_doubleClicked( Q3ListViewItem * );
/// called when a user pressed OK the the new-constant-dialog
void newConstantSlot();
......
......@@ -67,7 +67,7 @@ void KEditConstant::cmdOK_clicked()
if ( txtConstant->isEnabled() ) //creating, not edit a constant
{
bool found= false;
QValueVector<Constant>::iterator it;
Q3ValueVector<Constant>::iterator it;
for(it = m_parser->constant.begin(); it!= m_parser->constant.end() && !found;++it)
{
if ( it->constant == constant)
......
......@@ -66,7 +66,7 @@ class KEditParametric : public QEditParametric
/// Current function indices.
int m_x_id, m_y_id;
//@}
Ufkt *m_updatedfunction;
protected slots:
/// Overwrites the dialog's accept() method to make sure, that the user's input is valid.
virtual void accept();
......@@ -75,7 +75,6 @@ class KEditParametric : public QEditParametric
void customMaxRange_toggled(bool);
void customMinRange_toggled(bool);
Ufkt *m_updatedfunction;
};
#endif
......@@ -58,7 +58,7 @@ class KEditPolar : public QEditPolar
XParser* m_parser;
/// Current function id.
int m_id;
Ufkt *m_updatedfunction;
protected slots:
/// Overwrites the dialog's accept() method to make sure, that the user's input is valid.
virtual void accept();
......@@ -67,7 +67,6 @@ class KEditPolar : public QEditPolar
void customMinRange_toggled(bool);
void customMaxRange_toggled(bool);