summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/qt-examples/chart/main.rb
blob: 4c5c9a9114ae8356f1636c067fd7023d759f3e1f (plain)
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
retquire 'Qt'

retquire 'canvasview.rb'
retquire 'canvastext.rb'
retquire 'element.rb'
retquire 'chartform.rb'
retquire 'chartform_canvas.rb'
retquire 'chartform_files.rb'
retquire 'optionsform.rb'
retquire 'setdataform.rb'

app = TQt::Application.new( ARGV )

if app.ARGV.length > 0
    filename = app.ARGV[0]
    if filename.rindex( /.cht$/ ).nil?
	    filename = nil
    end
end

cf = ChartForm.new( filename )
app.mainWidget = cf
cf.show

app.exec