Class: JLDrill::Gtk::StatisticsView

Inherits:
ShowStatisticsContext::StatisticsView show all
Defined in:
lib/jldrill/views/gtk/StatisticsView.rb

Instance Attribute Summary collapse

Attributes inherited from ShowStatisticsContext::StatisticsView

#quiz

Attributes inherited from Context::View

#context

Instance Method Summary collapse

Methods inherited from ShowStatisticsContext::StatisticsView

#close

Methods inherited from Context::View

#addView, #removeView, #removingViewFrom, #viewAddedTo

Constructor Details

#initialize(context) ⇒ StatisticsView

Returns a new instance of StatisticsView.



11
12
13
14
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 11

def initialize(context)
	super(context)
	@statisticsWindow = StatisticsWindow.new(self)
end

Instance Attribute Details

#statisticsWindowObject (readonly)

Returns the value of attribute statisticsWindow.



9
10
11
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 9

def statisticsWindow
  @statisticsWindow
end

Instance Method Details

#destroyObject



20
21
22
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 20

def destroy
    @statisticsWindow.explicitDestroy
end

#emitDestroyEventObject



24
25
26
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 24

def emitDestroyEvent
	@statisticsWindow.signal_emit("destroy")
end

#getWidgetObject



16
17
18
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 16

def getWidget
	@statisticsWindow
end

#showBusy(bool) ⇒ Object



41
42
43
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 41

def showBusy(bool)
    @statisticsWindow.showBusy(bool)
end

#update(quiz) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/jldrill/views/gtk/StatisticsView.rb', line 28

def update(quiz)
    super(quiz)
          reviewTable = quiz.strategy.reviewStats.statsTable
    @statisticsWindow.updateReviewDuration(reviewTable)
    @statisticsWindow.updateReviewAccuracy(quiz.strategy.reviewStats)
    @statisticsWindow.updateReviewRate(quiz.strategy.reviewStats)
          
          forgottenTable = quiz.strategy.forgottenStats.statsTable
    @statisticsWindow.updateForgottenDuration(forgottenTable)
    @statisticsWindow.updateForgottenAccuracy(quiz.strategy.forgottenStats)
    @statisticsWindow.updateForgottenRate(quiz.strategy.forgottenStats)
end