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

« back to all changes in this revision

Viewing changes to eric/VCS/cvsPackage/OptionsForm.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/VCS/cvsPackage/OptionsForm.ui'
4
 
#
5
 
# Created: So Nov 27 16:13:09 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 CvsOptionsForm(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("CvsOptionsForm")
21
 
 
22
 
 
23
 
        CvsOptionsFormLayout = QVBoxLayout(self,6,6,"CvsOptionsFormLayout")
24
 
 
25
 
        layout3 = QGridLayout(None,1,1,0,6,"layout3")
26
 
 
27
 
        self.vcsDirButton = QPushButton(self,"vcsDirButton")
28
 
 
29
 
        layout3.addWidget(self.vcsDirButton,1,2)
30
 
 
31
 
        self.vcsReleaseEdit = QLineEdit(self,"vcsReleaseEdit")
32
 
 
33
 
        layout3.addWidget(self.vcsReleaseEdit,5,1)
34
 
 
35
 
        self.vcsLogEdit = QLineEdit(self,"vcsLogEdit")
36
 
 
37
 
        layout3.addWidget(self.vcsLogEdit,4,1)
38
 
 
39
 
        self.TextLabel3 = QLabel(self,"TextLabel3")
40
 
 
41
 
        layout3.addWidget(self.TextLabel3,2,0)
42
 
 
43
 
        self.vcsVendorEdit = QLineEdit(self,"vcsVendorEdit")
44
 
 
45
 
        layout3.addWidget(self.vcsVendorEdit,3,1)
46
 
 
47
 
        self.TextLabel2 = QLabel(self,"TextLabel2")
48
 
 
49
 
        layout3.addWidget(self.TextLabel2,1,0)
50
 
 
51
 
        self.vcsDirectoryEdit = QLineEdit(self,"vcsDirectoryEdit")
52
 
 
53
 
        layout3.addWidget(self.vcsDirectoryEdit,1,1)
54
 
 
55
 
        self.vcsArchiveEdit = QLineEdit(self,"vcsArchiveEdit")
56
 
        self.vcsArchiveEdit.setReadOnly(1)
57
 
 
58
 
        layout3.addWidget(self.vcsArchiveEdit,2,1)
59
 
 
60
 
        self.TextLabel5 = QLabel(self,"TextLabel5")
61
 
 
62
 
        layout3.addWidget(self.TextLabel5,4,0)
63
 
 
64
 
        self.vcsVendorLabel = QLabel(self,"vcsVendorLabel")
65
 
 
66
 
        layout3.addWidget(self.vcsVendorLabel,3,0)
67
 
 
68
 
        self.vcsReleaseLabel = QLabel(self,"vcsReleaseLabel")
69
 
 
70
 
        layout3.addWidget(self.vcsReleaseLabel,5,0)
71
 
        CvsOptionsFormLayout.addLayout(layout3)
72
 
 
73
 
        Layout4 = QHBoxLayout(None,0,6,"Layout4")
74
 
        Spacer3 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
75
 
        Layout4.addItem(Spacer3)
76
 
 
77
 
        self.okButton = QPushButton(self,"okButton")
78
 
        self.okButton.setDefault(1)
79
 
        Layout4.addWidget(self.okButton)
80
 
 
81
 
        self.cancelButton = QPushButton(self,"cancelButton")
82
 
        Layout4.addWidget(self.cancelButton)
