mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-03 03:57:31 +03:00
Cmake fixes: non exported symbols, missing files, shared import, rewrite cmake for demo and designer
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Ui {
|
||||
class lrbordereditor;
|
||||
}
|
||||
|
||||
class lrbordereditor : public QDialog
|
||||
class LIMEREPORT_EXPORT lrbordereditor : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@@ -1,9 +1,12 @@
|
||||
#include "lrpageeditor.h"
|
||||
#include "ui_lrpageeditor.h"
|
||||
#include "lrpagedesignintf.h"
|
||||
#include "lrpageitemdesignintf.h"
|
||||
#include <QPushButton>
|
||||
#include <QPageSize>
|
||||
lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) :
|
||||
|
||||
using namespace LimeReport;
|
||||
|
||||
lrpageeditor::lrpageeditor(QWidget *parent, PageItemDesignIntf *page) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::lrpageeditor)
|
||||
{
|
||||
@@ -16,10 +19,10 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page
|
||||
ui->format->addItem(pageSizes.key(i));
|
||||
}
|
||||
ui->format->setCurrentIndex(m_page->pageSize());
|
||||
ui->width->setValue(m_page->width() / LimeReport::Const::mmFACTOR);
|
||||
ui->height->setValue(m_page->height() / LimeReport::Const::mmFACTOR);
|
||||
ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait);
|
||||
ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape);
|
||||
ui->width->setValue(m_page->width() / Const::mmFACTOR);
|
||||
ui->height->setValue(m_page->height() / Const::mmFACTOR);
|
||||
ui->portrait->setChecked(m_page->pageOrientation() == PageItemDesignIntf::Portrait);
|
||||
ui->landscape->setChecked(m_page->pageOrientation() == PageItemDesignIntf::Landscape);
|
||||
//Margins
|
||||
ui->marginTop->setValue(m_page->topMargin());
|
||||
ui->marginRight->setValue(m_page->rightMargin());
|
||||
@@ -40,10 +43,10 @@ lrpageeditor::~lrpageeditor()
|
||||
|
||||
void lrpageeditor::applyChanges()
|
||||
{
|
||||
m_page->setPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(ui->format->currentIndex()));
|
||||
m_page->setWidth(ui->width->value()* LimeReport::Const::mmFACTOR);
|
||||
m_page->setHeight(ui->height->value()* LimeReport::Const::mmFACTOR);
|
||||
m_page->setPageOrientation(ui->portrait->isChecked()?LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape);
|
||||
m_page->setPageSize(static_cast<PageItemDesignIntf::PageSize>(ui->format->currentIndex()));
|
||||
m_page->setWidth(ui->width->value()* Const::mmFACTOR);
|
||||
m_page->setHeight(ui->height->value()* Const::mmFACTOR);
|
||||
m_page->setPageOrientation(ui->portrait->isChecked()?PageItemDesignIntf::Portrait : PageItemDesignIntf::Landscape);
|
||||
|
||||
m_page->setTopMargin(ui->marginTop->value());
|
||||
m_page->setBottomMargin(ui->marginBottom->value());
|
||||
@@ -61,9 +64,9 @@ void lrpageeditor::on_buttonBox_accepted()
|
||||
|
||||
}
|
||||
|
||||
QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size)
|
||||
QSizeF lrpageeditor::getRectByPageSize(const PageItemDesignIntf::PageSize& size)
|
||||
{
|
||||
if (size != LimeReport::PageItemDesignIntf::Custom) {
|
||||
if (size != PageItemDesignIntf::Custom) {
|
||||
QPrinter printer;
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
|
||||
@@ -76,8 +79,8 @@ QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::Pag
|
||||
QPageSize pageSize = QPageSize((QPageSize::PageSizeId)size);
|
||||
qreal width = pageSize.size(QPageSize::Millimeter).width() * 10;
|
||||
qreal height = pageSize.size(QPageSize::Millimeter).height() * 10;
|
||||
return QSizeF(pageOrientation() == Portrait ? width : height,
|
||||
pageOrientation() == Portrait ? height : width);
|
||||
return QSizeF(m_page->pageOrientation() == PageItemDesignIntf::Portrait ? width : height,
|
||||
m_page->pageOrientation() == PageItemDesignIntf::Orientation::Portrait ? height : width);
|
||||
|
||||
// printer.setPageOrientation((QPageLayout::Orientation)pageOrientation());
|
||||
// printer.setPageSize(QPageSize((QPageSize::PageSizeId)size));
|
||||
@@ -95,7 +98,7 @@ void lrpageeditor::on_format_currentIndexChanged(int index)
|
||||
QPageSize ps = *new QPageSize();
|
||||
if(ui->format->currentText() != "Custom")
|
||||
{
|
||||
QSizeF pageSize = getRectByPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(index));
|
||||
QSizeF pageSize = getRectByPageSize(static_cast<PageItemDesignIntf::PageSize>(index));
|
||||
ui->width->setValue(pageSize.width()/10);
|
||||
ui->height->setValue(pageSize.height()/10);
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ namespace Ui {
|
||||
class lrpageeditor;
|
||||
}
|
||||
|
||||
class lrpageeditor : public QDialog
|
||||
class LIMEREPORT_EXPORT lrpageeditor : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@@ -49,7 +49,7 @@ class ReportEnginePrivate;
|
||||
class PageDesignIntf;
|
||||
class BaseDesignIntf;
|
||||
|
||||
class Marker : public QGraphicsItem{
|
||||
class LIMEREPORT_EXPORT Marker : public QGraphicsItem{
|
||||
public:
|
||||
Marker(QGraphicsItem* parent = 0, BaseDesignIntf* owner = 0): QGraphicsItem(parent), m_owner(owner){}
|
||||
QRectF boundingRect() const;
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
BaseDesignIntf* m_owner;
|
||||
};
|
||||
|
||||
class SelectionMarker : public Marker{
|
||||
class LIMEREPORT_EXPORT SelectionMarker : public Marker{
|
||||
public:
|
||||
SelectionMarker(QGraphicsItem* parent=0, BaseDesignIntf* owner = 0);
|
||||
QColor color() const;
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
class DataSourceManager;
|
||||
class ReportRender;
|
||||
|
||||
class BaseDesignIntf :
|
||||
class LIMEREPORT_EXPORT BaseDesignIntf :
|
||||
public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
@@ -515,7 +515,7 @@ signals:
|
||||
void afterRender();
|
||||
};
|
||||
|
||||
class BookmarkContainerDesignIntf: public BaseDesignIntf{
|
||||
class LIMEREPORT_EXPORT BookmarkContainerDesignIntf: public BaseDesignIntf{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BookmarkContainerDesignIntf(const QString& storageTypeName, QObject* owner = 0, QGraphicsItem* parent = 0)
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "lrglobal.h"
|
||||
|
||||
class ACollectionProperty{
|
||||
class LIMEREPORT_EXPORT ACollectionProperty{
|
||||
public:
|
||||
ACollectionProperty(){}
|
||||
ACollectionProperty(const ACollectionProperty& ){}
|
||||
@@ -45,8 +45,8 @@ Q_DECLARE_METATYPE(ACollectionProperty)
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
const int COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>();
|
||||
class ICollectionContainer{
|
||||
const int inline COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>();
|
||||
class LIMEREPORT_EXPORT ICollectionContainer{
|
||||
public:
|
||||
virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0;
|
||||
virtual int elementsCount(const QString& collectionName)=0;
|
||||
|
@@ -125,12 +125,12 @@ namespace Const{
|
||||
Q_DECLARE_FLAGS(PreviewHints, PreviewHint)
|
||||
Q_FLAGS(PreviewHints)
|
||||
|
||||
class ReportError : public std::runtime_error{
|
||||
class LIMEREPORT_EXPORT ReportError : public std::runtime_error{
|
||||
public:
|
||||
ReportError(const QString& message);
|
||||
};
|
||||
|
||||
class ReportSettings{
|
||||
class LIMEREPORT_EXPORT ReportSettings{
|
||||
public:
|
||||
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
|
||||
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
|
||||
@@ -140,13 +140,13 @@ namespace Const{
|
||||
bool m_suppressAbsentFieldsAndVarsWarnings;
|
||||
};
|
||||
|
||||
class IExternalPainter{
|
||||
class LIMEREPORT_EXPORT IExternalPainter{
|
||||
public:
|
||||
virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0;
|
||||
virtual ~IExternalPainter();
|
||||
};
|
||||
|
||||
class IPainterProxy{
|
||||
class LIMEREPORT_EXPORT IPainterProxy{
|
||||
public:
|
||||
virtual void setExternalPainter(IExternalPainter* externalPainter) = 0;
|
||||
virtual ~IPainterProxy();
|
||||
@@ -168,7 +168,7 @@ namespace Const{
|
||||
#endif
|
||||
|
||||
|
||||
class Enums
|
||||
class LIMEREPORT_EXPORT Enums
|
||||
{
|
||||
public:
|
||||
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
class Segment{
|
||||
class LIMEREPORT_EXPORT Segment{
|
||||
public:
|
||||
Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){}
|
||||
bool intersect(Segment value);
|
||||
@@ -15,17 +15,17 @@ private:
|
||||
qreal m_end;
|
||||
};
|
||||
|
||||
class VSegment : public Segment{
|
||||
class LIMEREPORT_EXPORT VSegment : public Segment{
|
||||
public:
|
||||
VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){}
|
||||
};
|
||||
|
||||
struct HSegment :public Segment{
|
||||
struct LIMEREPORT_EXPORT HSegment :public Segment{
|
||||
public:
|
||||
HSegment(QRectF rect):Segment(rect.left(),rect.right()){}
|
||||
};
|
||||
|
||||
struct ItemSortContainer {
|
||||
struct LIMEREPORT_EXPORT ItemSortContainer {
|
||||
QRectF m_rect;
|
||||
BaseDesignIntf * m_item;
|
||||
ItemSortContainer(BaseDesignIntf *item){
|
||||
@@ -35,9 +35,9 @@ struct ItemSortContainer {
|
||||
};
|
||||
|
||||
typedef QSharedPointer< ItemSortContainer > PItemSortContainer;
|
||||
bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
|
||||
bool LIMEREPORT_EXPORT itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
|
||||
|
||||
class ItemsContainerDesignInft : public BookmarkContainerDesignIntf{
|
||||
class LIMEREPORT_EXPORT ItemsContainerDesignInft : public BookmarkContainerDesignIntf{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0):
|
||||
|
@@ -39,7 +39,7 @@
|
||||
namespace LimeReport{
|
||||
|
||||
class ReportRender;
|
||||
class PageItemDesignIntf : public ItemsContainerDesignInft
|
||||
class LIMEREPORT_EXPORT PageItemDesignIntf : public ItemsContainerDesignInft
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin)
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#ifndef LRSTORAGEINTF_H
|
||||
#define LRSTORAGEINTF_H
|
||||
|
||||
#include "lrglobal.h"
|
||||
#include <QSharedPointer>
|
||||
|
||||
class QString;
|
||||
@@ -37,14 +38,14 @@ class QObject;
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
class ObjectLoadingStateIntf{
|
||||
class LIMEREPORT_EXPORT ObjectLoadingStateIntf{
|
||||
public:
|
||||
virtual bool isLoading() = 0;
|
||||
virtual void objectLoadStarted() = 0;
|
||||
virtual void objectLoadFinished() = 0;
|
||||
};
|
||||
|
||||
class ItemsWriterIntf
|
||||
class LIMEREPORT_EXPORT ItemsWriterIntf
|
||||
{
|
||||
public:
|
||||
virtual void putItem(QObject* item) = 0;
|
||||
@@ -55,7 +56,7 @@ public:
|
||||
virtual ~ItemsWriterIntf(){}
|
||||
};
|
||||
|
||||
class ItemsReaderIntf
|
||||
class LIMEREPORT_EXPORT ItemsReaderIntf
|
||||
{
|
||||
public:
|
||||
typedef QSharedPointer<ItemsReaderIntf> Ptr;
|
||||
|
Reference in New Issue
Block a user