本文整理汇总了Python中circle.Circle.get_widget方法的典型用法代码示例。如果您正苦于以下问题:Python Circle.get_widget方法的具体用法?Python Circle.get_widget怎么用?Python Circle.get_widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类circle.Circle
的用法示例。
在下文中一共展示了Circle.get_widget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Tuner
# 需要导入模块: from circle import Circle [as 别名]
# 或者: from circle.Circle import get_widget [as 别名]
class Tuner(QtGui.QWidget):
def __init__(self, host="localhost", port=6499):
super(Tuner, self).__init__()
self.default_title = "Aura Tasks"
#self.chirp = None
#self.circle = None
#self.land = None
self.initUI()
self.load(host=host, port=port)
self.clean = True
def initUI(self):
self.setWindowTitle( self.default_title )
layout = QtGui.QVBoxLayout()
self.setLayout(layout)
# Main work area
self.tabs = QtGui.QTabWidget()
layout.addWidget( self.tabs )
#self.overview = Overview(changefunc=self.onChange)
#self.tabs.addTab( self.overview.get_widget(), "Overview" );
# 'File' button bar
file_group = QtGui.QFrame()
layout.addWidget(file_group)
file_layout = QtGui.QHBoxLayout()
file_group.setLayout( file_layout )
save = QtGui.QPushButton('Save')
save.clicked.connect(self.save)
file_layout.addWidget(save)
quit = QtGui.QPushButton('Quit')
quit.clicked.connect(self.quit)
file_layout.addWidget(quit)
file_layout.addStretch(1)
self.resize(800, 700)
self.show()
def load(self, host="localhost", port=6499):
print "Tuner.load " + str(port)
# Recalibrate page
self.recalibrate = Recalibrate(changefunc=self.onChange, host=host,
port=port)
self.tabs.addTab( self.recalibrate.get_widget(), "Recalibrate" )
# Preflight page
self.preflight = Preflight(changefunc=self.onChange, host=host,
port=port)
self.tabs.addTab( self.preflight.get_widget(), "Preflight" )
# Launch page
self.launch = Launch(changefunc=self.onChange, host=host, port=port)
self.tabs.addTab( self.launch.get_widget(), "Launch" )
# Circle hold page
self.circle = Circle(changefunc=self.onChange, host=host, port=port)
self.tabs.addTab( self.circle.get_widget(), "Circle" )
# Chirp page
self.chirp = Chirp(changefunc=self.onChange, host=host, port=port)
self.tabs.addTab( self.chirp.get_widget(), "Chirp" )
# Land page
self.land = Land(changefunc=self.onChange, host=host, port=port)
self.tabs.addTab( self.land.get_widget(), "Land" )
def save(self):
print "called for save, but does nothing yet"
def quit(self):
global data_fetcher_quit
data_fetcher_quit = True
QtCore.QCoreApplication.instance().quit()
def onChange(self):
#print "parent onChange() called!"
#result = self.rebuildTabNames()
#if result:
# self.rebuildWingLists()
self.clean = False
def isClean(self):
return self.clean
def setClean(self):
self.clean = True