Class: NewKeyDialog
- Inherits:
-
Qt::Dialog
- Object
- Qt::Dialog
- NewKeyDialog
- Defined in:
- lib/redix/qtui.rb
Overview
New Key
Instance Attribute Summary collapse
-
#buttonBox ⇒ Object
readonly
Returns the value of attribute buttonBox.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#input_name ⇒ Object
readonly
Returns the value of attribute input_name.
-
#input_type ⇒ Object
readonly
Returns the value of attribute input_type.
-
#input_value ⇒ Object
readonly
Returns the value of attribute input_value.
Instance Method Summary collapse
-
#retranslate_ui(dialog) ⇒ Object
retranslateUi.
- #retranslateUi(dialog) ⇒ Object
-
#setup_ui(dialog) ⇒ Object
setupUi.
- #setupUi(dialog = self) ⇒ Object
- #updateData(new) ⇒ Object
Instance Attribute Details
#buttonBox ⇒ Object (readonly)
Returns the value of attribute buttonBox.
167 168 169 |
# File 'lib/redix/qtui.rb', line 167 def @buttonBox end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
166 167 168 |
# File 'lib/redix/qtui.rb', line 166 def data @data end |
#input_name ⇒ Object (readonly)
Returns the value of attribute input_name.
168 169 170 |
# File 'lib/redix/qtui.rb', line 168 def input_name @input_name end |
#input_type ⇒ Object (readonly)
Returns the value of attribute input_type.
169 170 171 |
# File 'lib/redix/qtui.rb', line 169 def input_type @input_type end |
#input_value ⇒ Object (readonly)
Returns the value of attribute input_value.
170 171 172 |
# File 'lib/redix/qtui.rb', line 170 def input_value @input_value end |
Instance Method Details
#retranslate_ui(dialog) ⇒ Object
retranslateUi
227 228 229 |
# File 'lib/redix/qtui.rb', line 227 def retranslate_ui(dialog) retranslateUi(dialog) end |
#retranslateUi(dialog) ⇒ Object
220 221 222 223 224 225 |
# File 'lib/redix/qtui.rb', line 220 def retranslateUi(dialog) dialog.windowTitle = Qt::Application.translate("Dialog", "New Key", nil, Qt::Application::UnicodeUTF8) @label.text = Qt::Application.translate("Dialog", "Key", nil, Qt::Application::UnicodeUTF8) @label_type.text = Qt::Application.translate("Dialog", "Type", nil, Qt::Application::UnicodeUTF8) @label_value.text = Qt::Application.translate("Dialog", "Value", nil, Qt::Application::UnicodeUTF8) end |
#setup_ui(dialog) ⇒ Object
setupUi
216 217 218 |
# File 'lib/redix/qtui.rb', line 216 def setup_ui(dialog) setupUi(dialog) end |
#setupUi(dialog = self) ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/redix/qtui.rb', line 177 def setupUi(dialog = self) @buttonBox = Qt::DialogButtonBox.new(dialog) @buttonBox.objectName = "buttonBox" @buttonBox.geometry = Qt::Rect.new(30, 130, 341, 32) @buttonBox.orientation = Qt::Horizontal @buttonBox.standardButtons = Qt::DialogButtonBox::Cancel|Qt::DialogButtonBox::Ok @input_type = Qt::ComboBox.new(dialog) @input_type.objectName = "input_type" @input_type.geometry = Qt::Rect.new(70, 20, 311, 22) @input_type.addItems(["string", "list", "set", "zset", "hash", "channel"]) @label_type = Qt::Label.new(dialog) @label_type.objectName = "label_type" @label_type.geometry = Qt::Rect.new(20, 23, 61, 21) @input_name = Qt::LineEdit.new(dialog) @input_name.objectName = "input_name" @input_name.geometry = Qt::Rect.new(70, 50, 311, 22) @label = Qt::Label.new(dialog) @label.objectName = "label" @label.geometry = Qt::Rect.new(20, 53, 61, 21) @input_value = Qt::LineEdit.new(dialog) @input_value.objectName = "input_value" @input_value.geometry = Qt::Rect.new(70, 80, 311, 22) @label_value = Qt::Label.new(dialog) @label_value.objectName = "label_value" @label_value.geometry = Qt::Rect.new(20, 83, 61, 21) retranslateUi(dialog) Qt::Object.connect(@buttonBox, SIGNAL('accepted()'), dialog, SLOT('accept()')) Qt::Object.connect(@buttonBox, SIGNAL('rejected()'), dialog, SLOT('reject()')) Qt::MetaObject.connectSlotsByName(dialog) end |
#updateData(new) ⇒ Object
173 174 175 |
# File 'lib/redix/qtui.rb', line 173 def updateData(new) @data = new end |