diff --git a/.travis.yml b/.travis.yml index e708932..065513a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ matrix: - qt51base - qt51script - qt51tools + - qt51svg script: - source /opt/qt51/bin/qt51-env.sh @@ -67,6 +68,7 @@ matrix: - qt51base - qt51script - qt51tools + - qt51svg script: - source /opt/qt51/bin/qt51-env.sh @@ -88,6 +90,7 @@ matrix: - qt52base - qt52script - qt52tools + - qt52svg script: - source /opt/qt52/bin/qt52-env.sh @@ -109,6 +112,7 @@ matrix: - qt52base - qt52script - qt52tools + - qt52svg script: - source /opt/qt52/bin/qt52-env.sh @@ -130,6 +134,7 @@ matrix: - qt53base - qt53script - qt53tools + - qt53svg script: - source /opt/qt53/bin/qt53-env.sh @@ -151,6 +156,7 @@ matrix: - qt53base - qt53script - qt53tools + - qt53svg script: - source /opt/qt53/bin/qt53-env.sh @@ -172,6 +178,7 @@ matrix: - qt54base - qt54script - qt54tools + - qt54svg script: - source /opt/qt54/bin/qt54-env.sh @@ -193,6 +200,7 @@ matrix: - qt54base - qt54script - qt54tools + - qt54svg script: - source /opt/qt54/bin/qt54-env.sh @@ -214,6 +222,7 @@ matrix: - qt55base - qt55script - qt55tools + - qt55svg script: - source /opt/qt55/bin/qt55-env.sh @@ -235,6 +244,7 @@ matrix: - qt55base - qt55script - qt55tools + - qt55svg script: - source /opt/qt55/bin/qt55-env.sh @@ -256,6 +266,7 @@ matrix: - qt56base - qt56script - qt56tools + - qt56svg script: - source /opt/qt56/bin/qt56-env.sh @@ -277,6 +288,7 @@ matrix: - qt56base - qt56script - qt56tools + - qt56svg script: - source /opt/qt56/bin/qt56-env.sh @@ -298,6 +310,7 @@ matrix: - qt57base - qt57script - qt57tools + - qt57svg script: - source /opt/qt57/bin/qt57-env.sh @@ -319,6 +332,7 @@ matrix: - qt57base - qt57script - qt57tools + - qt57svg script: - source /opt/qt57/bin/qt57-env.sh @@ -340,6 +354,7 @@ matrix: - qt58base - qt58script - qt58tools + - qt58svg script: - source /opt/qt58/bin/qt58-env.sh @@ -361,6 +376,7 @@ matrix: - qt58base - qt58script - qt58tools + - qt58svg script: - source /opt/qt58/bin/qt58-env.sh @@ -382,6 +398,7 @@ matrix: - qt59base - qt59script - qt59tools + - qt59svg script: - source /opt/qt59/bin/qt59-env.sh @@ -403,6 +420,7 @@ matrix: - qt59base - qt59script - qt59tools + - qt59svg script: - source /opt/qt59/bin/qt59-env.sh @@ -424,6 +442,7 @@ matrix: - qt510base - qt510script - qt510tools + - qt510svg script: - source /opt/qt510/bin/qt510-env.sh @@ -445,6 +464,7 @@ matrix: - qt510base - qt510script - qt510tools + - qt510svg script: - source /opt/qt510/bin/qt510-env.sh @@ -466,6 +486,7 @@ matrix: - qt511base - qt511script - qt511tools + - qt511svg - mesa-common-dev - libgl1-mesa-dev @@ -489,6 +510,7 @@ matrix: - qt511base - qt511script - qt511tools + - qt511svg - mesa-common-dev - libgl1-mesa-dev @@ -512,6 +534,7 @@ matrix: - qt512base - qt512script - qt512tools + - qt512svg - mesa-common-dev - libgl1-mesa-dev @@ -535,6 +558,7 @@ matrix: - qt512base - qt512script - qt512tools + - qt512svg - mesa-common-dev - libgl1-mesa-dev @@ -558,6 +582,7 @@ matrix: - qt513base - qt513script - qt513tools + - qt513svg - mesa-common-dev - libgl1-mesa-dev @@ -581,6 +606,7 @@ matrix: - qt513base - qt513script - qt513tools + - qt513svg - mesa-common-dev - libgl1-mesa-dev @@ -604,6 +630,7 @@ matrix: - qt514base - qt514script - qt514tools + - qt514svg - mesa-common-dev - libgl1-mesa-dev @@ -627,6 +654,7 @@ matrix: - qt514base - qt514script - qt514tools + - qt514svg - mesa-common-dev - libgl1-mesa-dev @@ -637,4 +665,4 @@ matrix: - make check notifications: - email: false \ No newline at end of file + email: false diff --git a/common.pri b/common.pri index 94c4737..385ee82 100644 --- a/common.pri +++ b/common.pri @@ -134,7 +134,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 44 +LIMEREPORT_VERSION_RELEASE = 45 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/dialogdesigner/lrdialogdesigner.cpp b/limereport/dialogdesigner/lrdialogdesigner.cpp index 82a08d0..4a23d4d 100644 --- a/limereport/dialogdesigner/lrdialogdesigner.cpp +++ b/limereport/dialogdesigner/lrdialogdesigner.cpp @@ -40,6 +40,8 @@ DialogDesignerManager::DialogDesignerManager(QObject *parent) : QObject(parent) m_editWidgetsAction = new QAction(tr("Edit Widgets"), this); m_editWidgetsAction->setIcon(QIcon(":/images/images/widgettool.png")); m_editWidgetsAction->setEnabled(false); + m_editWidgetsAction->setCheckable(true); + m_editWidgetsAction->setChecked(true); connect(m_editWidgetsAction, SIGNAL(triggered()), this, SLOT(slotEditWidgets())); connect(m_formEditor->formWindowManager(), SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)), this, SLOT(slotActiveFormWindowChanged(QDesignerFormWindowInterface*)) ); @@ -258,6 +260,8 @@ void DialogDesignerManager::slotActiveFormWindowChanged(QDesignerFormWindowInter { if (formWindow){ m_editWidgetsAction->setEnabled(true); + m_editWidgetsAction->trigger(); + m_editWidgetsAction->setChecked(true); m_activeWindowName = formWindow->objectName(); } } diff --git a/limereport/items/lrshapeitem.cpp b/limereport/items/lrshapeitem.cpp index 182ea9e..4bef04b 100644 --- a/limereport/items/lrshapeitem.cpp +++ b/limereport/items/lrshapeitem.cpp @@ -55,7 +55,6 @@ ShapeItem::ShapeItem(QObject *owner, QGraphicsItem *parent) m_shapeBrushType(Qt::NoBrush), m_lineWidth(1), m_penStyle(Qt::SolidLine), - m_opacity(100), m_cornerRadius(0) { } @@ -89,7 +88,7 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, brush.setTransform(painter->worldTransform().inverted()); painter->setBrush(brush); painter->setBackground(QBrush(Qt::NoBrush)); - painter->setOpacity(qreal(m_opacity)/100); + painter->setOpacity(qreal(opacity())/100); QRectF rectangleRect = rect().adjusted((lineWidth() / 2), (lineWidth() / 2), -(lineWidth() / 2), @@ -190,27 +189,5 @@ void ShapeItem::setCornerRadius(int borderRadius) notify("cornerRadius",oldValue,m_cornerRadius); } } -int ShapeItem::opacity() const -{ - return m_opacity; -} - -void ShapeItem::setOpacity(int opacity) -{ - if (m_opacity!=opacity){ - if (opacity < 0) { - m_opacity = 0; - } - else if (opacity > 100) { - m_opacity = 100; - } - else { - m_opacity = opacity; - } - update(); - } -} - - } diff --git a/limereport/items/lrshapeitem.h b/limereport/items/lrshapeitem.h index 1516aad..bdfab3b 100644 --- a/limereport/items/lrshapeitem.h +++ b/limereport/items/lrshapeitem.h @@ -66,8 +66,6 @@ public: qreal lineWidth() const {return m_lineWidth;} Qt::PenStyle penStyle() const; void setPenStyle(const Qt::PenStyle &value); - int opacity() const; - void setOpacity(int opacity); int cornerRadius() const; void setCornerRadius(int cornerRadius); @@ -81,7 +79,7 @@ private: Qt::BrushStyle m_shapeBrushType; qreal m_lineWidth; Qt::PenStyle m_penStyle; - int m_opacity; +// int m_opacity; int m_cornerRadius; }; diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index fe2e53c..ba990d4 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1408,11 +1408,13 @@ void ScriptEngineContext::qobjectToScript(const QString& name, QObject *item) #ifdef HAVE_UI_LOADER #ifdef USE_QJSENGINE -void registerChildObjects(ScriptEngineType* se, ScriptValueType* sv){ - foreach(QObject* obj, sv->toQObject()->children()){ - ScriptValueType child = se->newQObject(obj); - sv->setProperty(obj->objectName(),child); - registerChildObjects(se, &child); +void registerChildObjects(ScriptEngineType* se, ScriptValueType* root, QObject* currObj){ + foreach(QObject* obj, currObj->children()){ + if (!obj->objectName().isEmpty()){ + ScriptValueType child = se->newQObject(obj); + root->setProperty(obj->objectName(),child); + } + registerChildObjects(se, root, obj); } } #endif @@ -1422,7 +1424,7 @@ void ScriptEngineContext::initDialogs(){ foreach(DialogDescriber::Ptr dialog, dialogDescribers()){ ScriptValueType sv = se->newQObject(getDialog(dialog->name())); #ifdef USE_QJSENGINE - registerChildObjects(se,&sv); + registerChildObjects(se, &sv, sv.toQObject()); #endif se->globalObject().setProperty(dialog->name(),sv); }