def __aboutKde(self):
     """
     Private slot to handle the About KDE dialog.
     """
     from PyKDE4.kdeui import KHelpMenu
     menu = KHelpMenu(self.__ui)
     menu.aboutKDE()
Пример #2
0
    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
    def setup_actions(self):
        self.touchpad_on_action = KToggleAction(
            i18nc('@action:inmenu', 'Touchpad on'), self.actionCollection())
        self.actionCollection().addAction(
            'touchpadOn', self.touchpad_on_action)
        self.touchpad_on_action.setGlobalShortcut(
            KShortcut(i18nc('Touchpad toggle shortcut', 'Ctrl+Alt+T')))
        self.contextMenu().addAction(self.touchpad_on_action)

        self.contextMenu().addSeparator()

        shortcuts = self.actionCollection().addAction(
            KStandardAction.KeyBindings, 'shortcuts')
        shortcuts.triggered.connect(self.show_shortcuts_dialog)
        self.contextMenu().addAction(shortcuts)

        self.preferences_action = self.actionCollection().addAction(
            KStandardAction.Preferences, 'preferences')
        self.preferences_action.triggered.connect(
            self.show_configuration_dialog)
        self.contextMenu().addAction(self.preferences_action)

        help_menu = KHelpMenu(self.contextMenu(), KCmdLineArgs.aboutData())
        self.contextMenu().addMenu(help_menu.menu())