Class: Ui::LayoutMethodModel
- Defined in:
- lib/roby/gui/relations_view/relations_config.rb
Constant Summary collapse
- METHODS =
["Auto", "dot [rankdir=LR]", "dot [rankdir=TB]", "circo", "neato [overlap=false]", "neato [overlap=false,mode=hier]", "twopi", "fdp"].freeze
Instance Attribute Summary collapse
-
#combo ⇒ Object
readonly
Returns the value of attribute combo.
-
#display ⇒ Object
readonly
Returns the value of attribute display.
Instance Method Summary collapse
- #data(index, role) ⇒ Object
- #flags(index) ⇒ Object
-
#initialize(display, combo) ⇒ LayoutMethodModel
constructor
A new instance of LayoutMethodModel.
- #layout_method(index) ⇒ Object
- #rowCount(parent) ⇒ Object
- #selected ⇒ Object
Constructor Details
#initialize(display, combo) ⇒ LayoutMethodModel
Returns a new instance of LayoutMethodModel.
196 197 198 199 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 196 def initialize(display, combo) super() @display, @combo = display, combo end |
Instance Attribute Details
#combo ⇒ Object (readonly)
Returns the value of attribute combo.
194 195 196 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 194 def combo @combo end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
194 195 196 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 194 def display @display end |
Instance Method Details
#data(index, role) ⇒ Object
207 208 209 210 211 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 207 def data(index, role) return Qt::Variant.new unless role == Qt::DisplayRole && index.valid? Qt::Variant.new(METHODS[index.row]) end |
#flags(index) ⇒ Object
215 216 217 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 215 def flags(index) Qt::ItemIsSelectable | Qt::ItemIsEnabled end |
#layout_method(index) ⇒ Object
213 |
# File 'lib/roby/gui/relations_view/relations_config.rb', line 213 def layout_method(index); end |