本文整理汇总了Python中Window.open_windows方法的典型用法代码示例。如果您正苦于以下问题:Python Window.open_windows方法的具体用法?Python Window.open_windows怎么用?Python Window.open_windows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window.open_windows方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Window [as 别名]
# 或者: from Window import open_windows [as 别名]
def __init__(self):
QtGui.QMainWindow.__init__(self, None,QtCore.Qt.WindowStaysOnTopHint|QtCore.Qt.FramelessWindowHint)#| QtCore.Qt.X11BypassWindowManagerHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.setWindowTitle("ducklauncher")#recognisable by wnck
#screen size
d = QtGui.QDesktopWidget()
self.top_pos=0
self.s_width = d.availableGeometry().width()
self.s_height =d.availableGeometry().height()
d.resized.connect(self.updateSize)
#Config
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 = 15
self.R=int(conf['r'])
self.G=int(conf['g'])
self.B=int(conf['b'])
self.ICON_SIZE=int(conf['icon-size'])
#Geometry
self.setGeometry(0,0,self.HALF_OPEN_POS+4,self.s_height)
#reserve wndow space
#self.activateWindow()
xwin = XlibStuff.fix_window(self.winId(),self.HALF_OPEN_POS+5,0,0,0)
#
#Values
self.apps_per_row = math.trunc(((self.s_width/3)-30)/self.ICON_SIZE)
self.apps_per_col = math.trunc(((self.s_height)-30)/self.ICON_SIZE)
self.apps_per_page=self.apps_per_col*self.apps_per_row
self.app_page_state=0
self.files_page_state=0
self.Files = Files.getFiles()
self.pos_x=self.HALF_OPEN_POS
self.move=False
self.current_state="half_open"
self.activity="apps"
self.dock_apps = Apps.find_info(self.conf['dock-apps'])
self.current_text=''
#Update open windows
self.timer=QtCore.QTimer()
self.timer.setInterval(2000)
self.timer.start()
self.timer.timeout.connect(self.updateOpenWindows)
#
self.open_windows=window.get_open_windows()
self.open_win = window.open_windows()
self.open_state=False
#
self.settings_win = Settings.Window(self)
示例2: __init__
# 需要导入模块: import Window [as 别名]
# 或者: from Window import open_windows [as 别名]
def __init__(self):
QtGui.QMainWindow.__init__(self,None,QtCore.Qt.WindowStaysOnTopHint|QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.setAttribute(QtCore.Qt.WA_X11NetWmWindowTypeDock)
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()
#bg_width
#Config
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
#self.R=int(conf['r'])
#self.G=int(conf['g'])
#self.B=int(conf['b'])
#self.ICON_SIZE=int(conf['icon-size'])
#Geometry
self.setGeometry(0,self.top_pos,self.HALF_OPEN_POS+6,self.s_height)
#Values
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.appHtmlSource="/usr/share/duck-launcher/default-theme/apps.html"
self.appHtmlString=Template(open(self.appHtmlSource,"r").read()).render(color=(int(self.conf["r"]),int(self.conf["g"]),int(self.conf["b"])),font=str(self.conf["font"]), icon_size=int(self.conf["icon-size"]))
self.plugin=False
#Open windows window
self.open_windows=Window.get_open_windows()
self.open_win = Window.open_windows()
#Dock Apps Options Window
self.dock_options_win=DockAppsOptions.Window(parent=self)
#Webview for plugins
self.webview=QtWebKit.QWebView(self)
palette = self.webview.palette()
palette.setBrush(QtGui.QPalette.Base, QtCore.Qt.transparent)
self.webview.page().setPalette(palette)
self.webview.setAttribute(QtCore.Qt.WA_OpaquePaintEvent, False)
self.webview.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
self.webview.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
self.webview.connect(self.webview, QtCore.SIGNAL("linkClicked(const QUrl&)"), self.web_linkClicked)
self.webview.page().mainFrame().javaScriptWindowObjectCleared.connect(self.web_populateJavaScriptWindowObject)
self.webview.setHtml("<body style='background:rgb(230,100,80);'><input type='text' placehodler='aaa'></input></body>")
self.webview.setGeometry(2,50,self.s_width/3-20,self.s_height-50)
self.webview.activateWindow()
self.webview.hide()
#System window
self.sys_win=System.Window()
#Fake window
self.fakewin = Fakewin(10,10, self)
self.fakewin.show()
XlibStuff.fix_window(self.winId(),self.HALF_OPEN_POS+5,0,0,0)
示例3: __init__
# 需要导入模块: import Window [as 别名]
# 或者: from Window import open_windows [as 别名]
def __init__(self):
QtGui.QMainWindow.__init__(self, None,QtCore.Qt.WindowStaysOnTopHint|QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.setAttribute(QtCore.Qt.WA_X11NetWmWindowTypeDock)
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()
import Xlib
screen = Xlib.display.Display().screen().root.get_geometry()
self.top_pos= screen.height-self.s_height
#bg_width
#Config
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
self.R=int(conf['r'])
self.G=int(conf['g'])
self.B=int(conf['b'])
self.ICON_SIZE=int(conf['icon-size'])
#Geometry
self.setGeometry(0,self.top_pos,self.HALF_OPEN_POS+4,self.s_height)
#Values
self.apps_per_row = math.trunc(((self.s_width/3)-30)/self.ICON_SIZE)
self.apps_per_col = math.trunc(((self.s_height)-30)/self.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.files_page_state=0
self.Files = Files.getFiles()
self.pos_x=self.HALF_OPEN_POS
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)
#Update open windows
'''
self.timer=QtCore.QTimer()
self.timer.setInterval(1000)
self.timer.start()
self.timer.timeout.connect(self.updateOpenWindows)
'''
#Open windows window
self.open_windows=Window.get_open_windows()
self.open_win = Window.open_windows()
#Settings window
#self.settings_win = Settings.Window(self)
#System window
self.sys_win=System.Window()
#Fake window
self.fakewin = Fakewin(self.HALF_OPEN_POS,self.s_height, self)
self.fakewin.show()
XlibStuff.fix_window(self.fakewin.winId(),self.HALF_OPEN_POS+5,0,0,0)