Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

FunctionDialog.h

Go to the documentation of this file.
00001 //LabPlot : FunctionDialog.h
00002 
00003 #ifndef FUNCTIONDIALOG_H
00004 #define FUNCTIONDIALOG_H
00005 
00006 #include <qtoolbutton.h>
00007 #include <qcheckbox.h>
00008 #include <qcolor.h>
00009 #include <klineedit.h>
00010 #include <knuminput.h>
00011 #include "Dialog.h"
00012 #include "Worksheet.h"
00013 #include "GraphListDialog.h"
00014 #include "Graph2D.h"
00015 #include "RichTextWidget.h"
00016 
00017 class FunctionDialog: public Dialog
00018 {
00019         Q_OBJECT
00020 public:
00021         FunctionDialog(MainWin *mw, const char *name, ListDialog *l, int item, PType newtype);
00022 public slots:
00023         int addFunction();      
00024         void updateLabel() { rtw->getLabel()->setTitle(funle->text()); rtw->update(); }
00025 
00026         void setFunction(QString fun) { funle->setText(fun); }                  
00027         void recreate(bool b=true) { reread->setChecked(b); }           
00028         void setLabel(QString l=0) {                                    
00029                 if(l!=0) funle->setText(l);
00030                 updateLabel();
00031         }
00032         void setRange(double a, double b) { xmin->setText(QString::number(a)); xmax->setText(QString::number(b)); }
00034         void setYRange(double a, double b) { ymin->setText(QString::number(a)); ymax->setText(QString::number(b)); }
00036         void setPoints(int nr) { nx->setValue(nr); }                            
00037         void setYPoints(int nr) { ny->setValue(nr); }                           
00038         
00039         int Apply() { return apply_clicked(); }
00040 private slots :
00041         void insertConstant(int i);
00042         void insertFunction(int i);
00043         void ok_clicked() { if (!apply_clicked()) accept(); }
00044         void saveSettings(bool pressed=true);
00045         int apply_clicked();
00046 private:
00047         void findPlot();
00048         KLineEdit *funle, *ymin, *ymax;
00049         KLineEdit *xmin, *xmax;
00050         KIntNumInput *nx, *ny;
00051         KComboBox *concb, *selcb;
00052         QCheckBox *reread;
00053         ListDialog *l;
00054         int item;
00055         PType type;
00056         Graph *graph;                   // Graph
00057         RichTextWidget *rtw;            // label widget
00058 };
00059 #endif //FUNCTIONDIALOG_H

Generated on Sun Apr 2 02:05:09 2006 for LabPlot by  doxygen 1.4.4