Commit 35d93897 authored by Fredrik Edemar's avatar Fredrik Edemar

* DCOP interface for Parser and View so you can add/modify/remove functions via DCOP .

* Ability to copy and move functions to other running Kmplot instances.
* Convert some atoi-calls to use .toInt() instead.
* Check if the expression is valid when the user change the range values.
* Merge Ufkt::k_liste and Ufkt::str_parameter to Ufkt::parameters.
* Fix bug #92014.
* When opening a file in a new window, the new window exits if the file couln't be loaded.
* Kmplot automatic give you an other function name if you try to define one that already exists.

svn path=/trunk/kdeedu/kmplot/; revision=358745
parent aa1fc790
......@@ -13,9 +13,8 @@ TODO
* Draw tangents in trace mode (pipesmoker)
* Printing (pipesmoker)
- different paper sizes
* Use a better(faster!) algorithm for drawing integrals numeric.
* Use a better(faster!) algorithm for drawing integrals numeric. It's not urgent anymore since the implemention of Euler's method is better now.
* An export dialog where you can set the size and enable/disable monocrome.
* Move and copy functions to other instances of KmPlot.
IN PROGRESS
=========================
......@@ -71,4 +70,6 @@ DONE
* Support for more than 10 parameter values for a function.
* Improved drawing of integrals (faster!)
* KPart
* Ability to set font size when drawing labels.
\ No newline at end of file
* Ability to set font size when drawing labels.
* Automatic choose a new function if the user want to define a function name that already exists.
* Move and copy functions to other instances of KmPlot.
\ No newline at end of file
......@@ -30,7 +30,9 @@
// KDE includes
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
#include <qcstring.h>
// locale includes
#include "FktDlg.h"
......@@ -39,6 +41,7 @@
#include "keditparametric.h"
#include "keditpolar.h"
#include "MainDlg.h"
#include "parseriface.h"
#include "xparser.h"
#include <kdebug.h>
......@@ -47,6 +50,8 @@
FktDlg::FktDlg( QWidget* parent, View *view ) : Inherited( parent, "editPlots" ), m_view(view)
{
connect( cmdCopyFunction, SIGNAL( clicked() ), this, SLOT( slotCopyFunction()) );
connect( cmdMoveFunction, SIGNAL( clicked() ), this, SLOT( slotMoveFunction()) );
}
FktDlg::~FktDlg()
......@@ -66,17 +71,15 @@ void FktDlg::slotDelete()
if( lb_fktliste->text( num )[0] == 'x' )
{
// Delete pair of parametric function
int const ix = m_view->parser()->ixValue( getParamId( lb_fktliste->text( num ) ) );
if ( ix == -1)
int const id = getParamId( lb_fktliste->text( num ));
if ( id == -1)
return;
m_view->parser()->delfkt( ix+1 );
m_view->parser()->delfkt( ix );
m_view->parser()->delfkt(id);
}
else
else
{
// only one function to be deleted
m_view->parser()->delfkt( m_view->parser()->ixValue(getId( lb_fktliste->text( num ))) );
}
lb_fktliste->removeItem( num );
changed = true;
......@@ -133,9 +136,11 @@ void FktDlg::updateView()
void FktDlg::slotHasSelection()
{
bool has_selection = !( lb_fktliste->currentItem() == -1 );
bool const has_selection = !( lb_fktliste->currentItem() == -1 );
PushButtonEdit->setEnabled( has_selection );
PushButtonDel->setEnabled( has_selection );
cmdCopyFunction->setEnabled( has_selection );
cmdMoveFunction->setEnabled( has_selection );
}
void FktDlg::slotEditFunction( int id, int num )
......@@ -232,3 +237,48 @@ void FktDlg::showEvent ( QShowEvent * )
{
changed = false;
}
void FktDlg::slotCopyFunction()
{
int num;
if ( ( num = lb_fktliste->currentItem() )== -1)
{
cmdCopyFunction->setEnabled(false);
return;
}
QString const fstr = lb_fktliste->text(num);
if( fstr.at(0) == 'x' )
{
int const id = getParamId( lb_fktliste->text( num ));
if ( !m_view->parser()->sendFunction(id) )
return;
m_view->parser()->sendFunction(id+1);
}
else
m_view->parser()->sendFunction(getId(fstr));
}
void FktDlg::slotMoveFunction()
{
int num;
if ( ( num = lb_fktliste->currentItem() )== -1)
{
cmdCopyFunction->setEnabled(false);
return;
}
QString const fstr = lb_fktliste->text(num);
if( fstr.at(0) == 'x' )
{
int const id = getParamId( lb_fktliste->text( num ));
if ( !m_view->parser()->sendFunction(id) )
return;
if ( m_view->parser()->sendFunction(id+1) )
return;
}
else
if ( !m_view->parser()->sendFunction(getId( lb_fktliste->text( lb_fktliste->currentItem())) ) )
return;
slotDelete();
}
......@@ -60,6 +60,11 @@ public:
/// Returns true if a function was changed
bool isChanged();
public slots:
/// Pressed on the "Copy Function.." button
void slotCopyFunction();
/// Pressed on the "Move Function.." button
void slotMoveFunction();
protected slots:
/// Delete selected plot
void slotDelete();
......@@ -101,6 +106,9 @@ private:
void updateView();
/// Called when the dialog is showed
void showEvent ( QShowEvent * );
// /// Send a function to an other instance of Kmplot. Returns true if it success, otherwise false
// bool sendFunction();
/// Ponts to the parser instance.
View* m_view;
/// indicates if a function is changed/added/removed
......
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FktDlgData</class>
<widget class="QDialog">
<property name="name">
......@@ -108,7 +108,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QListBox" row="0" column="0" rowspan="7" colspan="1">
<widget class="QListBox" row="0" column="0" rowspan="9" colspan="1">
<property name="name">
<cstring>lb_fktliste</cstring>
</property>
......@@ -133,9 +133,12 @@
<string>Here you see the list of all functions to be plotted.</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<widget class="QPushButton" row="4" column="1">
<property name="name">
<cstring>PushButtonNewFunction</cstring>
<cstring>PushButtonDel</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
......@@ -146,41 +149,43 @@
</sizepolicy>
</property>
<property name="text">
<string>New &amp;Function Plot...</string>
</property>
<property name="default">
<bool>true</bool>
<string>&amp;Delete</string>
</property>
<property name="toolTip" stdset="0">
<string>define a new function</string>
<string>delete the selected function</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
<string>Click here to delete the selected function from the list.</string>
</property>
</widget>
<spacer row="6" column="1">
<widget class="QPushButton" row="3" column="1">
<property name="name">
<cstring>Spacer1</cstring>
<cstring>PushButtonEdit</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizeType">
<enum>Expanding</enum>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>70</height>
</size>
<property name="text">
<string>&amp;Edit...</string>
</property>
</spacer>
<widget class="QPushButton" row="5" column="1">
<property name="name">
<cstring>PushButtonDel</cstring>
<property name="toolTip" stdset="0">
<string>edit the selected function</string>
</property>
<property name="enabled">
<bool>false</bool>
<property name="whatsThis" stdset="0">
<string>Click here to edit the selected function.</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>PushButtonNewFunction</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
......@@ -191,16 +196,19 @@
</sizepolicy>
</property>
<property name="text">
<string>&amp;Delete</string>
<string>New &amp;Function Plot...</string>
</property>
<property name="default">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
<string>delete the selected function</string>
<string>define a new function</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click here to delete the selected function from the list.</string>
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
</property>
</widget>
<widget class="QPushButton" row="2" column="1">
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>PushButtonNewParametric</cstring>
</property>
......@@ -222,7 +230,7 @@
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
</property>
</widget>
<widget class="QPushButton" row="3" column="1">
<widget class="QPushButton" row="2" column="1">
<property name="name">
<cstring>PushButtonNewPolar</cstring>
</property>
......@@ -244,9 +252,26 @@
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
</property>
</widget>
<widget class="QPushButton" row="4" column="1">
<spacer row="8" column="1">
<property name="name">
<cstring>PushButtonEdit</cstring>
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="6" column="1">
<property name="name">
<cstring>cmdCopyFunction</cstring>
</property>
<property name="enabled">
<bool>false</bool>
......@@ -260,15 +285,57 @@
</sizepolicy>
</property>
<property name="text">
<string>&amp;Edit...</string>
<string>&amp;Copy function...</string>
</property>
<property name="toolTip" stdset="0">
<string>edit the selected function</string>
<string>define a new function</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click here to edit the selected function.</string>
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
</property>
</widget>
<widget class="QPushButton" row="7" column="1">
<property name="name">
<cstring>cmdMoveFunction</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Move function...</string>
</property>
<property name="toolTip" stdset="0">
<string>define a new function</string>
</property>
<property name="whatsThis" stdset="0">
<string>Click here to define a new function. There are 3 types of function, explicit given functions, parametric plots and polar plots. Choose the appropriate type from the drop down list.</string>
</property>
</widget>
<spacer row="5" column="1">
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
......@@ -346,6 +413,9 @@
<tabstop>pushButtonCancel</tabstop>
<tabstop>pushButtonHelp</tabstop>
</tabstops>
<includes>
<include location="local" impldecl="in implementation">FktDlgData.ui.h</include>
</includes>
<slots>
<slot>slotDelete()</slot>
<slot>slotEdit()</slot>
......
......@@ -53,7 +53,6 @@
#include "MainDlg.moc"
#include "settings.h"
#include "settingspagecolor.h"
#include "settingspagecoords.h"
#include "settingspagefonts.h"
#include "settingspageprecision.h"
#include "settingspagescaling.h"
......@@ -82,6 +81,7 @@ MainDlg::MainDlg(QWidget *parentWidget, const char *, QObject *parent, const cha
new BrowserExtension(this); // better integration with Konqueror
}
fdlg = 0;
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 &) ) );
......@@ -134,7 +134,7 @@ void MainDlg::setupActions()
KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
// KmPLot specific actions
// KmPlot specific actions
// file menu
( void ) new KAction( i18n( "E&xport..." ), 0, this, SLOT( slotExport() ), actionCollection(), "export");
......@@ -172,14 +172,7 @@ void MainDlg::setupActions()
( 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" );
// tools menu
KAction *mnuHide = new KAction(i18n("&Hide") ,0,view, SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" );
mnuHide->plug(m_popupmenu);
KAction *mnuRemove = new KAction(i18n("&Remove"),0,view, SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" );
mnuRemove->plug(m_popupmenu);
KAction *mnuEdit = new KAction(i18n("&Edit"), 0,view, SLOT( mnuEdit_clicked() ),actionCollection(),"mnuedit" );
mnuEdit->plug(m_popupmenu);
// 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" );
......@@ -195,6 +188,18 @@ void MainDlg::setupActions()
( void ) new KToggleAction( i18n( "Show Slider 3" ), 0, this, SLOT( toggleShowSlider2() ), actionCollection(), QString( "options_configure_show_slider_2" ).latin1() );
( void ) new KToggleAction( i18n( "Show Slider 4" ), 0, this, SLOT( toggleShowSlider3() ), actionCollection(), QString( "options_configure_show_slider_3" ).latin1() );
// Popup menu
KAction *mnuHide = new KAction(i18n("&Hide") ,0,view, SLOT( mnuHide_clicked() ),actionCollection(),"mnuhide" );
mnuHide->plug(m_popupmenu);
KAction *mnuRemove = new KAction(i18n("&Remove"),0,view, SLOT( mnuRemove_clicked() ),actionCollection(),"mnuremove" );
mnuRemove->plug(m_popupmenu);
KAction *mnuEdit = new KAction(i18n("&Edit"), 0,view, 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" );
mnuCopy->plug(m_popupmenu);
KAction *mnuMove = new KAction(i18n("&Move"), 0,view, SLOT( mnuMove_clicked() ),actionCollection(),"mnumove" );
mnuMove->plug(m_popupmenu);
m_popupmenu->insertSeparator();
mnuYValue->plug(m_popupmenu);
mnuMinValue->plug(m_popupmenu);
......@@ -209,13 +214,13 @@ bool MainDlg::checkModified()
"Do you want to save it?" ) );
switch( saveit )
{
case KMessageBox::Yes:
slotSave();
if ( m_modified) // the user didn't save the file
case KMessageBox::Yes:
slotSave();
if ( m_modified) // the user didn't saved the file
return false;
break;
case KMessageBox::Cancel:
return false;
break;
case KMessageBox::Cancel:
return false;
}
}
return true;
......@@ -223,6 +228,8 @@ bool MainDlg::checkModified()
void MainDlg::slotCleanWindow()
{
if (m_readonly)
return;
view->init(); // set globals to default
view->updateSliders();
view->drawPlot();
......@@ -230,7 +237,7 @@ void MainDlg::slotCleanWindow()
void MainDlg::slotSave()
{
if ( !m_modified) //don't save if no changes are made
if ( !m_modified || m_readonly) //don't save if no changes are made or readonly is enabled
return;
if ( m_url.isEmpty() ) // if there is no file name set yet
slotSaveas();
......@@ -253,6 +260,8 @@ void MainDlg::slotSave()
void MainDlg::slotSaveas()
{
if (m_readonly)
return;
KURL url = KFileDialog::getSaveURL( QDir::currentDirPath(), i18n( "*.fkt|KmPlot Files (*.fkt)\n*|All Files" ), m_parent, i18n( "Save As" ) );
if ( !url.isEmpty() )
......@@ -336,13 +345,14 @@ void MainDlg::slotExport()
bool MainDlg::openFile()
{
view->init();
if ( !kmplotio->load( m_url ) )
if (m_url==m_currentfile || !kmplotio->load( m_url ) )
{
m_recentFiles->removeURL(m_url ); //remove the file from the recent-opened-file-list
m_url = "";
kdDebug() << "Hit2?" << endl;
return false;
}
m_currentfile = m_url;
m_recentFiles->addURL( m_url );
setWindowCaption( m_url.url() );
m_modified = false;
......@@ -368,6 +378,7 @@ void MainDlg::slotOpenRecent( const KURL &url )
m_recentFiles->removeURL(url ); //remove the file from the recent-opened-file-list
return;
}
m_recentFiles->setCurrentItem(-1); //don't select the item in the open-recent menu
view->updateSliders();
view->drawPlot();
m_url = url;
......@@ -402,20 +413,21 @@ void MainDlg::editColors()
void MainDlg::editAxes()
{
// create a config dialog and add a colors page
KConfigDialog* coordsDialog = new KConfigDialog( m_parent, "coords", Settings::self() );
coordsDialog->setHelp("axes-config");
coordsDialog->addPage( new SettingsPageCoords( 0, "coordsSettings" ), i18n( "Coords" ), "coords", i18n( "Edit Coordinate System" ) );
// User edited the configuration - update your local copies of the
// configuration data
connect( coordsDialog, SIGNAL( settingsChanged() ), this, SLOT(updateSettings() ) );
// create a config dialog and add a axes page
if ( !coordsDialog)
{
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() ) );
}
coordsDialog->show();
}
void MainDlg::editScaling()
{
// create a config dialog and add a colors page
KConfigDialog* scalingDialog = new KConfigDialog( m_parent, "scaling", Settings::self() );
// create a config dialog and add a scaling page
KConfigDialog *scalingDialog = new KConfigDialog( m_parent, "scaling", Settings::self() );
scalingDialog->setHelp("scaling-config");
scalingDialog->addPage( new SettingsPageScaling( 0, "scalingSettings" ), i18n( "Scale" ), "scaling", i18n( "Edit Scaling" ) );
// User edited the configuration - update your local copies of the
......@@ -426,7 +438,7 @@ void MainDlg::editScaling()
void MainDlg::editFonts()
{
// create a config dialog and add a colors page
// create a config dialog and add a font page
KConfigDialog* fontsDialog = new KConfigDialog( m_parent, "fonts", Settings::self() );
fontsDialog->setHelp("font-config");
fontsDialog->addPage( new SettingsPageFonts( 0, "fontsSettings" ), i18n( "Fonts" ), "fonts", i18n( "Edit Fonts" ) );
......
......@@ -43,6 +43,7 @@
#undef GrayScale
// local includes
#include "coordsconfigdialog.h"
#include "FktDlg.h"
#include "View.h"
#include "kminmax.h"
......@@ -52,7 +53,6 @@
class KConfigDialog;
class KLineEdit;
class KRecentFilesAction;
class SettingsPageCoords;
class SettingsPageColor;
class SettingsPageFonts;
class SettingsPagePrecision;
......@@ -112,9 +112,7 @@ public slots:
void toggleShowSlider1();
void toggleShowSlider2();
void toggleShowSlider3();
/// Implement the File -> Open action
//void slotOpen();
///Implement the File -> New action by cleaning the plot area
void slotCleanWindow();
///Save a plot i.e. save the function name and all the settings for the plot
......@@ -188,6 +186,10 @@ private:
bool m_readonly;
/// MainDlg's parent widget
QWidget *m_parent;
/// Current file
KURL m_currentfile;
/// The axes config dialogs
CoordsConfigDialog* coordsDialog;
protected slots:
/**
......
......@@ -43,7 +43,7 @@ shellrc_DATA = kmplot_shell.rc
kde_module_LTLIBRARIES = libkmplotpart.la
# the Part's source, library search path, and link libraries
libkmplotpart_la_SOURCES = FktDlgData.ui parser.cpp xparser.cpp diagr.cpp View.cpp MainDlg.cpp FktDlg.cpp kprinterdlg.cpp settings.kcfgc settingspagecolor.ui kconstanteditor.cpp qparametereditor.ui kparametereditor.cpp settingspagecoords.ui settingspagefonts.ui settingspagescaling.ui settingspageprecision.ui qeditparametric.ui keditparametric.cpp qeditpolar.ui keditpolar.cpp editfunctionpage.ui editderivativespage.ui editintegralpage.ui editfunction.cpp qeditconstant.ui qminmax.ui kminmax.cpp qconstanteditor.ui keditconstant.cpp kmplotio.cpp sliderwindow.ui MainDlgIface.skel
libkmplotpart_la_SOURCES = FktDlgData.ui parser.cpp xparser.cpp diagr.cpp View.cpp MainDlg.cpp FktDlg.cpp kprinterdlg.cpp settings.kcfgc settingspagecolor.ui kconstanteditor.cpp qparametereditor.ui kparametereditor.cpp settingspagecoords.ui settingspagefonts.ui settingspagescaling.ui settingspageprecision.ui qeditparametric.ui keditparametric.cpp qeditpolar.ui keditpolar.cpp editfunctionpage.ui editderivativespage.ui editintegralpage.ui editfunction.cpp qeditconstant.ui qminmax.ui kminmax.cpp qconstanteditor.ui keditconstant.cpp kmplotio.cpp sliderwindow.ui MainDlgIface.skel parseriface.skel Viewiface.skel coordsconfigdialog.cpp
libkmplotpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
libkmplotpart_la_LIBADD = $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) $(LIBSOCKET) $(LIB_KDEPRINT)
......@@ -55,7 +55,7 @@ partdesktop_DATA = kmplot_part.desktop
partrcdir = $(kde_datadir)/kmplot
partrc_DATA = kmplot_part.rc kmplot_part_readonly.rc
EXTRA_DIST = kmplot.desktop FktDlg.h MainDlg.cpp MainDlg.h View.h diagr.cpp diagr.h xparser.h parser.h kprinterdlg.h keditparametric.h keditpolar.h keditconstant.h kconstanteditor.h kparametereditor.h kmplotio.h kminmax.h
EXTRA_DIST = kmplot.desktop FktDlg.h MainDlg.cpp MainDlg.h View.h diagr.cpp diagr.h xparser.h parser.h kprinterdlg.h keditparametric.h keditpolar.h keditconstant.h kconstanteditor.h kparametereditor.h kmplotio.h kminmax.h coordsconfigdialog.h
xdg_apps_DATA = kmplot.desktop
kde_kcfg_DATA = kmplot.kcfg
......@@ -56,9 +56,9 @@ double View::xmin = 0;
double View::xmax = 0;
View::View(bool const r, bool & mo, KPopupMenu *p, QWidget* parent, const char* name ) : 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 , WStaticContents ), buffer( width(), height() ), m_popupmenu(p), m_modified(mo), m_readonly(r), m_dcop_client(KApplication::kApplication()->dcopClient())
{
m_parser = new XParser(MEMSIZE, STACKSIZE );
m_parser = new XParser(mo);
init();
csflg=0;
csmode=-1;
......@@ -256,12 +256,10 @@ void View::plotfkt(Ufkt *ufkt, QPainter *pDC)
pen.setColor(ufkt->color);
pDC->setPen(pen);
while(1)
{