

from PyQt4 import QtGui,QtCore
import CCP4TaskWidget
import CCP4Widgets

class CTaskGesamt(CCP4TaskWidget.CTaskWidget):

# Subclass CTaskWidget to give specific task window
  TASKNAME = 'gesamt'
  TASKVERSION = 0.0
  TASKMODULE='model_data_utility'
  TASKTITLE='Structural alignment - Gesamt'
  SHORTTASKTITLE='GESAMT'
  WHATNEXT = []
  PROGRAMHELP = 'gesamt'
  DESCRIPTION='Superpose one protein structure on another'
  
  def __init__(self,parent):
    CCP4TaskWidget.CTaskWidget.__init__(self,parent)


  def drawContents(self):

    self.setProgramHelpFile('gesamt')

    
    # Remove the 'followFrom' widget cos there can be no preceeding jobs - (this may be wrong thing to do)                    
    folder = self.openFolder(folderFunction='inputData',title='Input Data',followFrom=False)

    self.createLine( [ 'subtitle', 'Structure to superpose' ] )
    self.createLine( ['tip', 'This is the query structure to which the transformation matrix will be applied.', 'widget', 'XYZIN_QUERY'] )
    self.getWidget('XYZIN_QUERY').showAtomSelection()

    self.createLine( [ 'subtitle', 'Target structure' ] )
    self.createLine( ['tip', 'This is the target structure onto which the query structure will be moved.', 'widget', 'XYZIN_TARGET'] )
    self.getWidget('XYZIN_TARGET').showAtomSelection()

    self.createLine( ['tip', 'Save the moved model, or just report the quality of the match?', 'widget', 'OUTPUT_COORDS', 'label', 'Output superposed coordinates'])

    self.createLine( ['tip', 'Normal mode is sufficient for most purposes. High quality mode will take about 10 times longer', 'widget', 'MODE' ] )
