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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Helpviewer/SearchForm.ui'
#
# Created: Sa Jul 15 10:41:02 2006
#      by: The PyQt User Interface Compiler (pyuic) 3-snapshot-20060708
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        Layout3 = QGridLayout(None,1,1,0,6,"Layout3")

        self.backwardsCheckBox = QCheckBox(self,"backwardsCheckBox")

        Layout3.addWidget(self.backwardsCheckBox,3,1)

        self.findtextCombo = QComboBox(0,self,"findtextCombo")
        self.findtextCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.findtextCombo.sizePolicy().hasHeightForWidth()))
        self.findtextCombo.setEditable(1)
        self.findtextCombo.setInsertionPolicy(QComboBox.AtTop)
        self.findtextCombo.setDuplicatesEnabled(0)

        Layout3.addWidget(self.findtextCombo,0,1)

        self.caseCheckBox = QCheckBox(self,"caseCheckBox")

        Layout3.addWidget(self.caseCheckBox,1,1)

        self.TextLabel1 = QLabel(self,"TextLabel1")

        Layout3.addWidget(self.TextLabel1,0,0)

        self.wordCheckBox = QCheckBox(self,"wordCheckBox")

        Layout3.addWidget(self.wordCheckBox,2,1)
        SearchFormLayout.addLayout(Layout3)

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

        self.findButton = QPushButton(self,"findButton")
        self.findButton.setEnabled(0)
        self.findButton.setDefault(1)
        Layout3_2.addWidget(self.findButton)

        self.findNextButton = QPushButton(self,"findNextButton")
        self.findNextButton.setEnabled(0)
        Layout3_2.addWidget(self.findNextButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout3_2.addWidget(self.cancelButton)
        Spacer4 = QSpacerItem(50,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout3_2.addItem(Spacer4)
        SearchFormLayout.addLayout(Layout3_2)

        self.languageChange()

        self.resize(QSize(416,173).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.close)
        self.connect(self.findButton,SIGNAL("clicked()"),self.handleFind)
        self.connect(self.findNextButton,SIGNAL("clicked()"),self.handleFindNext)
        self.connect(self.findtextCombo,SIGNAL("textChanged(const QString&)"),self.enableFindButtons)

        self.setTabOrder(self.findtextCombo,self.caseCheckBox)
        self.setTabOrder(self.caseCheckBox,self.wordCheckBox)
        self.setTabOrder(self.wordCheckBox,self.backwardsCheckBox)
        self.setTabOrder(self.backwardsCheckBox,self.findButton)
        self.setTabOrder(self.findButton,self.cancelButton)

        self.TextLabel1.setBuddy(self.findtextCombo)


    def languageChange(self):
        self.setCaption(self.__tr("Find"))
        self.backwardsCheckBox.setText(self.__tr("Search &backwards"))
        self.caseCheckBox.setText(self.__tr("&Match upper/lower case"))
        self.TextLabel1.setText(self.__tr("Find &text:"))
        self.wordCheckBox.setText(self.__tr("Whole &word"))
        self.findButton.setText(self.__tr("&Find"))
        self.findButton.setAccel(QKeySequence(self.__tr("Alt+F")))
        self.findNextButton.setText(self.__tr("Find &Next"))
        self.cancelButton.setText(self.__tr("&Close"))
        self.cancelButton.setAccel(QKeySequence(self.__tr("Alt+C")))


    def enableFindButtons(self):
        print "SearchForm.enableFindButtons(): Not implemented yet"

    def handleFind(self):
        print "SearchForm.handleFind(): Not implemented yet"

    def handleFindNext(self):
        print "SearchForm.handleFindNext(): Not implemented yet"

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

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