Class: Idb::DefaultProtectionClassGroupWidget

Inherits:
Qt::GroupBox
  • Object
show all
Defined in:
lib/gui/default_protection_class_group_widget.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ DefaultProtectionClassGroupWidget

Returns a new instance of DefaultProtectionClassGroupWidget.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gui/default_protection_class_group_widget.rb', line 3

def initialize(args)
  super(*args)

  setTitle  "Default Data Protection"

  @layout = Qt::GridLayout.new
  label = Qt::Label.new "<b>Default Data Protection</b>", self, 0
  @val = Qt::Label.new "No default set in the entitlements of this app.", self, 0
  @layout.addWidget label, 0, 0
  @layout.addWidget @val, 0, 1
  spacer_horizontal = Qt::SpacerItem.new 0, 1, Qt::SizePolicy::Expanding, Qt::SizePolicy::Fixed
  @layout.addItem spacer_horizontal, 0, 2

  setLayout @layout
end

Instance Method Details

#updateObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/gui/default_protection_class_group_widget.rb', line 19

def update
  if $device.ios_version < 8
    @val.setText "Only available for iOS 8+"
  else
    $selected_app.entitlements.each do |x|
      if x[0].to_s == "com.apple.developer.default-data-protection"
        @val.setText x[1].to_s
      end
    end
  end
end