Class: Ruber::IRB::ConfigWidget

Inherits:
Qt::Widget
  • Object
show all
Defined in:
plugins/irb/irb.rb,
plugins/irb/irb.rb,
plugins/irb/irb.rb

Instance Method Summary (collapse)

Constructor Details

- (ConfigWidget) initialize(parent = nil)

A new instance of ConfigWidget



108
109
110
111
112
# File 'plugins/irb/irb.rb', line 108

def initialize parent = nil
  super
  @ui = Ui::ConfigWidget.new
  @ui.setup_ui self
end

Instance Method Details

- (Object) read_settings



114
115
116
117
118
119
120
121
# File 'plugins/irb/irb.rb', line 114

def read_settings
  prompts = @settings_dialog.container[:irb, :prompts]
  @ui.prompt_i.text = prompts[:PROMPT_I]
  @ui.prompt_n.text = prompts[:PROMPT_N]
  @ui.prompt_s.text = prompts[:PROMPT_S]
  @ui.prompt_c.text = prompts[:PROMPT_C]
  @ui.prompt_return.text = prompts[:RETURN]
end

- (Object) store_settings



128
129
130
131
132
133
134
135
136
# File 'plugins/irb/irb.rb', line 128

def store_settings
  prompts = {}
  prompts[:PROMPT_I] = @ui.prompt_i.text
  prompts[:PROMPT_N] = @ui.prompt_n.text
  prompts[:PROMPT_S] = @ui.prompt_s.text
  prompts[:PROMPT_C] = @ui.prompt_c.text
  prompts[:RETURN] = @ui.prompt_return.text
  @settings_dialog.container[:irb, :prompts] = prompts
end