本文整理汇总了Python中Window.openWindowsThread方法的典型用法代码示例。如果您正苦于以下问题:Python Window.openWindowsThread方法的具体用法?Python Window.openWindowsThread怎么用?Python Window.openWindowsThread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window.openWindowsThread方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Window [as 别名]
# 或者: from Window import openWindowsThread [as 别名]
def __init__(self):
QtGui.QMainWindow.__init__(self,None,QtCore.Qt.WindowStaysOnTopHint|QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground,True)
self.setAttribute(QtCore.Qt.WA_X11NetWmWindowTypeDock,True)
self.setWindowTitle("ducklauncher!!")#recognisable by wnck
self.activateWindow()
#screen size
d = QtGui.QDesktopWidget()
self.top_pos=0
self.s_width = d.availableGeometry().width()
self.s_height =d.availableGeometry().height()
self.top_pos= d.availableGeometry().y()
#Config values
conf=Config.get()
self.conf=conf
self.HALF_OPEN_POS=int(conf['size'])
self.ICO_TOP=self.HALF_OPEN_POS-5
self.OPEN_STATE_TOP=self.ICO_TOP*4+5
self.SIZE = 14
#Geometry
self.setGeometry(0,self.top_pos,self.HALF_OPEN_POS+9,self.s_height)
#Values
self.ICON_SIZE=int(conf['icon-size'])
self.apps_per_row = math.trunc(((self.s_width/3)-50)/ int(self.conf["icon-size"]))
self.apps_per_col = math.trunc(((self.s_height)-90)/ int(self.conf["icon-size"]))
self.apps_per_page=self.apps_per_col*self.apps_per_row
self.app_page_state=0
self.appRect=None
self.drawAppRect=False
self.pos_x=self.HALF_OPEN_POS-2
self.move=False
self.current_state="half_open"
self.activity="apps"
self.dock_apps = Apps.find_info(self.conf['dock-apps'])
self.current_text=''
self.allApps=Apps.info(self.current_text)
self.plugin=False
self.pl_rect_pos=0
self.pl_logo=None
self.fg_color=(int(self.conf['r']),int(self.conf['g']),int(self.conf['b']))
self.font_color=(int(self.conf['font-r']),int(self.conf['font-g']),int(self.conf['font-b']))
##Windows
#Enables the server which gets open windows
self.op_thread=Window.openWindowsThread()
self.op_thread.start()
self.connect(self.op_thread,QtCore.SIGNAL("new-window"),self.addOpenWindow)
self.connect(self.op_thread,QtCore.SIGNAL("remove-window"),self.updateOpenWindows)
self.open_windows=Window.get_open_windows()
self.ow_in_dock=[]
#Dock Apps Options Window
self.dock_options_win=DockAppsOptions.Window(parent=self)
#Webview (for plugins, files, and settings view)
self.webview=Widgets.pluginView(self)
self.webview.setGeometry(2,60,self.s_width/3-20,self.s_height-60)
#System window
self.sys_win=System.Window()
#Fake window, required to capture keyboard events
self.fakewin = Fakewin(10,10, self)
self.fakewin.show()
XlibStuff.fix_window(self.winId(),self.HALF_OPEN_POS+3,0,0,0)