Skip to content

Commit 1c346d4

Browse files
committed
add the commit of code
1 parent e5b05e4 commit 1c346d4

File tree

5 files changed

+25
-62
lines changed

5 files changed

+25
-62
lines changed

Pyquino.e4p

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
33
<!-- eric project file for project Pyquino -->
4-
<!-- Saved: 2017-07-14, 14:01:37 -->
4+
<!-- Saved: 2017-08-11, 12:13:43 -->
55
<!-- Copyright (C) 2017 you-sheng, -->
66
<Project version="5.1">
77
<Language>en_US</Language>
@@ -13,21 +13,23 @@
1313
<Email></Email>
1414
<Eol index="0"/>
1515
<Sources>
16+
<Source>core/GraphyViewModule.py</Source>
17+
<Source>core/RightClick.py</Source>
1618
<Source>core/Ui_mainwindow.py</Source>
17-
<Source>core/Ui_mainwindow2.py</Source>
19+
<Source>core/Ui_settingForm.py</Source>
1820
<Source>core/__init__.py</Source>
1921
<Source>core/gcode/gcodeParser.py</Source>
2022
<Source>core/graphy/Ui_graphy.py</Source>
2123
<Source>core/graphy/__init__.py</Source>
2224
<Source>core/graphy/graphy.py</Source>
23-
<Source>core/graphy_test.py</Source>
2425
<Source>core/info.py</Source>
2526
<Source>core/mainwindow.py</Source>
2627
<Source>core/monitor/Ui_machine_mointor.py</Source>
2728
<Source>core/monitor/__init__.py</Source>
2829
<Source>core/monitor/machine_mointor.py</Source>
2930
<Source>core/serialportcontext.py</Source>
3031
<Source>core/serialportedittext.py</Source>
32+
<Source>core/settingForm.py</Source>
3133
<Source>core/vrep/Ui_vrep_setting.py</Source>
3234
<Source>core/vrep/vrep_setting.py</Source>
3335
<Source>core/vrep/vrep_test.py</Source>
@@ -44,10 +46,10 @@
4446
<Source>testCode/test.py</Source>
4547
</Sources>
4648
<Forms>
49+
<Form>core/settingForm.ui</Form>
4750
<Form>core/gcode/mainwindow.ui</Form>
4851
<Form>core/graphy/graphy.ui</Form>
4952
<Form>core/mainwindow.ui</Form>
50-
<Form>core/mainwindow2.ui</Form>
5153
<Form>core/monitor/machine_mointor.ui</Form>
5254
<Form>core/monitor/mainwindow.ui</Form>
5355
<Form>core/vrep/vrep_setting.ui</Form>

_eric6project/Pyquino.e4q

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
33
<!-- eric6 user project file for project Pyquino -->
4-
<!-- Saved: 2017-07-20, 15:08:10 -->
4+
<!-- Saved: 2017-11-19, 13:36:29 -->
55
<!-- Copyright (C) 2017 you-sheng, -->
66
<UserProject version="4.0"/>

_eric6project/Pyquino.e6t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE Tasks SYSTEM "Tasks-6.0.dtd">
33
<!-- eric6 tasks file for project Pyquino -->
4-
<!-- Saved: 2017-08-07, 20:28:58 -->
4+
<!-- Saved: 2017-11-19, 13:38:53 -->
55
<Tasks version="6.0">
66
<ProjectScanFilter></ProjectScanFilter>
7-
<Task priority="1" completed="False" type="1" uid="{2672eadf-84b3-48c4-ac30-d495eb0b856a}">
8-
<Summary>TODO: not implemented yet</Summary>
7+
<Task priority="1" completed="False" type="1" uid="{ffbfc3fe-6425-4797-be6e-85fc94452adc}">
8+
<Summary>TODO: context menu not yet</Summary>
99
<Description></Description>
10-
<Created>2017-08-07, 20:28:55</Created>
10+
<Created>2017-11-19, 13:38:50</Created>
1111
<Resource>
1212
<Filename>core/mainwindow.py</Filename>
13-
<Linenumber>424</Linenumber>
13+
<Linenumber>91</Linenumber>
1414
</Resource>
1515
</Task>
1616
</Tasks>

core/mainwindow.py

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,7 @@ def __init__(self, args, parent=None):
3232
super(MainWindow, self).__init__(parent)
3333
self.setupUi(self)
3434
rightClick(self)
35-
'''
36-
pal = QPalette()
37-
pal.setColor(QPalette.Background, QColor(125,125 ,125))
38-
39-
self.setAutoFillBackground(True)
40-
self.setPalette(pal)
41-
'''
42-
print(args)
4335
self.initForms()
44-
45-
#self.comboBoxBaud.setCurrentIndex(len(bauds) - 1)
46-
4736

4837
def initForms(self):
4938

