Refactor: Follow Qt5 module's file directories style
Xlsx Shared library can be used now
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
load(qt_build_config)
|
||||
|
||||
MODULE_VERSION = 0.0.1
|
||||
@@ -1,6 +1,3 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = hello
|
||||
|
||||
SUBDIRS += \
|
||||
style
|
||||
SUBDIRS = xlsx
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
TARGET = hello
|
||||
|
||||
include(../../src/qtxlsxwriter.pri)
|
||||
|
||||
SOURCES += main.cpp
|
||||
@@ -1,5 +0,0 @@
|
||||
TARGET = style
|
||||
|
||||
include(../../src/qtxlsxwriter.pri)
|
||||
|
||||
SOURCES += main.cpp
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
TARGET = hello
|
||||
|
||||
#include(../../../src/xlsx/qtxlsx.pri)
|
||||
QT+=xlsx
|
||||
|
||||
SOURCES += main.cpp
|
||||
@@ -0,0 +1,6 @@
|
||||
TARGET = style
|
||||
|
||||
#include(../../../src/xlsx/qtxlsx.pri)
|
||||
QT += xlsx
|
||||
|
||||
SOURCES += main.cpp
|
||||
@@ -0,0 +1,3 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = hello style
|
||||
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
load(qt_parts)
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "qxlsxwriter.h"
|
||||
|
||||
QXlsxWriter::QXlsxWriter(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef QXLSXWRITER_H
|
||||
#define QXLSXWRITER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class QXlsxWriter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QXlsxWriter(QObject *parent = 0);
|
||||
|
||||
// void worksheets();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
// void addWorksheet(QString name);
|
||||
// void addFormat();
|
||||
// void addChart();
|
||||
// void setProperties();
|
||||
};
|
||||
|
||||
#endif // QXLSXWRITER_H
|
||||
@@ -0,0 +1,3 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = xlsx
|
||||
@@ -2,6 +2,7 @@ INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
QT += core gui gui-private
|
||||
!build_xlsx_lib:DEFINES += XLSX_NO_LIB
|
||||
|
||||
HEADERS += $$PWD/xlsxdocprops_p.h \
|
||||
$$PWD/xlsxrelationships_p.h \
|
||||
@@ -18,7 +19,8 @@ HEADERS += $$PWD/xlsxdocprops_p.h \
|
||||
$$PWD/xlsxpackage_p.h \
|
||||
$$PWD/xlsxworkbook_p.h \
|
||||
$$PWD/xlsxworksheet_p.h \
|
||||
$$PWD/xlsxformat_p.h
|
||||
$$PWD/xlsxformat_p.h \
|
||||
$$PWD/xlsxglobal.h
|
||||
|
||||
SOURCES += $$PWD/xlsxdocprops.cpp \
|
||||
$$PWD/xlsxrelationships.cpp \
|
||||
@@ -0,0 +1,13 @@
|
||||
TARGET = QtXlsx
|
||||
|
||||
#QMAKE_DOCS = $$PWD/doc/qtxlsx.qdocconf
|
||||
|
||||
load(qt_module)
|
||||
|
||||
CONFIG += build_xlsx_lib
|
||||
include(qtxlsx.pri)
|
||||
|
||||
QMAKE_TARGET_COMPANY = "Debao Zhang"
|
||||
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2013 Debao Zhang <hello@debao.me>"
|
||||
QMAKE_TARGET_DESCRIPTION = ".Xlsx file wirter for Qt5"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef QXLSX_FORMAT_H
|
||||
#define QXLSX_FORMAT_H
|
||||
|
||||
#include "xlsxglobal.h"
|
||||
#include <QFont>
|
||||
#include <QColor>
|
||||
#include <QByteArray>
|
||||
@@ -37,7 +38,7 @@ class Worksheet;
|
||||
class WorksheetPrivate;
|
||||
|
||||
class FormatPrivate;
|
||||
class Format
|
||||
class Q_XLSX_EXPORT Format
|
||||
{
|
||||
Q_DECLARE_PRIVATE(Format)
|
||||
public:
|
||||
@@ -0,0 +1,43 @@
|
||||
/****************************************************************************
|
||||
** Copyright (c) 2013 Debao Zhang <hello@debao.me>
|
||||
** All right reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining
|
||||
** a copy of this software and associated documentation files (the
|
||||
** "Software"), to deal in the Software without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Software, and to
|
||||
** permit persons to whom the Software is furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be
|
||||
** included in all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef XLSXGLOBAL_H
|
||||
#define XLSXGLOBAL_H
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace QXlsx {
|
||||
|
||||
#if !defined(QT_STATIC) && !defined(XLSX_NO_LIB)
|
||||
# if defined(QT_BUILD_XLSX_LIB)
|
||||
# define Q_XLSX_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define Q_XLSX_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define Q_XLSX_EXPORT
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // XLSXGLOBAL_H
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef XLSXWORKBOOK_H
|
||||
#define XLSXWORKBOOK_H
|
||||
|
||||
#include "xlsxglobal.h"
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
class QIODevice;
|
||||
@@ -38,7 +39,7 @@ class Styles;
|
||||
class Package;
|
||||
|
||||
class WorkbookPrivate;
|
||||
class Workbook : public QObject
|
||||
class Q_XLSX_EXPORT Workbook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(Workbook)
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef XLSXWORKSHEET_H
|
||||
#define XLSXWORKSHEET_H
|
||||
|
||||
#include "xlsxglobal.h"
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QMap>
|
||||
@@ -39,7 +40,7 @@ class XmlStreamWriter;
|
||||
class Format;
|
||||
|
||||
class WorksheetPrivate;
|
||||
class Worksheet : public QObject
|
||||
class Q_XLSX_EXPORT Worksheet : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(Worksheet)
|
||||
@@ -0,0 +1,7 @@
|
||||
%modules = (
|
||||
"QtXlsx" => "$basedir/src/xlsx",
|
||||
);
|
||||
|
||||
%dependencies = (
|
||||
"qtbase" => "",
|
||||
);
|
||||
Reference in New Issue
Block a user