重构 , 增加可读性 及 伸缩菜单功能
This commit is contained in:
parent
0677a1ae2a
commit
468f4944bc
46 changed files with 1248 additions and 3162 deletions
|
@ -1,215 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
description: 抽象类模块
|
||||
|
||||
Created on 2018年7月7日
|
||||
|
||||
email: 625781186@qq.com
|
||||
|
||||
'''
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
import traceback, sip
|
||||
|
||||
class SingeleWidget(QWidget):
|
||||
'''
|
||||
菜单条的每个框。
|
||||
'''
|
||||
#1
|
||||
def __init__(self, parent=None):
|
||||
'''
|
||||
_hideFlag__Button: 0 表明没有显示弹窗;1表示显示了弹窗。
|
||||
'''
|
||||
super(SingeleWidget, self).__init__(parent)
|
||||
|
||||
self._hideFlag__Button = 0
|
||||
self.m_menu = QWidget()
|
||||
self.setProperty("WID", "isTrue")
|
||||
self.setAttribute(Qt.WA_StyledBackground, True)
|
||||
print("W实例化")
|
||||
# self.setMaximumWidth(80)
|
||||
def _creatMenu(self, L_Name, parent):
|
||||
'''
|
||||
Main.py中被调用。把LX类实例化。
|
||||
'''
|
||||
# self.m_menu = L1(parent)
|
||||
print(L_Name, parent)
|
||||
self.m_menu = L_Name(parent)
|
||||
|
||||
def enterEvent(self, e):
|
||||
'''鼠标移入label后 , _hideFlag__Button=1,表明显示了弹窗。'''
|
||||
#设置菜单窗体的宽度
|
||||
self.m_menu.setMinimumWidth(self.width())
|
||||
self.m_menu.setMaximumWidth(self.width())
|
||||
|
||||
#我靠!
|
||||
a0 = self.mapToGlobal( QPoint( self.parent().x() , self.height()) )
|
||||
|
||||
self.m_menu.move(a0)
|
||||
|
||||
#设置table外容器的宽度
|
||||
if self.m_menu.tableWidget.rowCount()!=0:
|
||||
table = self.m_menu.tableWidget
|
||||
height = table.rowCount()*30
|
||||
table.parent().setMinimumHeight(height)
|
||||
table.parent().setMaximumHeight(height)
|
||||
# table.setMinimumHeight(height)
|
||||
# table.setMaximumHeight(height)
|
||||
self.m_menu.show()
|
||||
|
||||
#表明显示了弹窗
|
||||
self._hideFlag__Button = 1
|
||||
|
||||
def leaveEvent(self, e):
|
||||
'''
|
||||
离开时判断是否显示了窗体,80ms后发射到_jugement去检测。
|
||||
'''
|
||||
if self._hideFlag__Button==1: #显示了窗体
|
||||
QTimer.singleShot(80, self._jugement)
|
||||
|
||||
def _jugement(self):
|
||||
'''
|
||||
离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。
|
||||
'''
|
||||
if self.m_menu._hideFlag__Menu!=1:
|
||||
self.m_menu.hide()
|
||||
self.m_menu.close()
|
||||
self._hideFlag__Button=0
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
#========================================================
|
||||
class BaseMenuWidget(QWidget):
|
||||
#2
|
||||
'''
|
||||
下拉菜单的基类。 被LX继承,父类在18L 实现。
|
||||
'''
|
||||
def __init__(self, parent=None):
|
||||
'''
|
||||
_hideFlag__Menu: 0时隐藏,1时显示;
|
||||
'''
|
||||
|
||||
super(BaseMenuWidget, self).__init__(parent)
|
||||
#无边框,隐藏任务栏;
|
||||
self.setWindowFlags( Qt.FramelessWindowHint|Qt.Tool|Qt.Widget)
|
||||
self.setupUi(self)
|
||||
self._hideFlag__Menu = 0
|
||||
print("L实例化")
|
||||
|
||||
def enterEvent(self, e):
|
||||
#表明进入了弹窗
|
||||
self._hideFlag__Menu=1
|
||||
|
||||
def leaveEvent(self, e):
|
||||
self._hideFlag__Menu=0
|
||||
self.hide()
|
||||
for i in self.children():
|
||||
if isinstance(i, BaseTable):#判断对象是否是tablewiget, 是则隐藏选中item颜色
|
||||
i.clearSelection()
|
||||
|
||||
def _showSomething(self, **kwgs):
|
||||
MW = self.parent()
|
||||
|
||||
if MW.objectName()=="MainWindow":
|
||||
|
||||
try:
|
||||
# MW.Buttom_Vbox.setParent(None)#这是个严重的问题,如果用这个函数会造成78L无法成功
|
||||
_parent=MW.Buttom_Vbox.parent()#获取下面窗体对象的指针
|
||||
|
||||
# ! 目前的安排是离开当前页则释放对象 , 要求页面数据不需要保留才可以。
|
||||
for obj in _parent.children():
|
||||
print(obj)
|
||||
sip.delete(obj)
|
||||
|
||||
MW.Buttom_Vbox = QtWidgets.QVBoxLayout(_parent)
|
||||
MW.Buttom_Vbox.setContentsMargins(0, 0, 0, 0)
|
||||
MW.Buttom_Vbox.setSpacing(0)
|
||||
MW.Buttom_Vbox.setObjectName("Buttom_Vbox")
|
||||
|
||||
except:
|
||||
showERROR()
|
||||
|
||||
# elif msg==QMessageBox.No:
|
||||
# pass
|
||||
# else:
|
||||
# showERROR()
|
||||
def _deleteSomething(self):
|
||||
pass
|
||||
#====================================================
|
||||
class BaseButton(QPushButton):
|
||||
#1
|
||||
'''
|
||||
主菜单的按钮的样式。
|
||||
'''
|
||||
def __init__(self, parent=None):
|
||||
|
||||
super(BaseButton, self).__init__(parent)
|
||||
|
||||
# self.setMinimumWidth(50)
|
||||
# self.setMaximumWidth(80)
|
||||
|
||||
self.setMaximumWidth(80)
|
||||
self.setMinimumHeight(self.width())#保证是个正方形
|
||||
self.setFocusPolicy(Qt.NoFocus)#无焦点,防止背景卡色
|
||||
self.setFlat(True)#无凸起阴影
|
||||
|
||||
self.clicked.connect(self._todo)
|
||||
|
||||
self.png = QLabel(self)
|
||||
print("B实例化")
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
'''
|
||||
每个按钮要重新实现的功能函数。
|
||||
'''
|
||||
pass
|
||||
|
||||
def _createLabel(self, path):
|
||||
'''
|
||||
path:主菜单图标的路径。
|
||||
'''
|
||||
self.png.resize(self.size())
|
||||
self.png_pixmap = QPixmap(path)
|
||||
self.png.setPixmap(self.png_pixmap)
|
||||
self.png.setScaledContents(True)
|
||||
pass
|
||||
def resizeEvent(self, e):
|
||||
self.setMinimumHeight(self.width())
|
||||
self.png.resize(self.size())
|
||||
|
||||
#==================================================
|
||||
class BaseTable(QTableWidget):
|
||||
#3
|
||||
'''
|
||||
下拉菜单中Table的样式。
|
||||
'''
|
||||
def __init__(self, parent=None):
|
||||
super(BaseTable, self).__init__(parent)
|
||||
|
||||
self.horizontalHeader().setSectionResizeMode(3)#列宽设置
|
||||
|
||||
self.horizontalHeader().setStretchLastSection(True); #充满列宽
|
||||
|
||||
self.verticalHeader().setSectionResizeMode(1)#行高设置
|
||||
|
||||
self.verticalHeader().setStretchLastSection(True); #充满行高
|
||||
|
||||
self.setEditTriggers(QAbstractItemView.NoEditTriggers); #只读
|
||||
|
||||
self.itemClicked.connect(self.parent()._showSomething)#Go 66L;
|
||||
|
||||
#关闭滑动条
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
|
||||
print("T实例化")
|
||||
|
||||
def showERROR():
|
||||
errmsg = traceback.format_exc()
|
||||
QMessageBox.warning(QWidget(), '请确认', errmsg,
|
||||
QMessageBox.Ok)
|
|
@ -1,268 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu.BaseElement</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.BaseElement</h1>
|
||||
<p>
|
||||
description: 抽象类模块
|
||||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseButton">BaseButton</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget">BaseMenuWidget</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseTable">BaseTable</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget">SingeleWidget</a></td>
|
||||
<td>菜单条的每个框。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#showERROR">showERROR</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseButton" ID="BaseButton"></a>
|
||||
<h2>BaseButton</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QPushButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseButton.__init__">BaseButton</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton._createLabel">_createLabel</a></td>
|
||||
<td>path:主菜单图标的路径。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton._todo">_todo</a></td>
|
||||
<td>每个按钮要重新实现的功能函数。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton.resizeEvent">resizeEvent</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseButton.__init__" ID="BaseButton.__init__"></a>
|
||||
<h4>BaseButton (Constructor)</h4>
|
||||
<b>BaseButton</b>(<i>parent=None</i>)
|
||||
<a NAME="BaseButton._createLabel" ID="BaseButton._createLabel"></a>
|
||||
<h4>BaseButton._createLabel</h4>
|
||||
<b>_createLabel</b>(<i>path</i>)
|
||||
<p>
|
||||
path:主菜单图标的路径。
|
||||
</p><a NAME="BaseButton._todo" ID="BaseButton._todo"></a>
|
||||
<h4>BaseButton._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
<p>
|
||||
每个按钮要重新实现的功能函数。
|
||||
</p><a NAME="BaseButton.resizeEvent" ID="BaseButton.resizeEvent"></a>
|
||||
<h4>BaseButton.resizeEvent</h4>
|
||||
<b>resizeEvent</b>(<i>e</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseMenuWidget" ID="BaseMenuWidget"></a>
|
||||
<h2>BaseMenuWidget</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseMenuWidget.__init__">BaseMenuWidget</a></td>
|
||||
<td>_hideFlag__Menu: 0时隐藏,1时显示;</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget._deleteSomething">_deleteSomething</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget.enterEvent">enterEvent</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget.leaveEvent">leaveEvent</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseMenuWidget.__init__" ID="BaseMenuWidget.__init__"></a>
|
||||
<h4>BaseMenuWidget (Constructor)</h4>
|
||||
<b>BaseMenuWidget</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
_hideFlag__Menu: 0时隐藏,1时显示;
|
||||
</p><a NAME="BaseMenuWidget._deleteSomething" ID="BaseMenuWidget._deleteSomething"></a>
|
||||
<h4>BaseMenuWidget._deleteSomething</h4>
|
||||
<b>_deleteSomething</b>(<i></i>)
|
||||
<a NAME="BaseMenuWidget._showSomething" ID="BaseMenuWidget._showSomething"></a>
|
||||
<h4>BaseMenuWidget._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>**kwgs</i>)
|
||||
<a NAME="BaseMenuWidget.enterEvent" ID="BaseMenuWidget.enterEvent"></a>
|
||||
<h4>BaseMenuWidget.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
<a NAME="BaseMenuWidget.leaveEvent" ID="BaseMenuWidget.leaveEvent"></a>
|
||||
<h4>BaseMenuWidget.leaveEvent</h4>
|
||||
<b>leaveEvent</b>(<i>e</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseTable" ID="BaseTable"></a>
|
||||
<h2>BaseTable</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QTableWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseTable.__init__">BaseTable</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseTable.__init__" ID="BaseTable.__init__"></a>
|
||||
<h4>BaseTable (Constructor)</h4>
|
||||
<b>BaseTable</b>(<i>parent=None</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="SingeleWidget" ID="SingeleWidget"></a>
|
||||
<h2>SingeleWidget</h2>
|
||||
<p>
|
||||
菜单条的每个框。
|
||||
</p>
|
||||
<h3>Derived from</h3>
|
||||
QWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#SingeleWidget.__init__">SingeleWidget</a></td>
|
||||
<td>_hideFlag__Button: 0 表明没有显示弹窗;1表示显示了弹窗。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget._creatMenu">_creatMenu</a></td>
|
||||
<td>Main.py中被调用。把LX类实例化。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget._jugement">_jugement</a></td>
|
||||
<td>离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget.enterEvent">enterEvent</a></td>
|
||||
<td>鼠标移入label后 , _hideFlag__Button=1,表明显示了弹窗。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget.leaveEvent">leaveEvent</a></td>
|
||||
<td>离开时判断是否显示了窗体,80ms后发射到_jugement去检测。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="SingeleWidget.__init__" ID="SingeleWidget.__init__"></a>
|
||||
<h4>SingeleWidget (Constructor)</h4>
|
||||
<b>SingeleWidget</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
_hideFlag__Button: 0 表明没有显示弹窗;1表示显示了弹窗。
|
||||
</p><a NAME="SingeleWidget._creatMenu" ID="SingeleWidget._creatMenu"></a>
|
||||
<h4>SingeleWidget._creatMenu</h4>
|
||||
<b>_creatMenu</b>(<i>L_Name, parent</i>)
|
||||
<p>
|
||||
Main.py中被调用。把LX类实例化。
|
||||
</p><a NAME="SingeleWidget._jugement" ID="SingeleWidget._jugement"></a>
|
||||
<h4>SingeleWidget._jugement</h4>
|
||||
<b>_jugement</b>(<i></i>)
|
||||
<p>
|
||||
离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。
|
||||
</p><a NAME="SingeleWidget.enterEvent" ID="SingeleWidget.enterEvent"></a>
|
||||
<h4>SingeleWidget.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
<p>
|
||||
鼠标移入label后 , _hideFlag__Button=1,表明显示了弹窗。
|
||||
</p><a NAME="SingeleWidget.leaveEvent" ID="SingeleWidget.leaveEvent"></a>
|
||||
<h4>SingeleWidget.leaveEvent</h4>
|
||||
<b>leaveEvent</b>(<i>e</i>)
|
||||
<p>
|
||||
离开时判断是否显示了窗体,80ms后发射到_jugement去检测。
|
||||
</p>
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="showERROR" ID="showERROR"></a>
|
||||
<h2>showERROR</h2>
|
||||
<b>showERROR</b>(<i></i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,252 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.BaseElement</h1>
|
||||
<p>
|
||||
description: 抽象类模块
|
||||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseButton">BaseButton</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget">BaseMenuWidget</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseTable">BaseTable</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget">SingeleWidget</a></td>
|
||||
<td>菜单条的每个框。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#showERROR">showERROR</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseButton" ID="BaseButton"></a>
|
||||
<h2>BaseButton</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QPushButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseButton.__init__">BaseButton</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton._createLabel">_createLabel</a></td>
|
||||
<td>path:主菜单图标的路径。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton._todo">_todo</a></td>
|
||||
<td>每个按钮要重新实现的功能函数。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseButton.resizeEvent">resizeEvent</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseButton.__init__" ID="BaseButton.__init__"></a>
|
||||
<h4>BaseButton (Constructor)</h4>
|
||||
<b>BaseButton</b>(<i>parent=None</i>)
|
||||
<a NAME="BaseButton._createLabel" ID="BaseButton._createLabel"></a>
|
||||
<h4>BaseButton._createLabel</h4>
|
||||
<b>_createLabel</b>(<i>path</i>)
|
||||
<p>
|
||||
path:主菜单图标的路径。
|
||||
</p><a NAME="BaseButton._todo" ID="BaseButton._todo"></a>
|
||||
<h4>BaseButton._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
<p>
|
||||
每个按钮要重新实现的功能函数。
|
||||
</p><a NAME="BaseButton.resizeEvent" ID="BaseButton.resizeEvent"></a>
|
||||
<h4>BaseButton.resizeEvent</h4>
|
||||
<b>resizeEvent</b>(<i>e</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseMenuWidget" ID="BaseMenuWidget"></a>
|
||||
<h2>BaseMenuWidget</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseMenuWidget.__init__">BaseMenuWidget</a></td>
|
||||
<td>_hideFlag__Menu: 0时隐藏,1时显示;</td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget._deleteSomething">_deleteSomething</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget.enterEvent">enterEvent</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#BaseMenuWidget.leaveEvent">leaveEvent</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseMenuWidget.__init__" ID="BaseMenuWidget.__init__"></a>
|
||||
<h4>BaseMenuWidget (Constructor)</h4>
|
||||
<b>BaseMenuWidget</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
_hideFlag__Menu: 0时隐藏,1时显示;
|
||||
</p><a NAME="BaseMenuWidget._deleteSomething" ID="BaseMenuWidget._deleteSomething"></a>
|
||||
<h4>BaseMenuWidget._deleteSomething</h4>
|
||||
<b>_deleteSomething</b>(<i></i>)
|
||||
<a NAME="BaseMenuWidget._showSomething" ID="BaseMenuWidget._showSomething"></a>
|
||||
<h4>BaseMenuWidget._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>**kwgs</i>)
|
||||
<a NAME="BaseMenuWidget.enterEvent" ID="BaseMenuWidget.enterEvent"></a>
|
||||
<h4>BaseMenuWidget.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
<a NAME="BaseMenuWidget.leaveEvent" ID="BaseMenuWidget.leaveEvent"></a>
|
||||
<h4>BaseMenuWidget.leaveEvent</h4>
|
||||
<b>leaveEvent</b>(<i>e</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="BaseTable" ID="BaseTable"></a>
|
||||
<h2>BaseTable</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
QTableWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#BaseTable.__init__">BaseTable</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="BaseTable.__init__" ID="BaseTable.__init__"></a>
|
||||
<h4>BaseTable (Constructor)</h4>
|
||||
<b>BaseTable</b>(<i>parent=None</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="SingeleWidget" ID="SingeleWidget"></a>
|
||||
<h2>SingeleWidget</h2>
|
||||
<p>
|
||||
菜单条的每个框。
|
||||
</p>
|
||||
<h3>Derived from</h3>
|
||||
QWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#SingeleWidget.__init__">SingeleWidget</a></td>
|
||||
<td>_hideFlag__Button: 0 表明没有显示弹窗;1表示显示了弹窗。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget._creatMenu">_creatMenu</a></td>
|
||||
<td>Main.py中被调用。把LX类实例化。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget._jugement">_jugement</a></td>
|
||||
<td>离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget.enterEvent">enterEvent</a></td>
|
||||
<td>鼠标移入label后 , _hideFlag__Button=1,表明显示了弹窗。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#SingeleWidget.leaveEvent">leaveEvent</a></td>
|
||||
<td>离开时判断是否显示了窗体,80ms后发射到_jugement去检测。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="SingeleWidget.__init__" ID="SingeleWidget.__init__"></a>
|
||||
<h4>SingeleWidget (Constructor)</h4>
|
||||
<b>SingeleWidget</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
_hideFlag__Button: 0 表明没有显示弹窗;1表示显示了弹窗。
|
||||
</p><a NAME="SingeleWidget._creatMenu" ID="SingeleWidget._creatMenu"></a>
|
||||
<h4>SingeleWidget._creatMenu</h4>
|
||||
<b>_creatMenu</b>(<i>L_Name, parent</i>)
|
||||
<p>
|
||||
Main.py中被调用。把LX类实例化。
|
||||
</p><a NAME="SingeleWidget._jugement" ID="SingeleWidget._jugement"></a>
|
||||
<h4>SingeleWidget._jugement</h4>
|
||||
<b>_jugement</b>(<i></i>)
|
||||
<p>
|
||||
离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。
|
||||
</p><a NAME="SingeleWidget.enterEvent" ID="SingeleWidget.enterEvent"></a>
|
||||
<h4>SingeleWidget.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
<p>
|
||||
鼠标移入label后 , _hideFlag__Button=1,表明显示了弹窗。
|
||||
</p><a NAME="SingeleWidget.leaveEvent" ID="SingeleWidget.leaveEvent"></a>
|
||||
<h4>SingeleWidget.leaveEvent</h4>
|
||||
<b>leaveEvent</b>(<i>e</i>)
|
||||
<p>
|
||||
离开时判断是否显示了窗体,80ms后发射到_jugement去检测。
|
||||
</p>
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="showERROR" ID="showERROR"></a>
|
||||
<h2>showERROR</h2>
|
||||
<b>showERROR</b>(<i></i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,78 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu.CommonHelper</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.CommonHelper</h1>
|
||||
<p>
|
||||
读取CSS用模块。
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper">CommonHelper</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="CommonHelper" ID="CommonHelper"></a>
|
||||
<h2>CommonHelper</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
None
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper.__init__">CommonHelper</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper.readQss">readQss</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a NAME="CommonHelper.__init__" ID="CommonHelper.__init__"></a>
|
||||
<h4>CommonHelper (Constructor)</h4>
|
||||
<b>CommonHelper</b>(<i></i>)
|
||||
<a NAME="CommonHelper.readQss" ID="CommonHelper.readQss"></a>
|
||||
<h4>CommonHelper.readQss (static)</h4>
|
||||
<b>readQss</b>(<i></i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,62 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.CommonHelper</h1>
|
||||
<p>
|
||||
读取CSS用模块。
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper">CommonHelper</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="CommonHelper" ID="CommonHelper"></a>
|
||||
<h2>CommonHelper</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
None
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper.__init__">CommonHelper</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#CommonHelper.readQss">readQss</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a NAME="CommonHelper.__init__" ID="CommonHelper.__init__"></a>
|
||||
<h4>CommonHelper (Constructor)</h4>
|
||||
<b>CommonHelper</b>(<i></i>)
|
||||
<a NAME="CommonHelper.readQss" ID="CommonHelper.readQss"></a>
|
||||
<h4>CommonHelper.readQss (static)</h4>
|
||||
<b>readQss</b>(<i></i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,95 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu.Main</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.Main</h1>
|
||||
<p>
|
||||
主函数.
|
||||
</p><p>
|
||||
description: pyqt5悬浮下拉菜单
|
||||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#MainWindow">MainWindow</a></td>
|
||||
<td>Class documentation goes here.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="MainWindow" ID="MainWindow"></a>
|
||||
<h2>MainWindow</h2>
|
||||
<p>
|
||||
Class documentation goes here.
|
||||
</p>
|
||||
<h3>Derived from</h3>
|
||||
QMainWindow, Ui_MainWindow
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>app</td></tr><tr><td>qssStyle</td></tr><tr><td>styleFile</td></tr><tr><td>ui</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#MainWindow.__init__">MainWindow</a></td>
|
||||
<td>Constructor</td>
|
||||
</tr><tr>
|
||||
<td><a href="#MainWindow.enterEvent">enterEvent</a></td>
|
||||
<td>自定义标题栏需要重置光标。</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="MainWindow.__init__" ID="MainWindow.__init__"></a>
|
||||
<h4>MainWindow (Constructor)</h4>
|
||||
<b>MainWindow</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
Constructor
|
||||
</p><dl>
|
||||
<dt><i>parent</i> (QWidget)</dt>
|
||||
<dd>
|
||||
reference to the parent widget
|
||||
</dd>
|
||||
</dl><a NAME="MainWindow.enterEvent" ID="MainWindow.enterEvent"></a>
|
||||
<h4>MainWindow.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
<p>
|
||||
自定义标题栏需要重置光标。
|
||||
</p>
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,6 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu.Main</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.Main</h1>
|
||||
|
@ -11,6 +15,8 @@ description: pyqt5悬浮下拉菜单
|
|||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
Author: 人间白头
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
|
@ -21,7 +27,7 @@ email: 625781186@qq.com
|
|||
<table>
|
||||
<tr>
|
||||
<td><a href="#MainWindow">MainWindow</a></td>
|
||||
<td>Class documentation goes here.</td>
|
||||
<td>主窗口.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
|
@ -32,13 +38,13 @@ email: 625781186@qq.com
|
|||
<a NAME="MainWindow" ID="MainWindow"></a>
|
||||
<h2>MainWindow</h2>
|
||||
<p>
|
||||
Class documentation goes here.
|
||||
主窗口.
|
||||
</p>
|
||||
<h3>Derived from</h3>
|
||||
QMainWindow, Ui_MainWindow
|
||||
Ui_MainWindow, QMainWindow
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>app</td></tr><tr><td>qssStyle</td></tr><tr><td>styleFile</td></tr><tr><td>ui</td></tr>
|
||||
<tr><td>app</td></tr><tr><td>ui</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
|
@ -48,10 +54,16 @@ QMainWindow, Ui_MainWindow
|
|||
<table>
|
||||
<tr>
|
||||
<td><a href="#MainWindow.__init__">MainWindow</a></td>
|
||||
<td>Constructor</td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#MainWindow.enterEvent">enterEvent</a></td>
|
||||
<td>自定义标题栏需要重置光标。</td>
|
||||
<td><a href="#MainWindow.__initUI">__initUI</a></td>
|
||||
<td>一些无法在基础元素累中初始化的参数。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#MainWindow.readCSS">readCSS</a></td>
|
||||
<td>用于设置样式,SingeleWidget类中也需要用到。</td>
|
||||
</tr><tr>
|
||||
<td><a href="#MainWindow.start_animation">start_animation</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
|
@ -62,18 +74,23 @@ QMainWindow, Ui_MainWindow
|
|||
<h4>MainWindow (Constructor)</h4>
|
||||
<b>MainWindow</b>(<i>parent=None</i>)
|
||||
<p>
|
||||
Constructor
|
||||
</p><dl>
|
||||
<dt><i>parent</i> (QWidget)</dt>
|
||||
<dd>
|
||||
reference to the parent widget
|
||||
</dd>
|
||||
</dl><a NAME="MainWindow.enterEvent" ID="MainWindow.enterEvent"></a>
|
||||
<h4>MainWindow.enterEvent</h4>
|
||||
<b>enterEvent</b>(<i>e</i>)
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><a NAME="MainWindow.__initUI" ID="MainWindow.__initUI"></a>
|
||||
<h4>MainWindow.__initUI</h4>
|
||||
<b>__initUI</b>(<i></i>)
|
||||
<p>
|
||||
自定义标题栏需要重置光标。
|
||||
</p>
|
||||
一些无法在基础元素累中初始化的参数。
|
||||
</p><a NAME="MainWindow.readCSS" ID="MainWindow.readCSS"></a>
|
||||
<h4>MainWindow.readCSS</h4>
|
||||
<b>readCSS</b>(<i>obj</i>)
|
||||
<p>
|
||||
用于设置样式,SingeleWidget类中也需要用到。
|
||||
</p><a NAME="MainWindow.start_animation" ID="MainWindow.start_animation"></a>
|
||||
<h4>MainWindow.start_animation</h4>
|
||||
<b>start_animation</b>(<i>checked</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,358 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu.Menu</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.Menu</h1>
|
||||
<p>
|
||||
description: 要增加菜单栏时,在这里添加。<br>
|
||||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p><p>
|
||||
BX: 主菜单按钮;<br>
|
||||
LX:子菜单按钮-继承了UI类和 隐藏基类;<br>
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B1">B1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B2">B2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B3">B3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B4">B4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L1">L1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L2">L2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L3">L3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L4">L4</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="B1" ID="B1"></a>
|
||||
<h2>B1</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B1.__init__">B1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B1._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B1.__init__" ID="B1.__init__"></a>
|
||||
<h4>B1 (Constructor)</h4>
|
||||
<b>B1</b>(<i>parent=None</i>)
|
||||
<a NAME="B1._todo" ID="B1._todo"></a>
|
||||
<h4>B1._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B2" ID="B2"></a>
|
||||
<h2>B2</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B2.__init__">B2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B2._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B2.__init__" ID="B2.__init__"></a>
|
||||
<h4>B2 (Constructor)</h4>
|
||||
<b>B2</b>(<i>parent=None</i>)
|
||||
<a NAME="B2._todo" ID="B2._todo"></a>
|
||||
<h4>B2._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B3" ID="B3"></a>
|
||||
<h2>B3</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B3.__init__">B3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B3._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B3.__init__" ID="B3.__init__"></a>
|
||||
<h4>B3 (Constructor)</h4>
|
||||
<b>B3</b>(<i>parent=None</i>)
|
||||
<a NAME="B3._todo" ID="B3._todo"></a>
|
||||
<h4>B3._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B4" ID="B4"></a>
|
||||
<h2>B4</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B4.__init__">B4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B4._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B4.__init__" ID="B4.__init__"></a>
|
||||
<h4>B4 (Constructor)</h4>
|
||||
<b>B4</b>(<i>parent=None</i>)
|
||||
<a NAME="B4._todo" ID="B4._todo"></a>
|
||||
<h4>B4._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L1" ID="L1"></a>
|
||||
<h2>L1</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L1.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L1.__init__">L1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L1._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L1.__init__" ID="L1.__init__"></a>
|
||||
<h4>L1 (Constructor)</h4>
|
||||
<b>L1</b>(<i>parent=None</i>)
|
||||
<a NAME="L1._showSomething" ID="L1._showSomething"></a>
|
||||
<h4>L1._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L2" ID="L2"></a>
|
||||
<h2>L2</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L2.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L2.__init__">L2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L2._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L2.__init__" ID="L2.__init__"></a>
|
||||
<h4>L2 (Constructor)</h4>
|
||||
<b>L2</b>(<i>parent=None</i>)
|
||||
<a NAME="L2._showSomething" ID="L2._showSomething"></a>
|
||||
<h4>L2._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L3" ID="L3"></a>
|
||||
<h2>L3</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L3.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L3.__init__">L3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L3._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L3.__init__" ID="L3.__init__"></a>
|
||||
<h4>L3 (Constructor)</h4>
|
||||
<b>L3</b>(<i>parent=None</i>)
|
||||
<a NAME="L3._showSomething" ID="L3._showSomething"></a>
|
||||
<h4>L3._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L4" ID="L4"></a>
|
||||
<h2>L4</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L4.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L4.__init__">L4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L4._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L4.__init__" ID="L4.__init__"></a>
|
||||
<h4>L4 (Constructor)</h4>
|
||||
<b>L4</b>(<i>parent=None</i>)
|
||||
<a NAME="L4._showSomething" ID="L4._showSomething"></a>
|
||||
<h4>L4._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,342 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
|
||||
</head>
|
||||
<body><a NAME="top" ID="top"></a>
|
||||
<h1>5.hoverMenu.Menu</h1>
|
||||
<p>
|
||||
description: 要增加菜单栏时,在这里添加。<br>
|
||||
</p><p>
|
||||
Created on 2018年7月7日
|
||||
</p><p>
|
||||
email: 625781186@qq.com
|
||||
</p><p>
|
||||
BX: 主菜单按钮;<br>
|
||||
LX:子菜单按钮-继承了UI类和 隐藏基类;<br>
|
||||
</p>
|
||||
<h3>Global Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Classes</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B1">B1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B2">B2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B3">B3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B4">B4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L1">L1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L2">L2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L3">L3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L4">L4</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<hr /><hr />
|
||||
<a NAME="B1" ID="B1"></a>
|
||||
<h2>B1</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B1.__init__">B1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B1._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B1.__init__" ID="B1.__init__"></a>
|
||||
<h4>B1 (Constructor)</h4>
|
||||
<b>B1</b>(<i>parent=None</i>)
|
||||
<a NAME="B1._todo" ID="B1._todo"></a>
|
||||
<h4>B1._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B2" ID="B2"></a>
|
||||
<h2>B2</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B2.__init__">B2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B2._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B2.__init__" ID="B2.__init__"></a>
|
||||
<h4>B2 (Constructor)</h4>
|
||||
<b>B2</b>(<i>parent=None</i>)
|
||||
<a NAME="B2._todo" ID="B2._todo"></a>
|
||||
<h4>B2._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B3" ID="B3"></a>
|
||||
<h2>B3</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B3.__init__">B3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B3._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B3.__init__" ID="B3.__init__"></a>
|
||||
<h4>B3 (Constructor)</h4>
|
||||
<b>B3</b>(<i>parent=None</i>)
|
||||
<a NAME="B3._todo" ID="B3._todo"></a>
|
||||
<h4>B3._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="B4" ID="B4"></a>
|
||||
<h2>B4</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
BaseButton
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#B4.__init__">B4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#B4._todo">_todo</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="B4.__init__" ID="B4.__init__"></a>
|
||||
<h4>B4 (Constructor)</h4>
|
||||
<b>B4</b>(<i>parent=None</i>)
|
||||
<a NAME="B4._todo" ID="B4._todo"></a>
|
||||
<h4>B4._todo</h4>
|
||||
<b>_todo</b>(<i>*args, **kwgs</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L1" ID="L1"></a>
|
||||
<h2>L1</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L1.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L1.__init__">L1</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L1._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L1.__init__" ID="L1.__init__"></a>
|
||||
<h4>L1 (Constructor)</h4>
|
||||
<b>L1</b>(<i>parent=None</i>)
|
||||
<a NAME="L1._showSomething" ID="L1._showSomething"></a>
|
||||
<h4>L1._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L2" ID="L2"></a>
|
||||
<h2>L2</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L2.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L2.__init__">L2</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L2._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L2.__init__" ID="L2.__init__"></a>
|
||||
<h4>L2 (Constructor)</h4>
|
||||
<b>L2</b>(<i>parent=None</i>)
|
||||
<a NAME="L2._showSomething" ID="L2._showSomething"></a>
|
||||
<h4>L2._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L3" ID="L3"></a>
|
||||
<h2>L3</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L3.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L3.__init__">L3</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L3._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L3.__init__" ID="L3.__init__"></a>
|
||||
<h4>L3 (Constructor)</h4>
|
||||
<b>L3</b>(<i>parent=None</i>)
|
||||
<a NAME="L3._showSomething" ID="L3._showSomething"></a>
|
||||
<h4>L3._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr /><hr />
|
||||
<a NAME="L4" ID="L4"></a>
|
||||
<h2>L4</h2>
|
||||
|
||||
<h3>Derived from</h3>
|
||||
Ui_L4.Ui_Form, BaseMenuWidget
|
||||
<h3>Class Attributes</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Class Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<h3>Methods</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="#L4.__init__">L4</a></td>
|
||||
<td></td>
|
||||
</tr><tr>
|
||||
<td><a href="#L4._showSomething">_showSomething</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Static Methods</h3>
|
||||
<table>
|
||||
<tr><td>None</td></tr>
|
||||
</table>
|
||||
<a NAME="L4.__init__" ID="L4.__init__"></a>
|
||||
<h4>L4 (Constructor)</h4>
|
||||
<b>L4</b>(<i>parent=None</i>)
|
||||
<a NAME="L4._showSomething" ID="L4._showSomething"></a>
|
||||
<h4>L4._showSomething</h4>
|
||||
<b>_showSomething</b>(<i>item</i>)
|
||||
|
||||
<div align="right"><a href="#top">Up</a></div>
|
||||
<hr />
|
||||
</body></html>
|
|
@ -1,42 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>5.hoverMenu</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>5.hoverMenu</h1>
|
||||
|
||||
|
||||
|
||||
<h3>Modules</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="5.hoverMenu.BaseElement.html">BaseElement</a></td>
|
||||
<td>description: 抽象类模块</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.CommonHelper.html">CommonHelper</a></td>
|
||||
<td>读取CSS用模块。</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.Main.html">Main</a></td>
|
||||
<td>主函数.</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.Menu.html">Menu</a></td>
|
||||
<td>description: 要增加菜单栏时,在这里添加。<br></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
|
@ -1,26 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>5.hoverMenu</h1>
|
||||
|
||||
|
||||
|
||||
<h3>Modules</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="5.hoverMenu.BaseElement.md">BaseElement</a></td>
|
||||
<td>description: 抽象类模块</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.CommonHelper.md">CommonHelper</a></td>
|
||||
<td>读取CSS用模块。</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.Main.md">Main</a></td>
|
||||
<td>主函数.</td>
|
||||
</tr><tr>
|
||||
<td><a href="5.hoverMenu.Menu.md">Menu</a></td>
|
||||
<td>description: 要增加菜单栏时,在这里添加。<br></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>Table of contents</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
body {
|
||||
background: #EDECE6;
|
||||
margin: 0em 1em 10em 1em;
|
||||
color: black;
|
||||
}
|
||||
|
||||
h1 { color: white; background: #85774A; }
|
||||
h2 { color: white; background: #85774A; }
|
||||
h3 { color: white; background: #9D936E; }
|
||||
h4 { color: white; background: #9D936E; }
|
||||
|
||||
a { color: #BA6D36; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Table of contents</h1>
|
||||
|
||||
|
||||
<h3>Packages</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="index-5.hoverMenu.html">hoverMenu</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body></html>
|
|
@ -7,57 +7,130 @@ description: pyqt5悬浮下拉菜单
|
|||
|
||||
Created on 2018年7月7日
|
||||
|
||||
Author: 人间白头
|
||||
|
||||
email: 625781186@qq.com
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from Menu import *
|
||||
from U_FuncWidget.Menu import *
|
||||
from Ui_Main import Ui_MainWindow
|
||||
#读取CSS用
|
||||
from CommonHelper import CommonHelper
|
||||
|
||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
from Tools.CommonHelper import CommonHelper #读取CSS用
|
||||
from Tools.qmf_showError import w_showERROR #弹窗报错
|
||||
|
||||
|
||||
class MainWindow(Ui_MainWindow, QMainWindow):
|
||||
"""
|
||||
Class documentation goes here.
|
||||
主窗口.
|
||||
"""
|
||||
|
||||
def __init__(self, parent=None):
|
||||
"""
|
||||
Constructor
|
||||
|
||||
@param parent reference to the parent widget
|
||||
@type QWidget
|
||||
"""
|
||||
super(MainWindow, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
self.showMaximized()
|
||||
# W1->TestWidget 生成,然后B->,然后L->tablewidget
|
||||
for i in range(1,10):
|
||||
try:
|
||||
txt='''self.W{x}._creatMenu(L{x}, self);
|
||||
'''.format(x=i)
|
||||
|
||||
exec(txt)
|
||||
except:
|
||||
continue
|
||||
# 用于存储界面是否需要删除,
|
||||
# 目前只支持9个菜单按钮。
|
||||
self.Wid_Obj={
|
||||
"b1":{}, "b2":{}, "b3":{}, "b4":{}, "b5":{},
|
||||
"b6":{}, "b7":{}, "b8":{}, "b9":{},
|
||||
}
|
||||
|
||||
def enterEvent(self, e):
|
||||
'''自定义标题栏需要重置光标。'''
|
||||
self.setCursor(Qt.ArrowCursor)
|
||||
self.__initUI()
|
||||
|
||||
def __initUI(self):
|
||||
'''
|
||||
一些无法在基础元素累中初始化的参数。
|
||||
'''
|
||||
|
||||
# 有用判断最长的label的长度
|
||||
label_width = 0
|
||||
|
||||
self.label_list = []
|
||||
|
||||
# 从上部分窗体的子对象中循环选取出self.WX
|
||||
for WX in self.topWidget.children():
|
||||
# 判断是不是WX窗体
|
||||
name = WX.objectName()[0]
|
||||
if name =="W" and isinstance(WX, SingeleWidget):
|
||||
num = WX.objectName()[1]
|
||||
# 从全局中取 LX类
|
||||
LX = globals()["L%s"%num]
|
||||
del WX.m_menu
|
||||
WX.m_menu = LX(self)
|
||||
|
||||
label = WX.findChild(QLabel)
|
||||
self.label_list.append(label)
|
||||
|
||||
# 判断文字最长的label
|
||||
if label_width < len(label.text()):
|
||||
label_width = len(label.text())
|
||||
|
||||
# 用空格填充label, 使其宽度统一
|
||||
for label in self.label_list:
|
||||
|
||||
length = label_width - len(label.text())
|
||||
size = length
|
||||
text = label.text()
|
||||
|
||||
if length%2:
|
||||
text = ' '+ text +' '
|
||||
text = ' '*size+ text +' '*size
|
||||
label.setText(text)
|
||||
|
||||
self.readCSS(self)
|
||||
|
||||
self.DEFAULT = {}
|
||||
self.animation = QPropertyAnimation(self.topWidget, b'maximumHeight' )
|
||||
self.toggleButton.clicked.connect(self.start_animation)
|
||||
|
||||
def readCSS(self, obj):
|
||||
'''
|
||||
用于设置样式,SingeleWidget类中也需要用到。
|
||||
'''
|
||||
styleFile = './Tools/style.css'
|
||||
qssStyle = CommonHelper.readQss( styleFile )
|
||||
obj.setStyleSheet( qssStyle )
|
||||
|
||||
def start_animation(self, checked):
|
||||
|
||||
CurrentHeight = self.topWidget.height()
|
||||
if self.DEFAULT == {}:
|
||||
self.DEFAULT["len"] = CurrentHeight
|
||||
if CurrentHeight == 0:
|
||||
direction = QAbstractAnimation.Backward
|
||||
self.toggleButton.setText("↑")
|
||||
else:
|
||||
direction = QAbstractAnimation.Forward
|
||||
self.toggleButton.setText("↓")
|
||||
self.animation.setDirection(direction)
|
||||
self.animation.setDuration(150)
|
||||
self.animation.setStartValue(self.DEFAULT["len"])
|
||||
self.animation.setEndValue(0)
|
||||
self.animation.start()
|
||||
|
||||
# def enterEvent(self, e):
|
||||
# '''自定义标题栏需要重置光标。'''
|
||||
# self.setCursor(Qt.ArrowCursor)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
ui = MainWindow()
|
||||
styleFile = './style.css'
|
||||
qssStyle = CommonHelper.readQss( styleFile )
|
||||
ui.setStyleSheet( qssStyle )
|
||||
|
||||
# import qdarkstyle
|
||||
# app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
|
||||
|
||||
ui.show()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
|
|
@ -7,21 +7,55 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>797</width>
|
||||
<height>536</height>
|
||||
<width>908</width>
|
||||
<height>518</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"> #MainWindow { border:none;}</string>
|
||||
<string notr="true">* #MainWindow { border:none;}
|
||||
#widget{ border:none; }
|
||||
/*#topWidget QWidget{ background-color: green; }
|
||||
#widget QLabel{ background-color: rgb(85, 0, 255); }*/
|
||||
</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#centralWidget {border:none;}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="toggleButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:#1d4371;
|
||||
|
||||
border-radius:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>↑</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -46,297 +80,29 @@
|
|||
<item>
|
||||
<widget class="QWidget" name="topWidget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#widget{ border:none; }</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,0,0">
|
||||
<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>
|
||||
<widget class="SingeleWidget" name="W1" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="B1" name="filemenu_storeData_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>店铺数据</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SingeleWidget" name="W2" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>竞品分析</string>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="B2" name="filemenu_competitiveProductAnalysis_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SingeleWidget" name="W3" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="B3" name="filemenu_throughTrain_4">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>直通车工具工具工具</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SingeleWidget" name="W4" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="B4" name="filemenu_throughTrain_3">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>直通</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
|
@ -359,31 +125,228 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="SingeleWidget" name="W2" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="B2" name="filemenu_storeData_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>店铺数据</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="SingeleWidget" name="W4" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="B4" name="filemenu_storeData_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>店铺</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="SingeleWidget" name="W1" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="B1" name="filemenu_storeData_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>店铺数据</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="SingeleWidget" name="W3" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>店店店</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="B3" name="filemenu_storeData_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="buttomWidget" native="true">
|
||||
<widget class="QWidget" name="bottomWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="Buttom_Vbox">
|
||||
<layout class="QVBoxLayout" name="Bottom_Vbox">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -423,27 +386,27 @@
|
|||
<customwidget>
|
||||
<class>B1</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Menu</header>
|
||||
<header>U_FuncWidget.Menu</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>B2</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Menu</header>
|
||||
<header>U_FuncWidget.Menu</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>B3</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Menu</header>
|
||||
<header>U_FuncWidget.Menu</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>B4</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Menu</header>
|
||||
<header>U_FuncWidget.Menu</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SingeleWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>BaseElement</header>
|
||||
<header>U_FuncWidget.BaseElement</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
description: 要增加菜单栏时,在这里添加。<br>
|
||||
|
||||
Created on 2018年7月7日
|
||||
|
||||
email: 625781186@qq.com
|
||||
|
||||
BX: 主菜单按钮;<br>
|
||||
LX:子菜单按钮-继承了UI类和 隐藏基类;<br>
|
||||
'''
|
||||
|
||||
from BaseElement import *
|
||||
|
||||
from UStoreData1 import Ui_L1
|
||||
from UCompetitiveProduct2 import Ui_L2
|
||||
from UMarketAnalysis3 import Ui_L3
|
||||
from UThroughTrain4 import Ui_L4
|
||||
|
||||
#============================================= 店铺数据 =======================================
|
||||
class B1( BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B1, self).__init__(parent)
|
||||
self._createLabel(":/static/store_data.png")
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B1, self)._todo()
|
||||
|
||||
class L1( Ui_L1.Ui_Form, BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L1, self).__init__(parent)
|
||||
def _showSomething(self, item):
|
||||
super(L1, self)._showSomething()
|
||||
MW = self.parent()#是MainWindow
|
||||
if item.text()=="语音数据":
|
||||
print(1) #功能未实现
|
||||
|
||||
#============================================= 竞品分析 =======================================
|
||||
class B2(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B2, self).__init__(parent)
|
||||
self._createLabel(":/static/competitiveProductAnalysis.png")
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B2, self)._todo()
|
||||
|
||||
class L2(Ui_L2.Ui_Form, BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L2, self).__init__(parent)
|
||||
def _showSomething(self, item):
|
||||
super(L2, self)._showSomething()
|
||||
|
||||
MW = self.parent()#是MainWindow
|
||||
if item.text()=="评价分析":
|
||||
print(1) #功能未实现
|
||||
elif item.text()=="SKU分析":
|
||||
|
||||
from UCompetitiveProduct2 import SKU_Widget
|
||||
#切换窗体
|
||||
self.sku_Widget = SKU_Widget.SKU_Form(MW.Buttom_Vbox.parent())
|
||||
|
||||
self.parent().Buttom_Vbox.addWidget(self.sku_Widget)
|
||||
|
||||
|
||||
elif item.text()=="流量分析":
|
||||
print(3) #功能未实现
|
||||
|
||||
|
||||
#============================================= 市场分析 =======================================
|
||||
class B3(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B3, self).__init__(parent)
|
||||
self._createLabel(":/static/search.png")
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B3, self)._todo()
|
||||
|
||||
class L3(Ui_L3.Ui_Form, BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L3, self).__init__(parent)
|
||||
def _showSomething(self, item):
|
||||
super(L3, self)._showSomething()
|
||||
MW = self.parent()#是MainWindow
|
||||
if item.text()=="类目趋势":
|
||||
print(1)#功能未实现
|
||||
elif item.text()=="属性趋势":
|
||||
print(2)#功能未实现
|
||||
elif item.text()=="品牌分析":
|
||||
print(3)#功能未实现
|
||||
|
||||
|
||||
#============================================= 直通车工具 =======================================
|
||||
class B4(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B4, self).__init__(parent)
|
||||
self._createLabel(":/static/throughTrain.png")
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B4, self)._todo()
|
||||
|
||||
class L4(Ui_L4.Ui_Form,BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L4, self).__init__(parent)
|
||||
def _showSomething(self, item):
|
||||
super(L4, self)._showSomething()
|
||||
MW = self.parent()#是MainWindow
|
||||
|
||||
if item.text()=="地域分析":
|
||||
from UThroughTrain4 import GeographicAnalysis_Widget
|
||||
self.geo_Widget = GeographicAnalysis_Widget.GeographicAnalysis_Form(MW.Buttom_Vbox.parent())
|
||||
#切换窗体
|
||||
MW.Buttom_Vbox.addWidget(self.geo_Widget)
|
||||
|
||||
self.geo_Widget.show()
|
||||
elif item.text()=="实时数据":
|
||||
print(2)#功能未实现
|
||||
elif item.text()=="标签工具":
|
||||
print(3)
|
||||
|
||||
|
||||
#============================================= 智钻工具 =======================================
|
181
partner_625781186/5.hoverMenu/Tools/Ui_Main.py
Normal file
181
partner_625781186/5.hoverMenu/Tools/Ui_Main.py
Normal file
|
@ -0,0 +1,181 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\Main.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(648, 493)
|
||||
MainWindow.setStyleSheet(" #MainWindow { border:none;}")
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setStyleSheet("#centralWidget {border:none;}")
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(2)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.widget = QtWidgets.QWidget(self.centralWidget)
|
||||
self.widget.setStyleSheet("#widget {border:none;}")
|
||||
self.widget.setObjectName("widget")
|
||||
self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.widget)
|
||||
self.verticalLayout_14.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout_14.setSpacing(0)
|
||||
self.verticalLayout_14.setObjectName("verticalLayout_14")
|
||||
self.topWidget = QtWidgets.QWidget(self.widget)
|
||||
self.topWidget.setStyleSheet("#widget{ border:none; }")
|
||||
self.topWidget.setObjectName("topWidget")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.topWidget)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout.setSpacing(2)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.W1 = SingeleWidget(self.topWidget)
|
||||
self.W1.setObjectName("W1")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.W1)
|
||||
self.gridLayout.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout.setSpacing(2)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.filemenu_storeData_3 = B1(self.W1)
|
||||
self.filemenu_storeData_3.setText("")
|
||||
self.filemenu_storeData_3.setObjectName("filemenu_storeData_3")
|
||||
self.gridLayout.addWidget(self.filemenu_storeData_3, 0, 1, 1, 1)
|
||||
self.label_15 = QtWidgets.QLabel(self.W1)
|
||||
self.label_15.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_15.setObjectName("label_15")
|
||||
self.gridLayout.addWidget(self.label_15, 1, 1, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem, 0, 0, 1, 1)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem1, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W1)
|
||||
self.W2 = SingeleWidget(self.topWidget)
|
||||
self.W2.setObjectName("W2")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.W2)
|
||||
self.gridLayout_2.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_2.setSpacing(2)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.label_16 = QtWidgets.QLabel(self.W2)
|
||||
self.label_16.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_16.setObjectName("label_16")
|
||||
self.gridLayout_2.addWidget(self.label_16, 1, 1, 1, 1)
|
||||
self.filemenu_competitiveProductAnalysis_3 = B2(self.W2)
|
||||
self.filemenu_competitiveProductAnalysis_3.setText("")
|
||||
self.filemenu_competitiveProductAnalysis_3.setObjectName("filemenu_competitiveProductAnalysis_3")
|
||||
self.gridLayout_2.addWidget(self.filemenu_competitiveProductAnalysis_3, 0, 1, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_2.addItem(spacerItem2, 0, 0, 1, 1)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_2.addItem(spacerItem3, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W2)
|
||||
self.W3 = SingeleWidget(self.topWidget)
|
||||
self.W3.setObjectName("W3")
|
||||
self.gridLayout_4 = QtWidgets.QGridLayout(self.W3)
|
||||
self.gridLayout_4.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_4.setSpacing(2)
|
||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||
spacerItem4 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem4, 0, 0, 1, 1)
|
||||
self.filemenu_throughTrain_4 = B3(self.W3)
|
||||
self.filemenu_throughTrain_4.setAutoFillBackground(False)
|
||||
self.filemenu_throughTrain_4.setText("")
|
||||
self.filemenu_throughTrain_4.setObjectName("filemenu_throughTrain_4")
|
||||
self.gridLayout_4.addWidget(self.filemenu_throughTrain_4, 0, 1, 1, 1)
|
||||
self.label_19 = QtWidgets.QLabel(self.W3)
|
||||
self.label_19.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_19.setObjectName("label_19")
|
||||
self.gridLayout_4.addWidget(self.label_19, 1, 1, 1, 1)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem5, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W3)
|
||||
self.W4 = SingeleWidget(self.topWidget)
|
||||
self.W4.setObjectName("W4")
|
||||
self.gridLayout_5 = QtWidgets.QGridLayout(self.W4)
|
||||
self.gridLayout_5.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_5.setSpacing(2)
|
||||
self.gridLayout_5.setObjectName("gridLayout_5")
|
||||
spacerItem6 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_5.addItem(spacerItem6, 0, 0, 1, 1)
|
||||
self.filemenu_throughTrain_3 = B4(self.W4)
|
||||
self.filemenu_throughTrain_3.setAutoFillBackground(False)
|
||||
self.filemenu_throughTrain_3.setText("")
|
||||
self.filemenu_throughTrain_3.setObjectName("filemenu_throughTrain_3")
|
||||
self.gridLayout_5.addWidget(self.filemenu_throughTrain_3, 0, 1, 1, 1)
|
||||
self.label_14 = QtWidgets.QLabel(self.W4)
|
||||
self.label_14.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_14.setObjectName("label_14")
|
||||
self.gridLayout_5.addWidget(self.label_14, 1, 1, 1, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_5.addItem(spacerItem7, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W4)
|
||||
self.verticalLayout_19 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_19.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout_19.setSpacing(2)
|
||||
self.verticalLayout_19.setObjectName("verticalLayout_19")
|
||||
self.label_17 = QtWidgets.QLabel(self.topWidget)
|
||||
self.label_17.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_17.setObjectName("label_17")
|
||||
self.verticalLayout_19.addWidget(self.label_17)
|
||||
self.label_18 = QtWidgets.QLabel(self.topWidget)
|
||||
self.label_18.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_18.setObjectName("label_18")
|
||||
self.verticalLayout_19.addWidget(self.label_18)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_19)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(25, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem8)
|
||||
self.horizontalLayout.setStretch(0, 1)
|
||||
self.horizontalLayout.setStretch(1, 1)
|
||||
self.horizontalLayout.setStretch(2, 1)
|
||||
self.horizontalLayout.setStretch(3, 1)
|
||||
self.verticalLayout_14.addWidget(self.topWidget)
|
||||
self.buttomWidget = QtWidgets.QWidget(self.widget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.buttomWidget.sizePolicy().hasHeightForWidth())
|
||||
self.buttomWidget.setSizePolicy(sizePolicy)
|
||||
self.buttomWidget.setObjectName("buttomWidget")
|
||||
self.Buttom_Vbox = QtWidgets.QVBoxLayout(self.buttomWidget)
|
||||
self.Buttom_Vbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.Buttom_Vbox.setSpacing(0)
|
||||
self.Buttom_Vbox.setObjectName("Buttom_Vbox")
|
||||
self.verticalLayout_14.addWidget(self.buttomWidget)
|
||||
self.verticalLayout.addWidget(self.widget)
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
self.action1 = QtWidgets.QAction(MainWindow)
|
||||
self.action1.setObjectName("action1")
|
||||
self.action2 = QtWidgets.QAction(MainWindow)
|
||||
self.action2.setObjectName("action2")
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
||||
self.label_15.setText(_translate("MainWindow", "店铺数据"))
|
||||
self.label_16.setText(_translate("MainWindow", "竞品分析"))
|
||||
self.label_19.setText(_translate("MainWindow", "直通工具"))
|
||||
self.label_14.setText(_translate("MainWindow", "直通工具"))
|
||||
self.label_17.setText(_translate("MainWindow", "个人中心"))
|
||||
self.label_18.setText(_translate("MainWindow", "退出登录"))
|
||||
self.action1.setText(_translate("MainWindow", "1"))
|
||||
self.action2.setText(_translate("MainWindow", "2"))
|
||||
|
||||
from BaseElement import SingeleWidget
|
||||
from Menu import B1, B2, B3, B4
|
||||
import tbqrc_rc
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
MainWindow = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(MainWindow)
|
||||
MainWindow.show()
|
||||
sys.exit(app.exec_())
|
||||
|
0
partner_625781186/5.hoverMenu/Tools/__init__.py
Normal file
0
partner_625781186/5.hoverMenu/Tools/__init__.py
Normal file
52
partner_625781186/5.hoverMenu/Tools/qmf_showError.py
Normal file
52
partner_625781186/5.hoverMenu/Tools/qmf_showError.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
|
||||
"""
|
||||
Created on 2018-09-09
|
||||
|
||||
description: 错误提示窗模块
|
||||
|
||||
author: 625781186@qq.com
|
||||
|
||||
site: https://github.com/625781186
|
||||
"""
|
||||
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
import traceback
|
||||
|
||||
def w_showERROR(widget=None):
|
||||
|
||||
errmsg = traceback.format_exc()
|
||||
# QMessageBox.warning(QWidget(), '请确认', errmsg,
|
||||
# QMessageBox.Ok)
|
||||
msg = QErrorMessage(widget)
|
||||
msg.setModal(True)
|
||||
msg.showMessage(errmsg)
|
||||
|
||||
def f_showERROR(func, *args, **kwargs):
|
||||
def _doWhat(*args, **kwargs):
|
||||
try:
|
||||
func(*args, **kwargs)
|
||||
except:
|
||||
import sys
|
||||
app =QApplication(sys.argv)
|
||||
errmsg = traceback.format_exc()
|
||||
print(errmsg)
|
||||
gitMsg=QMessageBox()
|
||||
|
||||
gitMsg.setWindowTitle("错误")
|
||||
|
||||
gitMsg.setText(errmsg)
|
||||
gitMsg.setDetailedText(errmsg)
|
||||
gitMsg.setStandardButtons(QMessageBox.Ok)
|
||||
gitMsg.buttons()[-1].click()
|
||||
|
||||
gitMsg.exec_()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
return
|
||||
|
||||
return _doWhat
|
|
@ -1,5 +1,5 @@
|
|||
/*background-color: #3daee9; */
|
||||
#topWidget , TestWidget
|
||||
#topWidget
|
||||
{
|
||||
color: #eff0f1;
|
||||
background-color: #3daee9;
|
||||
|
@ -9,14 +9,10 @@
|
|||
border-image: none;
|
||||
border: 0px transparent black;
|
||||
outline: 0;
|
||||
|
||||
}
|
||||
TestWidget > QPushButton{
|
||||
border-width: 1px;
|
||||
|
||||
}
|
||||
|
||||
#buttomWidget
|
||||
|
||||
#bottomWidget
|
||||
{
|
||||
border-image: url(:/static/background.jpg);
|
||||
}
|
||||
|
@ -36,10 +32,10 @@ TestWidget > QPushButton{
|
|||
color: #eff0f1;
|
||||
}
|
||||
|
||||
/* QWidget:item:selected
|
||||
QWidget:item:selected
|
||||
{
|
||||
background-color: #18465d;
|
||||
} */
|
||||
}
|
||||
|
||||
|
||||
QWidget:disabled
|
||||
|
@ -313,6 +309,22 @@ TestWidget > QPushButton{
|
|||
border: 1px transparent black;
|
||||
}
|
||||
|
||||
BaseMenuWidget{
|
||||
|
||||
border:1px solid rgb(17, 66, 116);
|
||||
}
|
||||
|
||||
QPushButton[M_Action='isTrue']
|
||||
{
|
||||
border:none ;
|
||||
border-radius:0px;
|
||||
}
|
||||
QPushButton[M_Action='isTrue']:pressed
|
||||
{
|
||||
background-color: #3daee9;
|
||||
color: #eff0f1;
|
||||
}
|
||||
|
||||
/* --------------------------------------- QPushButton -----------------------------------*/
|
||||
QPushButton
|
||||
{
|
||||
|
@ -351,11 +363,9 @@ TestWidget > QPushButton{
|
|||
padding-bottom: -17px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QPushButton:checked{
|
||||
background-color: #76797C;
|
||||
border-color: #6A6969;
|
||||
background-color: #287399;
|
||||
border-color: #287399;
|
||||
}
|
||||
|
||||
|
||||
|
@ -534,10 +544,7 @@ TestWidget > QPushButton{
|
|||
left: 8px;
|
||||
}
|
||||
|
||||
BaseMenuWidget{
|
||||
|
||||
border:1px solid rgb(17, 66, 116);
|
||||
}
|
||||
|
||||
QTableView
|
||||
{
|
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>113</width>
|
||||
<height>119</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 170, 255);</string>
|
||||
</property>
|
||||
<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>
|
||||
<widget class="BaseTable" name="tableWidget">
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>新建列</string>
|
||||
</property>
|
||||
</column>
|
||||
<item row="0" column="0">
|
||||
<property name="text">
|
||||
<string>评价分析</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<property name="text">
|
||||
<string>SKU分析</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<property name="text">
|
||||
<string>流量分析</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseTable</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>BaseElement</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,34 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
SKU分析菜单的界面。
|
||||
"""
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from .Ui_SKU_Widget import Ui_Form
|
||||
|
||||
|
||||
class SKU_Form(QWidget, Ui_Form):
|
||||
"""
|
||||
Class documentation goes here.
|
||||
"""
|
||||
def __init__(self, parent=None):
|
||||
"""
|
||||
Constructor
|
||||
|
||||
@param parent reference to the parent widget
|
||||
@type QWidget
|
||||
"""
|
||||
super(SKU_Form, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
ui = SKU_Form()
|
||||
|
||||
ui.show()
|
||||
sys.exit(app.exec_())
|
|
@ -1,74 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UCompetitiveProduct2\L2.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(113, 119)
|
||||
Form.setStyleSheet("background-color: rgb(85, 170, 255);")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tableWidget = BaseTable(Form)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(1)
|
||||
self.tableWidget.setRowCount(3)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(1, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(0, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(1, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(2, 0, item)
|
||||
self.tableWidget.horizontalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setHighlightSections(True)
|
||||
self.verticalLayout.addWidget(self.tableWidget)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("Form", "新建列"))
|
||||
__sortingEnabled = self.tableWidget.isSortingEnabled()
|
||||
self.tableWidget.setSortingEnabled(False)
|
||||
item = self.tableWidget.item(0, 0)
|
||||
item.setText(_translate("Form", "评价分析"))
|
||||
item = self.tableWidget.item(1, 0)
|
||||
item.setText(_translate("Form", "SKU分析"))
|
||||
item = self.tableWidget.item(2, 0)
|
||||
item.setText(_translate("Form", "流量分析"))
|
||||
self.tableWidget.setSortingEnabled(__sortingEnabled)
|
||||
|
||||
from BaseElement import BaseTable
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Form = QtWidgets.QWidget()
|
||||
ui = Ui_Form()
|
||||
ui.setupUi(Form)
|
||||
Form.show()
|
||||
sys.exit(app.exec_())
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>113</width>
|
||||
<height>119</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 170, 255);</string>
|
||||
</property>
|
||||
<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>
|
||||
<widget class="BaseTable" name="tableWidget">
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>新建列</string>
|
||||
</property>
|
||||
</column>
|
||||
<item row="0" column="0">
|
||||
<property name="text">
|
||||
<string>类目趋势</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<property name="text">
|
||||
<string>属性趋势</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<property name="text">
|
||||
<string>品牌分析</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseTable</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>BaseElement</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,74 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UMarketAnalysis3\L3.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(113, 119)
|
||||
Form.setStyleSheet("background-color: rgb(85, 170, 255);")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tableWidget = BaseTable(Form)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(1)
|
||||
self.tableWidget.setRowCount(3)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(1, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(0, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(1, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(2, 0, item)
|
||||
self.tableWidget.horizontalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setHighlightSections(True)
|
||||
self.verticalLayout.addWidget(self.tableWidget)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("Form", "新建列"))
|
||||
__sortingEnabled = self.tableWidget.isSortingEnabled()
|
||||
self.tableWidget.setSortingEnabled(False)
|
||||
item = self.tableWidget.item(0, 0)
|
||||
item.setText(_translate("Form", "类目趋势"))
|
||||
item = self.tableWidget.item(1, 0)
|
||||
item.setText(_translate("Form", "属性趋势"))
|
||||
item = self.tableWidget.item(2, 0)
|
||||
item.setText(_translate("Form", "品牌分析"))
|
||||
self.tableWidget.setSortingEnabled(__sortingEnabled)
|
||||
|
||||
from BaseElement import BaseTable
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Form = QtWidgets.QWidget()
|
||||
ui = Ui_Form()
|
||||
ui.setupUi(Form)
|
||||
Form.show()
|
||||
sys.exit(app.exec_())
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>113</width>
|
||||
<height>119</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 170, 255);</string>
|
||||
</property>
|
||||
<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>
|
||||
<widget class="BaseTable" name="tableWidget">
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>新建列</string>
|
||||
</property>
|
||||
</column>
|
||||
<item row="0" column="0">
|
||||
<property name="text">
|
||||
<string>语音数据</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseTable</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>BaseElement</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,60 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UStoreData1\L1.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(113, 119)
|
||||
Form.setStyleSheet("background-color: rgb(85, 170, 255);")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tableWidget = BaseTable(Form)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(1)
|
||||
self.tableWidget.setRowCount(1)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(0, 0, item)
|
||||
self.tableWidget.horizontalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setHighlightSections(True)
|
||||
self.verticalLayout.addWidget(self.tableWidget)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("Form", "新建列"))
|
||||
__sortingEnabled = self.tableWidget.isSortingEnabled()
|
||||
self.tableWidget.setSortingEnabled(False)
|
||||
item = self.tableWidget.item(0, 0)
|
||||
item.setText(_translate("Form", "语音数据"))
|
||||
self.tableWidget.setSortingEnabled(__sortingEnabled)
|
||||
|
||||
from BaseElement import BaseTable
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Form = QtWidgets.QWidget()
|
||||
ui = Ui_Form()
|
||||
ui.setupUi(Form)
|
||||
Form.show()
|
||||
sys.exit(app.exec_())
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Module implementing GeographicAnalysis_Form.
|
||||
"""
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from .Ui_GeographicAnalysis_Widget import Ui_Form
|
||||
|
||||
|
||||
class GeographicAnalysis_Form(QWidget, Ui_Form):
|
||||
"""
|
||||
Class documentation goes here.
|
||||
"""
|
||||
def __init__(self, parent=None):
|
||||
"""
|
||||
Constructor
|
||||
|
||||
@param parent reference to the parent widget
|
||||
@type QWidget
|
||||
"""
|
||||
super(GeographicAnalysis_Form, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.geographicAnalysis_table.horizontalHeader().setSectionResizeMode(1)#列宽设置
|
||||
|
||||
self.geographicAnalysis_table.horizontalHeader().setStretchLastSection(True); #充满列宽
|
||||
|
||||
self.geographicAnalysis_table.verticalHeader().setSectionResizeMode(1)#行高设置
|
||||
|
||||
self.geographicAnalysis_table.verticalHeader().setStretchLastSection(True); #充满行高
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
ui = GeographicAnalysis_Form()
|
||||
|
||||
ui.show()
|
||||
sys.exit(app.exec_())
|
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>113</width>
|
||||
<height>119</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(85, 170, 255);</string>
|
||||
</property>
|
||||
<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>
|
||||
<widget class="BaseTable" name="tableWidget">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</row>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>新建列</string>
|
||||
</property>
|
||||
</column>
|
||||
<item row="0" column="0">
|
||||
<property name="text">
|
||||
<string>地域分析</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<property name="text">
|
||||
<string>实时数据</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<property name="text">
|
||||
<string>标签工具</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BaseTable</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>BaseElement</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,82 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UThroughTrain4\L4.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(113, 119)
|
||||
Form.setStyleSheet("background-color: rgb(85, 170, 255);")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tableWidget = BaseTable(Form)
|
||||
self.tableWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.tableWidget.setObjectName("tableWidget")
|
||||
self.tableWidget.setColumnCount(1)
|
||||
self.tableWidget.setRowCount(3)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(1, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setVerticalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(0, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(1, 0, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
item.setTextAlignment(QtCore.Qt.AlignCenter)
|
||||
self.tableWidget.setItem(2, 0, item)
|
||||
self.tableWidget.horizontalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setVisible(False)
|
||||
self.tableWidget.verticalHeader().setHighlightSections(True)
|
||||
self.verticalLayout.addWidget(self.tableWidget)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
item = self.tableWidget.verticalHeaderItem(0)
|
||||
item.setText(_translate("Form", "1"))
|
||||
item = self.tableWidget.verticalHeaderItem(1)
|
||||
item.setText(_translate("Form", "2"))
|
||||
item = self.tableWidget.verticalHeaderItem(2)
|
||||
item.setText(_translate("Form", "3"))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("Form", "新建列"))
|
||||
__sortingEnabled = self.tableWidget.isSortingEnabled()
|
||||
self.tableWidget.setSortingEnabled(False)
|
||||
item = self.tableWidget.item(0, 0)
|
||||
item.setText(_translate("Form", "地域分析"))
|
||||
item = self.tableWidget.item(1, 0)
|
||||
item.setText(_translate("Form", "实时数据"))
|
||||
item = self.tableWidget.item(2, 0)
|
||||
item.setText(_translate("Form", "标签工具"))
|
||||
self.tableWidget.setSortingEnabled(__sortingEnabled)
|
||||
|
||||
from BaseElement import BaseTable
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Form = QtWidgets.QWidget()
|
||||
ui = Ui_Form()
|
||||
ui.setupUi(Form)
|
||||
Form.show()
|
||||
sys.exit(app.exec_())
|
||||
|
284
partner_625781186/5.hoverMenu/U_FuncWidget/BaseElement.py
Normal file
284
partner_625781186/5.hoverMenu/U_FuncWidget/BaseElement.py
Normal file
|
@ -0,0 +1,284 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
description: 抽象类模块
|
||||
|
||||
Created on 2018年7月7日
|
||||
|
||||
Author: 人间白头
|
||||
|
||||
email: 625781186@qq.com
|
||||
|
||||
'''
|
||||
import sip , functools
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets, QtCore
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
from Tools.qmf_showError import f_showERROR, w_showERROR
|
||||
from Tools.CommonHelper import CommonHelper
|
||||
|
||||
|
||||
SHOWMENU = {"yes":True , "no":False , "setShow":True , "setHide":False }
|
||||
ENTERMENU = {"yes":True , "no":False }
|
||||
|
||||
class SingeleWidget(QWidget):
|
||||
'''
|
||||
菜单栏的每个框。
|
||||
'''
|
||||
#1
|
||||
|
||||
Button_hideFlag = SHOWMENU["setHide"]
|
||||
|
||||
def __init__(self, parent=None):
|
||||
'''
|
||||
Button_hideFlag: 0 表明没有显示弹窗;1表示显示了弹窗。
|
||||
'''
|
||||
super(SingeleWidget, self).__init__(parent)
|
||||
|
||||
# 很重要 , 否则样式背景无效!
|
||||
self.setAttribute(Qt.WA_StyledBackground, True)
|
||||
|
||||
# 这个m_menu没有用, 有用的是main.py中生成的m_menu
|
||||
self.m_menu = QWidget()
|
||||
|
||||
# 用来测试qss的 , 可以注释掉
|
||||
self.setProperty("WID", "isTrue")
|
||||
|
||||
def enterEvent(self, e):
|
||||
|
||||
#设置菜单窗体的宽度
|
||||
self.m_menu.setMinimumWidth(self.width())
|
||||
self.m_menu.setMaximumWidth(self.width())
|
||||
|
||||
#我靠! 把菜单窗体对齐到按钮框
|
||||
menu_Pos = self.mapToGlobal(
|
||||
QPoint( self.parent().x() ,
|
||||
self.parent().height() )
|
||||
)
|
||||
|
||||
self.m_menu.move(menu_Pos)
|
||||
|
||||
self.m_menu.show()
|
||||
|
||||
#表明显示了弹窗
|
||||
self.Button_hideFlag = SHOWMENU["setShow"]
|
||||
|
||||
def leaveEvent(self, e):
|
||||
'''
|
||||
离开时判断是否显示了窗体,80ms后发射到_jugement去检测。
|
||||
'''
|
||||
if self.Button_hideFlag is SHOWMENU["yes"]: #显示了窗体
|
||||
QTimer.singleShot(80, self._jugement)
|
||||
|
||||
def _jugement(self):
|
||||
'''
|
||||
离开上面窗体之后80ms, 1:进入旁边的菜单框;2:进入弹出的菜单。
|
||||
'''
|
||||
if self.m_menu.Menu_hideFlag is ENTERMENU["no"]:
|
||||
self.m_menu.hide()
|
||||
self.m_menu.close()
|
||||
self.Button_hideFlag = SHOWMENU["setHide"]
|
||||
|
||||
#==================================================
|
||||
class BaseMenuWidget(QTableWidget):
|
||||
#2
|
||||
'''
|
||||
下拉菜单。
|
||||
'''
|
||||
m_currentRow = None
|
||||
m_currentCol = None
|
||||
|
||||
Menu_hideFlag = ENTERMENU["no"]
|
||||
|
||||
def __init__(self, parent=None):
|
||||
'''
|
||||
Menu_hideFlag: 0时隐藏,1时显示;
|
||||
'''
|
||||
|
||||
super(BaseMenuWidget, self).__init__(parent)
|
||||
|
||||
self.__initUI()
|
||||
|
||||
def __initUI(self):
|
||||
|
||||
#无边框,隐藏任务栏;
|
||||
self.setWindowFlags( Qt.FramelessWindowHint|Qt.Tool|Qt.Widget)
|
||||
#列宽设置
|
||||
self.horizontalHeader().setSectionResizeMode(3)
|
||||
#充满列宽
|
||||
self.horizontalHeader().setStretchLastSection(True)
|
||||
#行高模式
|
||||
self.verticalHeader().setSectionResizeMode(1)
|
||||
#充满行高
|
||||
self.verticalHeader().setStretchLastSection(True)
|
||||
#只读
|
||||
self.setEditTriggers(QAbstractItemView.NoEditTriggers)
|
||||
|
||||
# 隐藏表头
|
||||
self.horizontalHeader().setVisible(False);
|
||||
self.verticalHeader().setVisible(False);
|
||||
|
||||
# 关闭滑动条
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
|
||||
self.setColumnCount(1);
|
||||
self._setHeight()
|
||||
|
||||
# 不知道为啥main.py中的下拉菜单样式要重新赋予一次
|
||||
self.parent().readCSS(self)
|
||||
|
||||
def _setHeight(self):
|
||||
height = self.rowCount()*40
|
||||
self.setMinimumHeight(height)
|
||||
self.setMaximumHeight(height)
|
||||
|
||||
def enterEvent(self, e):
|
||||
#表明进入了弹窗
|
||||
self.Menu_hideFlag = ENTERMENU["yes"]
|
||||
|
||||
def leaveEvent(self, e):
|
||||
#表名离开了弹窗
|
||||
self.Menu_hideFlag = ENTERMENU["no"]
|
||||
self.hide()
|
||||
|
||||
#取消点击的按钮
|
||||
if self.m_currentRow is not None:
|
||||
self.clearSelection()
|
||||
self.cellWidget(self.m_currentRow,
|
||||
self.m_currentCol).setCheckable(False)
|
||||
|
||||
def _addAction(self, text, MyWidget=None, func=None, *args, **kwags):
|
||||
'''
|
||||
obj : QPushButton对象;
|
||||
text:obj的字;
|
||||
func:obj点击链接的信号;
|
||||
MyWidget:想要显示的窗体对象;
|
||||
'''
|
||||
self.insertRow(self.rowCount())
|
||||
self._setHeight()
|
||||
row = self.rowCount()-1
|
||||
col = self.columnCount()-1
|
||||
|
||||
obj = QPushButton(text)
|
||||
obj.setProperty("M_Action", "isTrue")
|
||||
obj.setFlat(True)
|
||||
obj.setCheckable(True);
|
||||
obj.setAutoExclusive(True);
|
||||
|
||||
#老子真聪明,哈哈
|
||||
#按钮默认连接changeTab函数
|
||||
if func == None :
|
||||
func = self.changeTab
|
||||
obj.clicked.connect(lambda: setattr(self , "m_currentRow" , row))
|
||||
obj.clicked.connect(lambda: setattr(self , "m_currentCol" , col))
|
||||
|
||||
obj.clicked.connect(functools.partial(
|
||||
func,
|
||||
text,
|
||||
MyWidget,
|
||||
*args,
|
||||
**kwags)
|
||||
)
|
||||
|
||||
self.setCellWidget(row, col , obj);
|
||||
|
||||
def _findParent(self, currentObj):
|
||||
'''
|
||||
递归找父窗口。
|
||||
'''
|
||||
|
||||
if currentObj.parent().objectName()=="MainWindow":
|
||||
return currentObj.parent()
|
||||
|
||||
#这里有返回值,返回倒数第二次的
|
||||
return self._findParent(currentObj.parent())
|
||||
|
||||
def changeTab(self, text, MyWidget, *args, **kwags):
|
||||
#返回的MainWindow
|
||||
mw = self._findParent(self)
|
||||
|
||||
#save:是否保留窗体;id:在mw.Wid_Obj 二级字典的键值;
|
||||
if "save" in kwags and "id" in kwags:
|
||||
save, id = kwags["save"], kwags["id"]
|
||||
#B1类-b1; B2类-b2;
|
||||
_key = "b"+ self.__class__.__name__[-1]
|
||||
# print(_key)
|
||||
childrens = mw.bottomWidget.children()[1:]
|
||||
if childrens!=[]:
|
||||
for obj in childrens:
|
||||
# 隐藏所有对象
|
||||
obj.setVisible(False)
|
||||
# 如果没有不可删除的属性,就删掉
|
||||
if not hasattr(obj, "SAVE"):
|
||||
sip.delete(obj)
|
||||
del obj
|
||||
|
||||
#如果为"s", 即对象不删除,保存到字典中;
|
||||
if save=="s":
|
||||
if MyWidget is not None:
|
||||
#第一次点击到时候判断是否存在二级字典中;
|
||||
if id in mw.Wid_Obj[_key].keys():
|
||||
print("存在wid_obj:", mw.Wid_Obj[_key][id])
|
||||
print("EXIT?:",mw.Wid_Obj[_key][id].SAVE )
|
||||
mw.Wid_Obj[_key][id].setVisible(True)
|
||||
else:
|
||||
#不存在则创建;
|
||||
print("saving..")
|
||||
obj_Widget = MyWidget()
|
||||
#动态添加不删除标志
|
||||
obj_Widget.SAVE = True
|
||||
#存对象
|
||||
mw.Wid_Obj[_key][id] = obj_Widget
|
||||
#加到布局
|
||||
mw.Bottom_Vbox.addWidget(obj_Widget)
|
||||
|
||||
elif save=="d":
|
||||
obj_Widget = MyWidget(mw)
|
||||
mw.Bottom_Vbox.addWidget(obj_Widget)
|
||||
|
||||
print(mw.Wid_Obj)
|
||||
|
||||
#==================================================
|
||||
class BaseButton(QPushButton):
|
||||
#1
|
||||
'''
|
||||
菜单栏的按钮的样式。
|
||||
'''
|
||||
def __init__(self, parent=None):
|
||||
|
||||
super(BaseButton, self).__init__(parent)
|
||||
|
||||
self.setMinimumWidth(70)
|
||||
self.setMaximumWidth(88)
|
||||
self.setMinimumHeight(self.width()) #保证是个正方形
|
||||
|
||||
self.setFocusPolicy(Qt.NoFocus) #无焦点,防止背景卡色
|
||||
self.setFlat(True) #无凸起阴影
|
||||
|
||||
self.clicked.connect(self._todo)
|
||||
|
||||
self.png = QLabel(self)
|
||||
|
||||
def _createLabel(self, path):
|
||||
'''
|
||||
path:主菜单图标的路径。
|
||||
'''
|
||||
self.png.resize(self.size())
|
||||
self.png_pixmap = QPixmap(path)
|
||||
self.png.setPixmap(self.png_pixmap)
|
||||
self.png.setScaledContents(True)
|
||||
pass
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
'''
|
||||
每个按钮要重新实现的功能函数。
|
||||
'''
|
||||
pass
|
||||
|
||||
def resizeEvent(self, e):
|
||||
self.setMinimumHeight(self.width())
|
||||
self.png.resize(self.size())
|
||||
|
97
partner_625781186/5.hoverMenu/U_FuncWidget/Menu.py
Normal file
97
partner_625781186/5.hoverMenu/U_FuncWidget/Menu.py
Normal file
|
@ -0,0 +1,97 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
description: 要增加菜单栏时,在这里添加。<br>
|
||||
|
||||
Created on 2018年7月7日
|
||||
|
||||
Author: 人间白头
|
||||
|
||||
email: 625781186@qq.com
|
||||
|
||||
BX: 主菜单按钮;<br>
|
||||
LX:子菜单按钮 BaseMenuWidget - 是个QTableWidget;<br>
|
||||
'''
|
||||
|
||||
from U_FuncWidget.BaseElement import *
|
||||
|
||||
from U_FuncWidget.UThroughTrain4 import GeographicAnalysis_Widget
|
||||
from U_FuncWidget.UCompetitiveProduct2 import SKU_Widget
|
||||
|
||||
#=========================== 店铺数据 ===========================
|
||||
|
||||
class B1( BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B1, self).__init__(parent)
|
||||
self._createLabel(":/static/store_data.png")
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
self.msg = QErrorMessage()
|
||||
self.msg.showMessage("你可以在此添加额外功能。")
|
||||
|
||||
class L1(BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L1, self).__init__(parent)
|
||||
|
||||
self._addAction("病人信息",
|
||||
GeographicAnalysis_Widget.Form,
|
||||
id="1", save= "s")
|
||||
self._addAction("病人", )
|
||||
|
||||
|
||||
#=========================== 竞品分析 ===========================
|
||||
class B2(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B2, self).__init__(parent)
|
||||
self._createLabel(":/static/competitiveProductAnalysis.png")
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B2, self)._todo()
|
||||
|
||||
class L2(BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L2, self).__init__(parent)
|
||||
|
||||
# 各种传入参数测试 , 也可关联到定义函数
|
||||
self._addAction("病人信息",
|
||||
SKU_Widget.Form,
|
||||
id="2", save= "s" )
|
||||
|
||||
self._addAction("检测1")
|
||||
|
||||
self._addAction("检测2", "hello" )
|
||||
|
||||
self._addAction("标定3", "word", self.cusTomerFunc)
|
||||
|
||||
self._addAction("标定4", "word",
|
||||
self.cusTomerFunc,
|
||||
id="4", save= "d" )
|
||||
|
||||
def cusTomerFunc(self, *a, **kw):
|
||||
self.changeTab("",
|
||||
GeographicAnalysis_Widget.Form,
|
||||
*a, **kw)
|
||||
print(a, kw)
|
||||
|
||||
#============================= 市场分析 ===========================
|
||||
class B3(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B3, self).__init__(parent)
|
||||
self._createLabel(":/static/search.png")
|
||||
|
||||
def _todo(self, *args, **kwgs):
|
||||
super(B3, self)._todo()
|
||||
|
||||
class L3(BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L3, self).__init__(parent)
|
||||
|
||||
|
||||
#============================ 直通车工具 ===========================
|
||||
class B4(BaseButton):
|
||||
def __init__(self, parent=None):
|
||||
super(B4, self).__init__(parent)
|
||||
self._createLabel(":/static/throughTrain.png")
|
||||
|
||||
class L4(BaseMenuWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(L4, self).__init__(parent)
|
||||
|
|
@ -12,7 +12,7 @@ from PyQt5.QtWidgets import *
|
|||
from .Ui_SKU_Widget import Ui_Form
|
||||
|
||||
|
||||
class SKU_Form(QWidget, Ui_Form):
|
||||
class Form(QWidget, Ui_Form):
|
||||
"""
|
||||
Class documentation goes here.
|
||||
"""
|
||||
|
@ -23,7 +23,7 @@ class SKU_Form(QWidget, Ui_Form):
|
|||
@param parent reference to the parent widget
|
||||
@type QWidget
|
||||
"""
|
||||
super(SKU_Form, self).__init__(parent)
|
||||
super(Form, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
if __name__ == "__main__":
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'D:\pyPro\hoverMenu\UCompetitiveProduct2\SKU_Widget.ui'
|
||||
# Form implementation generated from reading ui file 'D:\QGroup_432987409\WoHowLearn\0.M_I_pyqt\partner_625781186\5.hoverMenu\U_FuncWidget\UCompetitiveProduct2\SKU_Widget.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
# Created by: PyQt5 UI code generator 5.10.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
|
@ -0,0 +1 @@
|
|||
"""自定义界面."""
|
|
@ -0,0 +1 @@
|
|||
"""自定义界面."""
|
|
@ -0,0 +1 @@
|
|||
"""自定义界面."""
|
|
@ -12,7 +12,7 @@ from PyQt5.QtWidgets import *
|
|||
from .Ui_GeographicAnalysis_Widget import Ui_Form
|
||||
|
||||
|
||||
class GeographicAnalysis_Form(QWidget, Ui_Form):
|
||||
class Form(QWidget, Ui_Form):
|
||||
"""
|
||||
Class documentation goes here.
|
||||
"""
|
||||
|
@ -23,7 +23,7 @@ class GeographicAnalysis_Form(QWidget, Ui_Form):
|
|||
@param parent reference to the parent widget
|
||||
@type QWidget
|
||||
"""
|
||||
super(GeographicAnalysis_Form, self).__init__(parent)
|
||||
super(Form, self).__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.geographicAnalysis_table.horizontalHeader().setSectionResizeMode(1)#列宽设置
|
|
@ -0,0 +1 @@
|
|||
"""自定义界面."""
|
3
partner_625781186/5.hoverMenu/U_FuncWidget/__init__.py
Normal file
3
partner_625781186/5.hoverMenu/U_FuncWidget/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
"""
|
||||
添加功能及自定义界面.
|
||||
"""
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'D:\QGroup_432987409\WoHowLearn\0.M_I_pyqt\partner_625781186\5.hoverMenu\Main.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
# Created by: PyQt5 UI code generator 5.10.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
@ -11,15 +11,26 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(648, 493)
|
||||
MainWindow.setStyleSheet(" #MainWindow { border:none;}")
|
||||
MainWindow.resize(908, 518)
|
||||
MainWindow.setStyleSheet("* #MainWindow { border:none;}\n"
|
||||
" #widget{ border:none; }\n"
|
||||
"/*#topWidget QWidget{ background-color: green; }\n"
|
||||
"#widget QLabel{ background-color: rgb(85, 0, 255); }*/\n"
|
||||
"")
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setStyleSheet("#centralWidget {border:none;}")
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(2)
|
||||
self.verticalLayout.setContentsMargins(0, 2, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.toggleButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.toggleButton.setStyleSheet("background-color:#1d4371;\n"
|
||||
"\n"
|
||||
"border-radius:0px;")
|
||||
self.toggleButton.setFlat(True)
|
||||
self.toggleButton.setObjectName("toggleButton")
|
||||
self.verticalLayout.addWidget(self.toggleButton)
|
||||
self.widget = QtWidgets.QWidget(self.centralWidget)
|
||||
self.widget.setStyleSheet("#widget {border:none;}")
|
||||
self.widget.setObjectName("widget")
|
||||
|
@ -28,92 +39,14 @@ class Ui_MainWindow(object):
|
|||
self.verticalLayout_14.setSpacing(0)
|
||||
self.verticalLayout_14.setObjectName("verticalLayout_14")
|
||||
self.topWidget = QtWidgets.QWidget(self.widget)
|
||||
self.topWidget.setStyleSheet("#widget{ border:none; }")
|
||||
self.topWidget.setStyleSheet("")
|
||||
self.topWidget.setObjectName("topWidget")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(self.topWidget)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout.setSpacing(2)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.W1 = SingeleWidget(self.topWidget)
|
||||
self.W1.setObjectName("W1")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.W1)
|
||||
self.gridLayout.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout.setSpacing(2)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.filemenu_storeData_3 = B1(self.W1)
|
||||
self.filemenu_storeData_3.setText("")
|
||||
self.filemenu_storeData_3.setObjectName("filemenu_storeData_3")
|
||||
self.gridLayout.addWidget(self.filemenu_storeData_3, 0, 1, 1, 1)
|
||||
self.label_15 = QtWidgets.QLabel(self.W1)
|
||||
self.label_15.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_15.setObjectName("label_15")
|
||||
self.gridLayout.addWidget(self.label_15, 1, 1, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem, 0, 0, 1, 1)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem1, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W1)
|
||||
self.W2 = SingeleWidget(self.topWidget)
|
||||
self.W2.setObjectName("W2")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.W2)
|
||||
self.gridLayout_2.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(self.topWidget)
|
||||
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||
self.gridLayout_2.setSpacing(2)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.label_16 = QtWidgets.QLabel(self.W2)
|
||||
self.label_16.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_16.setObjectName("label_16")
|
||||
self.gridLayout_2.addWidget(self.label_16, 1, 1, 1, 1)
|
||||
self.filemenu_competitiveProductAnalysis_3 = B2(self.W2)
|
||||
self.filemenu_competitiveProductAnalysis_3.setText("")
|
||||
self.filemenu_competitiveProductAnalysis_3.setObjectName("filemenu_competitiveProductAnalysis_3")
|
||||
self.gridLayout_2.addWidget(self.filemenu_competitiveProductAnalysis_3, 0, 1, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_2.addItem(spacerItem2, 0, 0, 1, 1)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_2.addItem(spacerItem3, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W2)
|
||||
self.W3 = SingeleWidget(self.topWidget)
|
||||
self.W3.setObjectName("W3")
|
||||
self.gridLayout_4 = QtWidgets.QGridLayout(self.W3)
|
||||
self.gridLayout_4.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_4.setSpacing(2)
|
||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||
spacerItem4 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem4, 0, 0, 1, 1)
|
||||
self.filemenu_throughTrain_4 = B3(self.W3)
|
||||
self.filemenu_throughTrain_4.setAutoFillBackground(False)
|
||||
self.filemenu_throughTrain_4.setText("")
|
||||
self.filemenu_throughTrain_4.setObjectName("filemenu_throughTrain_4")
|
||||
self.gridLayout_4.addWidget(self.filemenu_throughTrain_4, 0, 1, 1, 1)
|
||||
self.label_19 = QtWidgets.QLabel(self.W3)
|
||||
self.label_19.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_19.setObjectName("label_19")
|
||||
self.gridLayout_4.addWidget(self.label_19, 1, 1, 1, 1)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem5, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W3)
|
||||
self.W4 = SingeleWidget(self.topWidget)
|
||||
self.W4.setObjectName("W4")
|
||||
self.gridLayout_5 = QtWidgets.QGridLayout(self.W4)
|
||||
self.gridLayout_5.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout_5.setSpacing(2)
|
||||
self.gridLayout_5.setObjectName("gridLayout_5")
|
||||
spacerItem6 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_5.addItem(spacerItem6, 0, 0, 1, 1)
|
||||
self.filemenu_throughTrain_3 = B4(self.W4)
|
||||
self.filemenu_throughTrain_3.setAutoFillBackground(False)
|
||||
self.filemenu_throughTrain_3.setText("")
|
||||
self.filemenu_throughTrain_3.setObjectName("filemenu_throughTrain_3")
|
||||
self.gridLayout_5.addWidget(self.filemenu_throughTrain_3, 0, 1, 1, 1)
|
||||
self.label_14 = QtWidgets.QLabel(self.W4)
|
||||
self.label_14.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_14.setObjectName("label_14")
|
||||
self.gridLayout_5.addWidget(self.label_14, 1, 1, 1, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_5.addItem(spacerItem7, 0, 2, 1, 1)
|
||||
self.horizontalLayout.addWidget(self.W4)
|
||||
self.verticalLayout_19 = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout_19.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout_19.setContentsMargins(-1, -1, 6, -1)
|
||||
self.verticalLayout_19.setSpacing(2)
|
||||
self.verticalLayout_19.setObjectName("verticalLayout_19")
|
||||
self.label_17 = QtWidgets.QLabel(self.topWidget)
|
||||
|
@ -124,26 +57,138 @@ class Ui_MainWindow(object):
|
|||
self.label_18.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_18.setObjectName("label_18")
|
||||
self.verticalLayout_19.addWidget(self.label_18)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_19)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(25, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem8)
|
||||
self.horizontalLayout.setStretch(0, 1)
|
||||
self.horizontalLayout.setStretch(1, 1)
|
||||
self.horizontalLayout.setStretch(2, 1)
|
||||
self.horizontalLayout.setStretch(3, 1)
|
||||
self.gridLayout_2.addLayout(self.verticalLayout_19, 1, 4, 1, 1)
|
||||
self.W2 = SingeleWidget(self.topWidget)
|
||||
self.W2.setObjectName("W2")
|
||||
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.W2)
|
||||
self.verticalLayout_5.setContentsMargins(9, 9, 9, 9)
|
||||
self.verticalLayout_5.setSpacing(2)
|
||||
self.verticalLayout_5.setObjectName("verticalLayout_5")
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_5.setSpacing(2)
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
self.filemenu_storeData_6 = B2(self.W2)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.filemenu_storeData_6.sizePolicy().hasHeightForWidth())
|
||||
self.filemenu_storeData_6.setSizePolicy(sizePolicy)
|
||||
self.filemenu_storeData_6.setText("")
|
||||
self.filemenu_storeData_6.setObjectName("filemenu_storeData_6")
|
||||
self.horizontalLayout_5.addWidget(self.filemenu_storeData_6)
|
||||
self.verticalLayout_5.addLayout(self.horizontalLayout_5)
|
||||
self.label_22 = QtWidgets.QLabel(self.W2)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_22.sizePolicy().hasHeightForWidth())
|
||||
self.label_22.setSizePolicy(sizePolicy)
|
||||
self.label_22.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_22.setObjectName("label_22")
|
||||
self.verticalLayout_5.addWidget(self.label_22)
|
||||
self.gridLayout_2.addWidget(self.W2, 1, 1, 1, 1)
|
||||
self.W4 = SingeleWidget(self.topWidget)
|
||||
self.W4.setObjectName("W4")
|
||||
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.W4)
|
||||
self.verticalLayout_7.setContentsMargins(9, 9, 9, 9)
|
||||
self.verticalLayout_7.setSpacing(2)
|
||||
self.verticalLayout_7.setObjectName("verticalLayout_7")
|
||||
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_7.setSpacing(2)
|
||||
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
||||
self.filemenu_storeData_8 = B4(self.W4)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.filemenu_storeData_8.sizePolicy().hasHeightForWidth())
|
||||
self.filemenu_storeData_8.setSizePolicy(sizePolicy)
|
||||
self.filemenu_storeData_8.setText("")
|
||||
self.filemenu_storeData_8.setObjectName("filemenu_storeData_8")
|
||||
self.horizontalLayout_7.addWidget(self.filemenu_storeData_8)
|
||||
self.verticalLayout_7.addLayout(self.horizontalLayout_7)
|
||||
self.label_24 = QtWidgets.QLabel(self.W4)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_24.sizePolicy().hasHeightForWidth())
|
||||
self.label_24.setSizePolicy(sizePolicy)
|
||||
self.label_24.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_24.setObjectName("label_24")
|
||||
self.verticalLayout_7.addWidget(self.label_24)
|
||||
self.gridLayout_2.addWidget(self.W4, 1, 3, 1, 1)
|
||||
self.W1 = SingeleWidget(self.topWidget)
|
||||
self.W1.setObjectName("W1")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.W1)
|
||||
self.verticalLayout_2.setContentsMargins(9, 9, 9, 9)
|
||||
self.verticalLayout_2.setSpacing(2)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setSpacing(2)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.filemenu_storeData_3 = B1(self.W1)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.filemenu_storeData_3.sizePolicy().hasHeightForWidth())
|
||||
self.filemenu_storeData_3.setSizePolicy(sizePolicy)
|
||||
self.filemenu_storeData_3.setText("")
|
||||
self.filemenu_storeData_3.setObjectName("filemenu_storeData_3")
|
||||
self.horizontalLayout_2.addWidget(self.filemenu_storeData_3)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
self.label_15 = QtWidgets.QLabel(self.W1)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_15.sizePolicy().hasHeightForWidth())
|
||||
self.label_15.setSizePolicy(sizePolicy)
|
||||
self.label_15.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_15.setObjectName("label_15")
|
||||
self.verticalLayout_2.addWidget(self.label_15)
|
||||
self.gridLayout_2.addWidget(self.W1, 1, 0, 1, 1)
|
||||
self.W3 = SingeleWidget(self.topWidget)
|
||||
self.W3.setObjectName("W3")
|
||||
self.gridLayout = QtWidgets.QGridLayout(self.W3)
|
||||
self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetMinAndMaxSize)
|
||||
self.gridLayout.setContentsMargins(9, 9, 9, 9)
|
||||
self.gridLayout.setSpacing(2)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label_23 = QtWidgets.QLabel(self.W3)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_23.sizePolicy().hasHeightForWidth())
|
||||
self.label_23.setSizePolicy(sizePolicy)
|
||||
self.label_23.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_23.setWordWrap(False)
|
||||
self.label_23.setObjectName("label_23")
|
||||
self.gridLayout.addWidget(self.label_23, 1, 0, 1, 1)
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_6.setSpacing(2)
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
self.filemenu_storeData_7 = B3(self.W3)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.filemenu_storeData_7.sizePolicy().hasHeightForWidth())
|
||||
self.filemenu_storeData_7.setSizePolicy(sizePolicy)
|
||||
self.filemenu_storeData_7.setText("")
|
||||
self.filemenu_storeData_7.setObjectName("filemenu_storeData_7")
|
||||
self.horizontalLayout_6.addWidget(self.filemenu_storeData_7)
|
||||
self.gridLayout.addLayout(self.horizontalLayout_6, 0, 0, 1, 1)
|
||||
self.gridLayout_2.addWidget(self.W3, 1, 2, 1, 1)
|
||||
self.verticalLayout_14.addWidget(self.topWidget)
|
||||
self.buttomWidget = QtWidgets.QWidget(self.widget)
|
||||
self.bottomWidget = QtWidgets.QWidget(self.widget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.buttomWidget.sizePolicy().hasHeightForWidth())
|
||||
self.buttomWidget.setSizePolicy(sizePolicy)
|
||||
self.buttomWidget.setObjectName("buttomWidget")
|
||||
self.Buttom_Vbox = QtWidgets.QVBoxLayout(self.buttomWidget)
|
||||
self.Buttom_Vbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.Buttom_Vbox.setSpacing(0)
|
||||
self.Buttom_Vbox.setObjectName("Buttom_Vbox")
|
||||
self.verticalLayout_14.addWidget(self.buttomWidget)
|
||||
sizePolicy.setHeightForWidth(self.bottomWidget.sizePolicy().hasHeightForWidth())
|
||||
self.bottomWidget.setSizePolicy(sizePolicy)
|
||||
self.bottomWidget.setObjectName("bottomWidget")
|
||||
self.Bottom_Vbox = QtWidgets.QVBoxLayout(self.bottomWidget)
|
||||
self.Bottom_Vbox.setContentsMargins(0, 0, 0, 0)
|
||||
self.Bottom_Vbox.setSpacing(0)
|
||||
self.Bottom_Vbox.setObjectName("Bottom_Vbox")
|
||||
self.verticalLayout_14.addWidget(self.bottomWidget)
|
||||
self.verticalLayout.addWidget(self.widget)
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
self.action1 = QtWidgets.QAction(MainWindow)
|
||||
|
@ -157,18 +202,22 @@ class Ui_MainWindow(object):
|
|||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
|
||||
self.label_15.setText(_translate("MainWindow", "店铺数据"))
|
||||
self.label_16.setText(_translate("MainWindow", "竞品分析"))
|
||||
self.label_19.setText(_translate("MainWindow", "直通车工具工具工具"))
|
||||
self.label_14.setText(_translate("MainWindow", "直通"))
|
||||
self.toggleButton.setText(_translate("MainWindow", "↑"))
|
||||
self.label_17.setText(_translate("MainWindow", "个人中心"))
|
||||
self.label_18.setText(_translate("MainWindow", "退出登录"))
|
||||
self.label_22.setText(_translate("MainWindow", "店铺数据"))
|
||||
self.label_24.setText(_translate("MainWindow", "店铺"))
|
||||
self.label_15.setText(_translate("MainWindow", "店铺数据"))
|
||||
self.label_23.setText(_translate("MainWindow", "店店店"))
|
||||
self.action1.setText(_translate("MainWindow", "1"))
|
||||
self.action2.setText(_translate("MainWindow", "2"))
|
||||
|
||||
from BaseElement import SingeleWidget
|
||||
from Menu import B1, B2, B3, B4
|
||||
from U_FuncWidget.BaseElement import SingeleWidget
|
||||
from U_FuncWidget.Menu import B1, B2, B3, B4
|
||||
try:
|
||||
import tbqrc_rc
|
||||
except:
|
||||
from . import tbqrc_rc
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-5.1.dtd">
|
||||
<!DOCTYPE Project SYSTEM "Project-6.0.dtd">
|
||||
<!-- eric project file for project hoverMenu -->
|
||||
<!-- Saved: 2018-07-07, 19:07:43 -->
|
||||
<!-- Saved: 2018-09-09, 22:34:07 -->
|
||||
<!-- Copyright (C) 2018 , -->
|
||||
<Project version="5.1">
|
||||
<Project version="6.0">
|
||||
<Language></Language>
|
||||
<Hash>873d0c0fade67dd54262d1b6954d5edfac966911</Hash>
|
||||
<ProgLanguage mixed="0">Python3</ProgLanguage>
|
||||
|
@ -13,40 +13,34 @@
|
|||
<Email></Email>
|
||||
<Eol index="0"/>
|
||||
<Sources>
|
||||
<Source>BaseElement.py</Source>
|
||||
<Source>CommonHelper.py</Source>
|
||||
<Source>Main.py</Source>
|
||||
<Source>Menu.py</Source>
|
||||
<Source>UCompetitiveProduct2/SKU_Widget.py</Source>
|
||||
<Source>UCompetitiveProduct2/Ui_L2.py</Source>
|
||||
<Source>UCompetitiveProduct2/Ui_SKU_Widget.py</Source>
|
||||
<Source>UMarketAnalysis3/Ui_L3.py</Source>
|
||||
<Source>UStoreData1/Ui_L1.py</Source>
|
||||
<Source>UThroughTrain4/GeographicAnalysis_Widget.py</Source>
|
||||
<Source>UThroughTrain4/Ui_GeographicAnalysis_Widget.py</Source>
|
||||
<Source>UThroughTrain4/Ui_L4.py</Source>
|
||||
<Source>Tools/CommonHelper.py</Source>
|
||||
<Source>Tools/__init__.py</Source>
|
||||
<Source>Tools/qmf_showError.py</Source>
|
||||
<Source>Tools/style.css</Source>
|
||||
<Source>U_FuncWidget/BaseElement.py</Source>
|
||||
<Source>U_FuncWidget/Menu.py</Source>
|
||||
<Source>U_FuncWidget/UCompetitiveProduct2/SKU_Widget.py</Source>
|
||||
<Source>U_FuncWidget/UCompetitiveProduct2/Ui_SKU_Widget.py</Source>
|
||||
<Source>U_FuncWidget/UCompetitiveProduct2/__init__.py</Source>
|
||||
<Source>U_FuncWidget/UStoreData1/Ui_L1.py</Source>
|
||||
<Source>U_FuncWidget/UThroughTrain4/GeographicAnalysis_Widget.py</Source>
|
||||
<Source>U_FuncWidget/UThroughTrain4/Ui_GeographicAnalysis_Widget.py</Source>
|
||||
<Source>U_FuncWidget/UThroughTrain4/__init__.py</Source>
|
||||
<Source>Ui_Main.py</Source>
|
||||
<Source>__init__.py</Source>
|
||||
<Source>tbqrc_rc.py</Source>
|
||||
</Sources>
|
||||
<Forms>
|
||||
<Form>Main.ui</Form>
|
||||
<Form>UCompetitiveProduct2/L2.ui</Form>
|
||||
<Form>UCompetitiveProduct2/SKU_Widget.ui</Form>
|
||||
<Form>UMarketAnalysis3/L3.ui</Form>
|
||||
<Form>UStoreData1/L1.ui</Form>
|
||||
<Form>UThroughTrain4/GeographicAnalysis_Widget.ui</Form>
|
||||
<Form>UThroughTrain4/GeographicAnalysis_Widget.ui</Form>
|
||||
<Form>UThroughTrain4/L4.ui</Form>
|
||||
<Form>U_FuncWidget/UCompetitiveProduct2/SKU_Widget.ui</Form>
|
||||
<Form>U_FuncWidget/UStoreData1/L1.ui</Form>
|
||||
<Form>U_FuncWidget/UThroughTrain4/GeographicAnalysis_Widget.ui</Form>
|
||||
</Forms>
|
||||
<Translations/>
|
||||
<Resources>
|
||||
<Resource>tbqrc.qrc</Resource>
|
||||
</Resources>
|
||||
<Interfaces/>
|
||||
<Others>
|
||||
<Other>Documentation</Other>
|
||||
<Other>/Documentation</Other>
|
||||
</Others>
|
||||
<Vcs>
|
||||
<VcsType>None</VcsType>
|
||||
|
@ -87,8 +81,8 @@
|
|||
</key>
|
||||
<value>
|
||||
<list>
|
||||
<string>tbqrc_rc.py</string>
|
||||
<string>Ui_Main.py</string>
|
||||
<string>Ui_*.py</string>
|
||||
<string>*_rc.py</string>
|
||||
</list>
|
||||
</value>
|
||||
<key>
|
||||
|
@ -103,6 +97,12 @@
|
|||
<value>
|
||||
<bool>False</bool>
|
||||
</value>
|
||||
<key>
|
||||
<string>useRecursion</string>
|
||||
</key>
|
||||
<value>
|
||||
<bool>True</bool>
|
||||
</value>
|
||||
</dict>
|
||||
</value>
|
||||
</dict>
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
## 更新 2018年9月9日
|
||||
- 在程序中定义 离开当前页面可以选择是删除数据还是保留 ;
|
||||
- 收缩动画 ;
|
||||
|
||||
# 进入式下拉菜单
|
||||
|
||||
![效果图](ScreenShot/2.gif)
|
||||
|
||||
[文档](Documentation/index-5.hoverMenu.md)
|
||||
## [程序文档 , emmm可能没什么用](Documentation/README-5.hoverMenu.md)
|
||||
|
||||
### 添加额外菜单
|
||||
- 1. 将W1整个窗体(连通子部件,按住Ctrl+鼠标左键复制),且对象名更改为W1-W9;
|
||||
|
||||
- 1.将W1整个窗体(连通子部件,按住Ctrl+鼠标左键复制);
|
||||
- 2.修改对象名更改为WX , 并将按钮的提升类设定为BX;
|
||||
### ↑这两点至关重要↑
|
||||
|
||||
![提升类.png](https://upload-images.jianshu.io/upload_images/10769157-aded44441a666282.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
|
||||
- 2.从复制旧的文件夹,并更改LX.ui中的每条;
|
||||
|
||||
![image.png](https://upload-images.jianshu.io/upload_images/10769157-e9d969a4ad55f05d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
|
||||
|
||||
- 3.在Menu.py中为你的菜单添加图标及事件;
|
||||
- BaseElement.py 对菜单栏的框/按钮/下拉菜单 定义;
|
||||
- Menu.py 对菜单栏按钮添加功能/对下拉菜单添加条目及功能;
|
||||
|
||||
![image.png](https://upload-images.jianshu.io/upload_images/10769157-9819676a7ed8329e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
|
||||
![image.png](https://upload-images.jianshu.io/upload_images/10769157-44f6e8eee864054e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
|
||||
|
||||
## 下一步要做的
|
||||
我不知道你能不能看懂我的文档,反正只是做一个思路,我自己也觉得太难用了,啥时候用空封装一下(估计一直懒一下);
|
||||
|
||||
也有可能寻找一种简单的解决办法。
|
||||
没想好;
|
Loading…
Reference in a new issue