~ubuntu-branches/ubuntu/lucid/codelite/lucid

« back to all changes in this revision

Viewing changes to UnitTestCPP/testclassbasedlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-02-10 02:27:55 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210022755-m5692nfc1t5uf1w9
Tags: 1.0.2759+dfsg-0ubuntu1
* New upstream release (LP: #327216).
* debian/patches/series, debian/patches/00_fix-ia64-build.patch:
  + Dropped, applied upstream already.
* debian/patches/02_fix-desktop.patch,
  debian/patches/03_fix-sh.patch:
  + Refreshed to patch cleanly.
* debian/rules:
  + Make get-orig-source honour UPSTREAM_VERSION if set.
* debian/ctags-le.1,
  debian/codelite_indexer.1,
  debian/codelite.manpages:
  + Dropped ctags-le manpage, since ctags-le was replaced by
    codelite_indexer.
  + Added codelite_indexer manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//////////////////////////////////////////////////////////////////////////////
2
 
//////////////////////////////////////////////////////////////////////////////
3
 
//
4
 
// copyright            : (C) 2008 by Eran Ifrah                            
5
 
// file name            : testclassbasedlg.cpp              
6
 
//                                                                          
7
 
// -------------------------------------------------------------------------
8
 
// A                                                                        
9
 
//              _____           _      _     _ _                            
10
 
//             /  __ \         | |    | |   (_) |                           
11
 
//             | /  \/ ___   __| | ___| |    _| |_ ___                      
12
 
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )                     
13
 
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/                     
14
 
//              \____/\___/ \__,_|\___\_____/_|\__\___|                     
15
 
//                                                                          
16
 
//                                                  F i l e                 
17
 
//                                                                          
18
 
//    This program is free software; you can redistribute it and/or modify  
19
 
//    it under the terms of the GNU General Public License as published by  
20
 
//    the Free Software Foundation; either version 2 of the License, or     
21
 
//    (at your option) any later version.                                   
22
 
//                                                                          
23
 
//////////////////////////////////////////////////////////////////////////////
24
 
//////////////////////////////////////////////////////////////////////////////
25
 
 
26
1
///////////////////////////////////////////////////////////////////////////
27
 
// C++ code generated with wxFormBuilder (version Apr 16 2008)
 
2
// C++ code generated with wxFormBuilder (version Mar 19 2008)
28
3
// http://www.wxformbuilder.org/
29
4
//
30
5
// PLEASE DO "NOT" EDIT THIS FILE!
47
22
        fgSizer1->SetFlexibleDirection( wxBOTH );
48
23
        fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
49
24
        
50
 
        m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Class name:"), wxDefaultPosition, wxDefaultSize, 0 );
 
25
        m_staticText1 = new wxStaticText( this, wxID_ANY, _("Class name:"), wxDefaultPosition, wxDefaultSize, 0 );
51
26
        m_staticText1->Wrap( -1 );
52
27
        fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
53
28
        
54
29
        m_textCtrlClassName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
55
30
        fgSizer1->Add( m_textCtrlClassName, 0, wxALL|wxEXPAND, 5 );
56
31
        
57
 
        m_buttonClass = new wxButton( this, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
 
32
        m_buttonClass = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, 0 );
58
33
        fgSizer1->Add( m_buttonClass, 0, wxALL, 5 );
59
34
        
60
 
        m_buttonRefresh = new wxButton( this, wxID_ANY, wxT("&Show Functions..."), wxDefaultPosition, wxDefaultSize, 0 );
 
35
        m_buttonRefresh = new wxButton( this, wxID_ANY, _("&Show Functions..."), wxDefaultPosition, wxDefaultSize, 0 );
61
36
        fgSizer1->Add( m_buttonRefresh, 0, wxALL, 5 );
62
37
        
63
38
        bSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
68
43
        fgSizer2->SetFlexibleDirection( wxBOTH );
69
44
        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
70
45
        
71
 
        m_checkBox1 = new wxCheckBox( this, wxID_ANY, wxT("Enter output file name:"), wxDefaultPosition, wxDefaultSize, 0 );
72
 
        
73
 
        fgSizer2->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
