Skip to content

Commit

Permalink
gui: network_view: add some help button to network graph
Browse files Browse the repository at this point in the history
  • Loading branch information
chelovechishko committed Apr 17, 2022
1 parent 7d8f232 commit 6144a66
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
18 changes: 18 additions & 0 deletions retroshare-gui/src/gui/NetworkView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 59,24 @@ NetworkView::NetworkView(QWidget *parent)
connect( ui.freezeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setFreezeState(bool)));
connect( ui.nameBox, SIGNAL(textChanged(QString)), this, SLOT(setNameSearch(QString)));

QString help_text = tr(
"<h2>Graph scene info</h2>"
"<p>You could use mouse to deal with the scene here:</p>"
"<ul>"
"<li>Left mouse button press on a node: " "selection to see with which nodes it has connections"
" (you can drag it for some distance)"
"<li>Right mouse button click on a node: " "to do some actions with it"
"<li>Drag scene with left mouse button: " "to scroll"
"</ul>"
"<p>and keyboard:</p>"
"<ul>"
"<li>Arrow keys: " "to scroll"
"<li>Space/Enter: " "to repaint a scene"
"<li> /-: " "to scale"
"</ul>"
);
registerHelpButton(ui.helpButton, help_text, "Graph scene");

_should_update = true ;
}

Expand Down
14 changes: 14 additions & 0 deletions retroshare-gui/src/gui/NetworkView.ui
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 54,20 @@
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QToolButton" name="helpButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="6">
<spacer>
<property name="orientation">
Expand Down

0 comments on commit 6144a66

Please sign in to comment.