+++ /dev/null
-# Authors: Amaury Medeiros and Paulo Ouriques
-# Software License: GPL
-
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-
-class PcsCustomButton(QLabel):
- def __init__(self, image, pressedImage, text = "", parent = None):
- super(QLabel, self).__init__(parent)
-
- self.panel = QLabel()
- self.layout = QHBoxLayout()
- self.text = QLabel(text)
- self.defaultPixmap = QPixmap(image)
- self.pressedPixmap = QPixmap(pressedImage)
- self.panel.setPixmap(self.defaultPixmap)
- self.panel.setGeometry(self.defaultPixmap.rect())
- self.layout.addWidget(self.panel)
- if(text <> ""):
- self.layout.addWidget(self.text)
- self.setLayout(self.layout)
-
-
- def mouseReleaseEvent(self,event):
- self.panel.setPixmap(self.defaultPixmap)
- self.emit(SIGNAL("clicked()"))
-
- def mousePressEvent(self, event):
- self.panel.setPixmap(self.pressedPixmap)
-
- def setTextVisible(self, flag):
- if flag:
- pass
-
-