1
#include "newqtprojdlg.h"
2
#include "qmakesettingsdlg.h"
5
#include "windowattrmanager.h"
9
NewQtProjDlg::NewQtProjDlg( wxWindow* parent, QmakeConf *conf, IManager *mgr )
10
: NewQtProjBaseDlg( parent )
14
m_choiceQmake->Append(m_conf->GetAllConfigurations());
15
if (m_choiceQmake->IsEmpty() == false) {
16
m_choiceQmake->SetSelection(0);
19
if( m_mgr->IsWorkspaceOpen() ) {
20
m_textCtrl->SetValue( m_mgr->GetWorkspace()->GetWorkspaceFileName().GetPath() );
23
WindowAttrManager::Load(this, wxT("NewQtProjDlg"), m_mgr->GetConfigTool());
26
NewQtProjDlg::~NewQtProjDlg()
28
WindowAttrManager::Save(this, wxT("NewQtProjDlg"), m_mgr->GetConfigTool());
31
void NewQtProjDlg::OnBrowseProjectPath( wxCommandEvent& event )
36
if ( m_mgr->IsWorkspaceOpen() ) {
37
initPath = m_mgr->GetWorkspace()->GetWorkspaceFileName().GetPath();
39
wxString new_path = wxDirSelector(wxT("Select directory:"), initPath, wxDD_DEFAULT_STYLE, wxDefaultPosition, this);
40
if (new_path.IsEmpty() == false) {
41
m_textCtrl->SetValue(new_path);
45
void NewQtProjDlg::OnNewQmakeSettings( wxCommandEvent& event )
47
QMakeSettingsDlg dlg(this, m_mgr, m_conf);
48
if (dlg.ShowModal() == wxID_OK) {
49
m_choiceQmake->Clear();
50
m_choiceQmake->Append(m_conf->GetAllConfigurations());
51
if (m_choiceQmake->IsEmpty() == false) {
52
m_choiceQmake->SetSelection(0);
57
bool NewQtProjDlg::GetCreateDirectory() const
59
return m_checkBoxUseSepDirectory->IsChecked();
62
wxString NewQtProjDlg::GetProjectKind() const
64
return m_choiceProjKind->GetStringSelection();
67
wxString NewQtProjDlg::GetProjectName() const
69
return m_textCtrlProjName->GetValue();
72
wxString NewQtProjDlg::GetProjectPath() const
74
return m_textCtrl->GetValue();
77
wxString NewQtProjDlg::GetQmake() const
79
return m_choiceQmake->GetStringSelection();