Finish 1.5.45

This commit is contained in:
Arin Alexander 2020-03-24 23:49:17 +03:00
commit 4e41b73c28
5 changed files with 15 additions and 34 deletions

View File

@ -133,7 +133,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}\\\"

View File

@ -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();
}
}

View File

@ -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();
}
}
}

View File

@ -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;
};

View File

@ -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);
}