summaryrefslogtreecommitdiffstats
path: root/python/pyqt/examples3/bigtable.py
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-14 19:47:20 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-14 19:47:20 +0000
commit875ae8e38bc3663e5057ca910e7ebe4b2994edb9 (patch)
treeddd3b3bc4d6f0343bae986aebbf9555c20f8e558 /python/pyqt/examples3/bigtable.py
parentcb61a0436524f8ceba31db51ce3f1c5d4afbbb0e (diff)
downloadtdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.tar.gz
tdebindings-875ae8e38bc3663e5057ca910e7ebe4b2994edb9.zip
Updated python directory
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1175349 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pyqt/examples3/bigtable.py')
-rwxr-xr-xpython/pyqt/examples3/bigtable.py72
1 files changed, 0 insertions, 72 deletions
diff --git a/python/pyqt/examples3/bigtable.py b/python/pyqt/examples3/bigtable.py
deleted file mode 100755
index 2c0b46a2..00000000
--- a/python/pyqt/examples3/bigtable.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-
-#****************************************************************************
-#** $Id$
-#**
-#** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved.
-#**
-#** This file is part of an example program for PyQt. This example
-#** program may be used, distributed and modified without limitation.
-#**
-#*****************************************************************************/
-
-import sys
-import os
-from qt import *
-from qttable import *
-
-TRUE = 1
-FALSE = 0
-
-numRows = 1000000
-numCols = 1000000
-
-class MyTable(QTable):
- def __init__(self, r, c):
- QTable.__init__(self, r, c)
- self.items = {}
- self.widgets = {}
- self.setCaption("This is a big table with 1.000.000x1.000.000 cells...")
- self.setLeftMargin(self.fontMetrics().width("W999999W"))
-
- def resizeData(self, v):
- return
-
- def item(self, r, c):
- try:
- return self.items[self.indexOf(r, c)]
- except KeyError:
- return None
-
- def setItem(self, r, c, i):
- self.items[self.indexOf(r, c)] = i
-
- def clearCell(self, r, c):
- try:
- del self.items[self.indexOf(r, c)]
- except KeyError:
- pass
-
- def insertWidget(self, r, c, w):
- self.widgets[self.indexOf(r, c)] = w
-
- def cellWidget(self, r, c):
- try:
- return self.widgets[self.indexOf(r, c)]
- except KeyError:
- return None
-
- def clearCellWidget(self, r, c):
- try:
- del self.widgets[self.indexOf(r, c)]
- except KeyError:
- pass
-
-
-if __name__ == '__main__':
- app = QApplication(sys.argv)
-
- table = MyTable(numRows, numCols)
- app.setMainWidget(table)
- table.show()
- app.exec_loop()