Class: Ruber::NewProjectDialog::NewProjectWidget

Inherits:
Qt::Widget
  • Object
show all
Defined in:
lib/ruber/main_window/main_window_actions.rb

Overview

Main widget for the Ruber::NewProjectDialog

Instance Method Summary collapse

Constructor Details

#initialize(parent = nil) ⇒ NewProjectWidget

Returns a new instance of NewProjectWidget.

Parameters:

  • parent (Qt::Widget, nil) (defaults to: nil)

    the parent widget



715
716
717
718
719
720
721
722
723
724
725
726
# File 'lib/ruber/main_window/main_window_actions.rb', line 715

def initialize parent = nil
  super
  @ui = Ui::NewProjectWidget.new
  @ui.setupUi self
  @ui.container_dir.url = KDE::Url.new Ruber[:config][:general, :default_project_directory]
  @ui.container_dir.mode = KDE::File::Directory | KDE::File::LocalOnly|
  KDE::File::ExistingOnly
  connect @ui.project_name, SIGNAL('textChanged(QString)'), self, SLOT('data_changed()')
  connect @ui.container_dir, SIGNAL('textChanged(QString)'), self, SLOT('data_changed()')
  @ui.project_name.set_focus
  self.focus_proxy = @ui.project_name
end

Instance Method Details

#project_fileString

Returns the path of the project file.

Returns:

  • (String)

    the path of the project file



738
739
740
# File 'lib/ruber/main_window/main_window_actions.rb', line 738

def project_file
  @ui.final_location.text
end

#project_nameString

Returns the name chosen by the user for the project.

Returns:

  • (String)

    the name chosen by the user for the project



731
732
733
# File 'lib/ruber/main_window/main_window_actions.rb', line 731

def project_name
  @ui.project_name.text
end