00001
00002
00003 #ifndef DUMPDIALOG_H
00004 #define DUMPDIALOG_H
00005
00006 #include <qfont.h>
00007 #include <qcheckbox.h>
00008 #include "Worksheet.h"
00009 #include "Dialog.h"
00010 #include "FilterKexiDB.h"
00011
00012 class DumpDialog: public Dialog
00013 {
00014 Q_OBJECT
00015 public:
00016 DumpDialog(MainWin *mw, const char *name, int item);
00017 public slots:
00018 void selectFile();
00019
00020 void setFilename(QString fn) { filele->setText(fn); }
00021 void exportHeader(bool b=true) { headercb->setChecked(b); }
00022 void setStartRow(int row) { startrow->setText(QString::number(row)); }
00023 void setEndRow(int row) { endrow->setText(QString::number(row)); }
00024 void setFileType(int t) { exportcb->setCurrentItem(t); }
00025 void setSeparator(QString s) { slabel->setText(s); }
00026 void setImageFormat(int i) { ic->setCurrentItem(i); }
00027 void setImageFormat(QString f) { ic->setCurrentText(f); }
00028 void setCDFCompression(int c) { cdfcomcb->setCurrentItem(c); }
00029 void setCDFEncoding(int c) { cdfenccb->setCurrentItem(c); }
00030 void setAudioFormat(int f) { audioformatcb->setCurrentItem(f); }
00031 void setSampleRate(int s) { samplele->setText(QString::number(s)); }
00032 void setBinaryType(int t) { binarytypecb->setCurrentItem(t); }
00033
00034 void ok_clicked() { if(!apply_clicked()) accept(); }
00035 int apply_clicked();
00036 private slots:
00037 void updateOptions(int item);
00038 void updateAudioFormat(int) { updateOptions(3); }
00039 void updateImageFormat(int) { updateOptions(4); }
00040 void wizardKexiDB(const QString &name);
00041 void finishKexiDB();
00042 private:
00043 void dumpASCII(QTextStream *t, QString sep);
00044 void dumpCDF(QString filename);
00045 void dumpNETCDF(QString filename);
00046 void dumpAUDIOFILE(QString filename);
00047 void dumpIMAGE(QString filename);
00048 void dumpBINARY(QDataStream *d);
00049 void dumpKexiDB();
00050 Plot *plot;
00051 int item;
00052 KLineEdit *startrow, *endrow, *samplele;
00053 QLabel *slabel, *flabel, *cdfcomlabel, *cdfenclabel, *audioformatlabel, *samplelabel;
00054 KComboBox *sc, *ic, *exportcb, *cdfcomcb, *cdfenccb, *audioformatcb;
00055 QCheckBox *imagecb, *compresscb, *headercb;
00056 KComboBox *binarytypecb;
00057 FilterKexiDB *kexi;
00058 KComboBox *driver, *databases, *tables;
00059 QLabel *connectionlabel, *tablelabel;
00060 KLineEdit *host, *user, *password;
00061 };
00062
00063 #endif //DUMPDIALOG_H