Compare commits
24 Commits
Author | SHA1 | Date |
---|---|---|
Rinaldus | 7822c3690b | |
Rinaldus | b04cb9a6ff | |
Rinaldus | 66020b44a5 | |
Rinaldus | 8fbcb94182 | |
Rinaldus | c025371c1b | |
Rinaldus | 6ccb04632b | |
Rinaldus | a49944eab6 | |
Rinaldus | d7378800d0 | |
Rinaldus | 6b73eb58bc | |
Rinaldus | f4b5be7933 | |
Rinaldus | 5af9d228b3 | |
Rinaldus | 147b7f47dc | |
Rinaldus | aab6cf8490 | |
Rinaldus | 7be56a1550 | |
Rinaldus | 5d9fa72bd0 | |
Rinaldus | ee2d66c8c8 | |
Rinaldus | ee0cb9b7de | |
Rinaldus | d5d41dcfef | |
Rinaldus | 52c76223a9 | |
Rinaldus | 51c9221822 | |
Rinaldus | 9cb0d58312 | |
Rinaldus | f73ca3e0b0 | |
Rinaldus | 207dbbcdb8 | |
Rinaldus | aba8637900 |
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2015-2016, Peter Svirshchevskiy
|
||||
Copyright (c) 2015-2017, Peter Svirshchevskiy
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
|
22
README.md
22
README.md
|
@ -3,9 +3,14 @@
|
|||
This is Light weight mail notifier written in PyQt5. It checks your mailbox periodically and notify you if you have new mail.
|
||||
|
||||
## Screenshots
|
||||
![MailboxEmpty](https://raw.github.com/rinaldus/mail-notify/master/screenshots/screen1.jpg)
|
||||
![MailboxFull](https://raw.github.com/rinaldus/mail-notify/master/screenshots/screen2.jpg)
|
||||
![Settings](https://raw.github.com/rinaldus/mail-notify/master/screenshots/screen3.jpg)
|
||||
### Version 3.0
|
||||
![MailboxEmpty](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/no_unread_mails-3.0.jpg)
|
||||
![MailboxFull](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/unread_mails-3.0.jpg)
|
||||
![Details](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/details-3.0.jpg)
|
||||
### Version 1.0
|
||||
![MailboxEmpty](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen1.jpg)
|
||||
![MailboxFull](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen2.jpg)
|
||||
![Settings](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen3.jpg)
|
||||
|
||||
## Install
|
||||
|
||||
|
@ -21,6 +26,17 @@ $ chmod +x mail-notifier.py
|
|||
|
||||
## Changelog
|
||||
|
||||
### Version 3.01 (release date: 10.10.17)
|
||||
* Added status bar in Details window
|
||||
* Details window now remembers its size
|
||||
* Some cosmetic improvements in menu
|
||||
|
||||
### Version 3.0 (release date: 26.07.16)
|
||||
* System tray icon displays count of unread mail directly on itself
|
||||
* Popup notification behaviour was changed: now popup notification appears only if the number of unread emails has
|
||||
changed since last mail check
|
||||
* Now you can view a short information about unread emails by click on system tray icon or choose "Details" from system tray menu
|
||||
|
||||
### Version 2.0 (release date: 23.03.16)
|
||||
* **Important! Users of Mail Notifier 1.x have to delete old configuration file located in ~/.config/mail-notifier/settings.conf before first launch of new version**
|
||||
* New "About" window
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
164
mail-notifier.py
164
mail-notifier.py
|
@ -7,19 +7,22 @@ from PyQt5.QtWidgets import (QAction, QApplication, QCheckBox, QComboBox,
|
|||
QTextEdit, QVBoxLayout, QInputDialog)
|
||||
from PyQt5.QtCore import (QThread, QTimer, QFile, QSettings)
|
||||
import imaplib
|
||||
import email
|
||||
imaplib._MAXLINE = 400000
|
||||
import subprocess
|
||||
import resources_rc
|
||||
from ui_settings import Ui_Settings
|
||||
from ui_about import Ui_about
|
||||
from ui_details import Ui_Details
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
import os
|
||||
import socket
|
||||
import time
|
||||
from datetime import datetime, date, time
|
||||
|
||||
#variables
|
||||
programTitle = "Mail Notifier"
|
||||
programVersion = "2.0"
|
||||
programVersion = "3.01-dev"
|
||||
settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat)
|
||||
def GlobalSettingsExist():
|
||||
if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and
|
||||
|
@ -56,7 +59,16 @@ class Window(QDialog):
|
|||
self.createActions()
|
||||
self.setTitle=programTitle
|
||||
self.createTrayIcon()
|
||||
self.trayIcon.setIcon(QIcon(":icons/mailbox_empty.png"))
|
||||
# Draw system tray icon
|
||||
pixmap = QtGui.QPixmap(QtGui.QPixmap(":icons/mailbox_empty.png"))
|
||||
painter = QtGui.QPainter(pixmap)
|
||||
painter.setPen(QtGui.QColor(255, 0, 0))
|
||||
painter.setFont(QtGui.QFont('Arial', QtGui.QFont.Bold))
|
||||
painter.drawText(QtCore.QRectF(pixmap.rect()), QtCore.Qt.AlignCenter, "0")
|
||||
painter.end()
|
||||
self.trayIcon.setIcon(QtGui.QIcon(pixmap))
|
||||
# End drawing system tray icon
|
||||
|
||||
self.trayIcon.setToolTip("You have no unread letters")
|
||||
self.trayIcon.show()
|
||||
|
||||
|
@ -75,30 +87,46 @@ class Window(QDialog):
|
|||
self.ui.btnSaveAccount.clicked.connect(self.btnSaveAccount_clicked)
|
||||
self.ui.btnRemoveAccount.clicked.connect(self.btnRemoveAccount_clicked)
|
||||
|
||||
# Check if account doesn't exist, it creates default one
|
||||
if (AccountExist() == False):
|
||||
self.ui.comboAccounts.addItem("Default")
|
||||
self.ui.comboAccounts.setCurrentText("Default")
|
||||
|
||||
|
||||
# Main timer
|
||||
self.timer = QTimer(self)
|
||||
self.timer.timeout.connect(mail_check)
|
||||
|
||||
self.lastCheckCount = 0 # variable for prevent annoying popup notification when mail count didn't change since last check
|
||||
|
||||
# Menu actions
|
||||
def createActions(self):
|
||||
self.aboutShow = QAction(QIcon(':icons/mailbox_empty.png'),"&About", self, triggered=self.aboutShow)
|
||||
self.detailsShow = QAction(QIcon(':icons/details.png'),"&Details...", self, triggered=self.detailsShow)
|
||||
self.aboutShow = QAction(QIcon(':icons/mailbox_empty.png'),"&About " + programTitle + "...", self, triggered=self.aboutShow)
|
||||
self.checkNow = QAction(QIcon(':icons/check_now.png'),"&Check now", self, triggered=mail_check)
|
||||
self.restoreAction = QAction(QIcon(":icons/settings.png"),"&Settings", self, triggered=self.showNormal)
|
||||
self.restoreAction = QAction(QIcon(":icons/settings.png"),"&Settings...", self, triggered=self.showNormal)
|
||||
self.quitAction = QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit)
|
||||
|
||||
# UI functions
|
||||
def createTrayIcon(self):
|
||||
self.trayIconMenu = QMenu(self)
|
||||
self.trayIconMenu.addAction(self.aboutShow)
|
||||
f = self.trayIconMenu.font()
|
||||
f.setBold(True)
|
||||
self.detailsShow.setFont(f)
|
||||
self.trayIconMenu.addAction(self.detailsShow)
|
||||
self.trayIconMenu.addSeparator()
|
||||
self.trayIconMenu.addAction(self.checkNow)
|
||||
self.trayIconMenu.addAction(self.restoreAction)
|
||||
self.trayIconMenu.addAction(self.aboutShow)
|
||||
self.trayIconMenu.addAction(self.quitAction)
|
||||
self.trayIcon = QSystemTrayIcon(self)
|
||||
self.trayIcon.setContextMenu(self.trayIconMenu)
|
||||
self.trayIcon.activated.connect(self.trayIconActivated)
|
||||
|
||||
def SettingsRestore(self):
|
||||
if (GlobalSettingsExist() and AccountExist()):
|
||||
groups = settings.childGroups()
|
||||
self.ui.comboAccounts.clear() # Clear account items before fill them again
|
||||
for i in range (len(groups)):
|
||||
self.ui.comboAccounts.addItem(groups[i])
|
||||
self.ui.comboAccounts.setCurrentText(groups[i])
|
||||
|
@ -186,6 +214,10 @@ class Window(QDialog):
|
|||
GroupName = self.ui.comboAccounts.currentText()
|
||||
self.ui.comboAccounts.removeItem(Index)
|
||||
self.SettingsRemove(GroupName)
|
||||
# Check if account doesn't exist, it creates default one
|
||||
if (AccountExist() == False):
|
||||
self.ui.comboAccounts.addItem("Default")
|
||||
self.ui.comboAccounts.setCurrentText("Default")
|
||||
|
||||
def comboAccounts_changed(self):
|
||||
self.ui.lblTestOutput.setText("")
|
||||
|
@ -203,6 +235,15 @@ class Window(QDialog):
|
|||
about.show()
|
||||
about.activateWindow()
|
||||
|
||||
def detailsShow(self):
|
||||
details.show()
|
||||
details.activateWindow()
|
||||
|
||||
def trayIconActivated(self, reason):
|
||||
if reason in (QSystemTrayIcon.Trigger, QSystemTrayIcon.DoubleClick):
|
||||
details.show()
|
||||
details.activateWindow()
|
||||
|
||||
def start(self):
|
||||
if (GlobalSettingsExist() and AccountExist()):
|
||||
CheckInterval = 1000*60*int(settings.value("CheckInterval"))
|
||||
|
@ -221,7 +262,7 @@ class About(QDialog):
|
|||
self.ui = Ui_about()
|
||||
self.ui.setupUi(self)
|
||||
self.setWindowFlags(QtCore.Qt.Tool)
|
||||
self.setFixedSize(483,334)
|
||||
self.setFixedSize(511,334)
|
||||
|
||||
self.ui.lblNameVersion.setText(programTitle + " " + programVersion)
|
||||
|
||||
|
@ -235,6 +276,27 @@ class About(QDialog):
|
|||
event.ignore()
|
||||
self.hide()
|
||||
|
||||
class Details(QDialog):
|
||||
def __init__(self):
|
||||
super(Details, self).__init__()
|
||||
|
||||
self.ui = Ui_Details()
|
||||
self.ui.setupUi(self)
|
||||
self.setWindowFlags(QtCore.Qt.Window)
|
||||
self.ui.btnRefresh.clicked.connect(self.Refresh_clicked)
|
||||
if (settings.contains("Details_width") and settings.contains("Details_height")):
|
||||
width = int(settings.value("Details_width"))
|
||||
height = int(settings.value("Details_height"))
|
||||
self.resize(width,height)
|
||||
|
||||
def closeEvent(self, event):
|
||||
event.ignore()
|
||||
settings.setValue("Details_width",self.width())
|
||||
settings.setValue("Details_height",self.height())
|
||||
self.hide()
|
||||
|
||||
def Refresh_clicked(self):
|
||||
mail_check()
|
||||
|
||||
# Common functions
|
||||
|
||||
|
@ -263,9 +325,35 @@ class Mail():
|
|||
except:
|
||||
print("Unable to check mail")
|
||||
return "ERROR"
|
||||
def parseMail(self,header):
|
||||
try:
|
||||
output=[]
|
||||
self.imap.select(readonly=True)
|
||||
typ, data = self.imap.search(None, 'UNSEEN')
|
||||
for num in data[0].split():
|
||||
typ, data = self.imap.fetch(num, '(RFC822)')
|
||||
raw_mail = data[0][1]
|
||||
mail=email.message_from_bytes(raw_mail)
|
||||
h=email.header.decode_header(mail.get(header))
|
||||
if (h[0][1] != "unknown-8bit"):
|
||||
msg = h[0][0].decode(h[0][1]) if h[0][1] else h[0][0]
|
||||
else:
|
||||
msg = "Unknown charset"
|
||||
output.append(msg)
|
||||
return output
|
||||
except:
|
||||
print("Unable to get mail data")
|
||||
return "ERROR"
|
||||
|
||||
def mail_check():
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Starting mail check")
|
||||
mail_count = 0
|
||||
AllFroms=[]
|
||||
AllSubjs=[]
|
||||
AllDates=[]
|
||||
details.ui.tableWidget.clearContents()
|
||||
details.ui.tableWidget.setRowCount(0)
|
||||
details.ui.tableWidget.setColumnCount(0)
|
||||
if (GlobalSettingsExist() and AccountExist()):
|
||||
m = Mail()
|
||||
groups = settings.childGroups()
|
||||
|
@ -283,6 +371,9 @@ def mail_check():
|
|||
mail_count = "ERROR"
|
||||
else:
|
||||
mail_count += m.checkMail()
|
||||
AllFroms.extend(m.parseMail("From"))
|
||||
AllSubjs.extend(m.parseMail("Subject"))
|
||||
AllDates.extend(m.parseMail("Date"))
|
||||
else:
|
||||
mail_count = "CONNECTION_ERROR"
|
||||
else:
|
||||
|
@ -291,26 +382,82 @@ def mail_check():
|
|||
# Parsing mail_count values
|
||||
|
||||
if mail_count == 0:
|
||||
# When mailbox have not unread letters
|
||||
window.trayIcon.setToolTip ("You have no unread mail")
|
||||
window.trayIcon.setIcon(QIcon(":icons/mailbox_empty.png"))
|
||||
# Draw text on icon
|
||||
pixmap = QtGui.QPixmap(QtGui.QPixmap(":icons/mailbox_empty.png"))
|
||||
painter = QtGui.QPainter(pixmap)
|
||||
painter.setPen(QtGui.QColor(255, 0, 0))
|
||||
painter.setFont(QtGui.QFont('Arial', 100,QtGui.QFont.Bold))
|
||||
painter.drawText(QtCore.QRectF(pixmap.rect()), QtCore.Qt.AlignCenter, "0")
|
||||
painter.end()
|
||||
# End drawing text on icon
|
||||
window.trayIcon.setIcon(QtGui.QIcon(pixmap))
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Mail check completed. You have no unread letters")
|
||||
elif mail_count == "ERROR":
|
||||
window.trayIcon.setIcon(QIcon(":icons/mailbox_error.png"))
|
||||
window.trayIcon.setToolTip ("Error checking mail.")
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Error checking mail")
|
||||
elif mail_count == "CONNECTION_ERROR":
|
||||
window.trayIcon.setToolTip("Unable to establish connection to mailbox. Check your mail settings and make sure that you have not network problems.")
|
||||
notify("Unable to establish connection to mailbox. Check your mail settings and make sure that you have not network problems.")
|
||||
window.trayIcon.setIcon(QIcon(":icons/mailbox_error.png"))
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Unable to establish connection to mailbox. Check your mail settings and make sure that you have not network problems")
|
||||
elif mail_count == "CONFIGURATION_ERROR":
|
||||
window.trayIcon.setIcon(QIcon(":icons/mailbox_error.png"))
|
||||
window.trayIcon.setToolTip("Cannot find configuration file. You should give access to your mailbox")
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Cannot find configuration file. You should give access to your mailbox")
|
||||
else:
|
||||
# When mailbox has unread letters
|
||||
window.trayIcon.setToolTip ("You have "+ str(mail_count)+" unread letters")
|
||||
window.trayIcon.setIcon(QIcon(":icons/mailbox_full.png"))
|
||||
# Draw text on icon
|
||||
pixmap = QtGui.QPixmap(QtGui.QPixmap(":icons/mailbox_full.png"))
|
||||
painter = QtGui.QPainter(pixmap)
|
||||
painter.setPen(QtGui.QColor(255, 255, 255))
|
||||
painter.setFont(QtGui.QFont('Arial', 100,QtGui.QFont.Bold))
|
||||
painter.drawText(QtCore.QRectF(pixmap.rect()), QtCore.Qt.AlignCenter, str(mail_count))
|
||||
painter.end()
|
||||
# End drawing text on icon
|
||||
window.trayIcon.setIcon(QtGui.QIcon(pixmap))
|
||||
# Popup notification appears only if mail count changed since last check
|
||||
if (mail_count != window.lastCheckCount):
|
||||
notify ("You have "+ str(mail_count) +" unread letters")
|
||||
|
||||
# Filling table
|
||||
data = {"From":AllFroms,
|
||||
"Subject":AllSubjs,
|
||||
"Date":AllDates,}
|
||||
details.ui.tableWidget.setRowCount(len(AllFroms))
|
||||
details.ui.tableWidget.setColumnCount(3)
|
||||
#Enter data onto Table
|
||||
try:
|
||||
horHeaders = []
|
||||
for n, key in enumerate(sorted(data.keys())):
|
||||
#print(data.keys())
|
||||
horHeaders.append(key)
|
||||
for m, item in enumerate(data[key]):
|
||||
newitem = QtWidgets.QTableWidgetItem(item)
|
||||
details.ui.tableWidget.setItem(m, n, newitem)
|
||||
except:
|
||||
print("Unable to load some data")
|
||||
pass
|
||||
|
||||
#Add Header
|
||||
details.ui.tableWidget.setHorizontalHeaderLabels(horHeaders)
|
||||
|
||||
#Adjust size of Table
|
||||
details.ui.tableWidget.resizeColumnsToContents()
|
||||
details.ui.tableWidget.resizeRowsToContents()
|
||||
details.ui.statusBar.setText(datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S")+" - Mail check completed. You have "+ str(mail_count) +" unread letters")
|
||||
# check was successfull, lastCheckCount is updating
|
||||
window.lastCheckCount = mail_count
|
||||
def notify(message):
|
||||
try:
|
||||
if settings.value("Notify"):
|
||||
subprocess.Popen(['notify-send', programTitle, message])
|
||||
return
|
||||
except:
|
||||
print(message)
|
||||
|
||||
|
||||
|
||||
|
@ -329,6 +476,7 @@ if __name__ == '__main__':
|
|||
QApplication.setQuitOnLastWindowClosed(False)
|
||||
window = Window()
|
||||
about = About()
|
||||
details = Details()
|
||||
if (GlobalSettingsExist() and AccountExist()):
|
||||
window.hide()
|
||||
else:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/details.png</file>
|
||||
<file>LICENSE.txt</file>
|
||||
<file>icons/save_account.png</file>
|
||||
<file>icons/mailbox_empty.png</file>
|
||||
|
|
5051
resources_rc.py
5051
resources_rc.py
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>483</width>
|
||||
<width>511</width>
|
||||
<height>334</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -60,7 +60,7 @@
|
|||
<rect>
|
||||
<x>200</x>
|
||||
<y>40</y>
|
||||
<width>203</width>
|
||||
<width>291</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Details</class>
|
||||
<widget class="QDialog" name="Details">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1048</width>
|
||||
<height>619</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Mail Notifier</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/icons/mailbox_empty.png</normaloff>:/icons/mailbox_empty.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRefresh">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Refresh</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/icons/check_now.png</normaloff>:/icons/check_now.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statusBar">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'ui/about.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.5.1
|
||||
# Created by: PyQt5 UI code generator 5.8.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_about(object):
|
||||
def setupUi(self, about):
|
||||
about.setObjectName("about")
|
||||
about.resize(483, 334)
|
||||
about.resize(511, 334)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
|
@ -31,7 +31,7 @@ class Ui_about(object):
|
|||
self.lblLogo.setScaledContents(True)
|
||||
self.lblLogo.setObjectName("lblLogo")
|
||||
self.lblNameVersion = QtWidgets.QLabel(about)
|
||||
self.lblNameVersion.setGeometry(QtCore.QRect(200, 40, 203, 31))
|
||||
self.lblNameVersion.setGeometry(QtCore.QRect(200, 40, 291, 31))
|
||||
self.lblNameVersion.setMinimumSize(QtCore.QSize(203, 0))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(20)
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/details.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.6.1.dev1604271126
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Details(object):
|
||||
def setupUi(self, Details):
|
||||
Details.setObjectName("Details")
|
||||
Details.resize(1048, 619)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/icons/mailbox_empty.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
Details.setWindowIcon(icon)
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Details)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.btnRefresh = QtWidgets.QPushButton(Details)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.btnRefresh.sizePolicy().hasHeightForWidth())
|
||||
self.btnRefresh.setSizePolicy(sizePolicy)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(":/icons/check_now.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.btnRefresh.setIcon(icon1)
|
||||
self.btnRefresh.setObjectName("btnRefresh")
|
||||
self.verticalLayout_2.addWidget(self.btnRefresh)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.tableWidget = QtWidgets.QTableWidget(Details)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(0)
|
||||
self.tableWidget.setRowCount(0)
|
||||
self.horizontalLayout.addWidget(self.tableWidget)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
self.statusBar = QtWidgets.QLabel(Details)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.statusBar.sizePolicy().hasHeightForWidth())
|
||||
self.statusBar.setSizePolicy(sizePolicy)
|
||||
self.statusBar.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.statusBar.setBaseSize(QtCore.QSize(0, 0))
|
||||
self.statusBar.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||
self.statusBar.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.statusBar.setText("")
|
||||
self.statusBar.setObjectName("statusBar")
|
||||
self.verticalLayout_2.addWidget(self.statusBar)
|
||||
|
||||
self.retranslateUi(Details)
|
||||
QtCore.QMetaObject.connectSlotsByName(Details)
|
||||
|
||||
def retranslateUi(self, Details):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Details.setWindowTitle(_translate("Details", "Mail Notifier"))
|
||||
self.btnRefresh.setText(_translate("Details", "Refresh"))
|
||||
|
||||
import resources_rc
|
Loading…
Reference in New Issue