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

Dialog.h

Go to the documentation of this file.
00001 //LabPlot : Dialog.h
00002 
00003 #ifndef DIALOG_H
00004 #define DIALOG_H
00005 
00006 #include <kdialog.h>
00007 #include <qvbox.h>
00008 #include <kpushbutton.h>
00009 #include <qgroupbox.h>
00010 #include <qcheckbox.h>
00011 #include <qtabwidget.h>
00012 #include <qvalidator.h>
00013 #include <klineedit.h>
00014 #include <klistbox.h>
00015 #include <kcolorbutton.h>
00016 #include <kcombobox.h>
00017 #include <knuminput.h>
00018 #include "Worksheet.h"
00019 
00020 #include "inputfilter.h"
00021 
00022 #ifdef HAVE_GL
00023 #include "qwt3d_surfaceplot.h"
00024 #endif
00025 
00026 class Dialog: public KDialog
00027 {
00028         Q_OBJECT
00029 public:
00030         Dialog(class MainWin *mw, const char *name);
00031         QVBox* surfaceStyle(QTabWidget *tw, bool fresh);
00032         QVBox* simpleStyle(QTabWidget *tw, Style *style, Symbol *symbol);
00033         void saveSimpleStyle();
00034         void saveSurfaceStyle();
00035 public slots:
00036         void setDestination(int d) {sheetcb->setCurrentItem(d); }               
00037         void setFilename(QString f) { filele->setText(f); }                     
00038         void setFilter(int f) { filtercb->setCurrentItem(f); }                  
00039         void setSimplify(bool b=true) { simplifycb->setChecked(b); }            
00040         void setEmpty(bool b=true) { emptycb->setChecked(b); }                  
00041         void setImportHeader(bool b=true) { headercb->setChecked(b); }          
00042         void setSameXColumn(bool b=true) { samexcb->setChecked(b); }            
00043         void setSeparator(int v) { sccb->setCurrentItem(v); }                   
00044         void setSeparator(QChar v) { sccb->setCurrentText(v); }                 
00045         void setComment(int v) { commcb->setCurrentItem(v); }                   
00046         void setComment(QChar v) { commcb->setCurrentText(v); }                 
00047         void setDataRange(int v, int e) { startle->setText(QString::number(v)); endle->setText(QString::number(e)); }
00049         void setStart(int v) {startle->setText(QString::number(v));}
00050         void setEnd(int e) {endle->setText(QString::number(e));}
00051 
00052         // binary data
00053         void setVars(int v) { varle->setText(QString::number(v)); }             
00054         void setBinaryType(int t) { binarytypecb->setCurrentItem(t); }          
00055         
00056         void setStyle(Style *s);                                                
00057         void setSymbol(Symbol *s);                                              
00058 protected:
00059         void resizeEvent(QResizeEvent *e);
00060         QVBox* annotateValuesTab(QTabWidget *tw, Graph *graph);
00061         void importWidget(QVBox *vb,QString filename,InputFilter filter);
00062         void saveImportSettings();
00063         double getBinaryValue(QDataStream *d, int type);
00064         bool openColorMap(QString fn);
00065         QGroupBox *vbox, *gbox;
00066         class MainWin *mw;
00067         class Worksheet *p;
00068         class Spreadsheet *s;
00069 #ifdef HAVE_GL
00070         Qwt3D::ColorVector cv;
00071 #endif
00072         KPushButton *ok, *apply, *save, *cancel;
00073         KLineEdit *filele;                                              // used from various dialogs
00074         KComboBox *cb2, *pencb, *brushcb, *sbrushcb;                    // simple
00075         KComboBox *symbolcb, *symbolfillcb;                             // simple
00076         KColorButton *color, *fcolor, *scolor, *sfcolor;                // simple
00077         QCheckBox *filled, *sortpointscb;                               // simple
00078         KIntNumInput *boxwidth, *width, *ssize;                         // simple
00079         QCheckBox *autobox, *ccb, *dcb, *coloredcb, *meshcb, *relativecb;       // surface
00080         KLineEdit *numberle, *thresholdle;                                      // surface
00081         KComboBox *dbrushcb;                                                    // surface
00082         KColorButton *contourcolor;                                             // surface
00083         KComboBox *typecb, *positioncb;                                         // annotatetab
00084         KIntNumInput *distance;                                                 // annotatetab
00085         QCheckBox *simplifycb, *emptycb, *headercb, *samexcb;                   // importWidget
00086         QLabel *seplabel, *commlabel, *startlabel, *endlabel;                   // importWidget
00087         KLineEdit *startle, *endle;                                             // importWidget
00088         KComboBox *filtercb, *sccb, *commcb;                                    // importWidget
00089         QLabel *varlabel, *binarytypelabel;                                     // importWidget : binary
00090         KLineEdit *varle;
00091         KComboBox *binarytypecb;
00092         KComboBox *sheetcb;                                     // for destination selection (list dialogs+function/data dialog)
00093 protected slots:
00094         void selectFile();
00095         void fileInfo();
00096         void selectColormap();
00097         void adaptDataColors(const QString&);
00098         void updateFilter(int item);
00099         QStringList splitLine(QString line,QString sep, bool empty);
00100 private:
00101         void fillBrushBox(KComboBox *cb,SType t, QColor c,FType f, QColor s);
00102         void fillSymbolBox(QColor c, FType f, QColor s, int b);
00103         void fillSymbolFillBox(SType t, QColor c, QColor s, int b);
00104 private slots:
00105         void styleChanged();
00106         void symbolChanged();
00107 };
00108 
00109 #endif //DIALOG_H

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