#coding:utf-8
from PyQt4 import QtCore
from PyQt4 import QtGui
class AppToolShow(QtGui.QPushButton):
    """
    工具栏点击收起按钮
    """
    def __init__(self,parent=None):
        QtGui.QPushButton.__init__(self,parent)
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.height_=19
        self.width_=parent.geometry().width()
        self.setFlat(True)
        self.setGeometry(0,parent.geometry().height()-self.height_-2,self.width_,self.height_)
        self.setStyleSheet("QPushButton{background-color:rgb(9,26,35);}")
        # self.setStyleSheet("QPushButton{border-image: url(VirtApp/images/up_down.png);background:transparent;}")
        self.enterSignal=QtCore.pyqtSignal()
        self.connect(self,QtCore.SIGNAL('enterSignal'),parent,QtCore.SIGNAL('enterSignal'))


    def enterEvent(self, QEvent):
        self.emit(QtCore.SIGNAL('enterSignal'))
