mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-05 20:37:37 +03:00
Fixed build issues
Fixed build with cmake when including limereport as a submodule with add_subdirectory(...) Removed unnecessary checks of ENABLE DIALOG DESIGNER in CMakeLists.txt Fixed Qt 5.15.16 incompatibility Added missing LIMEREPORT_EXPORT Fixed warnings
This commit is contained in:
@@ -39,7 +39,7 @@ typedef QMap<QString, Qt::Alignment> AlignMap;
|
||||
|
||||
class AlignmentItemEditor;
|
||||
|
||||
class AlignmentPropItem: public ObjectPropItem {
|
||||
class LIMEREPORT_EXPORT AlignmentPropItem: public ObjectPropItem {
|
||||
Q_OBJECT
|
||||
public:
|
||||
AlignmentPropItem(): ObjectPropItem(), m_horizEditor(NULL), m_vertEditor(NULL) { }
|
||||
|
@@ -94,16 +94,24 @@ void BorderFrameEditor::unSetAllLines()
|
||||
|
||||
void BorderFrameEditor::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->x() >= 10 && event->y() < 30)
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
|
||||
int x = event->x();
|
||||
int y = event->y();
|
||||
#else
|
||||
int x = event->position().x();
|
||||
int y = event->position().y();
|
||||
#endif
|
||||
|
||||
if (x >= 10 && y < 30)
|
||||
emit borderSideClicked(BaseDesignIntf::BorderSide::TopLine, !topLine);
|
||||
|
||||
if ((event->x() >= 10 && event->x() < 30) && (event->y() > 10))
|
||||
if ((x >= 10 && x < 30) && (y > 10))
|
||||
emit borderSideClicked(BaseDesignIntf::BorderSide::LeftLine, !leftLine);
|
||||
|
||||
if (event->x() >= 10 && (event->y() > 80 && event->y() < rect().bottom()))
|
||||
if (x >= 10 && (y > 80 && y < rect().bottom()))
|
||||
emit borderSideClicked(BaseDesignIntf::BorderSide::BottomLine, !bottomLine);
|
||||
|
||||
if ((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10)
|
||||
if ((x >= 130 && x < rect().width()) && y > 10)
|
||||
emit borderSideClicked(BaseDesignIntf::BorderSide::RightLine, !rightLine);
|
||||
}
|
||||
|
||||
@@ -172,6 +180,7 @@ QGraphicsLineItem* BorderFrameEditor::createSideLine(LimeReport::BaseDesignIntf:
|
||||
return scene->addLine(
|
||||
QLineF(10, rect().bottom() - 10, rect().width() - 10, rect().bottom() - 10), m_pen);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void BorderFrameEditor::updateBorders()
|
||||
|
@@ -770,26 +770,26 @@ QSizeF AbstractSeriesChart::calcChartLegendSize(const QFont& font, const qreal m
|
||||
}
|
||||
default: {
|
||||
qreal cw = 0;
|
||||
qreal maxWidth = 0;
|
||||
qreal mw = 0;
|
||||
|
||||
if (m_chartItem->series().isEmpty()) {
|
||||
foreach (QString label, m_designLabels) {
|
||||
cw += fm.height();
|
||||
if (maxWidth < fm.boundingRect(label).width())
|
||||
maxWidth = fm.boundingRect(label).width() + 10;
|
||||
if (mw < fm.boundingRect(label).width())
|
||||
mw = fm.boundingRect(label).width() + 10;
|
||||
}
|
||||
} else {
|
||||
foreach (SeriesItem* series, m_chartItem->series()) {
|
||||
cw += fm.height();
|
||||
if (maxWidth < fm.boundingRect(series->name()).width())
|
||||
maxWidth = fm.boundingRect(series->name()).width() + 10;
|
||||
if (mw < fm.boundingRect(series->name()).width())
|
||||
mw = fm.boundingRect(series->name()).width() + 10;
|
||||
}
|
||||
}
|
||||
cw += fm.height();
|
||||
return QSizeF(maxWidth + fm.height() * 2, cw);
|
||||
return QSizeF(mw + fm.height() * 2, cw);
|
||||
}
|
||||
}
|
||||
return QSizeF();
|
||||
|
||||
}
|
||||
|
||||
bool AbstractSeriesChart::verticalLabels(QPainter* painter, QRectF labelsRect)
|
||||
|
Reference in New Issue
Block a user