83
 
        Spacer4 = QSpacerItem(20,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
84
 
        Layout4.addItem(Spacer4)
85
 
        CvsOptionsFormLayout.addLayout(Layout4)
86
 
 
87
 
        self.languageChange()
88
 
 
89
 
        self.resize(QSize(562,192).expandedTo(self.minimumSizeHint()))
90
 
        self.clearWState(Qt.WState_Polished)
91
 
 
92
 
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
93
 
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
94
 
        self.connect(self.vcsDirButton,SIGNAL("clicked()"),self.handleDirectory)
95
 
 
96
 
        self.setTabOrder(self.vcsDirectoryEdit,self.vcsDirButton)
97
 
        self.setTabOrder(self.vcsDirButton,self.vcsArchiveEdit)
98
 
        self.setTabOrder(self.vcsArchiveEdit,self.vcsVendorEdit)
99
 
        self.setTabOrder(self.vcsVendorEdit,self.vcsLogEdit)
100
 
        self.setTabOrder(self.vcsLogEdit,self.vcsReleaseEdit)
101
 
        self.setTabOrder(self.vcsReleaseEdit,self.okButton)
102
 
        self.setTabOrder(self.okButton,self.cancelButton)
103
 
 
104
 
        self.TextLabel3.setBuddy(self.vcsArchiveEdit)
105
 
        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
106
 
        self.TextLabel5.setBuddy(self.vcsLogEdit)
107
 
        self.vcsVendorLabel.setBuddy(self.vcsVendorEdit)
108
 
        self.vcsReleaseLabel.setBuddy(self.vcsReleaseEdit)
109
 
 
110
 
 
111
 
    def languageChange(self):
112
 
        self.setCaption(self.__tr("Repository Infos"))
113
 
        QWhatsThis.add(self,self.__tr("<b>Repository Infos Dialog</b>\n"
114
 
"<p>Enter the various infos into the entry fields. These values are used to generate a new project in the repository. In order to access a remote repository, the repository path must contain the protocol info, user info and hostname, e.g. :pserver:anonymous@cvsserver:/cvsroot.</p>"))
115
 
        self.vcsDirButton.setText(self.__tr("..."))
116
 
        QToolTip.add(self.vcsDirButton,self.__tr("Show directory selection dialog"))
117
 
        QWhatsThis.add(self.vcsDirButton,self.__tr("<b>VCS-Directory</b>\n"
118
 
"<p>Select VCS root directory via a directory selection dialog.</p>"))
119
 
        self.vcsReleaseEdit.setText(self.__tr("start"))
120
 
        QToolTip.add(self.vcsReleaseEdit,self.__tr("Enter the release label."))
121
 
        QWhatsThis.add(self.vcsReleaseEdit,self.__tr("<b>Release Label</b>\n"
122
 
"<p>Enter the release label for the new project.</p>"))
123
 
        self.vcsLogEdit.setText(self.__tr("new project started"))
124
 
        QToolTip.add(self.vcsLogEdit,self.__tr("Enter the log message for the new project."))
125
 
        QWhatsThis.add(self.vcsLogEdit,self.__tr("<b>Log Message</b>\n"
126
 
"<p>Enter the log message to be used for the new project.</p>"))
127
 
        self.TextLabel3.setText(self.__tr("&Archive in repository:"))
128
 
        QToolTip.add(self.vcsVendorEdit,self.__tr("Enter the vendor label."))
129
 
        QWhatsThis.add(self.vcsVendorEdit,self.__tr("<b>Vendor Label</b>\n"
130
 
"<p>Enter the vendor label to be used for the archive.</p>"))
131
 
        self.TextLabel2.setText(self.__tr("&Repository:"))
132
 
        QToolTip.add(self.vcsDirectoryEdit,self.__tr("Enter the name of the VCS directory."))
133
 
        QWhatsThis.add(self.vcsDirectoryEdit,self.__tr("<b>VCS-Directory</b>\n"
134
 
"<p>Enter the name of the directory, that is the root of the VCS repository to be used. You may select it by pressing the button to the right.</p>"))
135
 
        QToolTip.add(self.vcsArchiveEdit,self.__tr("Enter the name of the archive in VCS."))
136
 
        QWhatsThis.add(self.vcsArchiveEdit,self.__tr("<b>Archive in VCS</b>\n"
137
 
"<p>Enter the name of the archive in the VCS.</p>"))
138
 
        self.TextLabel5.setText(self.__tr("Log &Message:"))
139
 
        self.vcsVendorLabel.setText(self.__tr("&Vendor Label:"))
140
 
        self.vcsReleaseLabel.setText(self.__tr("Release &Label:"))
141
 
        self.okButton.setText(self.__tr("&OK"))
142
 
        self.okButton.setAccel(self.__tr("Alt+O"))
143
 
        self.cancelButton.setText(self.__tr("&Cancel"))
144
 
 
145
 
 
146
 
    def handleDirectory(self):
147
 
        print "CvsOptionsForm.handleDirectory(): Not implemented yet"
148
 
 
149
 
    def handleComboBox(self,a0):
150
 
        print "CvsOptionsForm.handleComboBox(const QString&): Not implemented yet"
151
 
 
152
 
    def __tr(self,s,c = None):
153
 
        return qApp.translate("CvsOptionsForm",s,c)
154
 
 
155
 
if __name__ == "__main__":
156
 
    a = QApplication(sys.argv)
157
 
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
158
 
    w = CvsOptionsForm()
159
 
    a.setMainWidget(w)
160
 
    w.show()
161
 
    a.exec_loop()