Beispiel #1
0
 def __init__(self, *args):
     QVBox.__init__(self, *args)
     self.setMargin(6)
     self.setSpacing(6)
     
     bar = QToolBar("lala", None, self)
     
     but = QToolButton(getIconSet("add.png"), i18n("New connection"), "lala", self.slotCreate, bar)
     but.setUsesTextLabel(True)
     but.setTextPosition(but.BesideIcon)
     
     but = QToolButton(getIconSet("configure.png"), i18n("Name Service Settings"), "lala", self.slotSettings, bar)
     but.setUsesTextLabel(True)
     but.setTextPosition(but.BesideIcon)
     
     bar.addSeparator()
     
     but = QToolButton(getIconSet("help.png"), i18n("Help"), "lala", self.slotHelp, bar)
     but.setUsesTextLabel(True)
     but.setTextPosition(but.BesideIcon)
     
     self.view = ConnectionView(self)
     
     self.stack = nameconf.Window(self)
     
     comlink.new_hook.append(self.view.add)
     comlink.delete_hook.append(self.view.remove)
     comlink.state_hook.append(self.view.stateUpdate)
     comlink.hotplug_hook.append(self.view.hotPlug)
     comlink.noconn_hook.append(self.slotCreate)
     comlink.connect()
Beispiel #2
0
    def __init__(self, *args):
        QVBox.__init__(self, *args)
        self.setMargin(6)
        self.setSpacing(6)

        self.config = KConfig("network-appletrc")
        self.config.setGroup("General")

        bar = QToolBar("lala", None, self)

        self.butNew = QToolButton(getIconSet("add"), "", "lala", self.slotCreate, bar)
        self.butNew.setTextLabel(i18n("New connection"), False)
        self.butNew.setUsesTextLabel(True)
        self.butNew.setTextPosition(self.butNew.BesideIcon)

        self.butConf = QToolButton(getIconSet("configure"), "", "lala", self.slotSettings, bar)
        self.butConf.setTextLabel(i18n("Name Service Settings"), False)
        self.butConf.setUsesTextLabel(True)
        self.butConf.setTextPosition(self.butConf.BesideIcon)

        self.butAutoConnect = QToolButton(getIconSet("connect_creating"), "", "lala", self.slotAutoConnect, bar)
        self.butAutoConnect.setTextLabel(i18n("Connect Automatically"), False)
        self.butAutoConnect.setUsesTextLabel(True)
        self.butAutoConnect.setTextPosition(self.butAutoConnect.BesideIcon)

        self.helpwin = None
        self.newconnwin = None

        lab = QToolButton(bar)
        lab.setEnabled(False)
        bar.setStretchableWidget(lab)

        but = QToolButton(getIconSet("help"), "", "lala", self.slotHelp, bar)
        but.setTextLabel(i18n("Help"), False)
        but.setUsesTextLabel(True)
        but.setTextPosition(but.BesideIcon)

        self.view = ConnectionView(self)

        self.stack = nameconf.Window(self)
        self.autoCheck = QCheckBox(i18n("Try Auto Connect on startup"), self)
        self.connect(self.autoCheck, SIGNAL("clicked()"), self.setAutoConnect)
        self.autoCheck.setOn(self.config.readBoolEntry("AutoConnect", True))
        self.autoSwitch = autoswitch.autoSwitch(notifier=False)

        comlink.new_hook.append(self.view.add)
        comlink.delete_hook.append(self.view.remove)
        comlink.nowifi_hook.append(self.disableAutoConnectButtons)
        comlink.config_hook.append(self.view.configUpdate)
        comlink.state_hook.append(self.view.stateUpdate)
        comlink.hotplug_hook.append(self.view.hotPlug)
        comlink.noconn_hook.append(self.slotCreate)
        comlink.connect()

        comlink.denied_hook.append(self.setInterface)
        comlink.checkAccess("setConnection")
        comlink.queryWifi()
Beispiel #3
0
 def __init__(self, *args):
     QVBox.__init__(self, *args)
     self.setMargin(6)
     self.setSpacing(6)
     
     bar = QToolBar("lala", None, self)
     
     self.butNew = QToolButton(getIconSet("add"), "", "lala", self.slotCreate, bar)
     self.butNew.setTextLabel(i18n("New connection"), False)
     self.butNew.setUsesTextLabel(True)
     self.butNew.setTextPosition(self.butNew.BesideIcon)
     
     self.butConf = QToolButton(getIconSet("configure"), "", "lala", self.slotSettings, bar)
     self.butConf.setTextLabel(i18n("Name Service Settings"), False)
     self.butConf.setUsesTextLabel(True)
     self.butConf.setTextPosition(self.butConf.BesideIcon)
     
     lab = QToolButton(bar)
     lab.setEnabled(False)
     bar.setStretchableWidget(lab)
     
     but = QToolButton(getIconSet("help"), "", "lala", self.slotHelp, bar)
     but.setTextLabel(i18n("Help"), False)
     but.setUsesTextLabel(True)
     but.setTextPosition(but.BesideIcon)
     
     self.view = ConnectionView(self)
     
     self.stack = nameconf.Window(self)
     
     comlink.new_hook.append(self.view.add)
     comlink.delete_hook.append(self.view.remove)
     comlink.config_hook.append(self.view.configUpdate)
     comlink.state_hook.append(self.view.stateUpdate)
     comlink.hotplug_hook.append(self.view.hotPlug)
     comlink.noconn_hook.append(self.slotCreate)
     comlink.connect()
     
     comlink.denied_hook.append(self.setInterface)
     comlink.checkAccess("setConnection")