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.



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
176
177
178
179
180
181
182
183
184
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 135

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.



131
132
133
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 131

def active_policy
  @active_policy
end

#optionsObject (readonly)

Returns the value of attribute options.



133
134
135
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 133

def options
  @options
end

#selectedModulesObject (readonly)

Returns the value of attribute selectedModules.



132
133
134
# File 'lib/watobo/gui/quick_scan_dialog.rb', line 132

def selectedModules
  @selectedModules
end