# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Preferences/ShortcutsForm.ui'
#
# Created: Sam Jul 26 18:55:30 2003
#      by: The PyQt User Interface Compiler (pyuic) 3.7
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class ShortcutsForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("ShortcutsForm")


        ShortcutsFormLayout = QVBoxLayout(self,6,6,"ShortcutsFormLayout")

        self.shortcutsList = QListView(self,"shortcutsList")
        self.shortcutsList.addColumn(self.__tr("Name"))
        self.shortcutsList.addColumn(self.__tr("Shortcuts"))
        self.shortcutsList.setAllColumnsShowFocus(1)
        self.shortcutsList.setRootIsDecorated(1)
        ShortcutsFormLayout.addWidget(self.shortcutsList)

        layout1 = QHBoxLayout(None,0,6,"layout1")
        spacer = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer)

        self.okButton = QPushButton(self,"okButton")
        layout1.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout1.addWidget(self.cancelButton)
        spacer_2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer_2)
        ShortcutsFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(600,480).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self.handleOk)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))
        self.connect(self.shortcutsList,SIGNAL("doubleClicked(QListViewItem*)"),self.handleDoubleClicked)


    def languageChange(self):
        self.setCaption(self.__tr("Keyboard Shortcuts"))
        self.shortcutsList.header().setLabel(0,self.__tr("Name"))
        self.shortcutsList.header().setLabel(1,self.__tr("Shortcuts"))
        QToolTip.add(self.shortcutsList,self.__tr("This list shows all keyboard shortcuts."))
        QWhatsThis.add(self.shortcutsList,self.__tr("<b>Keyboard Shortcuts List</b>\n"
"<p>This list shows all keyboard shortcuts defined in the application. Double click an entry in order to change the respective shortcut.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleDoubleClicked(self,a0):
        print "ShortcutsForm.handleDoubleClicked(QListViewItem*): Not implemented yet"

    def handleOk(self):
        print "ShortcutsForm.handleOk(): Not implemented yet"

    def __tr(self,s,c = None):
        return qApp.translate("ShortcutsForm",s,c)

if __name__ == "__main__":
    a = QApplication(sys.argv)
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
    w = ShortcutsForm()
    a.setMainWidget(w)
    w.show()
    a.exec_loop()
