Browse Source

add hide menu action

master
Robin Thoni 10 years ago
parent
commit
7a234ac983
2 changed files with 12 additions and 0 deletions
  1. 2
    0
      netsoul/mainwindow.cpp
  2. 10
    0
      netsoul/mainwindow.ui

+ 2
- 0
netsoul/mainwindow.cpp View File

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

+ 10
- 0
netsoul/mainwindow.ui View File

128
     <addaction name="actionConnect"/>
128
     <addaction name="actionConnect"/>
129
     <addaction name="actionDisconnect"/>
129
     <addaction name="actionDisconnect"/>
130
     <addaction name="separator"/>
130
     <addaction name="separator"/>
131
+    <addaction name="actionHide"/>
132
+    <addaction name="separator"/>
131
     <addaction name="actionQuit"/>
133
     <addaction name="actionQuit"/>
132
    </widget>
134
    </widget>
133
    <widget class="QMenu" name="menuOptions">
135
    <widget class="QMenu" name="menuOptions">
188
     <string>Ctrl+Q</string>
190
     <string>Ctrl+Q</string>
189
    </property>
191
    </property>
190
   </action>
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
  </widget>
201
  </widget>
192
  <customwidgets>
202
  <customwidgets>
193
   <customwidget>
203
   <customwidget>

Loading…
Cancel
Save