#coding:utf-8

from PyQt4.QtCore import Qt, SIGNAL, QRect, QPoint,QSize
from PyQt4.QtGui import QDialog, QLabel, QPainter, QBrush, QColor, QPushButton, QPen, QLinearGradient, QFontMetrics,QIcon
from basedialog import BaseDialog

class InfoHintDialog(BaseDialog):
        
    def __init__(self, hintInfo="", parent = None):
        super(InfoHintDialog,self).__init__(parent)
        self.setWindowTitle(u'提示信息')
#         self.setWindowFlags(Qt.Dialog|Qt.FramelessWindowHint)
#         self.setWindowModality(Qt.ApplicationModal)
        self.setFixedSize(480, 200)
                           
        self.setStyleSheet("QPushButton{color:black; font: 10pt; border:1px;background:url(images/button.png);}")
        
        self.okBtn = QPushButton(u'确  定', self)
        self.okBtn.setFixedSize(75,27)
        
        self.okBtn.setFlat(True)
        self.setTitle(u'提示信息')
        
        self.hintInfo = hintInfo
        
        self.okBtn.move((self.width() - self.okBtn.width())/2, self.height() - self.okBtn.height() - 10)
        
        self.connect(self.okBtn, SIGNAL("clicked()"),self.slotOk)
        
    def slotOk(self):
        self.accept()
        
    def setTitle(self, title):
        self.title = title
        
    def setHintInfo(self, hintInfo):
        self.hintInfo = hintInfo
        self.update()
        

        
        
        
        