Class: Ruber::ProjectDialog

Inherits:
SettingsDialog show all
Defined in:
lib/ruber/project.rb,
lib/ruber/project.rb,
lib/ruber/project.rb

Overview

Subclass of SettingsDialog which differs from it only in that it overrides the widget_from_class method.

Note:

since the overridden widget_from_class method passes the project as argument to the widget’s class #new method, the widget’s constructor must explicitly pass nil to the superclass method as parent. To avoid any issues, you can derive your widget from ProjectConfigWidget rather than from Qt::Widget. If, for some reason, you can’t do that (for example because you need to derive from another specialized widget), your widget constructor must do something like this (assuming that the base class’s construcor take the same argument as Qt::Widget’s):

class MyWidget < SomeWidget def initialize prj super()
  1. do (if you want) something with prj end
end

Instance Attribute Summary

Attributes inherited from SettingsDialog

container

Instance Method Summary (collapse)

Methods inherited from SettingsDialog

#exec, #initialize, #read_default_settings, #read_settings, #show, #store_settings, #widget_from_code, #widgets

Constructor Details

This class inherits a constructor from Ruber::SettingsDialog

Instance Method Details

- (Object) widget_from_class(cls) (private)

Override of SettingsDialog#widget_from_class which passes the project as argument to the class’s #new method.



455
456
457
# File 'lib/ruber/project.rb', line 455

def widget_from_class cls
  cls.new @container
end