Class: Watobo::Gui::ScannerSettingsDialog
- Inherits:
-
FXDialogBox
- Object
- FXDialogBox
- Watobo::Gui::ScannerSettingsDialog
- Includes:
- Responder
- Defined in:
- lib/watobo/gui/scanner_settings_dialog.rb
Overview
Class: SelectNonUniqueParmsDialog
Instance Attribute Summary collapse
-
#scanner_settings ⇒ Object
readonly
Returns the value of attribute scanner_settings.
Instance Method Summary collapse
-
#initialize(owner, prefs) ⇒ ScannerSettingsDialog
constructor
A new instance of ScannerSettingsDialog.
- #onAccept(sender, sel, event) ⇒ Object
Constructor Details
#initialize(owner, prefs) ⇒ ScannerSettingsDialog
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/watobo/gui/scanner_settings_dialog.rb', line 329 def initialize(owner, prefs) super(owner, "Scanner Settings", DECOR_TITLE|DECOR_BORDER, :width => 400, :height => 500) # @scanner_settings = scanner_settings FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept) base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) # puts "create scopeframe with scope:" # @project.scope # @defineScopeFrame = DefineScopeFrame.new(base_frame, Watobo::Chats.sites(), YAML.load(YAML.dump(@project.scope)), prefs) @scannerSettingsFrame = ScannerSettingsFrame.new(base_frame, :opts => SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP) @finishButton = FXButton.new(, "Accept" , nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT) @finishButton.enable @finishButton.connect(SEL_COMMAND) do |sender, sel, item| #self.handle(self, FXSEL(SEL_COMMAND, ID_CANCEL), nil) self.handle(self, FXSEL(SEL_COMMAND, ID_ACCEPT), nil) end @cancelButton = FXButton.new(, "Cancel" , :target => self, :selector => FXDialogBox::ID_CANCEL, :opts => BUTTON_NORMAL|LAYOUT_RIGHT) end |
Instance Attribute Details
#scanner_settings ⇒ Object (readonly)
Returns the value of attribute scanner_settings.
313 314 315 |
# File 'lib/watobo/gui/scanner_settings_dialog.rb', line 313 def scanner_settings @scanner_settings end |
Instance Method Details
#onAccept(sender, sel, event) ⇒ Object
316 317 318 319 320 321 322 323 324 325 |
# File 'lib/watobo/gui/scanner_settings_dialog.rb', line 316 def onAccept(sender, sel, event) new_settings = Watobo::Conf::Scanner.to_h new_settings.update @scannerSettingsFrame.getSettings() Watobo::Conf::Scanner.set new_settings getApp().stopModal(self, 1) self.hide() return 1 end |