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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Helpviewer/BookmarkForm.ui'
#
# Created: Do Dez 30 14:12:30 2004
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20041229
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        Layout8 = QHBoxLayout(None,0,6,"Layout8")

        self.bmListView = QListView(self,"bmListView")
        self.bmListView.addColumn(self.__tr("Description"))
        self.bmListView.addColumn(self.__tr("File"))
        self.bmListView.setAllColumnsShowFocus(1)
        Layout8.addWidget(self.bmListView)

        Layout7 = QVBoxLayout(None,0,6,"Layout7")
        Spacer5 = QSpacerItem(0,20,QSizePolicy.Minimum,QSizePolicy.Expanding)
        Layout7.addItem(Spacer5)

        self.upButton = QPushButton(self,"upButton")
        Layout7.addWidget(self.upButton)

        self.downButton = QPushButton(self,"downButton")
        Layout7.addWidget(self.downButton)

        self.deleteButton = QPushButton(self,"deleteButton")
        Layout7.addWidget(self.deleteButton)
        Spacer2 = QSpacerItem(0,20,QSizePolicy.Minimum,QSizePolicy.Expanding)
        Layout7.addItem(Spacer2)
        Layout8.addLayout(Layout7)
        BookmarkFormLayout.addLayout(Layout8)

        Layout3 = QHBoxLayout(None,0,6,"Layout3")
        Spacer3 = QSpacerItem(20,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout3.addItem(Spacer3)

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        Layout3.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout3.addWidget(self.cancelButton)
        Spacer4 = QSpacerItem(20,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout3.addItem(Spacer4)
        BookmarkFormLayout.addLayout(Layout3)

        self.languageChange()

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

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.upButton,SIGNAL("clicked()"),self.moveUp)
        self.connect(self.downButton,SIGNAL("clicked()"),self.moveDown)
        self.connect(self.deleteButton,SIGNAL("clicked()"),self.handleDelete)


    def languageChange(self):
        self.setCaption(self.__tr("Edit Bookmarks"))
        QToolTip.add(self,self.__tr("Edit bookmarks"))
        QWhatsThis.add(self,QString.null)
        self.bmListView.header().setLabel(0,self.__tr("Description"))
        self.bmListView.header().setLabel(1,self.__tr("File"))
        QToolTip.add(self.bmListView,self.__tr("Bookmark Listview"))
        QWhatsThis.add(self.bmListView,self.__tr("<b>Bookmark Listview</b>\n"
"<p>This listview shows the description and the filename of the\n"
"bookmarks. The order of the bookmarks can be changed\n"
"by selecting one and move it up or down with the arrow buttons\n"
"on the right. The selected bookmark may be dleted with the\n"
"delete button on the right. The contents of the bookmark can be\n"
"changed by clicking twice in the respective column and editing it.\n"
"The changed list is saved after the OK button has been pressed.</p>"))
        self.upButton.setText(self.__tr("&Up"))
        self.upButton.setAccel(self.__tr("Alt+U"))
        QToolTip.add(self.upButton,self.__tr("Move up"))
        QWhatsThis.add(self.upButton,self.__tr("<b>Move Up</b>\n"
"<p>Move the selected bookmark up.</p>"))
        self.downButton.setText(self.__tr("&Down"))
        self.downButton.setAccel(self.__tr("Alt+D"))
        QToolTip.add(self.downButton,self.__tr("Move down"))
        QWhatsThis.add(self.downButton,self.__tr("<b>Move Down</b>\n"
"<p>Move the selected bookmark down.</p>"))
        self.deleteButton.setText(self.__tr("De&lete"))
        self.deleteButton.setAccel(self.__tr("Alt+L"))
        QToolTip.add(self.deleteButton,self.__tr("Delete Bookmark"))
        QWhatsThis.add(self.deleteButton,self.__tr("<b>Delete Bookmark</b>\n"
"<p>This button deletes the selected bookmark.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        QToolTip.add(self.okButton,self.__tr("OK"))
        QWhatsThis.add(self.okButton,self.__tr("<b>OK</b>\n"
"<p>This confirms the changes. They are saved to the\n"
"bookmarks file.</p>"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        QToolTip.add(self.cancelButton,self.__tr("Cancel"))
        QWhatsThis.add(self.cancelButton,self.__tr("<b>Cancel</b>\n"
"<p>The changes are canceled. Nothing is written to the\n"
"bookmarks file.</p>"))


    def moveUp(self):
        print "BookmarkForm.moveUp(): Not implemented yet"

    def moveDown(self):
        print "BookmarkForm.moveDown(): Not implemented yet"

    def handleDelete(self):
        print "BookmarkForm.handleDelete(): Not implemented yet"

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

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