Class: Ruber::MainWindowSettingsWidget
- Defined in:
- lib/ruber/main_window/main_window_actions.rb
Overview
Class containing the settings associated with the main window
Constant Summary collapse
- TOOL_OPEN_FILES =
Mapping between modes to open files from tool widgets and indexes in the corresponding combo box
[:split_horizontally, :split_vertically, :new_tab]
Instance Method Summary collapse
-
#initialize(parent = nil) ⇒ MainWindowSettingsWidget
constructor
A new instance of MainWindowSettingsWidget.
-
#sizeHint ⇒ Qt::Size
Override of @Qt::Widget#sizeHint@.
-
#tool_open_files ⇒ Integer
Store method for the @general/tool_open_files@ setting.
-
#tool_open_files=(value) ⇒ Symbol
Read method for the @general/tool_open_files@ setting.
Constructor Details
#initialize(parent = nil) ⇒ MainWindowSettingsWidget
Returns a new instance of MainWindowSettingsWidget.
652 653 654 655 656 657 658 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 652 def initialize parent = nil super @ui = Ui::MainWindowSettingsWidget.new @ui.setupUi self @ui._general__default_script_directory.mode = KDE::File::Directory @ui._general__default_project_directory.mode = KDE::File::Directory end |
Instance Method Details
#sizeHint ⇒ Qt::Size
Override of @Qt::Widget#sizeHint@
665 666 667 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 665 def sizeHint Qt::Size.new(380,150) end |
#tool_open_files ⇒ Integer
Store method for the @general/tool_open_files@ setting
the combo box
686 687 688 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 686 def tool_open_files TOOL_OPEN_FILES[@ui._general__tool_open_files.current_index] end |
#tool_open_files=(value) ⇒ Symbol
Read method for the @general/tool_open_files@ setting
675 676 677 678 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 675 def tool_open_files= value @ui._general__tool_open_files.current_index = TOOL_OPEN_FILES.index(value) || 0 value end |