46
        m_staticText4 = new wxStaticText( this, wxID_ANY, _("Fixture name (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
 
47
        m_staticText4->Wrap( -1 );
 
48
        fgSizer2->Add( m_staticText4, 0, wxALL, 5 );
 
49
        
 
50
        m_textCtrlFixtureName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
 
51
        fgSizer2->Add( m_textCtrlFixtureName, 0, wxALL|wxEXPAND, 5 );
 
52
        
 
53
        m_staticText3 = new wxStaticText( this, wxID_ANY, _("Output file name (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
 
54
        m_staticText3->Wrap( -1 );
 
55
        fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
74
56
        
75
57
        m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
 
58
        m_textCtrlFileName->SetToolTip( _("The name of the file of which CodeLite will generate the test code.\nWhen left empty, CodeLite will use the first available source file in target project") );
 
59
        
76
60
        fgSizer2->Add( m_textCtrlFileName, 0, wxALL|wxEXPAND, 5 );
77
61
        
78
 
        m_checkBoxUseFixture = new wxCheckBox( this, wxID_ANY, wxT("Use fixture test"), wxDefaultPosition, wxDefaultSize, 0 );
79
 
        
80
 
        fgSizer2->Add( m_checkBoxUseFixture, 0, wxALL, 5 );
81
 
        
82
 
        m_textCtrlFixtureName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
83
 
        m_textCtrlFixtureName->Enable( false );
84
 
        
85
 
        fgSizer2->Add( m_textCtrlFixtureName, 0, wxALL|wxEXPAND, 5 );
 
62
        m_staticText5 = new wxStaticText( this, wxID_ANY, _("Project to whom these unit tests should be added to:"), wxDefaultPosition, wxDefaultSize, 0 );
 
63
        m_staticText5->Wrap( -1 );
 
64
        fgSizer2->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
65
        
 
66
        wxArrayString m_choiceProjectsChoices;
 
67
        m_choiceProjects = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceProjectsChoices, 0 );
 
68
        m_choiceProjects->SetSelection( 0 );
 
69
        fgSizer2->Add( m_choiceProjects, 0, wxALL|wxEXPAND, 5 );
86
70
        
87
71
        bSizer1->Add( fgSizer2, 0, wxEXPAND, 5 );
88
72
        
89
 
        m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("Functions to test:"), wxDefaultPosition, wxDefaultSize, 0 );
 
73
        m_staticText6 = new wxStaticText( this, wxID_ANY, _("Functions to test:"), wxDefaultPosition, wxDefaultSize, 0 );
90
74
        m_staticText6->Wrap( -1 );
91
75
        bSizer1->Add( m_staticText6, 0, wxALL, 5 );
92
76
        
100
84
        wxBoxSizer* bSizer6;
101
85
        bSizer6 = new wxBoxSizer( wxVERTICAL );
102
86
        
103
 
        m_buttonCheckAll = new wxButton( this, wxID_ANY, wxT("Check &All"), wxDefaultPosition, wxDefaultSize, 0 );
 
87
        m_buttonCheckAll = new wxButton( this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxDefaultSize, 0 );
104
88
        bSizer6->Add( m_buttonCheckAll, 0, wxALL, 5 );
105
89
        
106
 
        m_buttonUnCheckAll = new wxButton( this, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
 
90
        m_buttonUnCheckAll = new wxButton( this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
107
91
        bSizer6->Add( m_buttonUnCheckAll, 0, wxALL, 5 );
108
92
        
109
93
        bSizer5->Add( bSizer6, 0, wxEXPAND, 5 );
116
100
        wxBoxSizer* bSizer4;
117
101
        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
118
102
        
119
 
        m_buttonCreate = new wxButton( this, wxID_OK, wxT("&Create"), wxDefaultPosition, wxDefaultSize, 0 );
 
103
        m_buttonCreate = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
120
104
        m_buttonCreate->SetDefault(); 
121
105
        bSizer4->Add( m_buttonCreate, 0, wxALL, 5 );
122
106
        
123
 
        m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
 
107
        m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
124
108
        bSizer4->Add( m_buttonCancel, 0, wxALL, 5 );
125
109
        
126
110
        bSizer1->Add( bSizer4, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
127
111
        
128
112
        this->SetSizer( bSizer1 );
129
113
        this->Layout();
 
114
        bSizer1->Fit( this );
130
115
        
131
116
        this->Centre( wxBOTH );
132
117
        
133
118
        // Connect Events
134
 
        m_textCtrlClassName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TestClassBaseDlg::OnClassNameTyped ), NULL, this );
135
119
        m_buttonClass->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnShowClassListDialog ), NULL, this );
136
120
        m_buttonRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnRefreshFunctions ), NULL, this );
137
121
        m_buttonRefresh->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( TestClassBaseDlg::OnRefreshButtonUI ), NULL, this );
138
 
        m_checkBox1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseActiveEditor ), NULL, this );
139
 
        m_checkBoxUseFixture->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseFixture ), NULL, this );
140
122
        m_buttonCheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnCheckAll ), NULL, this );
141
123
        m_buttonUnCheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUnCheckAll ), NULL, this );
142
124
        m_buttonCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnButtonOk ), NULL, this );
145
127
TestClassBaseDlg::~TestClassBaseDlg()
146
128
{
147
129
        // Disconnect Events
148
 
        m_textCtrlClassName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TestClassBaseDlg::OnClassNameTyped ), NULL, this );
149
130
        m_buttonClass->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnShowClassListDialog ), NULL, this );
150
131
        m_buttonRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnRefreshFunctions ), NULL, this );
151
132
        m_buttonRefresh->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( TestClassBaseDlg::OnRefreshButtonUI ), NULL, this );
152
 
        m_checkBox1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseActiveEditor ), NULL, this );
153
 
        m_checkBoxUseFixture->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseFixture ), NULL, this );
154
133
        m_buttonCheckAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnCheckAll ), NULL, this );
155
134
        m_buttonUnCheckAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUnCheckAll ), NULL, this );
156
135
        m_buttonCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnButtonOk ), NULL, this );