~ubuntu-branches/ubuntu/karmic/codelite/karmic

« back to all changes in this revision

Viewing changes to QmakePlugin/qmakesettingsbasedlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-08-15 17:42:43 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090815174243-nlb9ikgigbiybz12
Tags: 1.0.2893+dfsg-0ubuntu1
* debian/rules:
  + Tidy up get-orig-source rule
* debian/control:
  + Bump Standards-Version
  + Change Maintainer email address to @ubuntu.com
  + Drop cdbs build-dependency
* debian/copyright:
  + Update to DEP-5 format
* debian/patches/00_add-fPIC.patch:
  + Dropped, fix upstream
* Closes LP: #413992

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///////////////////////////////////////////////////////////////////////////
 
2
// C++ code generated with wxFormBuilder (version Apr 16 2008)
 
3
// http://www.wxformbuilder.org/
 
4
//
 
5
// PLEASE DO "NOT" EDIT THIS FILE!
 
6
///////////////////////////////////////////////////////////////////////////
 
7
 
 
8
#include "qmakesettingsbasedlg.h"
 
9
 
 
10
///////////////////////////////////////////////////////////////////////////
 
11
 
 
12
QMakeSettingsBaseDlg::QMakeSettingsBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 
13
{
 
14
        this->SetSizeHints( wxDefaultSize, wxDefaultSize );
 
15
        
 
16
        wxBoxSizer* mainSizer;
 
17
        mainSizer = new wxBoxSizer( wxVERTICAL );
 
18
        
 
19
        m_staticText5 = new wxStaticText( this, wxID_ANY, _("Add / modfiy qmake configurations:"), wxDefaultPosition, wxDefaultSize, 0 );
 
20
        m_staticText5->Wrap( -1 );
 
21
        mainSizer->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
 
22
        
 
23
        wxBoxSizer* bSizer3;
 
24
        bSizer3 = new wxBoxSizer( wxVERTICAL );
 
25
        
 
26
        m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
 
27
        
 
28
        bSizer3->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
 
29
        
 
30
        mainSizer->Add( bSizer3, 1, wxEXPAND, 5 );
 
31
        
 
32
        m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
 
33
        mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
 
34
        
 
35
        wxBoxSizer* bSizer2;
 
36
        bSizer2 = new wxBoxSizer( wxHORIZONTAL );
 
37
        
 
38
        m_buttonNew = new wxButton( this, wxID_ANY, _("&New..."), wxDefaultPosition, wxDefaultSize, 0 );
 
39
        m_buttonNew->SetToolTip( _("Create new qmake settings") );
 
40
        
 
41
        bSizer2->Add( m_buttonNew, 0, wxALL, 5 );
 
42
        
 
43
        m_buttonCancel = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
 
44
        bSizer2->Add( m_buttonCancel, 0, wxALL, 5 );
 
45
        
 
46
        m_buttonOk = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
 
47
        m_buttonOk->SetDefault(); 
 
48
        bSizer2->Add( m_buttonOk, 0, wxALL, 5 );
 
49
        
 
50
        mainSizer->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
 
51
        
 
52
        this->SetSizer( mainSizer );
 
53
        this->Layout();
 
54
        mainSizer->Fit( this );
 
55
        
 
56
        this->Centre( wxBOTH );
 
57
        
 
58
        // Connect Events
 
59
        m_notebook->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( QMakeSettingsBaseDlg::OnRightDown ), NULL, this );
 
60
        m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QMakeSettingsBaseDlg::OnNewQmakeSettings ), NULL, this );
 
61
        m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QMakeSettingsBaseDlg::OnOK ), NULL, this );
 
62
}
 
63
 
 
64
QMakeSettingsBaseDlg::~QMakeSettingsBaseDlg()
 
65
{
 
66
        // Disconnect Events
 
67
        m_notebook->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( QMakeSettingsBaseDlg::OnRightDown ), NULL, this );
 
68
        m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QMakeSettingsBaseDlg::OnNewQmakeSettings ), NULL, this );
 
69
        m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QMakeSettingsBaseDlg::OnOK ), NULL, this );
 
70
}
 
71
 
 
72
QmakeSettingsTabBase::QmakeSettingsTabBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
 
73
{
 
74
        wxBoxSizer* bSizer4;
 
75
        bSizer4 = new wxBoxSizer( wxVERTICAL );
 
76
        
 
77
        wxFlexGridSizer* fgSizer2;
 
78
        fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
 
79
        fgSizer2->AddGrowableCol( 1 );
 
80
        fgSizer2->SetFlexibleDirection( wxBOTH );
 
81
        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
 
82
        
 
83
        m_staticText1 = new wxStaticText( this, wxID_ANY, _("qmake executable:"), wxDefaultPosition, wxDefaultSize, 0 );
 
84
        m_staticText1->Wrap( -1 );
 
85
        fgSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
86
        
 
87
        m_filePickerQmakeExec = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
 
88
        fgSizer2->Add( m_filePickerQmakeExec, 0, wxALL|wxEXPAND, 5 );
 
89
        
 
90
        m_staticText2 = new wxStaticText( this, wxID_ANY, _("QMAKESPEC:"), wxDefaultPosition, wxDefaultSize, 0 );
 
91
        m_staticText2->Wrap( -1 );
 
92
        fgSizer2->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
93
        
 
94
        m_comboBoxQmakespec = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
 
95
        fgSizer2->Add( m_comboBoxQmakespec, 0, wxALL|wxEXPAND, 5 );
 
96
        
 
97
        m_staticText4 = new wxStaticText( this, wxID_ANY, _("QTDIR:"), wxDefaultPosition, wxDefaultSize, 0 );
 
98
        m_staticText4->Wrap( -1 );
 
99
        fgSizer2->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
100
        
 
101
        m_textCtrlQtdir = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
 
102
        m_textCtrlQtdir->SetToolTip( _("Set QTDIR to the directory where you've installed Qt") );
 
103
        
 
104
        fgSizer2->Add( m_textCtrlQtdir, 0, wxALL|wxEXPAND, 5 );
 
105
        
 
106
        bSizer4->Add( fgSizer2, 1, wxEXPAND, 5 );
 
107
        
 
108
        this->SetSizer( bSizer4 );
 
109
        this->Layout();
 
110
        
 
111
        // Connect Events
 
112
        m_filePickerQmakeExec->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( QmakeSettingsTabBase::OnFileSelected ), NULL, this );
 
113
}
 
114
 
 
115
QmakeSettingsTabBase::~QmakeSettingsTabBase()
 
116
{
 
117
        // Disconnect Events
 
118
        m_filePickerQmakeExec->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( QmakeSettingsTabBase::OnFileSelected ), NULL, this );
 
119
}