|
Lines 5-10
Link Here
|
| 5 |
import sys |
5 |
import sys |
| 6 |
import math |
6 |
import math |
| 7 |
import random |
7 |
import random |
|
|
8 |
|
| 9 |
# Trinity-specific paths |
| 10 |
import os |
| 11 |
tqt_modules = [] |
| 12 |
for m_path in sys.path: |
| 13 |
if os.path.exists(os.path.join(m_path, 'sip4_tqt')): |
| 14 |
m_sip_dir = os.path.join(m_path, 'sip4_tqt') |
| 15 |
tqt_modules.insert(0, m_sip_dir) |
| 16 |
if os.path.exists(os.path.join(m_path, 'python_tqt')): |
| 17 |
m_pyqt_dir = os.path.join(m_path, 'python_tqt') |
| 18 |
tqt_modules.insert(0, m_pyqt_dir) |
| 19 |
for m_path in tqt_modules: |
| 20 |
sys.path.insert(0, m_path) |
| 21 |
|
| 8 |
import qt |
22 |
import qt |
| 9 |
|
23 |
|
| 10 |
|
24 |
|
|
Lines 277-283
class GameBoard(qt.TQWidget):
Link Here
|
| 277 |
|
291 |
|
| 278 |
quit = qt.TQPushButton("&Quit", self, "quit") |
292 |
quit = qt.TQPushButton("&Quit", self, "quit") |
| 279 |
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) |
293 |
quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold)) |
| 280 |
self.connect(quit, qt.SIGNAL("clicked()"), qt.qApp, qt.SLOT("quit()")) |
294 |
self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()")) |
| 281 |
|
295 |
|
| 282 |
self.angle = LCDRange("ANGLE", self, "angle") |
296 |
self.angle = LCDRange("ANGLE", self, "angle") |
| 283 |
self.angle.setRange(5, 70) |
297 |
self.angle.setRange(5, 70) |
|
Lines 316-322
class GameBoard(qt.TQWidget):
Link Here
|
| 316 |
accel = qt.TQAccel(self) |
330 |
accel = qt.TQAccel(self) |
| 317 |
accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire) |
331 |
accel.connectItem(accel.insertItem(qt.TQt.Key_Enter), self.fire) |
| 318 |
accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire) |
332 |
accel.connectItem(accel.insertItem(qt.TQt.Key_Return), self.fire) |
| 319 |
accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.qApp, qt.SLOT("quit()")) |
333 |
accel.connectItem(accel.insertItem(qt.TQt.CTRL + qt.TQt.Key_Q), qt.tqApp, qt.SLOT("quit()")) |
| 320 |
|
334 |
|
| 321 |
grid = qt.TQGridLayout(self, 2, 2, 10) |
335 |
grid = qt.TQGridLayout(self, 2, 2, 10) |
| 322 |
grid.addWidget(quit, 0, 0) |
336 |
grid.addWidget(quit, 0, 0) |