@@ -54,48 +43,39 @@ def initForms(self):
5443
self.comboBoxPort.addItems(ports)
5544
print(ports)
5645
else:
57-
#todo:scan system serial port
5846
self.__scanSerialPorts__()
59-
47+
# setting bauds and get serial port
6048
bauds = ["50","75","134","110","150","200","300","600","1200","2400","4800","9600","14400","19200","38400","56000","57600",
6149
"115200"]
6250
self.comboBoxBaud.addItems(bauds)
6351
self.comboBoxBaud.setCurrentIndex(len(bauds) - 1)
64-
52+
# setting Checkbox
6553
checks = ["None","Odd","Even","Zero","One"]
6654
self.comboBoxCheckSum.addItems(checks)
6755
self.comboBoxCheckSum.setCurrentIndex(len(checks) - 1)
68-
56+
# setting start Bit of the hex
6957
bits = ["4 Bits", "5 Bits","6 Bits", "7 Bits", "8 Bits"]
7058
self.comboBoxBits.addItems(bits)
7159
self.comboBoxBits.setCurrentIndex(len(bits) - 1)
72-
60+
#setting stop bit of the box
7361
stopbits = ["1 Bit","1.5 Bits","2 Bits"];
7462
self.comboBoxStopBits.addItems(stopbits)
7563
self.comboBoxStopBits.setCurrentIndex(0)
76-
77-
78-
#self._auto_send_signal.connect(self.__auto_send_update__)
79-
64+
# get the comboBox get number
8065
port = self.comboBoxPort.currentText()
8166
baud = int("%s" % self.comboBoxBaud.currentText(), 10)
8267
self._serial_context_ = serialportcontext.SerialPortContext(port = port,baud = baud)
8368

84-
# self.lineEditReceivedCounts.setText("0")
85-
# self.lineEditSentCounts.setText("0")
8669
self.pushButtonOpenSerial.clicked.connect(self.__open_serial_port__)
87-
# self.pushButtonClearRecvArea.clicked.connect(self.__clear_recv_area__)
8870
self.pushButtonSendData.clicked.connect(self.__send_data__)
8971
self._receive_signal.connect(self.__display_recv_data__)
90-
# self.pushButtonOpenRecvFile.clicked.connect(self.__save_recv_file__)
9172
self.actionSend.triggered.connect(self.__open_send_file__)
9273
self.actionOpenGL.triggered.connect(self.__opengl__)
9374
self.actionVrep.triggered.connect(self.__teset__)
9475
self._send_file_data = ''
9576
self.numberx = 0
9677
self.numbery = 0
9778
self.numberz = 0
98-
#self.__control__()
9979
self.actionControl.triggered.connect(self.__control__)
10080

10181
##machine_control button setting
@@ -107,9 +87,8 @@ def initForms(self):
10787
self.zupButton.clicked.connect(self.__zupButton__)
10888
self.zdownButton.clicked.connect(self.__zdownButton__)
10989
self.graphyViewModule.insertWidget(1, graphy())
110-
# def __auto_send_update__(self):
111-
# self.lineEditSentCounts.setText("%d" % self._serial_context_.getSendCounts())
11290

91+
#TODO: context menu not yet
11392
@pyqtSlot(QPoint)
11493
def on_treeWidget_context_menu(self, point):
11594
action = self.popMenu_treeWidget.exec_(self.treeWidget.mapToGlobal(point))
@@ -126,14 +105,7 @@ def on_treeWidget_context_menu(self, point):
126105
except:
127106
print("No select")
128107
elif action == self.action_treeWidget_send:
129-
try :
130-
## 0807 not yet to do
131-
data = 'asa'
132-
if self._serial_context_.isRunning():
133-
if len(data) > 0: self._serial_context_.send(data, 0)
134-
print(self.tree.currentItem().takeChildren())
135-
except:
136-
pass
108+
self.graphyViewModule()
137109

138110

139111
def reflesh(self):
@@ -177,7 +149,7 @@ def __control__(self):
177149
print("control open")
178150
dlg = Machine()
179151
dlg.show()
180-
if dlg.exec_(): pass
152+
dlg.exec_()
181153

182154
def __open_send_file__(self):
183155
filename = QFileDialog.getOpenFileName(self, caption="Open Send File")
@@ -326,7 +298,7 @@ def __open_serial_port__(self):
326298
self.pushButtonOpenSerial.setText(u'close')
327299
except Exception as e:
328300
print("error")
329-
#QtGui.QMessageBox.critical(self,u"打开端口",u"打开端口失败,请检查!")
301+
#QtGui.QMessageBox.critical(self,u"Open port",u"please check the port!")
330302

331303
def __clear_recv_area__(self): self.textEditReceived.clear()
332304
def __clear_send_area__(self): self.textEditSent.clear()
@@ -411,20 +383,6 @@ def on_homeButton_clicked(self):
411383

412384

413385

414-
@pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
415-
def on_tree_currentItemChanged(self, current, previous):
416-
"""
417-
Slot documentation goes here.
418-
419-
@param current DESCRIPTION
420-
@type QTreeWidgetItem
421-
@param previous DESCRIPTION
422-
@type QTreeWidgetItem
423-
"""
424-
# TODO: not implemented yet
425-
#print(current.text(0))
426-
427-
428386
@pyqtSlot(QTreeWidgetItem, int)
429387
def on_tree_itemChanged(self, item, column):
430388
if column==0:

core/mainwindow.ui

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,11 +749,14 @@
749749
</rect>
750750
</property>
751751
<property name="text">
752-
<string>send</string>
752+
<string>&amp;Send</string>
753753
</property>
754754
<property name="autoDefault">
755755
<bool>true</bool>
756756
</property>
757+
<property name="default">
758+
<bool>false</bool>
759+
</property>
757760
</widget>
758761
<widget class="QTextEdit" name="textEditReceived">
759762
<property name="geometry">

0 commit comments

Comments
 (0)