Back to index

fet  5.18.0
export.h
Go to the documentation of this file.
00001 /*
00002 File export.h
00003 */
00004 
00005 /***************************************************************************
00006                                 FET
00007                           -------------------
00008    copyright            : (C) by Lalescu Liviu
00009     email                : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
00010  ***************************************************************************
00011                           export.h  -  description
00012                              -------------------
00013     begin                : Mar 2008
00014     copyright            : (C) by Volker Dirr
00015                          : http://www.timetabling.de/
00016  ***************************************************************************
00017  *                                                                         *
00018  *   This program is free software; you can redistribute it and/or modify  *
00019  *   it under the terms of the GNU General Public License as published by  *
00020  *   the Free Software Foundation; either version 2 of the License, or     *
00021  *   (at your option) any later version.                                   *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 #ifndef EXPORT_H
00026 #define EXPORT_H
00027 
00028 #include "timetable.h"
00029 #include "timetable_defs.h"
00030 
00031 #include <QDialog>
00032 #include <QWidget>
00033 
00034 #include <QMessageBox>
00035 
00036 class Export: public QObject{
00037        Q_OBJECT
00038 
00039 public:
00040        Export();
00041        ~Export();
00042 
00043        static void exportCSV(QWidget* parent);
00044 private:
00045        static bool okToWrite(QWidget* parent, const QString& file, QMessageBox::StandardButton& msgBoxButton);
00046 
00047        static bool checkSetSeparator(const QString& str, const QString setSeparator);
00048        static QString protectCSV(const QString& str);
00049 
00050        static bool isActivityNotManualyEdited(const int activityIndex, bool& diffTeachers, bool& diffSubject, bool& diffActivityTags, bool& diffStudents, bool& diffCompNStud, bool& diffNStud, bool& diffActive);
00051 
00052        static bool selectSeparatorAndTextquote(QWidget* parent, QDialog* &newParent, QString& textquote, QString& fieldSeparator, bool& head);
00053 
00054        static bool exportCSVActivities(QWidget* parent, QString& lastWarnings, const QString textquote, const QString fieldSeparator, const bool head, QMessageBox::StandardButton& msgBoxButton);
00055        static bool exportCSVActivitiesStatistic(QWidget* parent, QString& lastWarnings, const QString textquote, const QString fieldSeparator, const bool head, QMessageBox::StandardButton& msgBoxButton);
00056        static bool exportCSVActivityTags(QWidget* parent, QString& lastWarnings, const QString textquote, const bool head, const QString setSeparator, QMessageBox::StandardButton& msgBoxButton);
00057        static bool exportCSVRoomsAndBuildings(QWidget* parent, QString& lastWarnings, const QString textquote, const QString fieldSeparator, const bool head, QMessageBox::StandardButton& msgBoxButton);
00058        static bool exportCSVSubjects(QWidget* parent, QString& lastWarnings, const QString textquote, const bool head, QMessageBox::StandardButton& msgBoxButton);
00059        static bool exportCSVTeachers(QWidget* parent, QString& lastWarnings, const QString textquote, const bool head, const QString setSeparator, QMessageBox::StandardButton& msgBoxButton);
00060        static bool exportCSVStudents(QWidget* parent, QString& lastWarnings, const QString textquote, const QString fieldSeparator, const bool head, const QString setSeparator, QMessageBox::StandardButton& msgBoxButton);
00061        static bool exportCSVTimetable(QWidget* parent, QString& lastWarnings, const QString textquote, const QString fieldSeparator, const bool head, QMessageBox::StandardButton& msgBoxButton);
00062 };
00063 
00064 class LastWarningsDialogE: public QDialog{
00065        Q_OBJECT
00066        
00067 public:                            //can i do that privat too?
00068        LastWarningsDialogE(QWidget *parent, QString lastWarning);
00069        ~LastWarningsDialogE();
00070 };
00071 
00072 #endif