ExcelFileConverter.h
Go to the documentation of this file.
/***************************************************************************
File : ExcelFileConverter.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2010 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : An object converting Excel files to Open Document Format Spreadsheets (.ods)
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef ExcelFileConverter_H
#define ExcelFileConverter_H
#include <QObject>
#include <QProcess>
class ApplicationWindow;
class Table;
class ExcelFileConverter : public QObject
{
Q_OBJECT
public:
ExcelFileConverter(const QString& fileName, ApplicationWindow *app, bool keepInputFile = false);
QString outputFile(){return d_output_file;}
private slots:
void startConvertion();
void displayJavaError(QProcess::ProcessError error);
void displayOfficeError(QProcess::ProcessError error);
void finish(int exitCode, QProcess::ExitStatus exitStatus);
private:
void startOpenOfficeServer();
void displayError(const QString& process, QProcess::ProcessError error);
QString d_file_name;
QString d_output_file;
QProcess *soffice, *java;
bool d_keep_input_file;
#ifdef Q_WS_X11
bool d_soffice_already_running;
#endif
};
#endif
ExcelFileConverter::d_output_file
QString d_output_file
Definition: ExcelFileConverter.h:57
ExcelFileConverter::displayError
void displayError(const QString &process, QProcess::ProcessError error)
Definition: ExcelFileConverter.cpp:169
ExcelFileConverter::java
QProcess * java
Definition: ExcelFileConverter.h:58
ExcelFileConverter::ExcelFileConverter
ExcelFileConverter(const QString &fileName, ApplicationWindow *app, bool keepInputFile=false)
Definition: ExcelFileConverter.cpp:36
ExcelFileConverter::displayJavaError
void displayJavaError(QProcess::ProcessError error)
Definition: ExcelFileConverter.cpp:149
ExcelFileConverter::startOpenOfficeServer
void startOpenOfficeServer()
Definition: ExcelFileConverter.cpp:54
ApplicationWindow
QtiPlot's main window.
Definition: ApplicationWindow.h:133
ExcelFileConverter
Definition: ExcelFileConverter.h:38
ExcelFileConverter::finish
void finish(int exitCode, QProcess::ExitStatus exitStatus)
Definition: ExcelFileConverter.cpp:108
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
ExcelFileConverter::outputFile
QString outputFile()
Definition: ExcelFileConverter.h:44
ExcelFileConverter::startConvertion
void startConvertion()
Definition: ExcelFileConverter.cpp:74
ExcelFileConverter::soffice
QProcess * soffice
Definition: ExcelFileConverter.h:58
ExcelFileConverter::d_keep_input_file
bool d_keep_input_file
Definition: ExcelFileConverter.h:59
ExcelFileConverter::d_file_name
QString d_file_name
Definition: ExcelFileConverter.h:56
ExcelFileConverter::displayOfficeError
void displayOfficeError(QProcess::ProcessError error)
Definition: ExcelFileConverter.cpp:159