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.



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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 147

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)

#  @policyFrame = ChecksPolicyFrame.new(@switcher, project.active_checks, project.settings[:policy])
 @policyFrame = ChecksPolicyFrame.new(@switcher)

  # 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.



143
144
145
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 143

def active_policy
  @active_policy
end

#optionsObject (readonly)

Returns the value of attribute options.



145
146
147
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 145

def options
  @options
end

#selectedModulesObject (readonly)

Returns the value of attribute selectedModules.



144
145
146
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 144

def selectedModules
  @selectedModules
end