Class: Depot::GUI::InstalledAppsTable
- Inherits:
-
RubyQt6::Bando::QTableWidget
- Object
- RubyQt6::Bando::QTableWidget
- Depot::GUI::InstalledAppsTable
- Defined in:
- lib/depot/gui/main_window.rb
Instance Method Summary collapse
- #context_menu_event(event) ⇒ Object
-
#initialize(owner) ⇒ InstalledAppsTable
constructor
A new instance of InstalledAppsTable.
Constructor Details
#initialize(owner) ⇒ InstalledAppsTable
Returns a new instance of InstalledAppsTable.
8 9 10 11 |
# File 'lib/depot/gui/main_window.rb', line 8 def initialize(owner) super(0, 4) @owner = owner end |
Instance Method Details
#context_menu_event(event) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/depot/gui/main_window.rb', line 13 def (event) with_event_errors do item = item_at(event.pos) return unless item set_current_item(item) = QMenu.new("", self) view = .add_action("View info") rename = .add_action("Change title...") icon = .add_action("Change icon...") reset = .add_action("Reset properties") sandbox = .add_action("Sandbox...") .add_separator reinstall = .add_action("Reinstall") launch = .add_action("Launch") uninstall = .add_action("Uninstall") case .exec(event.global_pos)&.text.to_s when view.text.to_s @owner.info_selected when rename.text.to_s @owner.change_title_selected when icon.text.to_s @owner.change_icon_selected when reset.text.to_s @owner.reset_selected when sandbox.text.to_s @owner.sandbox_selected when reinstall.text.to_s @owner.reinstall_selected when launch.text.to_s @owner.launch_selected when uninstall.text.to_s @owner.uninstall_selected end end end |