Ver código fonte

add hide menu action

master
Robin Thoni 10 anos atrás
pai
commit
7a234ac983
2 arquivos alterados com 12 adições e 0 exclusões
  1. 2
    0
      netsoul/mainwindow.cpp
  2. 10
    0
      netsoul/mainwindow.ui

+ 2
- 0
netsoul/mainwindow.cpp Ver arquivo

@@ -20,6 +20,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
20 20
 	m_tray->show();
21 21
 	QMenu* menu = new QMenu("Epimafia NetSoul", this);
22 22
 	connect(menu->addAction("Show"), SIGNAL(triggered()), this, SLOT(showAndRaise()));
23
+	menu->addAction(ui->actionHide);
23 24
 	menu->addSeparator();
24 25
 	menu->addAction(ui->actionConnect);
25 26
 	menu->addAction(ui->actionDisconnect);
@@ -43,6 +44,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
43 44
 	connect(ui->contactsWidget, SIGNAL(chatRequested(NetSoul::Users)), m_chatMgr, SLOT(chat(NetSoul::Users)));
44 45
 	connect(ui->actionConnect, SIGNAL(triggered()), ui->loginWidget, SLOT(login()));
45 46
 	connect(ui->actionDisconnect, SIGNAL(triggered()), m_netsoul, SLOT(logout()));
47
+	connect(ui->actionHide, SIGNAL(triggered()), this, SLOT(hide()));
46 48
 	connect(ui->actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
47 49
 	connect(ui->actionOptions, SIGNAL(triggered()), this, SLOT(options()));
48 50
 	connect(ui->actionAddContact, SIGNAL(triggered()), this, SLOT(addContact()));

+ 10
- 0
netsoul/mainwindow.ui Ver arquivo

@@ -128,6 +128,8 @@ QLineEdit
128 128
     <addaction name="actionConnect"/>
129 129
     <addaction name="actionDisconnect"/>
130 130
     <addaction name="separator"/>
131
+    <addaction name="actionHide"/>
132
+    <addaction name="separator"/>
131 133
     <addaction name="actionQuit"/>
132 134
    </widget>
133 135
    <widget class="QMenu" name="menuOptions">
@@ -188,6 +190,14 @@ QLineEdit
188 190
     <string>Ctrl+Q</string>
189 191
    </property>
190 192
   </action>
193
+  <action name="actionHide">
194
+   <property name="text">
195
+    <string>Hide</string>
196
+   </property>
197
+   <property name="shortcut">
198
+    <string>Ctrl+W</string>
199
+   </property>
200
+  </action>
191 201
  </widget>
192 202
  <customwidgets>
193 203
   <customwidget>

Carregando…
Cancelar
Salvar