-
Notifications
You must be signed in to change notification settings - Fork 0
/
BugReport.cpp
197 lines (143 loc) · 5.31 KB
/
BugReport.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/* ----------------------------------------------------------------------------
BugReport.cpp
MIView - Medical Image Viewer
Copyright (C) 2009-2011 Gregory Book
MIView is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------- */
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "BugReport.h"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "BugReport.h"
////@begin XPM images
////@end XPM images
/*!
* BugReport type definition
*/
IMPLEMENT_DYNAMIC_CLASS( BugReport, wxDialog )
/*!
* BugReport event table definition
*/
BEGIN_EVENT_TABLE( BugReport, wxDialog )
////@begin BugReport event table entries
////@end BugReport event table entries
END_EVENT_TABLE()
/*!
* BugReport constructors
*/
BugReport::BugReport()
{
Init();
}
BugReport::BugReport( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Init();
Create(parent, id, caption, pos, size, style);
}
/*!
* BugReport creator
*/
bool BugReport::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin BugReport creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end BugReport creation
return true;
}
/*!
* BugReport destructor
*/
BugReport::~BugReport()
{
////@begin BugReport destruction
////@end BugReport destruction
}
/*!
* Member initialisation
*/
void BugReport::Init()
{
////@begin BugReport member initialisation
////@end BugReport member initialisation
}
/*!
* Control creation for BugReport
*/
void BugReport::CreateControls()
{
////@begin BugReport content construction
BugReport* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Found a bug?"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText3->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Report it to the developer:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
wxHyperlinkCtrl* itemHyperlinkCtrl5 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINKCTRL3, _("[email protected]"), _T("mailto:[email protected]"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemBoxSizer2->Add(itemHyperlinkCtrl5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
itemBoxSizer2->Add(5, 10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Include as much of the following information as possible:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText7->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer2->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);
wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("* The steps taken to reproduce the problem\n* The version and build date of MIView\n* Your PC hardware specifications including\n * CPU type and speed (eg Intel Core 2 Duo E6400)\n * Video card model (eg NVidia 8600GTS)\n * Video driver revision number (eg Forceware 169.28)"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText8, 0, wxALIGN_LEFT|wxALL, 3);
itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton10 = new wxButton( itemDialog1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemButton10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
////@end BugReport content construction
}
/*!
* Should we show tooltips?
*/
bool BugReport::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap BugReport::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin BugReport bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end BugReport bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon BugReport::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin BugReport icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end BugReport icon retrieval
}