• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

#-*- encoding: iso-8859-1 -*-
#-*- coding: iso-8859-1 -*-
 
import PyQt4
from pyHed.common import *
 
class FrameCustom(PyQt4.QtGui.QFrame):
	'''
		//!--------------------------------------------------------
		// @function	FrameCustom
		// @desc		FrameCustom: the base class for all frames in pyHed.
		// @author      Renato Dehnhardt <renato@planejar.com>, Edgar Prufer
		// @data        01/06/2008, 24/09/2009
		//!--------------------------------------------------------
	'''
	def __init__(self, parent):
		super(FrameCustom, self).__init__(parent)
		self.title = ''
		# it can be null if it's a FrameDetail
		if parent:
			self.parent = parent
			# resize the frame
			self.resize(pyHedConsts.frmMain.width(), pyHedConsts.frmMain.height())
 
		# create all GUI components
		self.onPaint()
 
	def onPaint(self):
		'''
		//!--------------------------------------------------------
		// @function	FrmCustomBtn::onPaint
		// @desc		use: to create all GUI components
		// @author      Renato Dehnhardt <renato@planejar.com>, Edgar Prufer
		// @data        01/06/2008, 24/09/2009
		//!--------------------------------------------------------
		'''
		pass
 
	def closeFrame(self):
		'''
		//!--------------------------------------------------------
		// @function	FrmCustomBtn::closeFrame
		// @desc		closes the current frame
		// @author      Renato Dehnhardt <renato@planejar.com>, Edgar Prufer
		// @data        01/06/2008, 24/09/2009
		//!--------------------------------------------------------
		'''
		pyHedConsts.frmMain.removeFrame()
		self.close()
 
	def getCaption(self):
		'''
		//!--------------------------------------------------------
		// @function	FrmCustomBtn::caption
		// @desc		returns the frame Tile
		// @return		self.title
		// @author      Renato Dehnhardt <renato@planejar.com>
		// @data        01/06/2008
		//!--------------------------------------------------------
		'''
		return self.title