From 1b913a76c1d6190620b5a5fe7d95eab62d652c3f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 14 Sep 2014 17:19:11 +0200 Subject: [PATCH] Show the node names as title, in the link dialog. --- .../src/plugins/gui_editor/expr_link_dlg.cpp | 4 ++- .../src/plugins/gui_editor/expr_link_dlg.h | 2 +- .../src/plugins/gui_editor/expr_link_dlg.ui | 28 +++++++++++++++---- .../plugins/gui_editor/expression_editor.cpp | 2 +- .../src/plugins/gui_editor/expression_node.h | 2 ++ 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp b/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp index 44cf29d74..9a91e5f21 100644 --- a/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp +++ b/code/studio/src/plugins/gui_editor/expr_link_dlg.cpp @@ -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 diff --git a/code/studio/src/plugins/gui_editor/expr_link_dlg.h b/code/studio/src/plugins/gui_editor/expr_link_dlg.h index d53d528c5..267787cf3 100644 --- a/code/studio/src/plugins/gui_editor/expr_link_dlg.h +++ b/code/studio/src/plugins/gui_editor/expr_link_dlg.h @@ -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; diff --git a/code/studio/src/plugins/gui_editor/expr_link_dlg.ui b/code/studio/src/plugins/gui_editor/expr_link_dlg.ui index 32e610352..d6fdf9d7d 100644 --- a/code/studio/src/plugins/gui_editor/expr_link_dlg.ui +++ b/code/studio/src/plugins/gui_editor/expr_link_dlg.ui @@ -6,21 +6,39 @@ 0 0 - 581 - 388 + 641 + 334 Linking nodes - + - + + + GroupBox + + + + + + + - + + + GroupBox + + + + + + + diff --git a/code/studio/src/plugins/gui_editor/expression_editor.cpp b/code/studio/src/plugins/gui_editor/expression_editor.cpp index dc164d361..62e034255 100644 --- a/code/studio/src/plugins/gui_editor/expression_editor.cpp +++ b/code/studio/src/plugins/gui_editor/expression_editor.cpp @@ -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; diff --git a/code/studio/src/plugins/gui_editor/expression_node.h b/code/studio/src/plugins/gui_editor/expression_node.h index 0b7242f5d..7d236475a 100644 --- a/code/studio/src/plugins/gui_editor/expression_node.h +++ b/code/studio/src/plugins/gui_editor/expression_node.h @@ -49,6 +49,8 @@ public: void clearLinks(); + QString name() const{ return m_name; } + protected: void mouseMoveEvent( QGraphicsSceneMouseEvent *e );