mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
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 > itrb( b );
|
||||
|
@ -60,6 +60,8 @@ void ExprLinkDlg::load( const QList< SlotInfo > &a, const QList< SlotInfo > &b )
|
|||
m_ui.list2->addItem( item );
|
||||
}
|
||||
|
||||
m_ui.groupBox1->setTitle( aname );
|
||||
m_ui.groupBox2->setTitle( bname );
|
||||
}
|
||||
|
||||
int ExprLinkDlg::getSlotA() const
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
ExprLinkDlg( QWidget *parent = NULL );
|
||||
~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 getSlotB() const;
|
||||
|
|
|
@ -6,21 +6,39 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>581</width>
|
||||
<height>388</height>
|
||||
<width>641</width>
|
||||
<height>334</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Linking nodes</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<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>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
|
@ -141,7 +141,7 @@ void ExpressionEditor::onLinkItems()
|
|||
}
|
||||
|
||||
ExprLinkDlg d;
|
||||
d.load( froml, tol );
|
||||
d.load( froml, tol, from->name(), to->name() );
|
||||
int result = d.exec();
|
||||
if( result == QDialog::Rejected )
|
||||
return;
|
||||
|
|
|
@ -49,6 +49,8 @@ public:
|
|||
|
||||
void clearLinks();
|
||||
|
||||
QString name() const{ return m_name; }
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent( QGraphicsSceneMouseEvent *e );
|
||||
|
||||
|
|
Loading…
Reference in a new issue