diff options
author | Laszlo Papp <lpapp@kde.org> | 2012-04-07 15:43:29 +0300 |
---|---|---|
committer | Denis Shienkov <scapig@yandex.ru> | 2012-04-07 14:56:11 +0200 |
commit | 6a2c9d3bcbe0df264c002117d63f54215607a5df (patch) | |
tree | 634f5bdc08faa19a80c73879436da8cf795470ba /examples | |
parent | 2782dca603c8dde184647b73f86066cb60a1a443 (diff) | |
download | qtserialport-6a2c9d3bcbe0df264c002117d63f54215607a5df.tar.gz |
Assign shortcuts to most of the actions available
It can be handy for certain people to use shortcuts for actions like in other
Desktop applications without too intrusive changes.
Selections:
* Connect: Ctrl+O -> Essentially because this shortcut is frequently used in
Desktop applications to open up a file. We do not open up files here, but the
serial port. Also, "o" is the second letter in the word "Connect". "C" might
be a poor choice since many words begin and contain that letter (Calls,
Connect, Configure and the like)
* Disconnect: Ctrl+D -> Essentially because this shortcut is frequently used in
terminal applications to close a session (ie. back from "root" to "user"). It is
also frequently used to close a process like an (for instance script language)
interpreter. In addition, this is the beginning letter of the "Disconnect" word.
* Configure: Alt+C -> Essentially because this shortcut is the most frequently
used for this action in other applications. We have actually made it default
inside our KDE Framework. It is pretty much the defacto standard for KDE
applications, and for many pure Qt applications as well. 'C' is also the
beginning letter of the word for this action.
* Clear: Alt+L -> Essentially because "Alt/Ctrl+C" would be confusing with
"Configure" and also with the generic "Copy" action. It is probably not the best
choice to accumulate the 'C' shortcut usage. "Ctrl+R" is widely used in
applications to refresh the window like browser. Hence, my decision is to use
"Alt+L" for this action. It is also a bit more difficult to type than "Alt+R"
meaning that it is less risky to clear the characters accidentally. This can be
reconsidered later, if the need arises. This is the hard selection out of the
all available. The other actions are straight-forward.
* About: Alt+A -> Essentially because this shortcut is the most frequently
used for this action in other applications. We have actually made it default
inside our KDE Framework. It is pretty much the defacto standard for KDE
applications, and for many pure Qt applications as well. 'A' is also the
beginning letter of the word for this action.
The relevant ampersand management is also being added so that the shorcut
character is underlined for the relevant menubar entry for the action in
question.
Change-Id: I64c206ff25f67cd5b7fb24528db8e1ae78e3d24b
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/terminal/mainwindow.ui | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/examples/terminal/mainwindow.ui b/examples/terminal/mainwindow.ui index 7e65b41..fd0c080 100644 --- a/examples/terminal/mainwindow.ui +++ b/examples/terminal/mainwindow.ui @@ -65,11 +65,14 @@ <widget class="QStatusBar" name="statusBar"/> <action name="actionAbout"> <property name="text"> - <string>About</string> + <string>&About</string> </property> <property name="toolTip"> <string>About program</string> </property> + <property name="shortcut"> + <string>Alt+A</string> + </property> </action> <action name="actionAboutQt"> <property name="text"> @@ -82,11 +85,14 @@ <normaloff>:/images/connect.png</normaloff>:/images/connect.png</iconset> </property> <property name="text"> - <string>Connect</string> + <string>C&onnect</string> </property> <property name="toolTip"> <string>Connect to serial port</string> </property> + <property name="shortcut"> + <string>Ctrl+O</string> + </property> </action> <action name="actionDisconnect"> <property name="icon"> @@ -94,11 +100,14 @@ <normaloff>:/images/disconnect.png</normaloff>:/images/disconnect.png</iconset> </property> <property name="text"> - <string>Disconnect</string> + <string>&Disconnect</string> </property> <property name="toolTip"> <string>Disconnect from serial port</string> </property> + <property name="shortcut"> + <string>Ctrl+D</string> + </property> </action> <action name="actionConfigure"> <property name="icon"> @@ -106,11 +115,14 @@ <normaloff>:/images/settings.png</normaloff>:/images/settings.png</iconset> </property> <property name="text"> - <string>Configure</string> + <string>&Configure</string> </property> <property name="toolTip"> <string>Configure serial port</string> </property> + <property name="shortcut"> + <string>Alt+C</string> + </property> </action> <action name="actionClear"> <property name="icon"> @@ -118,11 +130,14 @@ <normaloff>:/images/clear.png</normaloff>:/images/clear.png</iconset> </property> <property name="text"> - <string>Clear</string> + <string>C&lear</string> </property> <property name="toolTip"> <string>Clear data</string> </property> + <property name="shortcut"> + <string>Alt+L</string> + </property> </action> </widget> <layoutdefault spacing="6" margin="11"/> |