~ubuntu-branches/ubuntu/karmic/eric/karmic

« back to all changes in this revision

Viewing changes to eric/Project/AddDirectoryForm.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2008-01-28 18:02:25 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080128180225-6nrox6yrworh2c4v
Tags: 4.0.4-1ubuntu1
* Add python-qt3 to build-depends becuase that's where Ubuntu puts 
  pyqtconfig
* Change maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
 
3
 
# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Project/AddDirectoryForm.ui'
4
 
#
5
 
# Created: So Nov 27 16:12:48 2005
6
 
#      by: The PyQt User Interface Compiler (pyuic) 3.15
7
 
#
8
 
# WARNING! All changes made in this file will be lost!
9
 
 
10
 
 
11
 
import sys
12
 
from qt import *
13
 
 
14
 
 
15
 
class AddDirForm(QDialog):
16
 
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
17
 
        QDialog.__init__(self,parent,name,modal,fl)
18
 
 
19
 
        if not name:
20
 
            self.setName("AddDirForm")
21
 
 
22
 
 
23
 
        AddDirFormLayout = QVBoxLayout(self,6,6,"AddDirFormLayout")
24
 
 
25
 
        layout3 = QGridLayout(None,1,1,0,6,"layout3")
26
 
 
27
 
        self.filterComboBox = QComboBox(0,self,"filterComboBox")
28
 
 
29
 
        layout3.addMultiCellWidget(self.filterComboBox,0,0,1,2)
30
 
 
31
 
        self.targetDirButton = QPushButton(self,"targetDirButton")
32
 
 
33
 
        layout3.addWidget(self.targetDirButton,2,2)
34
 
 
35
 
        self.targetDirLabel = QLabel(self,"targetDirLabel")
36
 
 
37
 
        layout3.addWidget(self.targetDirLabel,2,0)
38
 
 
39
 
        self.sourceDirEdit = QLineEdit(self,"sourceDirEdit")
40
 
 
41
 
        layout3.addWidget(self.sourceDirEdit,1,1)
42
 
 
43
 
        self.recursiveCheckBox = QCheckBox(self,"recursiveCheckBox")
44
 
 
45
 
        layout3.addMultiCellWidget(self.recursiveCheckBox,3,3,0,2)
46
 
 
47
 
        self.targetDirEdit = QLineEdit(self,"targetDirEdit")
48
 
 
49
 
        layout3.addWidget(self.targetDirEdit,2,1)
50
 
 
51
 
        self.sourceDirButton = QPushButton(self,"sourceDirButton")
52
 
 
53
 
        layout3.addWidget(self.sourceDirButton,1,2)
54
 
 
55
 
        self.sourceDirLabel = QLabel(self,"sourceDirLabel")
56
 
 
57
 
        layout3.addWidget(self.sourceDirLabel,1,0)
58
 
 
59
 
        self.textLabel1 = QLabel(self,"textLabel1")
60
 
 
61
 
        layout3.addWidget(self.textLabel1,0,0)
62
 
        AddDirFormLayout.addLayout(layout3)
63
 
 
64
 
        Layout5 = QHBoxLayout(None,0,6,"Layout5")
65
 
        Spacer4 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
66
 
        Layout5.addItem(Spacer4)
67
 
 
68
 
        self.okButton = QPushButton(self,"okButton")
69
 
        self.okButton.setDefault(1)
70
 
        Layout5.addWidget(self.okButton)
71
 
 
72
 
        self.cancelButton = QPushButton(self,"cancelButton")
73
 
        Layout5.addWidget(self.cancelButton)
74
 
        Spacer5 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
75
 
        Layout5.addItem(Spacer5)
76
 
        AddDirFormLayout.addLayout(Layout5)
77
 
 
78
 
        self.languageChange()
79
 
 
80
 
        self.resize(QSize(391,169).expandedTo(self.minimumSizeHint()))
81
 
        self.clearWState(Qt.WState_Polished)
82
 
 
83
 
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
84
 
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
85
 
        self.connect(self.sourceDirButton,SIGNAL("clicked()"),self.handleSDirDialog)
86
 
        self.connect(self.targetDirButton,SIGNAL("clicked()"),self.handleTDirDialog)
87
 
        self.connect(self.sourceDirEdit,SIGNAL("textChanged(const QString&)"),self.handleSTextChanged)
