Skip to content

Commit

Permalink
#238 Documentation + table style handling cosmetic.
Browse files Browse the repository at this point in the history
Signed-off-by: cneben <[email protected]>
  • Loading branch information
cneben committed Aug 12, 2024
1 parent 5c596d0 commit 454ec18
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/RectGroupTemplate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ Item {
} // labelEditor Item
} // RowLayout: collapser + label
Rectangle {
// FIXME #238 do not show for tables...
Layout.fillWidth: true
Layout.margins: 0
height: 1
height: groupItem?.style?.borderWidth ?? 1.
border.width: 0
color: groupItem?.style?.borderColor ?? Qt.rgba(1., 1., 1., 0.)
opacity: 0.8
Expand Down
4 changes: 2 additions & 2 deletions src/TableBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import "qrc:/QuickQanava" as Qan

Qan.AbstractTableBorder {
id: tableBorder
borderWidth: tableGroup?.tableStyle?.borderWidth ?? 3.
borderWidth: tableGroup?.style?.borderWidth ?? 3.
Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
Expand All @@ -48,6 +48,6 @@ Qan.AbstractTableBorder {
tableBorder.width
height: tableBorder.orientation == Qt.Vertical ? tableBorder.height :
tableBorder.borderWidth
color: tableGroup?.tableStyle?.borderColor ?? Qt.rgba(0., 0., 0., 1.)
color: tableGroup?.style?.borderColor ?? Qt.rgba(0., 0., 0., 1.)
}
} // Qan.AbstractTableBorder
2 changes: 0 additions & 2 deletions src/qanDraggableCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ void DraggableCtrl::beginDragMove(const QPointF& sceneDragPos, bool dragSelec
if (/*notify && */_target->isGroup()) {
const auto groupItem = qobject_cast<qan::GroupItem*>(_targetItem);
const auto groupItemContainer = groupItem ? groupItem->getContainer() : nullptr;
// Convert sceneDragPos to group item local coordinates
// FIXME #238
//qWarning() << " groupItem=" << groupItem;
//qWarning() << " groupItem->getContainer()=" << groupItemContainer;
if (groupItem != nullptr && groupItemContainer != nullptr) {
Expand Down
9 changes: 7 additions & 2 deletions src/qanGroupItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class GroupItem : public qan::NodeItem
/*! \name Dragging Support Management *///---------------------------------
//@{
public:
//! FIXME #238
//! Define a group "dragging" policy: either only from group header or content (default to Header, can be or'ed).
enum class DragPolicy : unsigned int {
//! Undefined / No dragging.
Undefined = 0,
Expand All @@ -131,14 +131,19 @@ class GroupItem : public qan::NodeItem
Container = 2
};
Q_ENUM(DragPolicy)

//! \copydoc DragPolicy
Q_PROPERTY(DragPolicy dragPolicy READ getDragPolicy WRITE setDragPolicy NOTIFY dragPolicyChanged FINAL)
//! \copydoc DragPolicy
virtual bool setDragPolicy(DragPolicy dragPolicy) noexcept;
//! \copydoc DragPolicy
DragPolicy getDragPolicy() noexcept;
//! \copydoc DragPolicy
const DragPolicy getDragPolicy() const noexcept;
protected:
//! \copydoc DragPolicy
DragPolicy _dragPolicy = DragPolicy::Header;
signals:
//! \copydoc DragPolicy
void dragPolicyChanged();


Expand Down
2 changes: 1 addition & 1 deletion src/qanTableGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ qan::NodeStyle* TableGroup::style(QObject* parent) noexcept
qan_TableGroup_style->setFontPointSize(11);
qan_TableGroup_style->setFontBold(true);
qan_TableGroup_style->setLabelColor(QColor{"black"});
qan_TableGroup_style->setBorderWidth(2.);
qan_TableGroup_style->setBorderWidth(3.);
qan_TableGroup_style->setBackRadius(8.);
qan_TableGroup_style->setBackOpacity(0.90);
qan_TableGroup_style->setBaseColor(QColor(240, 245, 250));
Expand Down

0 comments on commit 454ec18

Please sign in to comment.