Class: Ruber::ProjectBrowser::ToolWidget::View
- Inherits:
-
Qt::TreeView
- Object
- Qt::TreeView
- Ruber::ProjectBrowser::ToolWidget::View
- Defined in:
- plugins/project_browser/project_browser.rb
Overview
The view used by the plugin
The only scope of this class is to provide the context menu
Instance Method Summary (collapse)
-
- (Object) contextMenuEvent(e)
Override of
Qt::AbstractScrollArea#contextMenuEvent
which displays a menu containing the action. -
- (View) initialize(parent = nil)
constructor
A new instance of View.
Signal Summary
-
- only_project_files_triggered(bool *true*)
Signal emitted whenever the user toggles the “Show only project files” action it.
Constructor Details
- (View) initialize(parent = nil)
A new instance of View
129 130 131 132 133 134 135 136 |
# File 'plugins/project_browser/project_browser.rb', line 129 def initialize parent = nil super @menu = Qt::Menu.new self @toggle_filter_action = KDE::ToggleAction.new 'Show only project files', @menu @toggle_filter_action.checked = true @menu.add_action @toggle_filter_action connect @toggle_filter_action, SIGNAL('toggled(bool)'), self, SIGNAL('only_project_files_triggered(bool)') end |
Instance Method Details
- (Object) contextMenuEvent(e)
Override of Qt::AbstractScrollArea#contextMenuEvent
which displays a menu containing
the action
143 144 145 |
# File 'plugins/project_browser/project_browser.rb', line 143 def contextMenuEvent e @menu.popup e.global_pos end |
Signal Details
- only_project_files_triggered(bool *true*)
Signal emitted whenever the user toggles the “Show only project files” action it