Example #1
0
    def __init__(self, parent=None):
        KVBox.__init__(self, parent)
        self.help = QLabel(i18n(helpText), self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter | Qt.AlignTop)
        self.setSpacing(40)

        hBox = KHBox(self)
        vBox1 = KVBox(hBox)
        vBox2 = KVBox(hBox)

        hBox.layout().setAlignment(vBox1, Qt.AlignHCenter)
        hBox.layout().setAlignment(vBox2, Qt.AlignHCenter)
        vBox1.setMargin(20)
        vBox2.setSpacing(20)

        self.datePickerLabel = QLabel("KDatePicker", vBox1)

        self.datePicker = KDatePicker(vBox2)
        self.datePicker.setFixedSize(400, 200)

        self.other = QLabel('KDateWidget', vBox1)
        vBox1.layout().setAlignment(self.other, Qt.AlignBottom)

        self.dateDisplay = KDateWidget(vBox2)

        self.connect(self.datePicker, SIGNAL('dateChanged(QDate)'),
                     self.dateDisplay.setDate)
Example #2
0
class MainFrame(KVBox):
    def __init__(self, parent=None):
        KVBox.__init__(self, parent)
        self.help = QLabel(i18n(helpText), self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter | Qt.AlignTop)
        self.setSpacing(40)

        hBox = KHBox(self)
        vBox1 = KVBox(hBox)
        vBox2 = KVBox(hBox)

        hBox.layout().setAlignment(vBox1, Qt.AlignHCenter)
        hBox.layout().setAlignment(vBox2, Qt.AlignHCenter)
        vBox1.setMargin(20)
        vBox2.setSpacing(20)

        self.datePickerLabel = QLabel("KDatePicker", vBox1)

        self.datePicker = KDatePicker(vBox2)
        self.datePicker.setFixedSize(400, 200)

        self.other = QLabel("KDateWidget", vBox1)
        vBox1.layout().setAlignment(self.other, Qt.AlignBottom)

        self.dateDisplay = KDateWidget(vBox2)

        self.connect(self.datePicker, SIGNAL("dateChanged(QDate)"), self.dateDisplay.setDate)
Example #3
0
class Ui_calendar(object):
    def setupUi(self, calendar):
        calendar.setObjectName("calendar")
        calendar.resize(276, 255)
        self.vboxlayout = QtGui.QVBoxLayout(calendar)
        self.vboxlayout.setSpacing(0)
        self.vboxlayout.setMargin(0)
        self.vboxlayout.setObjectName("vboxlayout")
        self.kdatepicker = KDatePicker(calendar)
        self.kdatepicker.setAutoFillBackground(True)
        self.kdatepicker.setObjectName("kdatepicker")
        self.vboxlayout.addWidget(self.kdatepicker)

        self.retranslateUi(calendar)
        QtCore.QMetaObject.connectSlotsByName(calendar)

    def retranslateUi(self, calendar):
        pass