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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Helpviewer/BookmarkForm.ui'
#
# Created: Mon Jan 20 20:44:56 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *

image0_data = [
"16 16 8 1",
". c None",
"# c #000000",
"d c #004040",
"f c #008080",
"e c #00c0c0",
"c c #00ffff",
"a c #c0ffff",
"b c #ffffff",
"................",
".......#........",
"......#a#.......",
".....#bcd#......",
"....#bcefd#.....",
"...#bceeefd#....",
"..#bceeeeefd#...",
".#bceeeeeeefd#..",
"#aceeeeeeeeefd#.",
"#####ceeef#####.",
"....#aeeef#.....",
"....#aeeef#.....",
"....#aeeef#.....",
"....#cffff#.....",
"....#######.....",
"................"
]
image1_data = [
"16 16 8 1",
". c None",
"# c #000000",
"f c #004040",
"d c #008080",
"c c #00c0c0",
"e c #00ffff",
"b c #c0ffff",
"a c #ffffff",
"................",
"....#######.....",
"....#aabbc#.....",
"....#acccd#.....",
"....#acccd#.....",
"....#bcccd#.....",
"#####ecccd#####.",
"#becccccccccdf#.",
".#becccccccdf#..",
"..#becccccdf#...",
"...#becccdf#....",
"....#becdf#.....",
".....#bdf#......",
"......#f#.......",
".......#........",
"................"
]
image2_data = [
"16 16 13 1",
". c None",
"# c #000000",
"a c #303030",
"k c #400000",
"e c #585858",
"j c #800000",
"f c #a0a0a0",
"c c #c3c3c3",
"b c #dcdcdc",
"h c #ff0000",
"i c #ffc0c0",
"g c #ffffc0",
"d c #ffffff",
"..##a###a##.....",
"..abbbbbcac#....",
"..#bdddddedb#...",
"..#bdddddebdc#..",
"..#bdddddeeea#..",
"..#bddddddbcf#..",
"..#bddddddgdb#..",
"..#bdhiddihdd#..",
"..#bdjhiihjdg#..",
"..#bddjhhjdgd#..",
"..#bddihhigdg#..",
"..#bdihjjhigd#..",
"..abihjdgjhdg#..",
"..#bdjdgdgjgg#..",
"..#bgdgdgdggg#..",
"..######k##a##.."
]

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

        image0 = QPixmap(image0_data)
        image1 = QPixmap(image1_data)
        image2 = QPixmap(image2_data)

        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")
        spacer = QSpacerItem(0,20,QSizePolicy.Minimum,QSizePolicy.Expanding)
        Layout7.addItem(spacer)

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

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

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

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

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

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

        self.languageChange()

        self.resize(QSize(599,480).expandedTo(self.minimumSizeHint()))

        self.connect(self.okButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("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(QString.null)
        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(QString.null)
        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(QString.null)
        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"


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()
