added GUI elements for upcoming multi account feature

This commit is contained in:
Rinaldus 2016-02-08 11:52:24 +03:00
parent ce5bff27ce
commit 72a16516f4
8 changed files with 2273 additions and 2004 deletions

BIN
icons/add_account.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

BIN
icons/modify_account.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

BIN
icons/remove_account.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

View File

@ -9,7 +9,7 @@ from PyQt5.QtCore import (QThread, QTimer, QFile, QSettings)
import imaplib import imaplib
imaplib._MAXLINE = 400000 imaplib._MAXLINE = 400000
import subprocess import subprocess
import res import resources_rc
from ui_settings import Ui_Settings from ui_settings import Ui_Settings
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
import os import os

View File

@ -6,5 +6,8 @@
<file>icons/menu_quit.png</file> <file>icons/menu_quit.png</file>
<file>icons/check_now.png</file> <file>icons/check_now.png</file>
<file>icons/settings.png</file> <file>icons/settings.png</file>
<file>icons/add_account.png</file>
<file>icons/modify_account.png</file>
<file>icons/remove_account.png</file>
</qresource> </qresource>
</RCC> </RCC>

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>585</width> <width>586</width>
<height>282</height> <height>332</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -27,7 +27,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>240</y> <y>290</y>
<width>341</width> <width>341</width>
<height>32</height> <height>32</height>
</rect> </rect>
@ -59,7 +59,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>70</y> <y>120</y>
<width>541</width> <width>541</width>
<height>161</height> <height>161</height>
</rect> </rect>
@ -306,8 +306,83 @@
<string>minutes</string> <string>minutes</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>151</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="btnAddAccount">
<property name="geometry">
<rect>
<x>180</x>
<y>80</y>
<width>31</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string>Add account</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/add_account.png</normalon>
</iconset>
</property>
</widget>
<widget class="QPushButton" name="btnModifyAccount">
<property name="geometry">
<rect>
<x>220</x>
<y>80</y>
<width>31</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string>Modify account</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/modify_account.png</normalon>
</iconset>
</property>
</widget>
<widget class="QPushButton" name="btnRemoveAccount">
<property name="geometry">
<rect>
<x>260</x>
<y>80</y>
<width>31</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string>Remove account</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/remove_account.png</normalon>
</iconset>
</property>
</widget>
</widget> </widget>
<resources/> <resources>
<include location="../resources.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/settings.ui' # Form implementation generated from reading ui file 'ui/settings.ui'
# #
# Created by: PyQt5 UI code generator 5.5 # Created by: PyQt5 UI code generator 5.5.1
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Settings(object): class Ui_Settings(object):
def setupUi(self, Settings): def setupUi(self, Settings):
Settings.setObjectName("Settings") Settings.setObjectName("Settings")
Settings.resize(585, 282) Settings.resize(586, 332)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -21,7 +21,7 @@ class Ui_Settings(object):
icon.addPixmap(QtGui.QPixmap("../icons/mailbox_empty.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap("../icons/mailbox_empty.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Settings.setWindowIcon(icon) Settings.setWindowIcon(icon)
self.buttonBox = QtWidgets.QDialogButtonBox(Settings) self.buttonBox = QtWidgets.QDialogButtonBox(Settings)
self.buttonBox.setGeometry(QtCore.QRect(20, 240, 341, 32)) self.buttonBox.setGeometry(QtCore.QRect(20, 290, 341, 32))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox") self.buttonBox.setObjectName("buttonBox")
@ -30,7 +30,7 @@ class Ui_Settings(object):
self.boolifNotify.setChecked(True) self.boolifNotify.setChecked(True)
self.boolifNotify.setObjectName("boolifNotify") self.boolifNotify.setObjectName("boolifNotify")
self.groupBox = QtWidgets.QGroupBox(Settings) self.groupBox = QtWidgets.QGroupBox(Settings)
self.groupBox.setGeometry(QtCore.QRect(20, 70, 541, 161)) self.groupBox.setGeometry(QtCore.QRect(20, 120, 541, 161))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -112,6 +112,30 @@ class Ui_Settings(object):
self.label_2 = QtWidgets.QLabel(Settings) self.label_2 = QtWidgets.QLabel(Settings)
self.label_2.setGeometry(QtCore.QRect(260, 20, 61, 16)) self.label_2.setGeometry(QtCore.QRect(260, 20, 61, 16))
self.label_2.setObjectName("label_2") self.label_2.setObjectName("label_2")
self.comboBox = QtWidgets.QComboBox(Settings)
self.comboBox.setGeometry(QtCore.QRect(20, 80, 151, 23))
self.comboBox.setObjectName("comboBox")
self.btnAddAccount = QtWidgets.QPushButton(Settings)
self.btnAddAccount.setGeometry(QtCore.QRect(180, 80, 31, 23))
self.btnAddAccount.setText("")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/add_account.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.btnAddAccount.setIcon(icon1)
self.btnAddAccount.setObjectName("btnAddAccount")
self.btnModifyAccount = QtWidgets.QPushButton(Settings)
self.btnModifyAccount.setGeometry(QtCore.QRect(220, 80, 31, 23))
self.btnModifyAccount.setText("")
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icons/modify_account.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.btnModifyAccount.setIcon(icon2)
self.btnModifyAccount.setObjectName("btnModifyAccount")
self.btnRemoveAccount = QtWidgets.QPushButton(Settings)
self.btnRemoveAccount.setGeometry(QtCore.QRect(260, 80, 31, 23))
self.btnRemoveAccount.setText("")
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/icons/remove_account.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.btnRemoveAccount.setIcon(icon3)
self.btnRemoveAccount.setObjectName("btnRemoveAccount")
self.retranslateUi(Settings) self.retranslateUi(Settings)
self.buttonBox.accepted.connect(Settings.accept) self.buttonBox.accepted.connect(Settings.accept)
@ -134,4 +158,8 @@ class Ui_Settings(object):
self.btnTestConnection.setText(_translate("Settings", "Test connection")) self.btnTestConnection.setText(_translate("Settings", "Test connection"))
self.label.setText(_translate("Settings", "Check for unread mail every")) self.label.setText(_translate("Settings", "Check for unread mail every"))
self.label_2.setText(_translate("Settings", "minutes")) self.label_2.setText(_translate("Settings", "minutes"))
self.btnAddAccount.setToolTip(_translate("Settings", "Add account"))
self.btnModifyAccount.setToolTip(_translate("Settings", "Modify account"))
self.btnRemoveAccount.setToolTip(_translate("Settings", "Remove account"))
import resources_rc