#coding:utf-8
from PyQt4 import QtGui
from PyQt4 import QtCore
from os import getenv
class AppToolActivities(QtGui.QPushButton):
    """

    """
    def __init__(self,parent=None):
        QtGui.QPushButton.__init__(self,parent)
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.imagePath=getenv("WIN_UI_IMAGES_PATH")
        self.setGeometry(104,0,52,52)
        # self.setGeometry(22,0,52,52)
        self.setStyleSheet("QPushButton{border-style:flat;color: rgb(255, 255, 255);background-color:rgb(9,26,35);}""QPushButton:hover{border-style:flat;color: rgb(255, 255, 255);background-color: rgb(59, 76, 85);}")
        # self.setStyleSheet("QPushButton{color: rgb(255, 255, 255);background-color: rgb(0, 0, 0);}""QPushButton:hover{color: rgb(255, 255, 255);background-color: rgb(51, 51, 51);}")
        self.label=QtGui.QLabel(self)
        self.label.setGeometry(0,0,self.width(),self.height())
        self.label.setStyleSheet('QLabel{border-image: url();background:transparent;}')
        self.label.icon=QtGui.QLabel(self.label)
        self.label.icon.setGeometry(14,6,23,23)
        self.label.icon.setStyleSheet('QLabel{border-image: url(%s/appImage/activities.png);background:transparent;}'%self.imagePath)
        self.label.home=QtGui.QLabel(self.label)
        self.label.home.setGeometry(0,31,self.label.width(),20)
        self.label.home.setStyleSheet('QLabel{color: rgb(255,255,255);background:transparent;}')
        self.label.home.setText('多任务'.decode('utf-8'))
        self.label.home.setAlignment(QtCore.Qt.AlignCenter)
        # self.setFlat(True)

