ClickSpotter 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,72 @@
1
+ #
2
+ # StatusCode.rb - ClickSpotter
3
+ #
4
+ # Copyright (c) 2005, 2006 by Chris Schlaeger <cs@kde.org>
5
+ # This program is free software; you can redistribute it and/or modify
6
+ # it under the terms of version 2 of the GNU General Public License as
7
+ # published by the Free Software Foundation.
8
+ #
9
+ # $Id: StatusCode.rb 8 2006-01-22 15:19:51Z cs $
10
+ #
11
+
12
+ class StatusCode
13
+
14
+ attr_reader :description
15
+
16
+ def initialize(code)
17
+ @hits = []
18
+ @@codes = { 100 => 'Continue', 101 => 'Switching Protocols',
19
+ 200 => 'Ok', 201 => 'Created', 202 => 'Accepted',
20
+ 203 => 'Non-Authorative Information',
21
+ 204 => 'No Content', 205 => 'Reset Content',
22
+ 206 => 'Partial Content',
23
+ 300 => 'Multiple Choices', 301 => 'Permanently Moved',
24
+ 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified',
25
+ 305 => 'Use Proxy',
26
+ 400 => 'Bad Request', 401 => 'Unauthorized',
27
+ 402 => 'Payment Required', 403 => 'Forbidden',
28
+ 404 => 'Not Found', 405 => 'Method Not Allowed',
29
+ 406 => 'Not Acceptable',
30
+ 407 => 'Proxy Authentication Required',
31
+ 408 => 'Request Timeout', 409 => 'Conflict',
32
+ 410 => 'Gone', 411 => 'Length Required',
33
+ 412 => 'Precondition Failed',
34
+ 413 => 'Request Entity Too Large',
35
+ 414 => 'Request URI Too Long',
36
+ 415 => 'Unsupported Media Type',
37
+ 416 => 'Requested Range Not Satisfiable',
38
+ 417 => 'Expectation Failed',
39
+ 500 => 'Internal Server Error', 501 => 'Not Implemented',
40
+ 502 => 'Bad Gateway', 503 => 'Service Unavailable',
41
+ 504 => 'Gateway Timeout',
42
+ 505 => 'HTTP Version Not Supported'
43
+ }
44
+
45
+ if @@codes[code]
46
+ @description = @@codes[code]
47
+ else
48
+ @description = "Unknown Code #{code}"
49
+ end
50
+ end
51
+
52
+ def addHit(hit)
53
+ @hits.push(hit)
54
+ end
55
+
56
+ def purge(deadline)
57
+ @hits.each do |h|
58
+ if h.timeStamp < deadline
59
+ @hits.delete(h)
60
+ else
61
+ return false
62
+ end
63
+ end
64
+ @hits.empty?
65
+ end
66
+
67
+ def hitCount
68
+ return @hits.length()
69
+ end
70
+
71
+ end
72
+
@@ -0,0 +1,53 @@
1
+ #
2
+ # TraceRouter.rb - ClickSpotter
3
+ #
4
+ # Copyright (c) 2005, 2006 by Chris Schlaeger <cs@kde.org>
5
+ # This program is free software; you can redistribute it and/or modify
6
+ # it under the terms of version 2 of the GNU General Public License as
7
+ # published by the Free Software Foundation.
8
+ #
9
+ # $Id: TraceRouter.rb 8 2006-01-22 15:19:51Z cs $
10
+ #
11
+
12
+ require 'time'
13
+ require 'AsyncResolverWithCache'
14
+
15
+ class TraceRouterRecord
16
+ attr_reader :routers
17
+ attr_accessor :timeStamp
18
+
19
+ def initialize
20
+ @routers = []
21
+ end
22
+
23
+ def resolve(ip)
24
+ begin
25
+ `traceroute -n #{ip}`.each_line do |line|
26
+ router = line.scan(/^\s*\d+\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\s+.*$/)
27
+ @routers << router[0][0] unless router.empty?
28
+ end
29
+ rescue
30
+ return false
31
+ end
32
+ # Don't include the IP of the destination host
33
+ @routers.pop if @routers.size > 0 && @routers[-1] == ip
34
+ @timeStamp = Time.now()
35
+ return true
36
+ end
37
+
38
+ end
39
+
40
+ class TraceRouter < AsyncResolverWithCache
41
+
42
+ def initialize
43
+ super('TraceRouterCache', $globals.getSetting('TracerTimeout') * 60 * 60,
44
+ 10)
45
+ @enabled = $globals.getSetting('TraceRouter')
46
+ end
47
+
48
+ def newRecord
49
+ TraceRouterRecord.new
50
+ end
51
+
52
+ end
53
+
@@ -0,0 +1,132 @@
1
+ #
2
+ # VisitorInformation.rb - ClickSpotter
3
+ #
4
+ # Copyright (c) 2005, 2006 by Chris Schlaeger <cs@kde.org>
5
+ # This program is free software; you can redistribute it and/or modify
6
+ # it under the terms of version 2 of the GNU General Public License as
7
+ # published by the Free Software Foundation.
8
+ #
9
+ # $Id: VisitorInformation.rb 8 2006-01-22 15:19:51Z cs $
10
+ #
11
+
12
+ require 'VisitorInformationDlg'
13
+ require 'PageInformation'
14
+ require 'BrowserLauncher'
15
+ require 'WorldMap'
16
+
17
+ class VisitorInformation < VisitorInformationDlg
18
+
19
+ include BrowserLauncher
20
+
21
+ slots 'pageListClicked(QListViewItem*)', 'openReferer()'
22
+
23
+ def initialize(visitor, parent = nil, name = nil)
24
+ super(parent, name)
25
+ $windowList.push(self)
26
+ @visitor = visitor
27
+ setCaption("Visitor Information - %s" % visitor.host)
28
+ @pageListCSLV = CSListView.new(@pageList)
29
+ @pageList.setSorting(3, true)
30
+ @pageListCSLV.setColumnWidth(0, 400)
31
+ @pageListCSLV.setColumnWidth(1, 400)
32
+ @pageList.hideColumn(3)
33
+
34
+ @visitorGDV = GeoDistView.new(mapFrame, nil, routeList)
35
+ @visitorGDV.showRoutes = true
36
+ @visitorGDV.showAll = true
37
+
38
+ connect(@pageList, SIGNAL('clicked(QListViewItem*)'),
39
+ SLOT('pageListClicked(QListViewItem*)'))
40
+ connect(@openButton, SIGNAL('clicked()'), SLOT('openReferer()'))
41
+
42
+ if $globals.getSetting("VisitorWindowW") > 0 &&
43
+ $globals.getSetting("VisitorWindowH") > 0
44
+ resize($globals.getSetting("VisitorWindowW"),
45
+ $globals.getSetting("VisitorWindowH"))
46
+ end
47
+ @worldMapWindow = nil
48
+ updateWindow
49
+ show
50
+
51
+ end
52
+
53
+ def pageListClicked(item)
54
+ return if item == nil
55
+ win = PageInformation.new($pages[item.text(0)])
56
+ end
57
+
58
+ def openReferer
59
+ return if @visitor.referer == nil
60
+ browseURL(@visitor.referer.url)
61
+ end
62
+
63
+ def updateWindow
64
+ unless $visitors.values.include?(@visitor)
65
+ close(true)
66
+ return
67
+ end
68
+
69
+ @ip.setText(@visitor.ip)
70
+ @host.setText(@visitor.host)
71
+ geoloc = $geoLocator.resolve(@visitor.ip)
72
+ if geoloc && geoloc.country != nil
73
+ @country.setText(geoloc.country)
74
+ @city.setText(geoloc.city)
75
+ @latitude.setText("%7.2f" % geoloc.latitude) if geoloc.latitude
76
+ @longitude.setText("%7.2f" % geoloc.longitude) if geoloc.longitude
77
+ vl = { @visitor.ip => @visitor }
78
+ @visitorGDV.update(vl)
79
+ @worldMapWindow.update(vl) if @worldMapWindow
80
+ end
81
+ @hits.setText('%d' % @visitor.hitCount)
82
+ @bytes.setText('%d' % @visitor.bytes)
83
+ @pages.setText('%d' % @visitor.pageCount)
84
+ @firstSeen.setText(@visitor.firstHit.timeStamp.
85
+ strftime("%H:%M:%S %Y/%m/%d"))
86
+ @lastSeen.setText(@visitor.lastHit.timeStamp.
87
+ strftime("%H:%M:%S %Y/%m/%d"))
88
+ @duration.setText("%d min" % ((@visitor.lastHit.timeStamp -
89
+ @visitor.firstHit.timeStamp) / 60))
90
+ @browser.setText(@visitor.browser)
91
+ @robot.setText(@visitor.robot ? @visitor.robot : '')
92
+ @referer.setText(@visitor.referer ? @visitor.referer.url : '')
93
+
94
+ @pageListCSLV.startUpdate
95
+ index = 0
96
+ showRegularPages = $globals.getSetting("ShowRegularPages") != 0
97
+ showAuxPages = $globals.getSetting("ShowAuxPages") != 0
98
+ @visitor.hits.each do |h|
99
+ if (h.page.isPage && !showRegularPages) ||
100
+ (!h.page.isPage && !showAuxPages)
101
+ next
102
+ end
103
+ @pageListCSLV.insertItem(h, h.page.url, h.referer ? h.referer.url : '',
104
+ h.timeStamp, index)
105
+ index += 1
106
+ end
107
+ @pageListCSLV.finishUpdate
108
+ end
109
+
110
+ def close(dummy)
111
+ @worldMapWindow.close(true) if @worldMapWindow
112
+ $globals.setSetting("VisitorWindowW", width())
113
+ $globals.setSetting("VisitorWindowH", height())
114
+ $windowList.delete(self)
115
+ super(true)
116
+ end
117
+
118
+ def largeMapBtnClicked
119
+ @worldMapWindow.close(true) if @worldMapWindow
120
+ @worldMapWindow = WorldMap.new(self)
121
+ end
122
+
123
+ def fixVisitorBtnClicked
124
+ browseURL("http://www.hostip.info/correct.html?spip=#{@visitor.ip}")
125
+ end
126
+
127
+ def worldMapClosed
128
+ @worldMapWindow = nil
129
+ end
130
+
131
+ end
132
+
@@ -0,0 +1,351 @@
1
+ # Form implementation generated from reading ui file 'VisitorInformationDlg.ui'
2
+ #
3
+ # Created: Mon Jan 23 23:21:52 2006
4
+ # by: The QtRuby User Interface Compiler (rbuic)
5
+ #
6
+ # WARNING! All changes made in this file will be lost!
7
+
8
+
9
+ require 'Qt'
10
+
11
+ class VisitorInformationDlg < Qt::Widget
12
+
13
+ slots 'languageChange()',
14
+ 'largeMapBtnClicked()',
15
+ 'fixVisitorBtnClicked()'
16
+
17
+ attr_reader :splitter1
18
+ attr_reader :routeList
19
+ attr_reader :mapFrame
20
+ attr_reader :groupBox30
21
+ attr_reader :label
22
+ attr_reader :textLabel15
23
+ attr_reader :ip
24
+ attr_reader :textLabel16_2
25
+ attr_reader :country
26
+ attr_reader :city
27
+ attr_reader :textLabel2
28
+ attr_reader :textLabel6
29
+ attr_reader :host
30
+ attr_reader :textLabel1_3
31
+ attr_reader :latitude
32
+ attr_reader :longitude
33
+ attr_reader :fixVisitorBtn
34
+ attr_reader :largeMapBtn
35
+ attr_reader :groupBox31
36
+ attr_reader :referer
37
+ attr_reader :openButton
38
+ attr_reader :browser
39
+ attr_reader :textLabel1_2
40
+ attr_reader :robot
41
+ attr_reader :textLabel10
42
+ attr_reader :textLabel1
43
+ attr_reader :textLabel14
44
+ attr_reader :textLabel4
45
+ attr_reader :textLabel16
46
+ attr_reader :bytes
47
+ attr_reader :textLabel12
48
+ attr_reader :firstSeen
49
+ attr_reader :duration
50
+ attr_reader :pages
51
+ attr_reader :Duration
52
+ attr_reader :hits
53
+ attr_reader :lastSeen
54
+ attr_reader :textLabel3
55
+ attr_reader :pageList
56
+
57
+
58
+ def initialize(parent = nil, name = nil, fl = 0)
59
+ super
60
+
61
+ if name.nil?
62
+ setName("VisitorInformationDlg")
63
+ end
64
+
65
+ @VisitorInformationDlgLayout = Qt::GridLayout.new(self, 1, 1, 11, 6, 'VisitorInformationDlgLayout')
66
+
67
+ @splitter1 = Qt::Splitter.new(self, "splitter1")
68
+ @splitter1.setOrientation( Qt::Splitter::Vertical )
69
+
70
+ @LayoutWidget = Qt::Widget.new(@splitter1, '@LayoutWidget')
71
+ @layout7 = Qt::GridLayout.new(@LayoutWidget, 1, 1, 0, 6, 'layout7')
72
+
73
+ @routeList = Qt::ListView.new(@LayoutWidget, "routeList")
74
+ @routeList.addColumn(trUtf8("Hop"))
75
+ @routeList.addColumn(trUtf8("IP"))
76
+ @routeList.addColumn(trUtf8("Host"))
77
+ @routeList.addColumn(trUtf8("Country"))
78
+ @routeList.addColumn(trUtf8("City"))
79
+ @routeList.addColumn(trUtf8("Latitude"))
80
+ @routeList.addColumn(trUtf8("Longitude"))
81
+ @routeList.setSizePolicy( Qt::SizePolicy.new(7, 7, 0, 20, @routeList.sizePolicy().hasHeightForWidth()) )
82
+ @routeList.setAllColumnsShowFocus( true )
83
+
84
+ @layout7.addMultiCellWidget(@routeList, 1, 1, 0, 1)
85
+
86
+ @mapFrame = Qt::GroupBox.new(@LayoutWidget, "mapFrame")
87
+ @mapFrame.setSizePolicy( Qt::SizePolicy.new(0, 0, 0, 0, @mapFrame.sizePolicy().hasHeightForWidth()) )
88
+ @mapFrame.setMinimumSize( Qt::Size.new(0, 0) )
89
+
90
+ @layout7.addWidget(@mapFrame, 0, 1)
91
+
92
+ @groupBox30 = Qt::GroupBox.new(@LayoutWidget, "groupBox30")
93
+ @groupBox30.setColumnLayout( 0, Qt::Vertical )
94
+ @groupBox30.layout().setSpacing(6)
95
+ @groupBox30.layout().setMargin(11)
96
+ @groupBox30Layout = Qt::GridLayout.new(@groupBox30.layout() )
97
+ @groupBox30Layout.setAlignment( AlignTop )
98
+
99
+ @label = Qt::Label.new(@groupBox30, "label")
100
+ @label.setSizePolicy( Qt::SizePolicy.new(1, 5, 0, 0, @label.sizePolicy().hasHeightForWidth()) )
101
+
102
+ @groupBox30Layout.addWidget(@label, 1, 0)
103
+
104
+ @textLabel15 = Qt::Label.new(@groupBox30, "textLabel15")
105
+
106
+ @groupBox30Layout.addWidget(@textLabel15, 4, 0)
107
+
108
+ @ip = Qt::LineEdit.new(@groupBox30, "ip")
109
+ @ip.setSizePolicy( Qt::SizePolicy.new(7, 0, 30, 0, @ip.sizePolicy().hasHeightForWidth()) )
110
+ @ip.setReadOnly( true )
111
+
112
+ @groupBox30Layout.addMultiCellWidget(@ip, 0, 0, 1, 2)
113
+
114
+ @textLabel16_2 = Qt::Label.new(@groupBox30, "textLabel16_2")
115
+
116
+ @groupBox30Layout.addWidget(@textLabel16_2, 5, 0)
117
+
118
+ @country = Qt::LineEdit.new(@groupBox30, "country")
119
+
120
+ @groupBox30Layout.addMultiCellWidget(@country, 2, 2, 1, 2)
121
+
122
+ @city = Qt::LineEdit.new(@groupBox30, "city")
123
+
124
+ @groupBox30Layout.addMultiCellWidget(@city, 3, 3, 1, 2)
125
+
126
+ @textLabel2 = Qt::Label.new(@groupBox30, "textLabel2")
127
+
128
+ @groupBox30Layout.addWidget(@textLabel2, 3, 0)
129
+
130
+ @textLabel6 = Qt::Label.new(@groupBox30, "textLabel6")
131
+
132
+ @groupBox30Layout.addWidget(@textLabel6, 0, 0)
133
+
134
+ @host = Qt::LineEdit.new(@groupBox30, "host")
135
+ @host.setSizePolicy( Qt::SizePolicy.new(7, 0, 70, 0, @host.sizePolicy().hasHeightForWidth()) )
136
+ @host.setReadOnly( true )
137
+
138
+ @groupBox30Layout.addMultiCellWidget(@host, 1, 1, 1, 2)
139
+
140
+ @textLabel1_3 = Qt::Label.new(@groupBox30, "textLabel1_3")
141
+
142
+ @groupBox30Layout.addWidget(@textLabel1_3, 2, 0)
143
+
144
+ @latitude = Qt::LineEdit.new(@groupBox30, "latitude")
145
+ @latitude.setReadOnly( true )
146
+
147
+ @groupBox30Layout.addWidget(@latitude, 4, 1)
148
+
149
+ @longitude = Qt::LineEdit.new(@groupBox30, "longitude")
150
+ @longitude.setReadOnly( true )
151
+
152
+ @groupBox30Layout.addWidget(@longitude, 5, 1)
153
+
154
+ @fixVisitorBtn = Qt::PushButton.new(@groupBox30, "fixVisitorBtn")
155
+
156
+ @groupBox30Layout.addWidget(@fixVisitorBtn, 5, 2)
157
+
158
+ @largeMapBtn = Qt::PushButton.new(@groupBox30, "largeMapBtn")
159
+ @largeMapBtn.setSizePolicy( Qt::SizePolicy.new(1, 0, 0, 0, @largeMapBtn.sizePolicy().hasHeightForWidth()) )
160
+
161
+ @groupBox30Layout.addWidget(@largeMapBtn, 4, 2)
162
+
163
+ @layout7.addWidget(@groupBox30, 0, 0)
164
+
165
+ @LayoutWidget_2 = Qt::Widget.new(@splitter1, '@LayoutWidget_2')
166
+ @layout8 = Qt::VBoxLayout.new(@LayoutWidget_2, 0, 6, 'layout8')
167
+
168
+ @groupBox31 = Qt::GroupBox.new(@LayoutWidget_2, "groupBox31")
169
+ @groupBox31.setColumnLayout( 0, Qt::Vertical )
170
+ @groupBox31.layout().setSpacing(6)
171
+ @groupBox31.layout().setMargin(11)
172
+ @groupBox31Layout = Qt::GridLayout.new(@groupBox31.layout() )
173
+ @groupBox31Layout.setAlignment( AlignTop )
174
+
175
+ @layout28 = Qt::GridLayout.new(nil, 1, 1, 0, 6, 'layout28')
176
+
177
+ @layout19 = Qt::HBoxLayout.new(nil, 0, 6, 'layout19')
178
+
179
+ @referer = Qt::LineEdit.new(@groupBox31, "referer")
180
+ @layout19.addWidget(@referer)
181
+
182
+ @openButton = Qt::PushButton.new(@groupBox31, "openButton")
183
+ @layout19.addWidget(@openButton)
184
+
185
+ @layout28.addLayout(@layout19, 2, 1)
186
+
187
+ @layout18 = Qt::HBoxLayout.new(nil, 0, 6, 'layout18')
188
+
189
+ @browser = Qt::LineEdit.new(@groupBox31, "browser")
190
+ @browser.setSizePolicy( Qt::SizePolicy.new(7, 0, 80, 0, @browser.sizePolicy().hasHeightForWidth()) )
191
+ @browser.setReadOnly( true )
192
+ @layout18.addWidget(@browser)
193
+
194
+ @textLabel1_2 = Qt::Label.new(@groupBox31, "textLabel1_2")
195
+ @layout18.addWidget(@textLabel1_2)
196
+
197
+ @robot = Qt::LineEdit.new(@groupBox31, "robot")
198
+ @robot.setSizePolicy( Qt::SizePolicy.new(7, 0, 20, 0, @robot.sizePolicy().hasHeightForWidth()) )
199
+ @layout18.addWidget(@robot)
200
+
201
+ @layout28.addLayout(@layout18, 1, 1)
202
+
203
+ @layout27 = Qt::VBoxLayout.new(nil, 0, 6, 'layout27')
204
+
205
+ @textLabel10 = Qt::Label.new(@groupBox31, "textLabel10")
206
+ @layout27.addWidget(@textLabel10)
207
+
208
+ @textLabel1 = Qt::Label.new(@groupBox31, "textLabel1")
209
+ @textLabel1.setSizePolicy( Qt::SizePolicy.new(5, 5, 0, 0, @textLabel1.sizePolicy().hasHeightForWidth()) )
210
+ @layout27.addWidget(@textLabel1)
211
+
212
+ @textLabel14 = Qt::Label.new(@groupBox31, "textLabel14")
213
+ @layout27.addWidget(@textLabel14)
214
+
215
+ @textLabel4 = Qt::Label.new(@groupBox31, "textLabel4")
216
+ @layout27.addWidget(@textLabel4)
217
+
218
+ @layout28.addMultiCellLayout(@layout27, 0, 2, 0, 0)
219
+
220
+ @layout12 = Qt::GridLayout.new(nil, 1, 1, 0, 6, 'layout12')
221
+
222
+ @textLabel16 = Qt::Label.new(@groupBox31, "textLabel16")
223
+
224
+ @layout12.addWidget(@textLabel16, 0, 3)
225
+
226
+ @bytes = Qt::LineEdit.new(@groupBox31, "bytes")
227
+ @bytes.setSizePolicy( Qt::SizePolicy.new(7, 0, 30, 0, @bytes.sizePolicy().hasHeightForWidth()) )
228
+ @bytes.setAlignment( Qt::LineEdit::AlignRight )
229
+ @bytes.setReadOnly( true )
230
+
231
+ @layout12.addWidget(@bytes, 0, 4)
232
+
233
+ @textLabel12 = Qt::Label.new(@groupBox31, "textLabel12")
234
+ @textLabel12.setSizePolicy( Qt::SizePolicy.new(1, 5, 0, 0, @textLabel12.sizePolicy().hasHeightForWidth()) )
235
+
236
+ @layout12.addWidget(@textLabel12, 0, 1)
237
+
238
+ @firstSeen = Qt::LineEdit.new(@groupBox31, "firstSeen")
239
+ @firstSeen.setReadOnly( true )
240
+
241
+ @layout12.addWidget(@firstSeen, 1, 0)
242
+
243
+ @duration = Qt::LineEdit.new(@groupBox31, "duration")
244
+ @duration.setAlignment( Qt::LineEdit::AlignRight )
245
+ @duration.setReadOnly( true )
246
+
247
+ @layout12.addWidget(@duration, 1, 4)
248
+
249
+ @pages = Qt::LineEdit.new(@groupBox31, "pages")
250
+ @pages.setSizePolicy( Qt::SizePolicy.new(7, 0, 30, 0, @pages.sizePolicy().hasHeightForWidth()) )
251
+ @pages.setAlignment( Qt::LineEdit::AlignRight )
252
+ @pages.setReadOnly( true )
253
+
254
+ @layout12.addWidget(@pages, 0, 2)
255
+
256
+ @Duration = Qt::Label.new(@groupBox31, "Duration")
257
+
258
+ @layout12.addWidget(@Duration, 1, 3)
259
+
260
+ @hits = Qt::LineEdit.new(@groupBox31, "hits")
261
+ @hits.setSizePolicy( Qt::SizePolicy.new(7, 0, 30, 0, @hits.sizePolicy().hasHeightForWidth()) )
262
+ @hits.setAlignment( Qt::LineEdit::AlignRight )
263
+ @hits.setReadOnly( true )
264
+
265
+ @layout12.addWidget(@hits, 0, 0)
266
+
267
+ @lastSeen = Qt::LineEdit.new(@groupBox31, "lastSeen")
268
+ @lastSeen.setReadOnly( true )
269
+
270
+ @layout12.addWidget(@lastSeen, 1, 2)
271
+
272
+ @textLabel3 = Qt::Label.new(@groupBox31, "textLabel3")
273
+ @textLabel3.setSizePolicy( Qt::SizePolicy.new(5, 5, 0, 0, @textLabel3.sizePolicy().hasHeightForWidth()) )
274
+
275
+ @layout12.addWidget(@textLabel3, 1, 1)
276
+
277
+ @layout28.addLayout(@layout12, 0, 1)
278
+
279
+ @groupBox31Layout.addLayout(@layout28, 0, 0)
280
+ @layout8.addWidget(@groupBox31)
281
+
282
+ @pageList = Qt::ListView.new(@LayoutWidget_2, "pageList")
283
+ @pageList.addColumn(trUtf8("Page"))
284
+ @pageList.addColumn(trUtf8("Referer"))
285
+ @pageList.addColumn(trUtf8("Time Stamp"))
286
+ @pageList.addColumn(trUtf8("Index"))
287
+ @pageList.header().setClickEnabled( false, @pageList.header().count() - 1 )
288
+ @pageList.header().setResizeEnabled( false, @pageList.header().count() - 1 )
289
+ @pageList.setSizePolicy( Qt::SizePolicy.new(7, 7, 0, 40, @pageList.sizePolicy().hasHeightForWidth()) )
290
+ @layout8.addWidget(@pageList)
291
+
292
+ @VisitorInformationDlgLayout.addWidget(@splitter1, 0, 0)
293
+ languageChange()
294
+ resize( Qt::Size.new(840, 903).expandedTo(minimumSizeHint()) )
295
+ clearWState( WState_Polished )
296
+
297
+ Qt::Object.connect(@largeMapBtn, SIGNAL("clicked()"), self, SLOT("largeMapBtnClicked()") )
298
+ Qt::Object.connect(@fixVisitorBtn, SIGNAL("clicked()"), self, SLOT("fixVisitorBtnClicked()") )
299
+ end
300
+
301
+ #
302
+ # Sets the strings of the subwidgets using the current
303
+ # language.
304
+ #
305
+ def languageChange()
306
+ setCaption(trUtf8("Visitor"))
307
+ @routeList.header().setLabel( 0, trUtf8("Hop") )
308
+ @routeList.header().setLabel( 1, trUtf8("IP") )
309
+ @routeList.header().setLabel( 2, trUtf8("Host") )
310
+ @routeList.header().setLabel( 3, trUtf8("Country") )
311
+ @routeList.header().setLabel( 4, trUtf8("City") )
312
+ @routeList.header().setLabel( 5, trUtf8("Latitude") )
313
+ @routeList.header().setLabel( 6, trUtf8("Longitude") )
314
+ @mapFrame.setTitle( trUtf8("Visitor Location") )
315
+ @groupBox30.setTitle( trUtf8("Visitor Details") )
316
+ @label.setText( trUtf8("<b>Host:</b>") )
317
+ @textLabel15.setText( trUtf8("<b>Latitude:</b>") )
318
+ @textLabel16_2.setText( trUtf8("<b>Longitude:</b>") )
319
+ @textLabel2.setText( trUtf8("<b>City:</b>") )
320
+ @textLabel6.setText( trUtf8("<b>IP:</b>") )
321
+ @textLabel1_3.setText( trUtf8("<b>Country:</b>") )
322
+ @fixVisitorBtn.setText( trUtf8("Correct Data") )
323
+ @largeMapBtn.setText( trUtf8("Large Map") )
324
+ @groupBox31.setTitle( trUtf8("Access Statistics") )
325
+ @openButton.setText( trUtf8("Open") )
326
+ @textLabel1_2.setText( trUtf8("<b>Robot:</b>") )
327
+ @textLabel10.setText( trUtf8("<b>Hits:</b>") )
328
+ @textLabel1.setText( trUtf8("<b>First&nbsp;Seen:</b>") )
329
+ @textLabel14.setText( trUtf8("<b>Browser:</b>") )
330
+ @textLabel4.setText( trUtf8("<b>Referer:</b>") )
331
+ @textLabel16.setText( trUtf8("<b>Bytes:</b>") )
332
+ @textLabel12.setText( trUtf8("<b>Pages:</b>") )
333
+ @Duration.setText( trUtf8("<b>Duration:</b>") )
334
+ @textLabel3.setText( trUtf8("<b>Last&nbsp;Seen:</b>") )
335
+ @pageList.header().setLabel( 0, trUtf8("Page") )
336
+ @pageList.header().setLabel( 1, trUtf8("Referer") )
337
+ @pageList.header().setLabel( 2, trUtf8("Time Stamp") )
338
+ @pageList.header().setLabel( 3, trUtf8("Index") )
339
+ end
340
+ protected :languageChange
341
+
342
+
343
+ def largeMapBtnClicked(*k)
344
+ print("VisitorInformationDlg.largeMapBtnClicked(): Not implemented yet.\n")
345
+ end
346
+
347
+ def fixVisitorBtnClicked(*k)
348
+ print("VisitorInformationDlg.fixVisitorBtnClicked(): Not implemented yet.\n")
349
+ end
350
+
351
+ end