mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-25 17:14:40 +03:00
Merge tag '1.5.30' into develop
Finish 1.5.30
This commit is contained in:
commit
a1925345f4
100
.travis.yml
100
.travis.yml
@ -498,7 +498,7 @@ matrix:
|
|||||||
- make
|
- make
|
||||||
- make check
|
- make check
|
||||||
|
|
||||||
- env: Qt5.12.3_Ubuntu_18.04
|
- env: Qt5.12.6_Ubuntu_18.04
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
language: cpp
|
language: cpp
|
||||||
@ -507,7 +507,7 @@ matrix:
|
|||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
|
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic'
|
||||||
packages:
|
packages:
|
||||||
- qt512base
|
- qt512base
|
||||||
- qt512script
|
- qt512script
|
||||||
@ -521,7 +521,7 @@ matrix:
|
|||||||
- make
|
- make
|
||||||
- make check
|
- make check
|
||||||
|
|
||||||
- env: Qt5.12.3_Ubuntu_18.04
|
- env: Qt5.12.6_Ubuntu_18.04
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
language: cpp
|
language: cpp
|
||||||
@ -530,7 +530,7 @@ matrix:
|
|||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
|
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic'
|
||||||
packages:
|
packages:
|
||||||
- qt512base
|
- qt512base
|
||||||
- qt512script
|
- qt512script
|
||||||
@ -544,5 +544,97 @@ matrix:
|
|||||||
- make
|
- make
|
||||||
- make check
|
- make check
|
||||||
|
|
||||||
|
- env: Qt5.13.2_Ubuntu_18.04
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
language: cpp
|
||||||
|
compiler: gcc
|
||||||
|
cache: ccache
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- sourceline: 'ppa:beineri/opt-qt-5.13.2-bionic'
|
||||||
|
packages:
|
||||||
|
- qt513base
|
||||||
|
- qt513script
|
||||||
|
- qt513tools
|
||||||
|
- mesa-common-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
|
||||||
|
script:
|
||||||
|
- source /opt/qt513/bin/qt513-env.sh
|
||||||
|
- /opt/qt513/bin/qmake -r limereport.pro
|
||||||
|
- make
|
||||||
|
- make check
|
||||||
|
|
||||||
|
- env: Qt5.13.2_Ubuntu_18.04
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
language: cpp
|
||||||
|
compiler: clang
|
||||||
|
cache: ccache
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- sourceline: 'ppa:beineri/opt-qt-5.13.2-bionic'
|
||||||
|
packages:
|
||||||
|
- qt513base
|
||||||
|
- qt513script
|
||||||
|
- qt513tools
|
||||||
|
- mesa-common-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
|
||||||
|
script:
|
||||||
|
- source /opt/qt513/bin/qt513-env.sh
|
||||||
|
- /opt/qt513/bin/qmake -r limereport.pro
|
||||||
|
- make
|
||||||
|
- make check
|
||||||
|
|
||||||
|
- env: Qt5.14.0_Ubuntu_18.04
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
language: cpp
|
||||||
|
compiler: gcc
|
||||||
|
cache: ccache
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic'
|
||||||
|
packages:
|
||||||
|
- qt514base
|
||||||
|
- qt514script
|
||||||
|
- qt514tools
|
||||||
|
- mesa-common-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
|
||||||
|
script:
|
||||||
|
- source /opt/qt514/bin/qt514-env.sh
|
||||||
|
- /opt/qt514/bin/qmake -r limereport.pro
|
||||||
|
- make
|
||||||
|
- make check
|
||||||
|
|
||||||
|
- env: Qt5.14.0_Ubuntu_18.04
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
language: cpp
|
||||||
|
compiler: clang
|
||||||
|
cache: ccache
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic'
|
||||||
|
packages:
|
||||||
|
- qt514base
|
||||||
|
- qt514script
|
||||||
|
- qt514tools
|
||||||
|
- mesa-common-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
|
||||||
|
script:
|
||||||
|
- source /opt/qt514/bin/qt514-env.sh
|
||||||
|
- /opt/qt514/bin/qmake -r limereport.pro
|
||||||
|
- make
|
||||||
|
- make check
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
@ -28,6 +28,7 @@ SOURCES += \
|
|||||||
$$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.cpp \
|
$$REPORT_PATH/objectinspector/propertyItems/lrgroupfieldpropitem.cpp \
|
||||||
$$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.cpp \
|
$$REPORT_PATH/objectinspector/propertyItems/lrcontentpropitem.cpp \
|
||||||
$$REPORT_PATH/objectinspector/propertyItems/lrmarginpropitem.cpp \
|
$$REPORT_PATH/objectinspector/propertyItems/lrmarginpropitem.cpp \
|
||||||
|
$$REPORT_PATH/objectinspector/propertyItems/lrseriespropitem.cpp \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.cpp \
|
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.cpp \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.cpp \
|
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.cpp \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.cpp \
|
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.cpp \
|
||||||
@ -71,6 +72,7 @@ HEADERS += \
|
|||||||
$$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.h \
|
$$REPORT_PATH/objectinspector/propertyItems/lrqrealpropitem.h \
|
||||||
$$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.h \
|
$$REPORT_PATH/objectinspector/propertyItems/lrcolorpropitem.h \
|
||||||
$$REPORT_PATH/objectinspector/propertyItems/lrmarginpropitem.h \
|
$$REPORT_PATH/objectinspector/propertyItems/lrmarginpropitem.h \
|
||||||
|
$$REPORT_PATH/objectinspector/propertyItems/lrseriespropitem.h \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.h \
|
$$REPORT_PATH/objectinspector/editors/lrtextitempropertyeditor.h \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.h \
|
$$REPORT_PATH/objectinspector/editors/lrcomboboxeditor.h \
|
||||||
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.h \
|
$$REPORT_PATH/objectinspector/editors/lrcheckboxeditor.h \
|
||||||
|
@ -117,7 +117,7 @@ class ChartItem : public LimeReport::ItemDesignIntf
|
|||||||
Q_ENUMS(LegendAlign)
|
Q_ENUMS(LegendAlign)
|
||||||
Q_ENUMS(TitleAlign)
|
Q_ENUMS(TitleAlign)
|
||||||
Q_ENUMS(ChartType)
|
Q_ENUMS(ChartType)
|
||||||
Q_PROPERTY(ACollectionProperty series READ fakeCollectionReader)
|
Q_PROPERTY(ACollectionProperty series READ fakeCollectionReader WRITE setSeries)
|
||||||
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
|
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
|
||||||
Q_PROPERTY(QString chartTitle READ chartTitle WRITE setChartTitle)
|
Q_PROPERTY(QString chartTitle READ chartTitle WRITE setChartTitle)
|
||||||
Q_PROPERTY(bool drawLegendBorder READ drawLegendBorder WRITE setDrawLegendBorder)
|
Q_PROPERTY(bool drawLegendBorder READ drawLegendBorder WRITE setDrawLegendBorder)
|
||||||
@ -163,6 +163,7 @@ public:
|
|||||||
|
|
||||||
QList<QString> labels() const;
|
QList<QString> labels() const;
|
||||||
void setLabels(const QList<QString> &labels);
|
void setLabels(const QList<QString> &labels);
|
||||||
|
QWidget* defaultEditor();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintChartTitle(QPainter* painter, QRectF titleRect);
|
void paintChartTitle(QPainter* painter, QRectF titleRect);
|
||||||
@ -174,8 +175,8 @@ protected:
|
|||||||
void collectionLoadFinished(const QString& collectionName){Q_UNUSED(collectionName)}
|
void collectionLoadFinished(const QString& collectionName){Q_UNUSED(collectionName)}
|
||||||
void updateItemSize(DataSourceManager *dataManager, RenderPass, int);
|
void updateItemSize(DataSourceManager *dataManager, RenderPass, int);
|
||||||
void fillLabels(IDataSource* dataSource);
|
void fillLabels(IDataSource* dataSource);
|
||||||
QWidget* defaultEditor();
|
|
||||||
bool isNeedUpdateSize(RenderPass pass) const;
|
bool isNeedUpdateSize(RenderPass pass) const;
|
||||||
|
void setSeries(ACollectionProperty series){Q_UNUSED(series)}
|
||||||
private:
|
private:
|
||||||
QList<SeriesItem*> m_series;
|
QList<SeriesItem*> m_series;
|
||||||
QString m_datasource;
|
QString m_datasource;
|
||||||
|
@ -189,9 +189,9 @@ void ChartItemEditor::on_splitter_splitterMoved(int , int )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ChartItemEditor::on_pbOk_clicked()
|
void ChartItemEditor::on_pbOk_clicked()
|
||||||
{
|
{
|
||||||
|
emit editingFinished();
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,10 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *);
|
void resizeEvent(QResizeEvent *);
|
||||||
void moveEvent(QMoveEvent *);
|
void moveEvent(QMoveEvent *);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void editingFinished();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_splitter_splitterMoved(int, int);
|
void on_splitter_splitterMoved(int, int);
|
||||||
void on_pbOk_clicked();
|
void on_pbOk_clicked();
|
||||||
|
@ -101,7 +101,11 @@ void ObjectInspectorTreeView::mousePressEvent(QMouseEvent *event)
|
|||||||
} else {
|
} else {
|
||||||
if ((index.column()==1)&&(!nodeFromIndex(index)->isHaveChildren())) {
|
if ((index.column()==1)&&(!nodeFromIndex(index)->isHaveChildren())) {
|
||||||
setCurrentIndex(index);
|
setCurrentIndex(index);
|
||||||
|
|
||||||
|
Qt::ItemFlags flags = index.model()->flags(index);
|
||||||
|
if ( !(((flags & Qt::ItemIsEditable) == 0) || ((flags & Qt::ItemIsEnabled) == 0)) )
|
||||||
edit(index);
|
edit(index);
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ QWidget* ImagePropItem::createProperyEditor(QWidget *parent) const
|
|||||||
|
|
||||||
QString ImagePropItem::displayValue() const
|
QString ImagePropItem::displayValue() const
|
||||||
{
|
{
|
||||||
return (propertyValue().isNull())?"":"Picture";
|
return (propertyValue().isNull()) ? "" : QObject::tr("image");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImagePropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const
|
void ImagePropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
#include "lrseriespropitem.h"
|
||||||
|
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
|
#include <lrchartitemeditor.h>
|
||||||
|
#include <lrpagedesignintf.h>
|
||||||
|
#include <lrreportengine_p.h>
|
||||||
|
|
||||||
|
namespace{
|
||||||
|
LimeReport::ObjectPropItem * createSeriesPropItem(
|
||||||
|
QObject *object, LimeReport::ObjectPropItem::ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& data, LimeReport::ObjectPropItem* parent, bool readonly)
|
||||||
|
{
|
||||||
|
return new LimeReport::SeriesPropItem(object, objects, name, displayName, data, parent, readonly);
|
||||||
|
}
|
||||||
|
bool VARIABLE_IS_NOT_USED registredSeriesProp = LimeReport::ObjectPropFactory::instance().registerCreator(LimeReport::APropIdent("series", "LimeReport::ChartItem"), QObject::tr("series"), createSeriesPropItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace LimeReport {
|
||||||
|
|
||||||
|
QWidget *SeriesPropItem::createProperyEditor(QWidget *parent) const
|
||||||
|
{
|
||||||
|
return new SeriesPropEditor(qobject_cast<ChartItem*>(object()), parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString SeriesPropItem::displayValue() const
|
||||||
|
{
|
||||||
|
return QObject::tr("Series");
|
||||||
|
}
|
||||||
|
|
||||||
|
SeriesPropEditor::SeriesPropEditor(ChartItem *chart, QWidget *parent)
|
||||||
|
: QWidget(parent), m_button(new QPushButton(this)), m_chart(chart)
|
||||||
|
{
|
||||||
|
m_button->setText("...");
|
||||||
|
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||||
|
layout->addWidget(m_button);
|
||||||
|
layout->setSpacing(1);
|
||||||
|
layout->setContentsMargins(1,0,1,1);
|
||||||
|
setLayout(layout);
|
||||||
|
setFocusProxy(m_button);
|
||||||
|
setAutoFillBackground(true);
|
||||||
|
connect(m_button,SIGNAL(clicked()),this,SLOT(slotButtonClicked()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SeriesPropEditor::slotButtonClicked()
|
||||||
|
{
|
||||||
|
m_chart->showEditorDialog();
|
||||||
|
emit editingFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
41
limereport/objectinspector/propertyItems/lrseriespropitem.h
Normal file
41
limereport/objectinspector/propertyItems/lrseriespropitem.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ifndef SERIESPROPITEM_H
|
||||||
|
#define SERIESPROPITEM_H
|
||||||
|
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <lrobjectpropitem.h>
|
||||||
|
#include <lrchartitem.h>
|
||||||
|
|
||||||
|
namespace LimeReport {
|
||||||
|
|
||||||
|
class SeriesPropEditor : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SeriesPropEditor(ChartItem* chart, QWidget *parent = 0);
|
||||||
|
signals:
|
||||||
|
void editingFinished();
|
||||||
|
private slots:
|
||||||
|
void slotButtonClicked();
|
||||||
|
private:
|
||||||
|
QPushButton* m_button;
|
||||||
|
ChartItem* m_chart;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SeriesPropItem : public LimeReport::ObjectPropItem{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SeriesPropItem():ObjectPropItem(){}
|
||||||
|
SeriesPropItem(QObject* object, ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& value, ObjectPropItem* parent, bool readonly)
|
||||||
|
:ObjectPropItem(object, objects, name, displayName, value, parent, readonly){}
|
||||||
|
QWidget* createProperyEditor(QWidget *parent) const;
|
||||||
|
QString displayValue() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace LimeReport
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // SERIESPROPITEM_H
|
Binary file not shown.
@ -16,7 +16,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Series</source>
|
<source>Series</source>
|
||||||
<translation>Ряд</translation>
|
<translation>Ряды данных</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add</source>
|
<source>Add</source>
|
||||||
@ -1952,7 +1952,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>series</source>
|
<source>series</source>
|
||||||
<translation>Ряд данных</translation>
|
<translation>Ряды данных</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>titleAlign</source>
|
<source>titleAlign</source>
|
||||||
@ -3225,5 +3225,17 @@ This preview is no longer valid.</source>
|
|||||||
<source>''</source>
|
<source>''</source>
|
||||||
<translation>''</translation>
|
<translation>''</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>image</source>
|
||||||
|
<translation>Изображение</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>series</source>
|
||||||
|
<translation>Ряды данных</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Series</source>
|
||||||
|
<translation>Ряды данных</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
Loading…
Reference in New Issue
Block a user