Created
September 1, 2011 03:43
-
-
Save stevennathaniel/1185404 to your computer and use it in GitHub Desktop.
Python Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# GUI Common Class Definitions | |
# | |
from Common71 import * | |
class GUICommon: | |
def turnon(self): | |
self.status = STATUS_ON | |
if not self.blink: self.update() | |
def turnoff(self): | |
self.status = STATUS_OFF | |
if not self.blink: self.update() | |
def alarm(self): | |
self.status = STATUS_ALARM | |
if not self.blink: self.update() | |
def warn(self): | |
self.status = STATUS_WARN | |
if not self.blink: self.update() | |
def set(self, color): | |
self.status = STATUS_SET | |
self.specialColor = color | |
self.update() | |
def blinkon(self): | |
if not self.blink: | |
self.blink = 1 | |
self.onState = self.status | |
self.update() | |
def blinkoff(self): | |
if self.blink: | |
self.blink = 0 | |
self.status = self.onState | |
self.onState = None | |
self.on = 0 | |
self.update() | |
def blinkstate(self, blinkstate): | |
if blinkstate: | |
self.blinkon() | |
else: | |
self.blinkoff() | |
#The following define drawing vertices for various | |
#graphical element | |
ARROW_HEAD_VERTICES = [ | |
['x-d', 'y-d', 'x', 'y+d', 'x+d', 'y-d', 'x-d', 'y-d'], | |
['x', 'y-d', 'x-d', 'y+d', 'x+d', 'y+d', 'x', 'y-d'], | |
['x-d', 'y-d', 'x+d', 'y', 'x-d', 'y+d', 'x-d', 'y-d'], | |
['x-d', 'y', 'x+d', 'y+d', 'x+d', 'y-d', 'x-d', 'y']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
C:\Users\Dell\PycharmProjects\pythonProject1\venv\Scripts\python.exe C:/Users/Dell/PycharmProjects/pythonProject1/GUI2.py
Traceback (most recent call last):
File "C:/Users/Dell/PycharmProjects/pythonProject1/GUI2.py", line 5, in
from Common71 import *
(((ModuleNotFoundError: No module named 'Common71')))
Process finished with exit code 1