Class: Watobo::Gui::QuickScanDialog

Inherits:
FXDialogBox
  • Object
show all
Includes:
Responder
Defined in:
lib/watobo/gui/quick_scan_dialog.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, prefs = {}) ⇒ QuickScanDialog

Returns a new instance of QuickScanDialog.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 126

def initialize(parent, prefs={} )
  super(parent, "Quick Scan", DECOR_ALL, :width => 300, :height => 400)
  # @active_policy = 'Default'
  @selectedModules = []
  
  
  FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)

  base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
  @switcher = FXSwitcher.new(base_frame, LAYOUT_FILL_X|LAYOUT_FILL_Y)

   @quickScanOptionsFrame = QuickScanOptionsFrame.new(@switcher, prefs)
  #@quickScanOptionsFrame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)

#  @policyFrame = ChecksPolicyFrame.new(@switcher, project.active_checks, project.settings[:policy])
  @policyFrame = ChecksPolicyFrame.new(@switcher)
 #@policyFrame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)

  # BUTTONS
  buttons_frame = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X)
  @startButton = FXButton.new(buttons_frame, "Start" ,
  :target => self, :selector => FXDialogBox::ID_ACCEPT,
  :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
  @startButton.disable

  @nextButton = FXButton.new(buttons_frame, "Next" ,  nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
  @nextButton.enable
  @nextButton.connect(SEL_COMMAND) do |sender, sel, item|
    if @switcher.current < @switcher.numChildren - 1
      @switcher.current = @switcher.current + 1

    end
    setButtons(@switcher.current)
  end

  @backButton = FXButton.new(buttons_frame, "Back" ,  nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
  @backButton.disable
  @backButton.connect(SEL_COMMAND) do |sender, sel, item|
    if @switcher.current > 0
      @switcher.current = @switcher.current-1

    end
    setButtons(@switcher.current)
  end

  @cancelButton = FXButton.new(buttons_frame, "Cancel" , :target => self, :selector => FXDialogBox::ID_CANCEL, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)

  #@filterCombo.appendItem("ohne Filter", nil)

end

Instance Attribute Details

#active_policyObject (readonly)

Returns the value of attribute active_policy.



122
123
124
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 122

def active_policy
  @active_policy
end

#optionsObject (readonly)

Returns the value of attribute options.



124
125
126
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 124

def options
  @options
end

#selectedModulesObject (readonly)

Returns the value of attribute selectedModules.



123
124
125
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 123

def selectedModules
  @selectedModules
end