88
 
        self.connect(self.filterComboBox,SIGNAL("highlighted(const QString&)"),self.handleFileTypeSelected)
89
 
 
90
 
        self.setTabOrder(self.filterComboBox,self.sourceDirEdit)
91
 
        self.setTabOrder(self.sourceDirEdit,self.sourceDirButton)
92
 
        self.setTabOrder(self.sourceDirButton,self.targetDirEdit)
93
 
        self.setTabOrder(self.targetDirEdit,self.targetDirButton)
94
 
        self.setTabOrder(self.targetDirButton,self.recursiveCheckBox)
95
 
        self.setTabOrder(self.recursiveCheckBox,self.okButton)
96
 
        self.setTabOrder(self.okButton,self.cancelButton)
97
 
 
98
 
        self.targetDirLabel.setBuddy(self.targetDirEdit)
99
 
        self.sourceDirLabel.setBuddy(self.sourceDirEdit)
100
 
        self.textLabel1.setBuddy(self.filterComboBox)
101
 
 
102
 
 
103
 
    def languageChange(self):
104
 
        self.setCaption(self.__tr("Add Directory"))
105
 
        QToolTip.add(self,self.__tr("Add a directory to the current project"))
106
 
        QWhatsThis.add(self,self.__tr("<b>Add Directory Dialog</b>\n"
107
 
"<p>This dialog is used to add a directory to the current project.</p>"))
108
 
        self.targetDirButton.setText(self.__tr("..."))
109
 
        QWhatsThis.add(self.targetDirButton,self.__tr("<b>Target Directory</b>\n"
110
 
"<p>Select the target directory via a directory selection dialog.</p>"))
111
 
        self.targetDirLabel.setText(self.__tr("&Target Directory:"))
112
 
        QToolTip.add(self.sourceDirEdit,self.__tr("Enter the name of the directory to add"))
113
 
        QWhatsThis.add(self.sourceDirEdit,self.__tr("<b>Source Directory</b>\n"
114
 
"<p>Enter the name of the directory to add to the current project.\n"
115
 
" You may select it with a dialog by pressing the button to\n"
116
 
" the right.</p>"))
117
 
        self.recursiveCheckBox.setText(self.__tr("&Recurse into subdirectories"))
118
 
        QToolTip.add(self.recursiveCheckBox,self.__tr("Select, whether a recursive add should be performed"))
119
 
        QToolTip.add(self.targetDirEdit,self.__tr("Enter the target directory for the file"))
120
 
        QWhatsThis.add(self.targetDirEdit,self.__tr("<b>Target Directory</b>\n"
121
 
"<p>Enter the target directory. You may select it\n"
122
 
" with a dialog by pressing the button to the right.</p>"))
123
 
        self.sourceDirButton.setText(self.__tr("..."))
124
 
        QWhatsThis.add(self.sourceDirButton,self.__tr("<b>Source Directory</b>\n"
125
 
"<p>Select the source directory via a directory selection dialog.</p>"))
126
 
        self.sourceDirLabel.setText(self.__tr("&Source Directory:"))
127
 
        self.textLabel1.setText(self.__tr("&File Type:"))
128
 
        self.okButton.setText(self.__tr("&OK"))
129
 
        self.cancelButton.setText(self.__tr("&Cancel"))
130
 
 
131
 
 
132
 
    def handleSDirDialog(self):
133
 
        print "AddDirForm.handleSDirDialog(): Not implemented yet"
134
 
 
135
 
    def handleTDirDialog(self):
136
 
        print "AddDirForm.handleTDirDialog(): Not implemented yet"
137
 
 
138
 
    def handleSTextChanged(self,a0):
139
 
        print "AddDirForm.handleSTextChanged(const QString&): Not implemented yet"
140
 
 
141
 
    def handleFileTypeSelected(self,a0):
142
 
        print "AddDirForm.handleFileTypeSelected(const QString&): Not implemented yet"
143
 
 
144
 
    def __tr(self,s,c = None):
145
 
        return qApp.translate("AddDirForm",s,c)
146
 
 
147
 
if __name__ == "__main__":
148
 
    a = QApplication(sys.argv)
149
 
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
150
 
    w = AddDirForm()
151
 
    a.setMainWidget(w)
152
 
    w.show()
153
 
    a.exec_loop()