OSCAR-code/exportcsv.h

60 lines
1.3 KiB
C++

/*
ExportCSV module header
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
License: GPL
*/
#ifndef EXPORTCSV_H
#define EXPORTCSV_H
#include <QDateEdit>
#include <QDialog>
#include "SleepLib/machine_common.h"
namespace Ui {
class ExportCSV;
}
struct DumpField {
DumpField() { code=NoChannel; mtype=MT_UNKNOWN; type=ST_CNT; }
DumpField(ChannelID c, MachineType mt, SummaryType t) { code=c; mtype=mt; type=t; }
DumpField(const DumpField & copy) {code=copy.code; mtype=copy.mtype; type=copy.type; }
ChannelID code;
MachineType mtype;
SummaryType type;
};
/*! \class ExportCSV
\brief Dialog for exporting SleepLib data in CSV Format
This module still needs a lot of work
*/
class ExportCSV : public QDialog
{
Q_OBJECT
public:
explicit ExportCSV(QWidget *parent = 0);
~ExportCSV();
private slots:
void on_filenameBrowseButton_clicked();
void on_quickRangeCombo_activated(const QString &arg1);
void on_exportButton_clicked();
void startDate_currentPageChanged(int year, int month);
void endDate_currentPageChanged(int year, int month);
private:
void UpdateCalendarDay(QDateEdit * dateedit,QDate date);
Ui::ExportCSV *ui;
QList<DumpField> fields;
};
#endif // EXPORTCSV_H