0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-01-12 09:31:04 +03:00

Finish 1.4.115

This commit is contained in:
Arin Alexander 2019-01-16 20:26:34 +03:00
commit c7a589744e
3 changed files with 204 additions and 228 deletions

View File

@ -77,7 +77,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 4 LIMEREPORT_VERSION_MINOR = 4
LIMEREPORT_VERSION_RELEASE = 113 LIMEREPORT_VERSION_RELEASE = 114
LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"'
DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\"

View File

@ -67,8 +67,6 @@ bool bandSortBandLessThen(const BandDesignIntf *c1, const BandDesignIntf *c2)
PageDesignIntf::PageDesignIntf(QObject *parent): PageDesignIntf::PageDesignIntf(QObject *parent):
QGraphicsScene(parent), QGraphicsScene(parent),
m_pageSize(A4),
m_orientation(Portrait),
m_pageItem(0), m_pageItem(0),
m_insertMode(false), m_insertMode(false),
m_itemInsertRect(0), m_itemInsertRect(0),
@ -84,8 +82,6 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
m_executingGroupCommand(false), m_executingGroupCommand(false),
m_settings(0), m_settings(0),
m_selectionRect(0), m_selectionRect(0),
//m_verticalGridStep(1*Const::mmFACTOR),
//m_horizontalGridStep(1*Const::mmFACTOR)
m_verticalGridStep(2), m_verticalGridStep(2),
m_horizontalGridStep(2), m_horizontalGridStep(2),
m_updating(false), m_updating(false),
@ -134,22 +130,22 @@ void PageDesignIntf::updatePageRect()
emit sceneRectChanged(sceneRect()); emit sceneRectChanged(sceneRect());
} }
PageDesignIntf::Orientation PageDesignIntf::getOrientation() //PageDesignIntf::Orientation PageDesignIntf::getOrientation()
{ //{
return m_orientation; // return m_orientation;
} //}
void PageDesignIntf::setPageSize(PageDesignIntf::PageSize sizeType, QSizeF sizeValue) //void PageDesignIntf::setPageSize(PageDesignIntf::PageSize sizeType, QSizeF sizeValue)
{ //{
m_pageSize = sizeType; // m_pageSize = sizeType;
m_pageSizeValue = sizeValue; // m_pageSizeValue = sizeValue;
updatePageRect(); // updatePageRect();
} //}
PageDesignIntf::PageSize PageDesignIntf::pageSize() const //PageDesignIntf::PageSize PageDesignIntf::pageSize() const
{ //{
return m_pageSize; // return m_pageSize;
} //}
void PageDesignIntf::keyPressEvent(QKeyEvent *event) void PageDesignIntf::keyPressEvent(QKeyEvent *event)
{ {
@ -672,22 +668,22 @@ bool PageDesignIntf::isExistsObjectName(const QString &objectName, QList<QGraphi
return false; return false;
} }
QRectF PageDesignIntf::getRectByPageSize(PageDesignIntf::PageSize pageSize) //QRectF PageDesignIntf::getRectByPageSize(PageDesignIntf::PageSize pageSize)
{ //{
if (m_pageSize != Custom) { // if (m_pageSize != PageSize::Custom) {
QPrinter printer; // QPrinter printer;
printer.setOutputFormat(QPrinter::PdfFormat); // printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOrientation((QPrinter::Orientation)getOrientation()); // printer.setOrientation((QPrinter::Orientation)getOrientation());
printer.setPageSize((QPrinter::PageSize)pageSize); // printer.setPageSize((QPrinter::PageSize)pageSize);
return QRectF(0, 0, printer.paperRect(QPrinter::Millimeter).width() * 10, // return QRectF(0, 0, printer.paperRect(QPrinter::Millimeter).width() * 10,
printer.paperSize(QPrinter::Millimeter).height() * 10); // printer.paperSize(QPrinter::Millimeter).height() * 10);
} // }
else { // else {
return QRectF(0, 0, m_pageSizeValue.width() * 10, // return QRectF(0, 0, m_pageSizeValue.width() * 10,
m_pageSizeValue.height() * 10); // m_pageSizeValue.height() * 10);
} // }
} //}
bool PageDesignIntf::isLoading() bool PageDesignIntf::isLoading()
{ {

View File

@ -102,20 +102,9 @@ namespace LimeReport {
public: public:
friend class PropertyChangedCommand; friend class PropertyChangedCommand;
friend class InsertHLayoutCommand; friend class InsertHLayoutCommand;
enum Orientation {Portrait, Landscape};
enum PageSize {A4, B5, Letter, Legal, Executive,
A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1,
B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E,
DLE, Folio, Ledger, Tabloid, Custom, NPageSize = Custom
};
explicit PageDesignIntf(QObject* parent = 0); explicit PageDesignIntf(QObject* parent = 0);
~PageDesignIntf(); ~PageDesignIntf();
void updatePageRect(); void updatePageRect();
Orientation getOrientation();
void setPageSize(PageSize sizeType, QSizeF sizeValue=QSizeF());
PageSize pageSize() const;
void startInsertMode(const QString& ItemType); void startInsertMode(const QString& ItemType);
void startEditMode(); void startEditMode();
@ -178,14 +167,11 @@ namespace LimeReport {
void itemMoved(BaseDesignIntf* item); void itemMoved(BaseDesignIntf* item);
bool magneticMovement() const; bool magneticMovement() const;
void setMagneticMovement(bool magneticMovement); void setMagneticMovement(bool magneticMovement);
ReportSettings *getReportSettings() const; ReportSettings *getReportSettings() const;
void setReportSettings(ReportSettings *reportSettings); void setReportSettings(ReportSettings *reportSettings);
void setPropertyToSelectedItems(const char *name, const QVariant &value); void setPropertyToSelectedItems(const char *name, const QVariant &value);
protected: protected:
virtual void keyPressEvent(QKeyEvent *event); virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event); virtual void keyReleaseEvent(QKeyEvent *event);
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
@ -201,7 +187,6 @@ namespace LimeReport {
BaseDesignIntf *findDestObject(BaseDesignIntf *item); BaseDesignIntf *findDestObject(BaseDesignIntf *item);
bool isExistsObjectName (const QString& objectName, QList<QGraphicsItem *> &itemsList) const; bool isExistsObjectName (const QString& objectName, QList<QGraphicsItem *> &itemsList) const;
QRectF getRectByPageSize(PageSize pageSize);
bool isLoading(); bool isLoading();
void objectLoadStarted(); void objectLoadStarted();
@ -272,13 +257,8 @@ namespace LimeReport {
CommandIf::Ptr createChangeSizeCommand(); CommandIf::Ptr createChangeSizeCommand();
void saveChangeProppertyCommand(const QString& objectName, const QString& propertyName, const QVariant& oldPropertyValue, const QVariant& newPropertyValue); void saveChangeProppertyCommand(const QString& objectName, const QString& propertyName, const QVariant& oldPropertyValue, const QVariant& newPropertyValue);
void changeSelectedGroupProperty(const QString& name,const QVariant& value); void changeSelectedGroupProperty(const QString& name,const QVariant& value);
private: private:
enum JoinType{Width, Height}; enum JoinType{Width, Height};
PageSize m_pageSize;
QSizeF m_pageSizeValue;
Orientation m_orientation;
QRectF m_geometry;
LimeReport::PageItemDesignIntf::Ptr m_pageItem; LimeReport::PageItemDesignIntf::Ptr m_pageItem;
QList<PageItemDesignIntf::Ptr> m_reportPages; QList<PageItemDesignIntf::Ptr> m_reportPages;
ReportEnginePrivate* m_reportEditor; ReportEnginePrivate* m_reportEditor;