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

« back to all changes in this revision

Viewing changes to eric/Templates/TemplateSingleVariableDialog.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) 2005 - 2007 Detlev Offenbach <detlev@die-offenbachs.de>
 
4
#
 
5
 
 
6
"""
 
7
Module implementing a dialog for entering a single template variable.
 
8
"""
 
9
 
 
10
from PyQt4.QtGui import QDialog
 
11
 
 
12
from Ui_TemplateSingleVariableDialog import Ui_TemplateSingleVariableDialog
 
13
 
 
14
 
 
15
class TemplateSingleVariableDialog(QDialog, Ui_TemplateSingleVariableDialog):
 
16
    """
 
17
    Class implementing a dialog for entering a single template variable.
 
18
    """
 
19
    def __init__(self, variable, parent = None):
 
20
        """
 
21
        Constructor
 
22
        
 
23
        @param variable template variable name (string)
 
24
        @param parent parent widget of this dialog (QWidget)
 
25
        """
 
26
        QDialog.__init__(self, parent)
 
27
        self.setupUi(self)
 
28
        
 
29
        self.variableLabel.setText(variable)
 
30
 
 
31
    def getVariable(self):
 
32
        """
 
33
        Public method to get the value for the variable.
 
34
        
 
35
        @return value for the template variable (string)
 
36
        """
 
37
        return unicode(self.variableEdit.toPlainText())