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
 #include "widget.h"
1
 #include "widget.h"
2
 #include "ui_widget.h"
2
 #include "ui_widget.h"
3
+#include <QShortcut>
3
 
4
 
4
 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
5
 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
5
 {
6
 {
6
     ui->setupUi(this);
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
     /*EpiUser usr;
13
     /*EpiUser usr;
9
     usr.setLogin("azerty_u");
14
     usr.setLogin("azerty_u");
10
     usr.setPwd_ppp("psswd");
15
     usr.setPwd_ppp("psswd");

+ 13
- 1
netsoul/mainwindow.ui View File

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

+ 5
- 0
ns_finder/widget.cpp View File

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

+ 5
- 0
usermgr/widget.cpp View File

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

Loading…
Cancel
Save