Skip to content
Snippets Groups Projects
Commit 059bda49 authored by Vincent Texier's avatar Vincent Texier
Browse files

add about popup window

add about menu to open the about popup window
parent 57e00bcf
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutPopup</class>
<widget class="QDialog" name="AboutPopup">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>297</width>
<height>264</height>
</rect>
</property>
<property name="windowTitle">
<string>About</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>AboutPopup</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>681</width> <width>681</width>
<height>20</height> <height>25</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menu_account"> <widget class="QMenu" name="menu_account">
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<addaction name="action_export"/> <addaction name="action_export"/>
<addaction name="action_import"/> <addaction name="action_import"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionAbout"/>
<addaction name="action_quit"/> <addaction name="action_quit"/>
</widget> </widget>
<widget class="QMenu" name="menu_contacts"> <widget class="QMenu" name="menu_contacts">
...@@ -176,6 +177,11 @@ ...@@ -176,6 +177,11 @@
<string>Set as default</string> <string>Set as default</string>
</property> </property>
</action> </action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>
...@@ -323,6 +329,22 @@ ...@@ -323,6 +329,22 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>actionAbout</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>open_about_popup()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>340</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections> </connections>
<slots> <slots>
<slot>open_add_account_dialog()</slot> <slot>open_add_account_dialog()</slot>
...@@ -335,5 +357,6 @@ ...@@ -335,5 +357,6 @@
<slot>export_account()</slot> <slot>export_account()</slot>
<slot>open_certification_dialog()</slot> <slot>open_certification_dialog()</slot>
<slot>set_as_default_account()</slot> <slot>set_as_default_account()</slot>
<slot>open_about_popup()</slot>
</slots> </slots>
</ui> </ui>
...@@ -4,7 +4,7 @@ Created on 1 févr. 2014 ...@@ -4,7 +4,7 @@ Created on 1 févr. 2014
@author: inso @author: inso
''' '''
from cutecoin.gen_resources.mainwindow_uic import Ui_MainWindow from cutecoin.gen_resources.mainwindow_uic import Ui_MainWindow
from PyQt5.QtWidgets import QMainWindow, QAction, QFileDialog, QProgressBar, QMessageBox, QLabel from PyQt5.QtWidgets import QMainWindow, QAction, QFileDialog, QProgressBar, QMessageBox, QLabel, QDialog
from PyQt5.QtCore import QSignalMapper, QModelIndex, QObject, QThread, pyqtSlot, pyqtSignal from PyQt5.QtCore import QSignalMapper, QModelIndex, QObject, QThread, pyqtSlot, pyqtSignal
from PyQt5.QtGui import QIcon from PyQt5.QtGui import QIcon
from .process_cfg_account import ProcessConfigureAccount from .process_cfg_account import ProcessConfigureAccount
...@@ -16,6 +16,7 @@ from .certification import CertificationDialog ...@@ -16,6 +16,7 @@ from .certification import CertificationDialog
from .password_asker import PasswordAskerDialog from .password_asker import PasswordAskerDialog
from ..tools.exceptions import NoPeerAvailable from ..tools.exceptions import NoPeerAvailable
from ..__init__ import __version__ from ..__init__ import __version__
from cutecoin.gen_resources.about_uic import Ui_AboutPopup
import logging import logging
import requests import requests
...@@ -127,6 +128,31 @@ class MainWindow(QMainWindow, Ui_MainWindow): ...@@ -127,6 +128,31 @@ class MainWindow(QMainWindow, Ui_MainWindow):
dialog.accepted.connect(self.refresh_communities) dialog.accepted.connect(self.refresh_communities)
dialog.exec_() dialog.exec_()
def open_about_popup(self):
"""
Open about popup window
"""
aboutDialog = QDialog(self)
aboutUi = Ui_AboutPopup()
aboutUi.setupUi(aboutDialog)
text = """
<h1>Cutecoin</h1>
<p>Python/Qt uCoin client</p>
<p>Version : {:}</p>
<p>License : MIT</p>
<p><b>Authors</b></p>
<p>inso</p>
<p>vit</p>
<p>canercandan</p>
""".format(__version__)
aboutUi.label.setText(text)
aboutDialog.show()
def refresh_wallets(self): def refresh_wallets(self):
currency_tab = self.currencies_tabwidget.currentWidget() currency_tab = self.currencies_tabwidget.currentWidget()
if currency_tab: if currency_tab:
......
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