Browse Source

Refactor: Follow Qt5 module's file directories style

Xlsx Shared library can be used now
master
Debao Zhang 11 years ago
parent
commit
929db3d481
  1. 3
      .qmake.conf
  2. 5
      examples/examples.pro
  3. 5
      examples/hello/hello.pro
  4. 5
      examples/style/style.pro
  5. 6
      examples/xlsx/hello/hello.pro
  6. 0
      examples/xlsx/hello/main.cpp
  7. 0
      examples/xlsx/style/main.cpp
  8. 6
      examples/xlsx/style/style.pro
  9. 3
      examples/xlsx/xlsx.pro
  10. 1
      qtxlsx.pro
  11. 0
      qtxlsxwriter.pro
  12. 6
      src/qxlsxwriter.cpp
  13. 23
      src/qxlsxwriter.h
  14. 3
      src/src.pro
  15. 4
      src/xlsx/qtxlsx.pri
  16. 13
      src/xlsx/xlsx.pro
  17. 0
      src/xlsx/xlsxcontenttypes.cpp
  18. 0
      src/xlsx/xlsxcontenttypes_p.h
  19. 0
      src/xlsx/xlsxdocprops.cpp
  20. 0
      src/xlsx/xlsxdocprops_p.h
  21. 0
      src/xlsx/xlsxformat.cpp
  22. 3
      src/xlsx/xlsxformat.h
  23. 0
      src/xlsx/xlsxformat_p.h
  24. 43
      src/xlsx/xlsxglobal.h
  25. 0
      src/xlsx/xlsxpackage.cpp
  26. 0
      src/xlsx/xlsxpackage_p.h
  27. 0
      src/xlsx/xlsxrelationships.cpp
  28. 0
      src/xlsx/xlsxrelationships_p.h
  29. 0
      src/xlsx/xlsxsharedstrings.cpp
  30. 0
      src/xlsx/xlsxsharedstrings_p.h
  31. 0
      src/xlsx/xlsxstyles.cpp
  32. 0
      src/xlsx/xlsxstyles_p.h
  33. 0
      src/xlsx/xlsxtheme.cpp
  34. 0
      src/xlsx/xlsxtheme_p.h
  35. 0
      src/xlsx/xlsxutility.cpp
  36. 0
      src/xlsx/xlsxutility_p.h
  37. 0
      src/xlsx/xlsxworkbook.cpp
  38. 3
      src/xlsx/xlsxworkbook.h
  39. 0
      src/xlsx/xlsxworkbook_p.h
  40. 0
      src/xlsx/xlsxworksheet.cpp
  41. 3
      src/xlsx/xlsxworksheet.h
  42. 0
      src/xlsx/xlsxworksheet_p.h
  43. 0
      src/xlsx/xmlstreamwriter.cpp
  44. 0
      src/xlsx/xmlstreamwriter_p.h
  45. 0
      src/xlsx/zipwriter.cpp
  46. 0
      src/xlsx/zipwriter_p.h
  47. 7
      sync.profile

3
.qmake.conf

@ -0,0 +1,3 @@
load(qt_build_config)
MODULE_VERSION = 0.0.1

5
examples/examples.pro

@ -1,6 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = hello
SUBDIRS += \
style
SUBDIRS = xlsx

5
examples/hello/hello.pro

@ -1,5 +0,0 @@
TARGET = hello
include(../../src/qtxlsxwriter.pri)
SOURCES += main.cpp

5
examples/style/style.pro

@ -1,5 +0,0 @@
TARGET = style
include(../../src/qtxlsxwriter.pri)
SOURCES += main.cpp

6
examples/xlsx/hello/hello.pro

@ -0,0 +1,6 @@
TARGET = hello
#include(../../../src/xlsx/qtxlsx.pri)
QT+=xlsx
SOURCES += main.cpp

0
examples/hello/main.cpp → examples/xlsx/hello/main.cpp

0
examples/style/main.cpp → examples/xlsx/style/main.cpp

6
examples/xlsx/style/style.pro

@ -0,0 +1,6 @@
TARGET = style
#include(../../../src/xlsx/qtxlsx.pri)
QT += xlsx
SOURCES += main.cpp

3
examples/xlsx/xlsx.pro

@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = hello style

1
qtxlsx.pro

@ -0,0 +1 @@
load(qt_parts)

0
qtxlsxwriter.pro

6
src/qxlsxwriter.cpp

@ -1,6 +0,0 @@
#include "qxlsxwriter.h"
QXlsxWriter::QXlsxWriter(QObject *parent) :
QObject(parent)
{
}

23
src/qxlsxwriter.h

@ -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
src/src.pro

@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = xlsx

4
src/qtxlsxwriter.pri → src/xlsx/qtxlsx.pri

@ -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 \

13
src/xlsx/xlsx.pro

@ -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"

0
src/xlsxcontenttypes.cpp → src/xlsx/xlsxcontenttypes.cpp

0
src/xlsxcontenttypes_p.h → src/xlsx/xlsxcontenttypes_p.h

0
src/xlsxdocprops.cpp → src/xlsx/xlsxdocprops.cpp

0
src/xlsxdocprops_p.h → src/xlsx/xlsxdocprops_p.h

0
src/xlsxformat.cpp → src/xlsx/xlsxformat.cpp

3
src/xlsxformat.h → src/xlsx/xlsxformat.h

@ -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
src/xlsxformat_p.h → src/xlsx/xlsxformat_p.h

43
src/xlsx/xlsxglobal.h

@ -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

0
src/xlsxpackage.cpp → src/xlsx/xlsxpackage.cpp

0
src/xlsxpackage_p.h → src/xlsx/xlsxpackage_p.h

0
src/xlsxrelationships.cpp → src/xlsx/xlsxrelationships.cpp

0
src/xlsxrelationships_p.h → src/xlsx/xlsxrelationships_p.h

0
src/xlsxsharedstrings.cpp → src/xlsx/xlsxsharedstrings.cpp

0
src/xlsxsharedstrings_p.h → src/xlsx/xlsxsharedstrings_p.h

0
src/xlsxstyles.cpp → src/xlsx/xlsxstyles.cpp

0
src/xlsxstyles_p.h → src/xlsx/xlsxstyles_p.h

0
src/xlsxtheme.cpp → src/xlsx/xlsxtheme.cpp

0
src/xlsxtheme_p.h → src/xlsx/xlsxtheme_p.h

0
src/xlsxutility.cpp → src/xlsx/xlsxutility.cpp

0
src/xlsxutility_p.h → src/xlsx/xlsxutility_p.h

0
src/xlsxworkbook.cpp → src/xlsx/xlsxworkbook.cpp

3
src/xlsxworkbook.h → src/xlsx/xlsxworkbook.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)

0
src/xlsxworkbook_p.h → src/xlsx/xlsxworkbook_p.h

0
src/xlsxworksheet.cpp → src/xlsx/xlsxworksheet.cpp

3
src/xlsxworksheet.h → src/xlsx/xlsxworksheet.h

@ -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
src/xlsxworksheet_p.h → src/xlsx/xlsxworksheet_p.h

0
src/xmlstreamwriter.cpp → src/xlsx/xmlstreamwriter.cpp

0
src/xmlstreamwriter_p.h → src/xlsx/xmlstreamwriter_p.h

0
src/zipwriter.cpp → src/xlsx/zipwriter.cpp

0
src/zipwriter_p.h → src/xlsx/zipwriter_p.h

7
sync.profile

@ -0,0 +1,7 @@
%modules = (
"QtXlsx" => "$basedir/src/xlsx",
);
%dependencies = (
"qtbase" => "",
);
Loading…
Cancel
Save