Commits

Alain Leufroy  committed 4b32c27

[gui.qt] texbox -> textinputbox

  • Participants
  • Parent commits 8b0b721

Comments (0)

Files changed (4)

File ui/gui/qt/elements.py

     """Base class for elements"""
     edited = QtCore.pyqtSignal(QtGui.QWidget)
 
-class TextBox(UiFromDesigner, UiElement):
+class TextInputBox(UiFromDesigner, UiElement):
     """
     An element representing a text box, a.k.a. a label used as title
     and an editable text multiline.
     """
 
-    __ui__ = 'textbox'
+    __ui__ = 'textinputbox'
 
     def __init__(self, title='input', text='', *ags, **kws):
         """
         :title: label of the text box
         :text: content text of the box
         """
-        super(TextBox, self).__init__(*ags, **kws)
+        super(TextInputBox, self).__init__(*ags, **kws)
         self._ui.label.setText(unicode(title or ''))
         self.text = text or ''
         # emit edited at the right moment
         """Return the text as unicode af the text box."""
         self._ui.edit.setText(unicode(text))
 
-    text = property(get_text, set_text, None, "The text of the textbox")
+    text = property(get_text, set_text, None, "The text of the textinputbox")
 
-class PathBox(TextBox):
+class PathBox(TextInputBox):
     """
     An element representing a text box, a.k.a. a label used as title
     and an editable text multiline.
         """Return the text as unicode af the text box."""
         self._ui.edit.setPlainText(unicode(text))
 
-    text = property(get_text, set_text, None, "The text of the textbox")
+    text = property(get_text, set_text, None, "The text of the subprocessbox")

File ui/gui/qt/item.py

     from limma.ui.gui.qt import get_ui
     from limma.ui.gui.qt.mainwindow import MainWindow
     from limma.ui.gui.qt.sheet import Sheet
-    from limma.ui.gui.qt.elements import TextBox, SubprocessBox, PathBox
+    from limma.ui.gui.qt.elements import TextInputBox, SubprocessBox, PathBox
     app = QtGui.QApplication(sys.argv)
     main_window = MainWindow()
     sheet = Sheet(title='The Big sheet', parent=main_window)
         item = Item(title='item %i' % it, parent=sheet)
         sheet.append(item)
         for el in xrange(3):
-            element = TextBox('input %i.%i' % (it, el), 'content %e' % el, parent=item)
+            element = TextInputBox('input %i.%i' % (it, el), 'content %e' % el, parent=item)
             item.append(element)
             item.edited.connect(lambda i: show("."))
         item.append(PathBox('My  path'))

File ui/gui/qt/uis/textbox.ui

-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Form</class>
- <widget class="QWidget" name="Form">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>174</width>
-    <height>43</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text">
-      <string>title</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QLineEdit" name="edit">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>

File ui/gui/qt/uis/textinputbox.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>174</width>
+    <height>43</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <widget class="QLabel" name="label">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>title</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="edit">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>