Class: Ruber::State::ConfigWidget

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

Overview

Configuration widget for the State plugin

Constant Summary

STARTUP_BEHAVIOURS =

A list of different behaviour the plugin can have at startup

[
  [:default_environment, :projects],
  [:projects],
  [:default_environment],
  []
]

Instance Method Summary (collapse)

Constructor Details

- (ConfigWidget) initialize(parent = nil)

A new instance of ConfigWidget

Parameters:

  • parent (Qt::Widget, nil) (defaults to: nil)

    the parent widget



524
525
526
527
528
# File 'plugins/state/state.rb', line 524

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

Instance Method Details

- (Symbol) startup_behaviour

Returns the symbol associated with the startup behaviour selected in the widget entry in the Startup behaviour widget

Returns:



546
547
548
# File 'plugins/state/state.rb', line 546

def startup_behaviour
  STARTUP_BEHAVIOURS[@ui._state__startup_behaviour.current_index]
end

- (Object) startup_behaviour=(val)

Selects the correct startup behaviour in the associated widget

of the entries in STARTUP_BEHAVIOURS

Parameters:

  • val (Symbol)

    the symbol stored in the configuration object. It must be one



536
537
538
539
# File 'plugins/state/state.rb', line 536

def startup_behaviour= val
  @ui._state__startup_behaviour.current_index = STARTUP_BEHAVIOURS.index val
  nil
end