mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +03:00
Finish 1.5.54
This commit is contained in:
commit
edd9f78c1c
@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 5
|
LIMEREPORT_VERSION_MINOR = 5
|
||||||
LIMEREPORT_VERSION_RELEASE = 53
|
LIMEREPORT_VERSION_RELEASE = 54
|
||||||
|
|
||||||
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}\\\"
|
||||||
|
@ -50,8 +50,9 @@ PageItemDesignIntf::PageItemDesignIntf(QObject *owner, QGraphicsItem *parent) :
|
|||||||
m_topMargin(0), m_bottomMargin(0), m_leftMargin(0), m_rightMargin(0),
|
m_topMargin(0), m_bottomMargin(0), m_leftMargin(0), m_rightMargin(0),
|
||||||
m_pageOrientaion(Portrait), m_pageSize(A4), m_sizeChainging(false),
|
m_pageOrientaion(Portrait), m_pageSize(A4), m_sizeChainging(false),
|
||||||
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
|
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
|
||||||
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false), m_setPageSizeToPrinter(false),
|
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false),
|
||||||
m_endlessHeight(false), m_printable(true), m_pageFooter(0), m_printBehavior(Split)
|
m_setPageSizeToPrinter(false), m_endlessHeight(false), m_printable(true),
|
||||||
|
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false)
|
||||||
{
|
{
|
||||||
setFixedPos(true);
|
setFixedPos(true);
|
||||||
setPossibleResizeDirectionFlags(Fixed);
|
setPossibleResizeDirectionFlags(Fixed);
|
||||||
@ -64,8 +65,9 @@ PageItemDesignIntf::PageItemDesignIntf(const PageSize pageSize, const QRectF &re
|
|||||||
m_topMargin(0), m_bottomMargin(0), m_leftMargin(0), m_rightMargin(0),
|
m_topMargin(0), m_bottomMargin(0), m_leftMargin(0), m_rightMargin(0),
|
||||||
m_pageOrientaion(Portrait), m_pageSize(pageSize), m_sizeChainging(false),
|
m_pageOrientaion(Portrait), m_pageSize(pageSize), m_sizeChainging(false),
|
||||||
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
|
m_fullPage(false), m_oldPrintMode(false), m_resetPageNumber(false),
|
||||||
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false), m_setPageSizeToPrinter(false),
|
m_isExtendedInDesignMode(false), m_extendedHeight(1000), m_isTOC(false),
|
||||||
m_endlessHeight(false), m_printable(true), m_pageFooter(0), m_printBehavior(Split)
|
m_setPageSizeToPrinter(false), m_endlessHeight(false), m_printable(true),
|
||||||
|
m_pageFooter(0), m_printBehavior(Split), m_dropPrinterMargins(false)
|
||||||
{
|
{
|
||||||
setFixedPos(true);
|
setFixedPos(true);
|
||||||
setPossibleResizeDirectionFlags(Fixed);
|
setPossibleResizeDirectionFlags(Fixed);
|
||||||
@ -345,6 +347,16 @@ void PageItemDesignIntf::initColumnsPos(QVector<qreal> &posByColumns, qreal pos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PageItemDesignIntf::dropPrinterMargins() const
|
||||||
|
{
|
||||||
|
return m_dropPrinterMargins;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PageItemDesignIntf::setDropPrinterMargins(bool dropPrinterMargins)
|
||||||
|
{
|
||||||
|
m_dropPrinterMargins = dropPrinterMargins;
|
||||||
|
}
|
||||||
|
|
||||||
void PageItemDesignIntf::setPrintBehavior(const PrintBehavior &printBehavior)
|
void PageItemDesignIntf::setPrintBehavior(const PrintBehavior &printBehavior)
|
||||||
{
|
{
|
||||||
m_printBehavior = printBehavior;
|
m_printBehavior = printBehavior;
|
||||||
|
@ -61,6 +61,7 @@ class PageItemDesignIntf : public ItemsContainerDesignInft
|
|||||||
Q_PROPERTY(QString printerName READ printerName WRITE setPrinterName)
|
Q_PROPERTY(QString printerName READ printerName WRITE setPrinterName)
|
||||||
Q_PROPERTY(UnitType units READ unitType WRITE setUnitTypeProperty)
|
Q_PROPERTY(UnitType units READ unitType WRITE setUnitTypeProperty)
|
||||||
Q_PROPERTY(PrintBehavior printBehavior READ printBehavior WRITE setPrintBehavior)
|
Q_PROPERTY(PrintBehavior printBehavior READ printBehavior WRITE setPrintBehavior)
|
||||||
|
Q_PROPERTY(bool dropPrinterMargins READ dropPrinterMargins WRITE setDropPrinterMargins)
|
||||||
friend class ReportRender;
|
friend class ReportRender;
|
||||||
public:
|
public:
|
||||||
enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape };
|
enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape };
|
||||||
@ -177,6 +178,9 @@ public:
|
|||||||
PrintBehavior printBehavior() const;
|
PrintBehavior printBehavior() const;
|
||||||
void setPrintBehavior(const PrintBehavior &printBehavior);
|
void setPrintBehavior(const PrintBehavior &printBehavior);
|
||||||
|
|
||||||
|
bool dropPrinterMargins() const;
|
||||||
|
void setDropPrinterMargins(bool dropPrinterMargins);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void beforeFirstPageRendered();
|
void beforeFirstPageRendered();
|
||||||
void afterLastPageRendered();
|
void afterLastPageRendered();
|
||||||
@ -220,6 +224,7 @@ private:
|
|||||||
QString m_printerName;
|
QString m_printerName;
|
||||||
BandDesignIntf* m_pageFooter;
|
BandDesignIntf* m_pageFooter;
|
||||||
PrintBehavior m_printBehavior;
|
PrintBehavior m_printBehavior;
|
||||||
|
bool m_dropPrinterMargins;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1797,9 +1797,6 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
|
|||||||
if (!m_firstPage && !m_painter->isActive()) return false;
|
if (!m_firstPage && !m_painter->isActive()) return false;
|
||||||
PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene());
|
PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene());
|
||||||
|
|
||||||
//LimeReport::PageDesignIntf m_renderPage;
|
|
||||||
//m_renderPage.setItemMode(PrintMode);
|
|
||||||
|
|
||||||
QPointF backupPagePos = page->pos();
|
QPointF backupPagePos = page->pos();
|
||||||
page->setPos(0,0);
|
page->setPos(0,0);
|
||||||
m_renderPage.setPageItem(page);
|
m_renderPage.setPageItem(page);
|
||||||
@ -1869,13 +1866,15 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
|
|||||||
m_printer->setPaperSize(pageSize,QPrinter::Millimeter);
|
m_printer->setPaperSize(pageSize,QPrinter::Millimeter);
|
||||||
} else {
|
} else {
|
||||||
m_printer->setFullPage(page->fullPage());
|
m_printer->setFullPage(page->fullPage());
|
||||||
|
if (page->dropPrinterMargins())
|
||||||
|
m_printer->setPageMargins(0, 0, 0, 0, QPrinter::Point);
|
||||||
m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation()));
|
m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation()));
|
||||||
if (page->pageSize()==PageItemDesignIntf::Custom){
|
if (page->pageSize()==PageItemDesignIntf::Custom){
|
||||||
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
|
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
|
||||||
QSizeF(page->sizeMM().height(),page->sizeMM().width()):
|
QSizeF(page->sizeMM().height(),page->sizeMM().width()):
|
||||||
page->sizeMM();
|
page->sizeMM();
|
||||||
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
|
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
|
||||||
m_printer->setPaperSize(pageSize,QPrinter::Millimeter);
|
m_printer->setPaperSize(pageSize, QPrinter::Millimeter);
|
||||||
} else {
|
} else {
|
||||||
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
|
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
|
||||||
m_printer->setPaperSize(static_cast<QPrinter::PageSize>(page->pageSize()));
|
m_printer->setPaperSize(static_cast<QPrinter::PageSize>(page->pageSize()));
|
||||||
|
Loading…
Reference in New Issue
Block a user