diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index fdff800..73ec832 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -65,7 +65,7 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_BGMode(OpaqueMode), m_opacity(100), m_borderLinesFlags(BorderLines()), - m_borderStyle(Qt::SolidLine), + m_borderStyle(BorderStyle::Solid), m_storageTypeName(storageTypeName), m_itemMode(DesignMode), m_objectState(ObjectCreated), @@ -974,9 +974,9 @@ qreal BaseDesignIntf::borderLineSize() const return m_borderLineSize; } -void BaseDesignIntf::setBorderStyle(Qt::PenStyle b) +void BaseDesignIntf::setBorderStyle(BorderStyle b) { - Qt::PenStyle oldValue = m_borderStyle; + BorderStyle oldValue = m_borderStyle; m_borderStyle = b; update(); notify("borderStyle",(BorderStyle)oldValue,(BorderStyle)b); @@ -1060,10 +1060,6 @@ BaseDesignIntf::BorderLines BaseDesignIntf::borderLines() const return m_borderLinesFlags; } -Qt::PenStyle BaseDesignIntf::borderStyle() const -{ - return m_borderStyle; -} void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const { @@ -1071,6 +1067,11 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const return; painter->setPen(borderPen(TopLine)); painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.y()+6+m_borderLineSize); } void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const @@ -1080,6 +1081,11 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(BottomLine)); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.height()-6-m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const @@ -1089,6 +1095,11 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const painter->setPen(borderPen(RightLine)); painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.width()-6 - m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.width()-6-m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const @@ -1097,6 +1108,11 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const return; painter->setPen(borderPen(LeftLine)); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); + if(borderStyle() == BorderStyle::Doubled) + painter->drawLine(rect.x()+6+m_borderLineSize, + rect.y()+6+m_borderLineSize, + rect.x()+6+m_borderLineSize, + rect.height()-6-m_borderLineSize); } void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const @@ -1216,9 +1232,10 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const QPen pen; if (m_borderLinesFlags & side) { pen.setColor(m_borderColor); - pen.setStyle(m_borderStyle); - //pen.setCosmetic(true); - pen.setWidthF(m_borderLineSize+1); + if(borderStyle() != BorderStyle::Doubled) + pen.setStyle(static_cast(m_borderStyle)); + pen.setCosmetic(true); + pen.setWidthF(m_borderLineSize+1); //To draw with point precision (By default: 2px = 1 pt) } else { pen.setColor(Qt::darkGray); diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 9284f53..751e61a 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -95,7 +95,7 @@ class BaseDesignIntf : Q_PROPERTY(bool shadow READ hasShadow WRITE setShadow) Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor) Q_PROPERTY(bool geometryLocked READ isGeometryLocked WRITE setGeometryLocked) - Q_PROPERTY(Qt::PenStyle borderStyle READ borderStyle WRITE setBorderStyle) + Q_PROPERTY(BorderStyle borderStyle READ borderStyle WRITE setBorderStyle) friend class ReportRender; public: @@ -106,6 +106,7 @@ public: Dashed = Qt::DashLine, DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine, + Doubled = 7 }; @@ -188,6 +189,7 @@ public: QString parentReportItemName() const; BrushStyle backgroundBrushStyle() const {return m_backgroundBrushStyle;} + BorderStyle borderStyle() const {return m_borderStyle;} void setBackgroundBrushStyle(BrushStyle value); QColor backgroundColor() const {return m_backgroundColor;} void setBackgroundColor(QColor value); @@ -253,7 +255,7 @@ public: PageDesignIntf* page(); BorderLines borderLines() const; - Qt::PenStyle borderStyle() const; + QString storageTypeName() const {return m_storageTypeName;} ReportEnginePrivate *reportEditor(); @@ -299,7 +301,7 @@ public: void setItemTypeName(const QString &itemTypeName); qreal borderLineSize() const; - void setBorderStyle(Qt::PenStyle b); + void setBorderStyle(BorderStyle b); void setBorderLineSize(qreal value); void showEditorDialog(); ItemAlign itemAlign() const; @@ -454,7 +456,7 @@ private: BGMode m_BGMode; int m_opacity; BorderLines m_borderLinesFlags; - Qt::PenStyle m_borderStyle; + BorderStyle m_borderStyle; QRectF m_bottomRect; QRectF m_topRect; diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 4458f78..2adb87e 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Verrouiller la géométrie d'un élément - + Copy Copier - + Cut Couper - + Paste Coller - + Bring to top Placer au premier-plan - + Send to back Placer en arrière-plan - + Create Horizontal Layout Créer une disposition horizontale - + Create Vertical Layout Créer une disposition verticale - + No borders Aucune bordure - + All borders Toutes les bordures diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 59ce1e2..556f35b 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; } LimeReport::BaseDesignIntf - - + + Lock item geometry Zablokuj geometrię pozycji - + Copy Kopiuj - + Cut Wytnij - + Paste Wklej - + Bring to top Przenieś na górę - + Send to back Przenieś na dół - + Create Horizontal Layout Utwórz układ poziomy - + Create Vertical Layout Utwórz układ pionowy - + No borders Bez obramowania - + All borders Pełne obramowanie