Class: Ruber::ProjectDialog
- Inherits:
-
SettingsDialog
- Object
- KDE::PageDialog
- SettingsDialog
- Ruber::ProjectDialog
- 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.
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()- do (if you want) something with prj end
Instance Attribute Summary
Attributes inherited from SettingsDialog
Instance Method Summary (collapse)
-
- (Object) widget_from_class(cls)
private
Override of SettingsDialog#widget_from_class which passes the project as argument to the class’s #new method.
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 cls cls.new @container end |