# Path: pordb_update_version.py
# class Ui_Dialog(object):
#     def setupUi(self, Dialog):
#         Dialog.setObjectName("Dialog")
#         Dialog.resize(638, 407)
#         icon = QtGui.QIcon()
#         icon.addPixmap(QtGui.QPixmap("pypordb/8027068_splash.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
#         Dialog.setWindowIcon(icon)
#         self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
#         self.gridLayout_2.setObjectName("gridLayout_2")
#         self.verticalLayout_2 = QtWidgets.QVBoxLayout()
#         self.verticalLayout_2.setObjectName("verticalLayout_2")
#         self.scrollArea = QtWidgets.QScrollArea(Dialog)
#         self.scrollArea.setWidgetResizable(True)
#         self.scrollArea.setObjectName("scrollArea")
#         self.scrollAreaWidgetContents = QtWidgets.QWidget()
#         self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 622, 337))
#         self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
#         self.gridLayout = QtWidgets.QGridLayout(self.scrollAreaWidgetContents)
#         self.gridLayout.setContentsMargins(0, 0, 0, 0)
#         self.gridLayout.setObjectName("gridLayout")
#         self.label_2 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
#         self.label_2.setObjectName("label_2")
#         self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
#         self.plainTextEditWhatsnew = QtWidgets.QPlainTextEdit(self.scrollAreaWidgetContents)
#         self.plainTextEditWhatsnew.setReadOnly(True)
#         self.plainTextEditWhatsnew.setObjectName("plainTextEditWhatsnew")
#         self.gridLayout.addWidget(self.plainTextEditWhatsnew, 2, 0, 1, 1)
#         self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
#         self.label_3.setObjectName("label_3")
#         self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
#         self.scrollArea.setWidget(self.scrollAreaWidgetContents)
#         self.verticalLayout_2.addWidget(self.scrollArea)
#         self.verticalLayout = QtWidgets.QVBoxLayout()
#         self.verticalLayout.setObjectName("verticalLayout")
#         self.label = QtWidgets.QLabel(Dialog)
#         self.label.setObjectName("label")
#         self.verticalLayout.addWidget(self.label)
#         self.horizontalLayout = QtWidgets.QHBoxLayout()
#         self.horizontalLayout.setObjectName("horizontalLayout")
#         self.pushButtonYes = QtWidgets.QPushButton(Dialog)
#         self.pushButtonYes.setAutoDefault(False)
#         self.pushButtonYes.setDefault(True)
#         self.pushButtonYes.setObjectName("pushButtonYes")
#         self.horizontalLayout.addWidget(self.pushButtonYes)
#         self.pushButtonNo = QtWidgets.QPushButton(Dialog)
#         self.pushButtonNo.setObjectName("pushButtonNo")
#         self.horizontalLayout.addWidget(self.pushButtonNo)
#         self.verticalLayout.addLayout(self.horizontalLayout)
#         self.verticalLayout_2.addLayout(self.verticalLayout)
#         self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
# 
#         self.retranslateUi(Dialog)
#         QtCore.QMetaObject.connectSlotsByName(Dialog)
# 
#     def retranslateUi(self, Dialog):
#         _translate = QtCore.QCoreApplication.translate
#         Dialog.setWindowTitle(_translate("Dialog", "PorDB3 Update"))
#         self.label_2.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt;\">What\'s new:</span></p></body></html>"))
#         self.label_3.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">New version of PorDB3 available</span></p></body></html>"))
#         self.label.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">Do you want to perform the update?</span></p></body></html>"))
#         self.pushButtonYes.setText(_translate("Dialog", "Yes"))
#         self.pushButtonNo.setText(_translate("Dialog", "No"))


from PyQt5 import QtGui, QtCore, QtWidgets
from pordb_update_version import Ui_Dialog as pordb_update_version
import os
import urllib.request, urllib.error, urllib.parse
import tempfile
import zipfile
# -*- coding: utf-8 -*-

'''
    Copyright 2012-2018 HWM
    
    This file is part of PorDB3.

    PorDB3 is free software: you can redistribute it and or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PorDB3 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar.  If not, see <http:  www.gnu.org licenses >.
'''


FILE_DOWNLOAD = "https://github.com/hwmay/pordb3/archive/master.zip"


