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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Refactoring/MatchesForm.ui'
#
# Created: So Nov 27 16:13:03 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.15
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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

        self.setSizeGripEnabled(1)

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

        self.matchesList = QListView(self,"matchesList")
        self.matchesList.addColumn(self.__tr("Filename"))
        self.matchesList.addColumn(self.__tr("Line"))
        self.matchesList.addColumn(self.__tr("Confidence [%]"))
        self.matchesList.setAllColumnsShowFocus(1)
        self.matchesList.setShowSortIndicator(1)
        MatchesFormLayout.addWidget(self.matchesList)

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

        self.closeButton = QPushButton(self,"closeButton")
        self.closeButton.setDefault(1)
        layout1.addWidget(self.closeButton)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer2)
        MatchesFormLayout.addLayout(layout1)

        self.languageChange()

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

        self.connect(self.closeButton,SIGNAL("clicked()"),self.close)
        self.connect(self.matchesList,SIGNAL("doubleClicked(QListViewItem*)"),self.handleDoubleClicked)


    def languageChange(self):
        self.setCaption(self.__tr("Refactoring Matches"))
        self.matchesList.header().setLabel(0,self.__tr("Filename"))
        self.matchesList.header().setLabel(1,self.__tr("Line"))
        self.matchesList.header().setLabel(2,self.__tr("Confidence [%]"))
        self.closeButton.setText(self.__tr("&Close"))
        self.closeButton.setAccel(self.__tr("Alt+C"))


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

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

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