00001
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 "Worksheet.h"
00018
00019 class Dialog: public KDialog
00020 {
00021 Q_OBJECT
00022 public:
00023 Dialog(MainWin *mw, const char *name);
00024 QVBox* surfaceStyle(QTabWidget *tw, bool fresh);
00025 QVBox* simpleStyle(QTabWidget *tw, Graph *graph, Style *style, Symbol *symbol);
00026 void saveSimpleStyle();
00027 void saveSurfaceStyle();
00028 protected:
00029 void resizeEvent(QResizeEvent *e);
00030 QVBox* annotateValuesTab(QTabWidget *tw, Graph *graph);
00031 void importWidget(QVBox *vb,QString filename);
00032 double getBinaryValue(QDataStream *d, int type);
00033 QGroupBox *vbox, *gbox;
00034 MainWin *mw;
00035 Worksheet *p;
00036 Spreadsheet *s;
00037 KPushButton *ok, *apply, *cancel;
00038 KLineEdit *filele;
00039 KComboBox *cb2, *pencb, *brushcb, *sbrushcb;
00040 KComboBox *symbolcb, *symbolfillcb;
00041 KColorButton *color, *fcolor, *scolor, *sfcolor;
00042 QCheckBox *filled;
00043 KLineEdit *boxwidthle, *ssize, *widthle;
00044 QCheckBox *autobox, *ccb, *dcb, *coloredcb, *meshcb, *relativecb;
00045 KLineEdit *numberle, *thresholdle;
00046 KComboBox *pcb, *dbrushcb;
00047 KColorButton *contourcolor;
00048 KComboBox *typecb, *positioncb;
00049 KLineEdit *distancele;
00050 QCheckBox *simplifycb, *emptycb;
00051 QLabel *seplabel, *commlabel, *startlabel, *endlabel;
00052 KLineEdit *startle, *endle;
00053 KComboBox *filtercb, *sccb, *commcb;
00054 QLabel *varlabel, *binarytypelabel;
00055 KLineEdit *varle;
00056 KComboBox *binarytypecb;
00057 KComboBox *sheetcb;
00058 protected slots:
00059 void selectFile();
00060 void fileInfo();
00061 void updateFilter(int item);
00062 QStringList splitLine(QString line,QString sep, bool empty);
00063 private:
00064 void fillBrushBox(KComboBox *cb,SType t, QColor c,FType f, QColor s);
00065 void fillSymbolBox(QColor c, FType f, QColor s, int b);
00066 void fillSymbolFillBox(SType t, QColor c, QColor s, int b);
00067 private slots:
00068 void styleChanged();
00069 void symbolChanged();
00070 };
00071
00072 #endif //DIALOG_H