# coding:utf-8
from PyQt4 import QtCore
from PyQt4 import QtGui
class MenuLabel(QtGui.QLabel):
    """
    菜单栏，展示菜单选项，包括：用户信息，登出，设置，切换应用和桌面展示
    """
    def __init__(self,parent=None):
        QtGui.QLabel.__init__(self, parent)
        self.setGeometry(0,0,parent.geometry().width(),parent.geometry().height()//10)
        self.setStyleSheet('QLabel{border-image: url();background-color:green;}')
#         self.setStyleSheet('background-color:blue;')
#         self.setStyleSheet('QLabel{border-image: url(images/set-conten-pop-bg.png);}')
        self.okButton=QtGui.QPushButton(''.decode('utf-8'),self)    
#         okButton=QtGui.QPushButton('确定'.decode('utf-8'),backLabel)
        btnRect=QtCore.QRect(0,0,70,20)
        self.okButton.setGeometry((self.geometry().width()-btnRect.width())//2,(self.geometry().height()-btnRect.height())//2,btnRect.width(),btnRect.height())
        self.okButton.setStyleSheet("""QPushButton{border-image: url(images/set-button-sure.png);}""")
        self.connect(self.okButton, QtCore.SIGNAL('clicked()'), QtGui.qApp,QtCore.SLOT('quit()'))
