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



814
815
816
817
818
819
820
821
822
823
824
825
# File 'lib/ruber/main_window/main_window_actions.rb', line 814

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



837
838
839
# File 'lib/ruber/main_window/main_window_actions.rb', line 837

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



830
831
832
# File 'lib/ruber/main_window/main_window_actions.rb', line 830

def project_name
  @ui.project_name.text
end