-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTableNode.h
More file actions
21 lines (17 loc) · 713 Bytes
/
Copy pathTableNode.h
File metadata and controls
21 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <QGraphicsRectItem>
#include <QString>
// A single table box on the diagram. Stores the table name as item data
// so DiagramView can identify which table was clicked without a separate
// QObject signal path (QGraphicsItem doesn't support signals directly).
class TableNode : public QGraphicsRectItem
{
public:
static constexpr qreal kWidth = 110.0;
static constexpr qreal kHeight = 44.0;
// isFocus draws the node with the accent (teal) style used for the
// table currently centered in the diagram; other nodes get the
// neutral gray style.
TableNode(const QString& tableName, bool isFocus, QGraphicsItem* parent = nullptr);
QString tableName() const;
};