本文整理匯總了Python中Files.getFiles方法的典型用法代碼示例。如果您正苦於以下問題:Python Files.getFiles方法的具體用法?Python Files.getFiles怎麽用?Python Files.getFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Files
的用法示例。
在下文中一共展示了Files.getFiles方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import Files [as 別名]
# 或者: from Files import getFiles [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 Files [as 別名]
# 或者: from Files import getFiles [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)