コード例 #1
0
ファイル: kaboutkdedialog.py プロジェクト: sigoa/pykde4
class MainFrame(KVBox):
    """Class showing the use of KAboutKdeDialog."""
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.helpmenu = KHelpMenu(parent, "", False)
        self.button.clicked.connect(self.helpmenu.aboutKDE)
コード例 #2
0
ファイル: kaboutkdedialog.py プロジェクト: KDE/pykde4
class MainFrame(KVBox):

    """Class showing the use of KAboutKdeDialog."""

    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.helpmenu = KHelpMenu(parent, "", False)
        self.button.clicked.connect(self.helpmenu.aboutKDE)
コード例 #3
0
class MainFrame(KVBox):
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.connect(self.button, SIGNAL("clicked()"), self.showDialog)

    def showDialog(self):
        dlg = KAboutApplicationDialog(aboutData, self.parent())
        dlg.exec_()
コード例 #4
0
ファイル: kcolordialog.py プロジェクト: sigoa/pykde4
class MainFrame(KVBox):
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.connect(self.button, SIGNAL('clicked()'), self.showDialog)

        self.colorPatch = KColorPatch(hBox)
        self.colorPatch.setColor(Qt.red)
        self.colorPatch.setMaximumSize(40, 40)

    def showDialog(self):
        color = QColor()
        result = KColorDialog.getColor(color, self)
        self.colorPatch.setColor(color)
コード例 #5
0
class MainFrame(KVBox):

    """Example class showing how KAboutApplicationDialog works."""

    def __init__(self, parent):

        super(MainFrame, self).__init__(parent)
        
        self.help = QLabel (helpText, self)
        self.layout ().setAlignment (self.help, Qt.AlignHCenter)
        
        hBox = KHBox (self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize (250, 30)
       
        self.button.clicked.connect(self.showDialog)

    def showDialog(self):
        dlg = KAboutApplicationDialog (aboutData, self.parent ())
        dlg.exec_ ()      
コード例 #6
0
ファイル: kcolordialog.py プロジェクト: KDE/pykde4
class MainFrame(KVBox):
    def __init__(self, parent):
        KVBox.__init__(self, parent)
        self.help = QLabel(helpText, self)
        self.layout().setAlignment(self.help, Qt.AlignHCenter)

        hBox = KHBox(self)
        self.button = KPushButton(i18n("Show %s" % dialogName), hBox)
        self.button.setMaximumSize(250, 30)

        self.connect(self.button, SIGNAL("clicked()"), self.showDialog)

        self.colorPatch = KColorPatch(hBox)
        self.colorPatch.setColor(Qt.red)
        self.colorPatch.setMaximumSize(40, 40)

    def showDialog(self):
        color = QColor()
        result = KColorDialog.getColor(color, self)
        self.colorPatch.setColor(color)