Refactor: Follow Qt5 module's file directories style

Xlsx Shared library can be used now
This commit is contained in:
Debao Zhang
2013-08-29 17:14:27 +08:00
parent a563809f77
commit 929db3d481
47 changed files with 95 additions and 47 deletions
+3
View File
@@ -0,0 +1,3 @@
load(qt_build_config)
MODULE_VERSION = 0.0.1
+1 -4
View File
@@ -1,6 +1,3 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS = hello SUBDIRS = xlsx
SUBDIRS += \
style
-5
View File
@@ -1,5 +0,0 @@
TARGET = hello
include(../../src/qtxlsxwriter.pri)
SOURCES += main.cpp
-5
View File
@@ -1,5 +0,0 @@
TARGET = style
include(../../src/qtxlsxwriter.pri)
SOURCES += main.cpp
+6
View File
@@ -0,0 +1,6 @@
TARGET = hello
#include(../../../src/xlsx/qtxlsx.pri)
QT+=xlsx
SOURCES += main.cpp
+6
View File
@@ -0,0 +1,6 @@
TARGET = style
#include(../../../src/xlsx/qtxlsx.pri)
QT += xlsx
SOURCES += main.cpp
+3
View File
@@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = hello style
Executable
+1
View File
@@ -0,0 +1 @@
load(qt_parts)
View File
-6
View File
@@ -1,6 +0,0 @@
#include "qxlsxwriter.h"
QXlsxWriter::QXlsxWriter(QObject *parent) :
QObject(parent)
{
}
-23
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = xlsx
+3 -1
View File
@@ -2,6 +2,7 @@ INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD DEPENDPATH += $$PWD
QT += core gui gui-private QT += core gui gui-private
!build_xlsx_lib:DEFINES += XLSX_NO_LIB
HEADERS += $$PWD/xlsxdocprops_p.h \ HEADERS += $$PWD/xlsxdocprops_p.h \
$$PWD/xlsxrelationships_p.h \ $$PWD/xlsxrelationships_p.h \
@@ -18,7 +19,8 @@ HEADERS += $$PWD/xlsxdocprops_p.h \
$$PWD/xlsxpackage_p.h \ $$PWD/xlsxpackage_p.h \
$$PWD/xlsxworkbook_p.h \ $$PWD/xlsxworkbook_p.h \
$$PWD/xlsxworksheet_p.h \ $$PWD/xlsxworksheet_p.h \
$$PWD/xlsxformat_p.h $$PWD/xlsxformat_p.h \
$$PWD/xlsxglobal.h
SOURCES += $$PWD/xlsxdocprops.cpp \ SOURCES += $$PWD/xlsxdocprops.cpp \
$$PWD/xlsxrelationships.cpp \ $$PWD/xlsxrelationships.cpp \
+13
View File
@@ -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"
+2 -1
View File
@@ -25,6 +25,7 @@
#ifndef QXLSX_FORMAT_H #ifndef QXLSX_FORMAT_H
#define QXLSX_FORMAT_H #define QXLSX_FORMAT_H
#include "xlsxglobal.h"
#include <QFont> #include <QFont>
#include <QColor> #include <QColor>
#include <QByteArray> #include <QByteArray>
@@ -37,7 +38,7 @@ class Worksheet;
class WorksheetPrivate; class WorksheetPrivate;
class FormatPrivate; class FormatPrivate;
class Format class Q_XLSX_EXPORT Format
{ {
Q_DECLARE_PRIVATE(Format) Q_DECLARE_PRIVATE(Format)
public: public:
+43
View File
@@ -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 #ifndef XLSXWORKBOOK_H
#define XLSXWORKBOOK_H #define XLSXWORKBOOK_H
#include "xlsxglobal.h"
#include <QObject> #include <QObject>
#include <QList> #include <QList>
class QIODevice; class QIODevice;
@@ -38,7 +39,7 @@ class Styles;
class Package; class Package;
class WorkbookPrivate; class WorkbookPrivate;
class Workbook : public QObject class Q_XLSX_EXPORT Workbook : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_DECLARE_PRIVATE(Workbook) Q_DECLARE_PRIVATE(Workbook)
@@ -25,6 +25,7 @@
#ifndef XLSXWORKSHEET_H #ifndef XLSXWORKSHEET_H
#define XLSXWORKSHEET_H #define XLSXWORKSHEET_H
#include "xlsxglobal.h"
#include <QObject> #include <QObject>
#include <QStringList> #include <QStringList>
#include <QMap> #include <QMap>
@@ -39,7 +40,7 @@ class XmlStreamWriter;
class Format; class Format;
class WorksheetPrivate; class WorksheetPrivate;
class Worksheet : public QObject class Q_XLSX_EXPORT Worksheet : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_DECLARE_PRIVATE(Worksheet) Q_DECLARE_PRIVATE(Worksheet)
+7
View File
@@ -0,0 +1,7 @@
%modules = (
"QtXlsx" => "$basedir/src/xlsx",
);
%dependencies = (
"qtbase" => "",
);