From cba7f95c744010f03aa807869904e6d0f6bc071d Mon Sep 17 00:00:00 2001 From: Inso <insomniak.fr@gmail.com> Date: Tue, 4 Mar 2014 18:51:33 +0100 Subject: [PATCH] Adding ui for account configuration. --- Makefile | 2 +- README.md | 4 +- res/ui/communityParametersWidget.ui | 91 +++++++++++++++++++++++++++++ res/ui/configureAccountDialog.ui | 88 ++++++++++++++++++++++++++++ res/ui/mainwindow.ui | 23 ++++++++ 5 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 res/ui/communityParametersWidget.ui create mode 100644 res/ui/configureAccountDialog.ui diff --git a/Makefile b/Makefile index 9988c5fc..ad67e6e1 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ RESOURCE_DIR = res/ui COMPILED_DIR = src/cutecoin/gen_resources #UI files to compile -UI_FILES = mainwindow.ui addAccountDialog.ui addCommunityDialog.ui communityTabWidget.ui issuanceDialog.ui transferDialog.ui addContactDialog.ui +UI_FILES = mainwindow.ui addAccountDialog.ui addCommunityDialog.ui communityTabWidget.ui issuanceDialog.ui transferDialog.ui addContactDialog.ui configureAccountDialog.ui communityParametersWidget.ui #Qt resource files to compile RESOURCES = diff --git a/README.md b/README.md index fe2d720c..0b4ec30e 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,6 @@ Qt Client for [Ucoin](http://www.ucoin.io) project. * Separating the 3 roles : Voter, Member, Random guy. Differnt rights for different roles : * A voter should be able to access the voting UI of the community (+member and random guy rights) * A member should be able to issue money (+random guy rights) - * A random guy should be able to send and receive money \ No newline at end of file + * A random guy should be able to send and receive money + +#TODO: Setuptools to build cutecoin automatically \ No newline at end of file diff --git a/res/ui/communityParametersWidget.ui b/res/ui/communityParametersWidget.ui new file mode 100644 index 00000000..b183684e --- /dev/null +++ b/res/ui/communityParametersWidget.ui @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CommunityParametersWidget</class> + <widget class="QWidget" name="CommunityParametersWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Trusted nodes :</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QListView" name="list_Trusted"/> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <item> + <widget class="QPushButton" name="button_addTrusted"> + <property name="text"> + <string>Add</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_removeTrusted"> + <property name="text"> + <string>Remove</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Favorite transaction nodes :</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QListView" name="list_Transactions"/> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>6</number> + </property> + <item> + <widget class="QPushButton" name="button_addTransaction"> + <property name="text"> + <string>Add</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_removeTransaction"> + <property name="text"> + <string>Remove</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/res/ui/configureAccountDialog.ui b/res/ui/configureAccountDialog.ui new file mode 100644 index 00000000..0ec37d49 --- /dev/null +++ b/res/ui/configureAccountDialog.ui @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ConfigureAccountDialog</class> + <widget class="QDialog" name="ConfigureAccountDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Configure current account</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Global parameters</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Communities parameters</string> + </property> + </widget> + </item> + <item> + <widget class="QTabWidget" name="communitiesWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>ConfigureAccountDialog</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> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>ConfigureAccountDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/res/ui/mainwindow.ui b/res/ui/mainwindow.ui index d763df0b..88e78e2b 100644 --- a/res/ui/mainwindow.ui +++ b/res/ui/mainwindow.ui @@ -126,6 +126,7 @@ <string>Change account</string> </property> </widget> + <addaction name="actionConfigure_parameters"/> <addaction name="menuChange_account"/> <addaction name="actionAdd_account"/> <addaction name="separator"/> @@ -227,6 +228,11 @@ <string>Transfer money</string> </property> </action> + <action name="actionConfigure_parameters"> + <property name="text"> + <string>Configure</string> + </property> + </action> </widget> <resources/> <connections> @@ -310,11 +316,28 @@ </hint> </hints> </connection> + <connection> + <sender>actionConfigure_parameters</sender> + <signal>triggered()</signal> + <receiver>MainWindow</receiver> + <slot>openConfigureAccountDialog()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>36</y> + </hint> + <hint type="destinationlabel"> + <x>248</x> + <y>218</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>openAddAccountDialog()</slot> <slot>save()</slot> <slot>openTransferMoneyDialog()</slot> <slot>openAddContactDialog()</slot> + <slot>openConfigureAccountDialog()</slot> </slots> </ui> -- GitLab