Skip to content
Snippets Groups Projects
Commit 4f3fcfb1 authored by inso's avatar inso
Browse files

New button to show diverse actions

parent 9246943a
No related branches found
No related tags found
No related merge requests found
......@@ -23,4 +23,5 @@ noun_178785_cc.svg : by Jevgeni Striganov
noun_41979_cc.svg : by by hunotika
noun_155533_cc.svg : by anbileru adaleru
noun_155520_cc.svg : by anbileru adaleru
noun_155540_cc.svg : by anbileru adaleru
\ No newline at end of file
noun_155540_cc.svg : by anbileru adaleru
noun_100552_cc.svg : by Rui
\ No newline at end of file
<RCC>
<qresource prefix="icons">
<file alias="menu_icon">noun_100552_cc.svg</file>
<file alias="leave_icon">noun_155520_cc.svg</file>
<file alias="new_membership">noun_155540_cc.svg</file>
<file alias="payment_icon">noun_178785_cc.svg</file>
......
......@@ -104,6 +104,32 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolbutton_menu">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/menu_icon</normaloff>:/icons/menu_icon</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -6,7 +6,7 @@ Created on 2 févr. 2014
import time
import logging
from PyQt5.QtWidgets import QWidget, QMessageBox, QDialog, QPushButton, QTabBar
from PyQt5.QtWidgets import QWidget, QMessageBox, QDialog, QPushButton, QTabBar, QAction
from PyQt5.QtCore import pyqtSlot, QDateTime, QLocale, QEvent
from PyQt5.QtGui import QIcon
......@@ -58,8 +58,6 @@ class CommunityWidget(QWidget, Ui_CommunityWidget):
self.tab_informations = InformationsTabWidget(self.app)
self.tab_menu = QWidget()
self.tab_network = NetworkTabWidget(self.app)
self.tab_identities.view_in_wot.connect(self.tab_wot.draw_graph)
self.tab_identities.view_in_wot.connect(lambda: self.tabs.setCurrentWidget(self.tab_wot))
......@@ -84,16 +82,23 @@ class CommunityWidget(QWidget, Ui_CommunityWidget):
QIcon(":/icons/network_icon"),
self.tr("Network"))
self.tabs.addTab(self.tab_informations,
QIcon(":/icons/informations_icon"),
self.tr("Informations"))
style = self.app.qapp.style()
icon = style.standardIcon(style.SP_DockWidgetCloseButton)
close_button = QPushButton(icon, '')
close_button.clicked.connect(lambda: self.tabs.removeTab(self.tabs.indexOf(self.tab_informations)))
close_button.setStyleSheet('border-style: inset;')
self.tabs.tabBar().setTabButton(4, QTabBar.RightSide, close_button)
action_showinfo = QAction(self.tr("Show informations"), self.toolbutton_menu)
def show_info():
if self.tabs.indexOf(self.tab_informations) == -1:
self.tabs.addTab(self.tab_informations,
QIcon(":/icons/informations_icon"),
self.tr("Informations"))
style = self.app.qapp.style()
icon = style.standardIcon(style.SP_DockWidgetCloseButton)
close_button = QPushButton(icon, '')
close_button.clicked.connect(lambda: self.tabs.removeTab(self.tabs.indexOf(self.tab_informations)))
close_button.setStyleSheet('border-style: inset;')
self.tabs.tabBar().setTabButton(4, QTabBar.RightSide, close_button)
action_showinfo.triggered.connect(show_info)
self.toolbutton_menu.addAction(action_showinfo)
self.button_membership.clicked.connect(self.send_membership_demand)
def cancel_once_tasks(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment