<s> from atom . api import Typed <EOL> from enaml . widgets . calendar import ProxyCalendar <EOL> from . QtGui import QCalendarWidget <EOL> from . qt_bounded_date import QtBoundedDate , CHANGED_GUARD <EOL> class QtCalendar ( QtBoundedDate , ProxyCalendar ) : <EOL> """<STR_LIT>""" <EOL> widget = Typed ( QCalendarWidget ) <EOL> def create_widget ( self ) : <EOL> """<STR_LIT>""" <EOL> self . widget = QCalendarWidget ( self . parent_widget ( ) ) <EOL> def init_widget ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( QtCalendar , self ) . init_widget ( ) <EOL> self . widget . activated . connect ( self . on_date_changed ) <EOL> def get_date ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . widget . selectedDate ( ) . toPython ( ) <EOL> def set_minimum ( self , date ) : <EOL> """<STR_LIT>""" <EOL> self . widget . setMinimumDate ( date ) <EOL> def set_maximum ( self , date ) : <EOL> """<STR_LIT>""" <EOL> self . widget . setMaximumDate ( date ) <EOL> def set_date ( self , date ) : <EOL> """<STR_LIT>""" <EOL> self . _guard |= CHANGED_GUARD <EOL> try : <EOL> self . widget . setSelectedDate ( date ) <EOL> finally : <EOL> self . _guard &= ~ CHANGED_GUARD </s>
