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

« back to all changes in this revision

Viewing changes to eric/VCS/cvsPackage/SwitchDialog.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
 
# Copyright (c) 2003 - 2007 Detlev Offenbach <detlev@die-offenbachs.de>
4
 
#
5
 
 
6
 
"""
7
 
Module implementing a dialog to enter the data for a switch operation.
8
 
"""
9
 
 
10
 
from qt import *
11
 
 
12
 
from SwitchForm import SwitchForm
13
 
 
14
 
class CvsSwitchDialog(SwitchForm):
15
 
    """
16
 
    Class implementing a dialog to enter the data for a switch operation.
17
 
    """
18
 
    def __init__(self, taglist, parent = None):
19
 
        """
20
 
        Constructor
21
 
        
22
 
        @param taglist list of previously entered tags (QStringList)
23
 
        @param parent parent widget (QWidget)
24
 
        """
25
 
        SwitchForm.__init__(self, parent, None, 1)
26
 
       
27
 
        dummy = self.trUtf8('dummy')
28
 
        
29
 
        self.tagCombo.clear()
30
 
        self.tagCombo.insertStringList(taglist)
31
 
        
32
 
        self.cvsTagValidator = QRegExpValidator(QRegExp(r"[a-zA-Z][a-zA-Z0-9_-]*"), self)
33
 
        self.tagCombo.setValidator(self.cvsTagValidator)
34
 
        
35
 
    def getParameters(self):
36
 
        """
37
 
        Public method to retrieve the tag data.
38
 
        
39
 
        @return tag name (QString)
40
 
        """
41
 
        return self.tagCombo.currentText()