示例#1
0
 def __init__(self, parent, cfg, name='ConfigureDialog'):
     print 'repreper'
     #skel = DefaultSkeleton()
     skel = KonsultantConfig()
     print 'hwllo'
     #skel.readConfig()
     print skel
     KConfigDialog.__init__(self, parent, name, skel)
示例#2
0
    def __init__(self, parent):
    
        cfg = LoviConfig().getInstance()
        
        KConfigDialog.__init__(self, parent, "settings",
            cfg, KDialogBase.IconList, KDialogBase.Ok | KDialogBase.Cancel)
            
        fontPage = QWidget(self, "Font")

        box = QVBoxLayout(fontPage, 3, 3)
        fontGrp = QVButtonGroup("", fontPage)
        fontGrp.setFrameStyle(QFrame.NoFrame)
        self.kcfg_fontDefault = \
            QRadioButton(i18n("Default font"), fontGrp, "kcfg_fontDefault")
        self.kcfg_fontFixed = \
            QRadioButton(i18n("Default fixed font"), fontGrp, "kcfg_fontFixed")
        self.kcfg_fontCustom = \
            QRadioButton(i18n("Custom:"), fontGrp, "kcfg_fontCustom")
        fontGrp.setExclusive(True)
        box.addWidget(fontGrp)
        self.kcfg_font = \
            KFontChooser(fontPage, "kcfg_font", False, QStringList(), False)
        box.addWidget(self.kcfg_font)
        
        filtersPage = QWidget(self, "filters")
        
        box = QGridLayout(filtersPage, 3, 2, 3, 7)
        box.addWidget(QLabel(i18n("Errors:"), filtersPage), 0, 0)
        self.kcfg_filterErrors = QLineEdit(cfg.filterErrorsVal, filtersPage, 
            "kcfg_filterErrors")
        box.addWidget(self.kcfg_filterErrors, 0, 1)
        box.addWidget(QLabel(i18n("Warnings:"), filtersPage), 1, 0)
        self.kcfg_filterWarnings = QLineEdit(cfg.filterWarningsVal, 
            filtersPage, "kcfg_filterWarnings")
        box.addWidget(self.kcfg_filterWarnings, 1, 1)
        box.setRowStretch(2, 1)

        # actionsPage = QWidget(self, "actions")

        self.addPage(fontPage, i18n("Font"), "fonts")
        self.addPage(filtersPage, i18n("Filters"), "2downarrow")
示例#3
0
import sys
from kdecore import KAboutData, KApplication, KCmdLineArgs, KConfigSkeleton
from kdeui import KConfigDialog, KMainWindow

KCmdLineArgs.init(sys.argv, KAboutData("test", "test", "1.0"))
app = KApplication()
mainWin = KMainWindow(None, "test")
app.setMainWidget(mainWin)
cfg = KConfigSkeleton("test")
dlg = KConfigDialog(mainWin, "settings", cfg)
mainWin.show()
app.exec_loop()