moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kmplot / kmplot / keditpolar.h
blob49cde0f400d120ad7be4ec0c3db0482574135d8e
1 /*
2 * KmPlot - a math. function plotter for the KDE-Desktop
4 * Copyright (C) 1998, 1999 Klaus-Dieter Möller
5 * 2000, 2002 kd.moeller@t-online.de
7 * This file is part of the KDE Project.
8 * KmPlot is part of the KDE-EDU Project.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #ifndef KEDITPOLAR_H
27 #define KEDITPOLAR_H
29 #include "qeditpolar.h"
30 #include "xparser.h"
32 class View;
33 class XParser;
35 /** @short Dialog window editing a polar plot and its properties. */
36 class KEditPolar : public QEditPolar
38 Q_OBJECT
39 public:
40 /// @param parser points to the parser instance.
41 /// @param parent points to the parent widget.
42 /// @param name of this instance.
43 KEditPolar( XParser* parser, QWidget* parent = NULL, const char* name = NULL );
44 /// Nothing special to do.
45 virtual ~KEditPolar() {};
47 ///Fill the dialog widgets with the properties of the parser function number id.
48 void initDialog( int id = -1 );
49 /// Returns a pointer to the added/updated function
50 Ufkt * functionItem();
52 private:
53 /// Clear alls widgets values.
54 void clearWidgets();
55 /// Fill the dialog's widgets with values from the parser.
56 void setWidgets();
57 /// Pointer to the parser instance.
58 XParser* m_parser;
59 /// Current function id.
60 int m_id;
62 protected slots:
63 /// Overwrites the dialog's accept() method to make sure, that the user's input is valid.
64 virtual void accept();
65 /// Invokes the helpCenter.
66 void slotHelp();
67 void customMinRange_toggled(bool);
68 void customMaxRange_toggled(bool);
70 Ufkt *m_updatedfunction;
73 #endif