Show the node names as title, in the link dialog.
This commit is contained in:
parent
e37394ae20
commit
1b913a76c1
5 changed files with 30 additions and 8 deletions
|
@ -33,7 +33,7 @@ ExprLinkDlg::~ExprLinkDlg()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExprLinkDlg::load( const QList< SlotInfo > &a, const QList< SlotInfo > &b )
|
void ExprLinkDlg::load( const QList< SlotInfo > &a, const QList< SlotInfo > &b, const QString &aname, const QString &bname )
|
||||||
{
|
{
|
||||||
QListIterator< SlotInfo > itra( a );
|
QListIterator< SlotInfo > itra( a );
|
||||||
QListIterator< SlotInfo > itrb( b );
|
QListIterator< SlotInfo > itrb( b );
|
||||||
|
@ -60,6 +60,8 @@ void ExprLinkDlg::load( const QList< SlotInfo > &a, const QList< SlotInfo > &b )
|
||||||
m_ui.list2->addItem( item );
|
m_ui.list2->addItem( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_ui.groupBox1->setTitle( aname );
|
||||||
|
m_ui.groupBox2->setTitle( bname );
|
||||||
}
|
}
|
||||||
|
|
||||||
int ExprLinkDlg::getSlotA() const
|
int ExprLinkDlg::getSlotA() const
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
ExprLinkDlg( QWidget *parent = NULL );
|
ExprLinkDlg( QWidget *parent = NULL );
|
||||||
~ExprLinkDlg();
|
~ExprLinkDlg();
|
||||||
|
|
||||||
void load( const QList< SlotInfo > &a, const QList< SlotInfo > &b );
|
void load( const QList< SlotInfo > &a, const QList< SlotInfo > &b, const QString &aname, const QString &bname );
|
||||||
|
|
||||||
int getSlotA() const;
|
int getSlotA() const;
|
||||||
int getSlotB() const;
|
int getSlotB() const;
|
||||||
|
|
|
@ -6,21 +6,39 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>581</width>
|
<width>641</width>
|
||||||
<height>388</height>
|
<height>334</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Linking nodes</string>
|
<string>Linking nodes</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="0" column="0" colspan="3">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="list1"/>
|
<widget class="QGroupBox" name="groupBox1">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="list1"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="list2"/>
|
<widget class="QGroupBox" name="groupBox2">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="list2"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -141,7 +141,7 @@ void ExpressionEditor::onLinkItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
ExprLinkDlg d;
|
ExprLinkDlg d;
|
||||||
d.load( froml, tol );
|
d.load( froml, tol, from->name(), to->name() );
|
||||||
int result = d.exec();
|
int result = d.exec();
|
||||||
if( result == QDialog::Rejected )
|
if( result == QDialog::Rejected )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -49,6 +49,8 @@ public:
|
||||||
|
|
||||||
void clearLinks();
|
void clearLinks();
|
||||||
|
|
||||||
|
QString name() const{ return m_name; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseMoveEvent( QGraphicsSceneMouseEvent *e );
|
void mouseMoveEvent( QGraphicsSceneMouseEvent *e );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue