Browse Source

add quit shortcut

master
Robin Thoni 10 years ago
parent
commit
1f352966e6
4 changed files with 28 additions and 1 deletions
  1. 5
    0
      intrabocal/widget.cpp
  2. 13
    1
      netsoul/mainwindow.ui
  3. 5
    0
      ns_finder/widget.cpp
  4. 5
    0
      usermgr/widget.cpp

+ 5
- 0
intrabocal/widget.cpp View File

@@ -1,10 +1,15 @@
1 1
 #include "widget.h"
2 2
 #include "ui_widget.h"
3
+#include <QShortcut>
3 4
 
4 5
 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
5 6
 {
6 7
     ui->setupUi(this);
7 8
 
9
+	QShortcut* quit = new QShortcut(QKeySequence("Ctrl+Q"), this);
10
+	connect(quit, SIGNAL(activated()), qApp, SLOT(quit()));
11
+
12
+
8 13
     /*EpiUser usr;
9 14
     usr.setLogin("azerty_u");
10 15
     usr.setPwd_ppp("psswd");

+ 13
- 1
netsoul/mainwindow.ui View File

@@ -109,7 +109,7 @@ color: white;</string>
109 109
      <x>0</x>
110 110
      <y>0</y>
111 111
      <width>260</width>
112
-     <height>21</height>
112
+     <height>19</height>
113 113
     </rect>
114 114
    </property>
115 115
    <widget class="QMenu" name="menuFichier">
@@ -146,16 +146,25 @@ color: white;</string>
146 146
    <property name="text">
147 147
     <string>Connect</string>
148 148
    </property>
149
+   <property name="shortcut">
150
+    <string>Ctrl+O</string>
151
+   </property>
149 152
   </action>
150 153
   <action name="actionDisconnect">
151 154
    <property name="text">
152 155
     <string>Disconnect</string>
153 156
    </property>
157
+   <property name="shortcut">
158
+    <string>Ctrl+F4</string>
159
+   </property>
154 160
   </action>
155 161
   <action name="actionOptions">
156 162
    <property name="text">
157 163
     <string>Options...</string>
158 164
    </property>
165
+   <property name="shortcut">
166
+    <string>Ctrl+P</string>
167
+   </property>
159 168
   </action>
160 169
   <action name="actionAddContact">
161 170
    <property name="text">
@@ -166,6 +175,9 @@ color: white;</string>
166 175
    <property name="text">
167 176
     <string>Quit</string>
168 177
    </property>
178
+   <property name="shortcut">
179
+    <string>Ctrl+Q</string>
180
+   </property>
169 181
   </action>
170 182
  </widget>
171 183
  <customwidgets>

+ 5
- 0
ns_finder/widget.cpp View File

@@ -1,9 +1,14 @@
1 1
 #include "widget.h"
2 2
 #include "ui_widget.h"
3
+#include <QShortcut>
3 4
 
4 5
 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
5 6
 {
6 7
     ui->setupUi(this);
8
+
9
+	QShortcut* quit = new QShortcut(QKeySequence("Ctrl+Q"), this);
10
+	connect(quit, SIGNAL(activated()), qApp, SLOT(quit()));
11
+
7 12
     setFixedSize(size());
8 13
     m_netsoul = new NetSoul(this);
9 14
     if(qApp->arguments().size() == 3)

+ 5
- 0
usermgr/widget.cpp View File

@@ -1,9 +1,14 @@
1 1
 #include "widget.h"
2 2
 #include "ui_widget.h"
3
+#include <QShortcut>
3 4
 
4 5
 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
5 6
 {
6 7
     ui->setupUi(this);
8
+
9
+	QShortcut* quit = new QShortcut(QKeySequence("Ctrl+Q"), this);
10
+	connect(quit, SIGNAL(activated()), qApp, SLOT(quit()));
11
+
7 12
 	setFixedSize(size());
8 13
     connect(ui->btnAdd, SIGNAL(clicked()), this, SLOT(addUser()));
9 14
     connect(ui->btnRemove, SIGNAL(clicked()), this, SLOT(removeCurrent()));

Loading…
Cancel
Save