# Path: ui/Ui_TipPupup.py
# class Ui_TipPupup(object):
#     def setupUi(self, TipWidget):
#         TipWidget.setObjectName(_fromUtf8("TipWidget"))
#         TipWidget.resize(375, 82)
#         TipWidget.setStyleSheet(_fromUtf8("background-color: rgb(89, 89, 89);"))
#         self.image_label = QtGui.QLabel(TipWidget)
#         self.image_label.setGeometry(QtCore.QRect(10, 10, 64, 64))
#         self.image_label.setFrameShape(QtGui.QFrame.NoFrame)
#         self.image_label.setText(_fromUtf8(""))
#         self.image_label.setObjectName(_fromUtf8("image_label"))
#         self.text_label = QtGui.QLabel(TipWidget)
#         self.text_label.setGeometry(QtCore.QRect(80, 20, 281, 41))
#         self.text_label.setStyleSheet(_fromUtf8("color: rgb(255, 255, 255);\n"
# "font: 11pt \"新宋体\";"))
#         self.text_label.setObjectName(_fromUtf8("text_label"))
# 
#         self.retranslateUi(TipWidget)
#         QtCore.QMetaObject.connectSlotsByName(TipWidget)
# 
#     def retranslateUi(self, TipWidget):
#         TipWidget.setWindowTitle(QtGui.QApplication.translate("TipWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
#         self.text_label.setText(QtGui.QApplication.translate("TipWidget", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))


from ui.Ui_TipPupup import Ui_TipPupup
from ui.TipIcons import *
from Queue import Queue
from PyQt4.QtGui import QApplication, QWidget, QPixmap
from PyQt4.QtCore import QTimer, Qt
import sys
#-*- coding: utf-8 -*-


class TipPupup(QWidget):
    
    TIMER_INTERVAL     = 10
    TIMER_COUNTER_STEP = 30
    MAX_OPACITY_TIME   = 100
    
    TEXT_TYPE_INFO     = 1
    TEXT_TYPE_WARNING  = 2
    TEXT_TYPE_ERROR    = 3
    INFO_ICON_PATH     = ":/tip/icons/tip/info.png"
    WARNING_ICON_PATH  = ":/tip/icons/tip/warning.png"
    ERROR_ICON_PATH    = ":/tip/icons/tip/error.png"

    SHORT_TIME         = 2000
    LONG_TIME          = 4000
    
    MAX_QUEUE_SIZE = 20
    
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setWindowFlags(Qt.FramelessWindowHint | Qt.Dialog)

# Path: ui/Ui_TipPupup.py
# class Ui_TipPupup(object):
#     def setupUi(self, TipWidget):
#         TipWidget.setObjectName(_fromUtf8("TipWidget"))
#         TipWidget.resize(375, 82)
#         TipWidget.setStyleSheet(_fromUtf8("background-color: rgb(89, 89, 89);"))
#         self.image_label = QtGui.QLabel(TipWidget)
#         self.image_label.setGeometry(QtCore.QRect(10, 10, 64, 64))
#         self.image_label.setFrameShape(QtGui.QFrame.NoFrame)
#         self.image_label.setText(_fromUtf8(""))
#         self.image_label.setObjectName(_fromUtf8("image_label"))
#         self.text_label = QtGui.QLabel(TipWidget)
#         self.text_label.setGeometry(QtCore.QRect(80, 20, 281, 41))
#         self.text_label.setStyleSheet(_fromUtf8("color: rgb(255, 255, 255);\n"
# "font: 11pt \"新宋体\";"))
#         self.text_label.setObjectName(_fromUtf8("text_label"))
# 
#         self.retranslateUi(TipWidget)
#         QtCore.QMetaObject.connectSlotsByName(TipWidget)
# 
#     def retranslateUi(self, TipWidget):
#         TipWidget.setWindowTitle(QtGui.QApplication.translate("TipWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
#         self.text_label.setText(QtGui.QApplication.translate("TipWidget", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))


# Path: form/TipPupup.py
from ui.Ui_TipPupup import Ui_TipPupup
from ui.TipIcons import *
from Queue import Queue
from PyQt4.QtGui import QApplication, QWidget, QPixmap
from PyQt4.QtCore import QTimer, Qt
import sys

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


class TipPupup(QWidget):
    
    TIMER_INTERVAL     = 10
    TIMER_COUNTER_STEP = 30
    MAX_OPACITY_TIME   = 100
    
    TEXT_TYPE_INFO     = 1
    TEXT_TYPE_WARNING  = 2
    TEXT_TYPE_ERROR    = 3
    INFO_ICON_PATH     = ":/tip/icons/tip/info.png"
    WARNING_ICON_PATH  = ":/tip/icons/tip/warning.png"
    ERROR_ICON_PATH    = ":/tip/icons/tip/error.png"

    SHORT_TIME         = 2000
    LONG_TIME          = 4000
    
    MAX_QUEUE_SIZE = 20
    
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        self.setWindowFlags(Qt.FramelessWindowHint | Qt.Dialog)

        self.ui = Ui_TipPupup()