~kubuntu-members/korundum/4.11

« back to all changes in this revision

Viewing changes to qtruby/modules/qwt/examples/clock/analog_clock.rb

  • Committer: Ian Monroe
  • Date: 2010-11-21 15:55:01 UTC
  • Revision ID: git-v1:c37670e4e3c59f5eb2ba112f5341a5e706217f6f
Split up Smoke into Qt and KDE directories. 
Move libsmoke stuff into the generator directory
Split up Ruby into qtruby and korundum directories

svn path=/trunk/KDE/kdebindings/ruby/; revision=1199320

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'Qt4'
 
2
require 'qwt'
 
3
 
 
4
app = Qt::Application.new(ARGV)
 
5
clock = Qwt::AnalogClock.new
 
6
clock.scaleDraw().setPenWidth(3);
 
7
clock.lineWidth = 6
 
8
clock.frameShadow = Qwt::Dial::Sunken
 
9
clock.setTime
 
10
clock.show
 
11
 
 
12
# update the clock every second
 
13
timer = Qt::Timer.new(clock)
 
14
timer.connect(timer, SIGNAL(:timeout), clock, SLOT(:setCurrentTime))
 
15
timer.start(1000)
 
16
app.exec