# Path: pordb_update_version.py
# class Ui_Dialog(object):
#     def setupUi(self, Dialog):
#         Dialog.setObjectName("Dialog")
#         Dialog.resize(638, 407)
#         icon = QtGui.QIcon()
#         icon.addPixmap(QtGui.QPixmap("pypordb/8027068_splash.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
#         Dialog.setWindowIcon(icon)
#         self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
#         self.gridLayout_2.setObjectName("gridLayout_2")
#         self.verticalLayout_2 = QtWidgets.QVBoxLayout()
#         self.verticalLayout_2.setObjectName("verticalLayout_2")
#         self.scrollArea = QtWidgets.QScrollArea(Dialog)
#         self.scrollArea.setWidgetResizable(True)
#         self.scrollArea.setObjectName("scrollArea")
#         self.scrollAreaWidgetContents = QtWidgets.QWidget()
#         self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 622, 337))
#         self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
#         self.gridLayout = QtWidgets.QGridLayout(self.scrollAreaWidgetContents)
#         self.gridLayout.setContentsMargins(0, 0, 0, 0)
#         self.gridLayout.setObjectName("gridLayout")
#         self.label_2 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
#         self.label_2.setObjectName("label_2")
#         self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
#         self.plainTextEditWhatsnew = QtWidgets.QPlainTextEdit(self.scrollAreaWidgetContents)
#         self.plainTextEditWhatsnew.setReadOnly(True)
#         self.plainTextEditWhatsnew.setObjectName("plainTextEditWhatsnew")
#         self.gridLayout.addWidget(self.plainTextEditWhatsnew, 2, 0, 1, 1)
#         self.label_3 = QtWidgets.QLabel(self.scrollAreaWidgetContents)
#         self.label_3.setObjectName("label_3")
#         self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
#         self.scrollArea.setWidget(self.scrollAreaWidgetContents)
#         self.verticalLayout_2.addWidget(self.scrollArea)
#         self.verticalLayout = QtWidgets.QVBoxLayout()
#         self.verticalLayout.setObjectName("verticalLayout")
#         self.label = QtWidgets.QLabel(Dialog)
#         self.label.setObjectName("label")
#         self.verticalLayout.addWidget(self.label)
#         self.horizontalLayout = QtWidgets.QHBoxLayout()
#         self.horizontalLayout.setObjectName("horizontalLayout")
#         self.pushButtonYes = QtWidgets.QPushButton(Dialog)
#         self.pushButtonYes.setAutoDefault(False)
#         self.pushButtonYes.setDefault(True)
#         self.pushButtonYes.setObjectName("pushButtonYes")
#         self.horizontalLayout.addWidget(self.pushButtonYes)
#         self.pushButtonNo = QtWidgets.QPushButton(Dialog)
#         self.pushButtonNo.setObjectName("pushButtonNo")
#         self.horizontalLayout.addWidget(self.pushButtonNo)
#         self.verticalLayout.addLayout(self.horizontalLayout)
#         self.verticalLayout_2.addLayout(self.verticalLayout)
#         self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
# 
#         self.retranslateUi(Dialog)
#         QtCore.QMetaObject.connectSlotsByName(Dialog)
# 
#     def retranslateUi(self, Dialog):
#         _translate = QtCore.QCoreApplication.translate
#         Dialog.setWindowTitle(_translate("Dialog", "PorDB3 Update"))
#         self.label_2.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt;\">What\'s new:</span></p></body></html>"))
#         self.label_3.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">New version of PorDB3 available</span></p></body></html>"))
#         self.label.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">Do you want to perform the update?</span></p></body></html>"))
#         self.pushButtonYes.setText(_translate("Dialog", "Yes"))
#         self.pushButtonNo.setText(_translate("Dialog", "No"))


# Path: pypordb_update_version.py
from PyQt5 import QtGui, QtCore, QtWidgets
from pordb_update_version import Ui_Dialog as pordb_update_version
import os
import urllib.request, urllib.error, urllib.parse
import tempfile
import zipfile

# -*- coding: utf-8 -*-

'''
    Copyright 2012-2018 HWM
    
    This file is part of PorDB3.

    PorDB3 is free software: you can redistribute it and or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PorDB3 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar.  If not, see <http:  www.gnu.org licenses >.
'''


FILE_DOWNLOAD = "https://github.com/hwmay/pordb3/archive/master.zip"


class UpdateVersion(QtWidgets.QDialog, pordb_update_version):