summaryrefslogtreecommitdiffstats
path: root/examples3/biff.py
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-07-28 15:46:19 +0000
committeraneejit1 <aneejit1@gmail.com>2022-07-30 17:54:15 +0000
commite602246539fd7435aaeb440fcb7f852c92c8426b (patch)
tree35e09f5d93c67158e6c1160d6d9b27ae8a0bf966 /examples3/biff.py
parentb34531364d5c0d3be7056d87011afd8bd538a0e7 (diff)
downloadpytqt-e602246539fd7435aaeb440fcb7f852c92c8426b.tar.gz
pytqt-e602246539fd7435aaeb440fcb7f852c92c8426b.zip
Remove Qt V2 support and example files
Build files for pyuic2 have been removed along with the examples for version 2 of Qt and the build/configure scripts have been amended accordingly. The "examples3" directory has been renamed to just "examples". Signed-off-by: aneejit1 <aneejit1@gmail.com>
Diffstat (limited to 'examples3/biff.py')
-rwxr-xr-xexamples3/biff.py173
1 files changed, 0 insertions, 173 deletions
diff --git a/examples3/biff.py b/examples3/biff.py
deleted file mode 100755
index abee0cf..0000000
--- a/examples3/biff.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys, string
-from python_tqt.qt import *
-
-
-if TQT_VERSION < 0x030100:
- print("This example requires TQt v3.1.0 or later.")
- sys.exit(1)
-
-
-FALSE = 0
-TRUE = 1
-
-hasmail_bmp_data = [
-"48 48 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"................................................",
-".............................++++++++++.........",
-".............................++++++++++.........",
-"........................++++.+++.+.+.++.........",
-"......................++++.++++.+.+.+++.........",
-".....................+++.....+++.+.+.++.........",
-"....................++.......++.+.+.+++.........",
-"...................++........++++++++++.........",
-"..................++.........++++++++++.........",
-".................++..........+++..+.............",
-"................++...........+++..+.............",
-"...............++............+++.++.............",
-"..............+++++++........++++++.............",
-".............++++++++++......++++++.............",
-"............+++......+++.....++++.+.............",
-"...........+++.........++....+++..+.............",
-"...........++..........++...++++..+.............",
-"..........++............++.+++++..+.............",
-"..........++............++++++++..+.............",
-".........++....++++++....+++.+++..+.............",
-".........++......++......++..+++..+.............",
-".........++..............++..+++..+.............",
-".........++..............++..+++..+.............",
-".........++..............++..++...+.............",
-"+++++++..++.+.+..+..+.+..++.......+..+++++++++++",
-".........++.+++.+.+.+.+..++.......+.............",
-".........++.+.+.+++.+.+..++.......+.............",
-".........++.+.+.+.+.+.+..++......++.............",
-".........++.+.+.+.+.+.++.++.....++..............",
-".........++..............++....++...............",
-"..+.+.+..++..............++...++..+.+.+.+.+.+.+.",
-".+.+.+.+.++..............++..++..+.+.+.+.+.+.+..",
-"..+.+.+..++..............++.++..+.+.+.+.+.+.+.+.",
-".+.+.+.+.++..............+++++.+.+.+.+.+.+.+.+..",
-"..+.+.+..+++++++++++++++++++.++.+.+.+.+.+.+.+.+.",
-".+.+.+.+..+++++++++++++++++..+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+..........+...+.....++.+.+.+.+.+.+.+.+.",
-".+.+.+.+.+.+.+.+.+.+...+.....+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+.+.+.+.+.++...+.....++.+.+.+.+.+.+.+.+.",
-".+.+.+.+.+.+.+.+.+.+...+.....+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+.+.+.+.+.++...+.....++.+.+.+.+.+.+.+.+.",
-".+.+.+.+.+.+.+.+.+.+...+.....+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+.+.+.+.+.++...+....+.+.+.+.+.+.+.+.+.+.",
-".+.+.+.+.+.+.+.+.+.+...+...+.+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+.+.+.+.+.+.+..+..+.+.+.+.+.+.+.+.+.+.+.",
-".+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..",
-"..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...",
-"................................................"
-]
-
-nomail_bmp_data = [
-"48 48 3 1",
-" c None",
-". c #FFFFFF",
-"+ c #000000",
-"................................................",
-"................................................",
-"................................................",
-".........................++++...................",
-".......................++++++++.................",
-".....................++++....+++................",
-"....................+++........++...............",
-"...................++...........++..............",
-"..................++............++..............",
-".................++..............++.......+.....",
-"................++...............++......++.....",
-"...............++................++.....+++.....",
-"..............+++++++...........+++....++++.....",
-".............++++++++++........++++...+++++.....",
-"............+++......+++......+++.+..++++++.....",
-"...........+++.........++....+++..+.+++.+++.....",
-"...........++..........++...+++...++++..+++.....",
-"..........++............++.+++...++++...++......",
-"..........++............+++++...++++............",
-".........++....++++++....+++...++++.............",
-".........++......++......++...+++.+.............",
-".........++..............++...+++.+.............",
-".........++..............++...++..+.............",
-".........++..............++.......+.............",
-"+++++++..++..............++.......+..+++++++++++",
-".........++..............++.......+.............",
-".........++..............++.......+.............",
-".........++..............++......++.............",
-".........++..............++.....++..............",
-".........++..............++....++...............",
-".........++..............++...++................",
-".........++..............++..++.................",
-".........++..............++.++..................",
-".........++..............+++++..................",
-".........+++++++++++++++++++.+..................",
-"..........+++++++++++++++++..+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"...................+...+.....+..................",
-"+++.++++++++++.+.+++...+..+++++++++++.++...+++++",
-"+.+++..+++.+.+++++.++..+.++.+++..+..+.++.+.++++.",
-".++...+.....++...+...+++++++....+....++++++...+.",
-"++++++++++++++++++++++++++++++++++++++++++++++++"
-]
-
-class Biff(TQWidget):
- def __init__(self):
- TQWidget.__init__(self, None, "Biff - example application")
-
- mail = os.getenv("MAIL")
- fi = TQFileInfo(mail);
- if not fi.exists():
- s = "/var/spool/mail/"+os.getenv("USER")
- fi.setFile(s)
-
- if fi.exists():
- self.mailbox = fi.absFilePath()
- self.startTimer(1000)
-
- self.setMinimumSize(48, 48)
- self.setMaximumSize(48, 48)
- self.resize(48, 48)
-
- self.hasNewMail = TQPixmap(hasmail_bmp_data)
- self.noNewMail = TQPixmap(nomail_bmp_data)
-
- self.gotMail = FALSE
- self.lastModified = fi.lastModified()
-
- def timerEvent(self, te):
- fi = TQFileInfo(self.mailbox)
- newState = ( fi.lastModified().toTime_t() != self.lastModified.toTime_t() and fi.lastModified().toTime_t() > fi.lastRead().toTime_t())
- if newState != self.gotMail:
- if self.gotMail == TRUE:
- self.lastModified = fi.lastModified()
- self.gotMail = newState
- self.repaint(FALSE)
-
- def paintEvent(self, pe):
- if self.gotMail:
- bitBlt(self, 0, 0, self.hasNewMail)
- else:
- bitBlt(self, 0, 0, self.noNewMail)
-
- def mousePressEvent(self, me):
- fi = TQFileInfo(self.mailbox)
- lastModified = fi.lastModified()
-
-
-a = TQApplication(sys.argv)
-b = Biff()
-a.setMainWidget(b)
-b.show()
-a.exec_loop()