2 * KmPlot - a math. function plotter for the KDE-Desktop
4 * Copyright (C) 1998, 1999 Klaus-Dieter M�ler
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.
27 * @brief Contains the FktDlg class. Entering and editing functions equation and attributes.
30 #ifndef FktDlg_included
31 #define FktDlg_included
34 #include "FktDlgData.h"
39 /** @short This widget class handles the users function input.
41 * The list of stored plots is shown. The entries can be edited and/or removed.
42 * New plots can be entered calling special dialog windows.
43 * @see KEditFunction, KEditParametric, KEditPolar
45 class FktDlg
: public FktDlgData
51 * The constructor gets the current parser instance
52 * @param parent Parent widget.
53 * @param parser points to the current parser instance.
55 FktDlg( QWidget
* parent
, View
* view
);
58 /// Fill the widgets with plots contained in th parser instance.
60 /// Returns true if a function was changed
64 /// Pressed on the "Copy Function.." button
65 void slotCopyFunction();
66 /// Pressed on the "Move Function.." button
67 void slotMoveFunction();
69 /// Delete selected plot
71 /// Edit selected Plot
73 /// Enables/disables actions if the list has a/no selection.
74 void slotHasSelection();
75 void lb_fktliste_doubleClicked(QListViewItem
*, const QPoint
&, int);
76 void lb_fktliste_clicked(QListViewItem
* item
);
77 void lb_fktliste_spacePressed(QListViewItem
* item
);
79 /// Edit a function plot.
80 /// @param index Function index of the parser instance.
81 /// @param num Listbox index
82 /// @see KEditFunction
83 void slotEditFunction( int id
= -1 );
84 /// Edit a parametric plot.
85 /// @param x_index, y_index Function index of the parser instance.
86 /// @param num Listbox index
87 /// @see KEditParametric
88 void slotEditParametric( int x_id
= -1, int y_id
= -1 );
89 /// Edit a polar plot.
90 /// @param index Function index of the parser instance.
91 /// @param num Listbox index
93 void slotEditPolar( int id
= -1 );
94 /// Edit a new function plot.
95 void slotNewFunction();
96 /// Edit a new parametric plot.
97 void slotNewParametric();
98 /// Edit a new polar plot.
104 /// Looks up the id of \a f_str in the parser instance.
105 int getId( const QString
&f_str
);
106 /// Looks up the indices of the parametric pair of function.
107 int getParamId( const QString
&f_str
);
108 /// Update the view of the main window.
110 /// Called when the dialog is showed
111 void showEvent ( QShowEvent
* );
112 // /// Send a function to an other instance of Kmplot. Returns true if it success, otherwise false
113 // bool sendFunction();
115 /// Ponts to the parser instance.
117 /// indicates if a function is changed/added/removed
121 #endif // FktDlg_included