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         ~FunctionDialog();
00023 public slots:
00024         int addFunction();      
00025         void updateLabel() { rtw->getLabel()->setTitle(funle->text()); rtw->update(); }
00026 
00027         void setFunction(QString fun) { funle->setText(fun); }                  
00028         void recreate(bool b=true) { reread->setChecked(b); }           
00029         void setLabel(QString label=0) {                                        
00030                 if(label!=0) funle->setText(label);
00031                 updateLabel();
00032         }
00033         void setRange(double a, double b) { xmin->setText(QString::number(a)); xmax->setText(QString::number(b)); }
00035         void setYRange(double a, double b) { ymin->setText(QString::number(a)); ymax->setText(QString::number(b)); }
00037         void setPoints(int nr) { nx->setValue(nr); }                            
00038         void setYPoints(int nr) { ny->setValue(nr); }                           
00039         
00040         int Apply() { return apply_clicked(); }
00041 private slots :
00042         void insertConstant(int i);
00043         void insertFunction(int i);
00044         void ok_clicked() { if (!apply_clicked()) accept(); }
00045         void saveSettings(bool pressed=true);
00046         int apply_clicked();
00047 private:
00048         void findPlot();
00049         KLineEdit *funle, *ymin, *ymax;
00050         KLineEdit *xmin, *xmax;
00051         KIntNumInput *nx, *ny;
00052         KComboBox *concb, *selcb;
00053         QCheckBox *reread;
00054         ListDialog *l;
00055         int item;
00056         PType type;
00057         Graph *graph;                   // Graph
00058         RichTextWidget *rtw;            // label widget
00059 };
00060 #endif //FUNCTIONDIALOG_H

Generated on Sat Oct 13 21:55:01 2007 for LabPlot by  doxygen 1.4.4