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.
751 752 753 754 755 756 757 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 751 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@
764 765 766 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 764 def sizeHint Qt::Size.new(380,150) end |
#tool_open_files ⇒ Integer
Store method for the @general/tool_open_files@ setting
the combo box
785 786 787 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 785 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
774 775 776 777 |
# File 'lib/ruber/main_window/main_window_actions.rb', line 774 def tool_open_files= value @ui._general__tool_open_files.current_index = TOOL_OPEN_FILES.index(value) || 0 value end |