Import LinuxCNC source tree
This commit is contained in:
55
share/qtvcp/panels/vismach_millturn/vismach_millturn.ui
Normal file
55
share/qtvcp/panels/vismach_millturn/vismach_millturn.ui
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="mainLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,79 @@
|
||||
############################
|
||||
# **** IMPORT SECTION **** #
|
||||
############################
|
||||
import sys
|
||||
from qtpy.QtCore import *
|
||||
from qtpy.QtGui import *
|
||||
from qtpy.QtWidgets import *
|
||||
from qtvcp.core import Status
|
||||
from qtvcp.lib.qt_vismach import millturn as MILL
|
||||
|
||||
###########################################
|
||||
# **** instantiate libraries section **** #
|
||||
###########################################
|
||||
STATUS = Status()
|
||||
###################################
|
||||
# **** HANDLER CLASS SECTION **** #
|
||||
###################################
|
||||
|
||||
class HandlerClass:
|
||||
|
||||
########################
|
||||
# **** INITIALIZE **** #
|
||||
########################
|
||||
# widgets allows access to widgets from the qtvcp files
|
||||
# at this point the widgets and hal pins are not instantiated
|
||||
def __init__(self, halcomp,widgets,paths):
|
||||
self.w = widgets
|
||||
|
||||
|
||||
##########################################
|
||||
# Special Functions called from QTVCP
|
||||
##########################################
|
||||
|
||||
# at this point:
|
||||
# the widgets are instantiated.
|
||||
# the HAL pins are built but HAL is not set ready
|
||||
def initialized__(self):
|
||||
self.machine = MILL.Window()
|
||||
self.w.mainLayout.addWidget(self.machine)
|
||||
|
||||
|
||||
########################
|
||||
# callbacks from STATUS #
|
||||
########################
|
||||
|
||||
#######################
|
||||
# callbacks from form #
|
||||
#######################
|
||||
|
||||
#####################
|
||||
# general functions #
|
||||
#####################
|
||||
|
||||
#####################
|
||||
# KEY BINDING CALLS #
|
||||
#####################
|
||||
|
||||
###########################
|
||||
# **** closing event **** #
|
||||
###########################
|
||||
def closing_cleanup__(self):
|
||||
self.machine.cleanup()
|
||||
|
||||
##############################
|
||||
# required class boiler code #
|
||||
##############################
|
||||
|
||||
def __getitem__(self, item):
|
||||
return getattr(self, item)
|
||||
def __setitem__(self, item, value):
|
||||
return setattr(self, item, value)
|
||||
|
||||
|
||||
################################
|
||||
# required handler boiler code #
|
||||
################################
|
||||
|
||||
def get_handlers(halcomp,widgets,paths):
|
||||
return [HandlerClass(halcomp,widgets,paths)]
|
||||
Reference in New Issue
Block a user