Compare commits
10 Commits
7043c22c95
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cdeb25f221 | |||
| 82ece43ac1 | |||
| e2081d4540 | |||
| 83bb1ceaf2 | |||
| 36256e6ac7 | |||
| e1f38077bb | |||
| fffdc47937 | |||
| 9c5033ee2e | |||
| 8c7f3fd930 | |||
| 96664ad16a |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__pycache__
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
## About
|
## About
|
||||||
|
|
||||||
This is Light weight desktop widget, that shows random picture from given directory. It's similar to the same plasmoid from KDE 4.x. I very liked it and was very upset when KDE 4 became obsolete and there's no alternative plasmoid in KDE 5. That's why I decided to write it myself. It was written in Python 3 and PyQt 5 and it's compatible with all known desktop environments.
|
This is light weight desktop widget, that shows random picture from given directory. It's similar to the same plasmoid from KDE 4.x. I very liked it and was very upset when KDE 4 became obsolete and there's no alternative plasmoid in KDE 5. That's why I decided to write it myself. It was written in Python 3 and PyQt 5 and it's compatible with all known desktop environments.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||

|

|
||||||
@@ -23,5 +23,11 @@ After program start, you have to set directory with many pictures or photos in "
|
|||||||
* Click on picture to choose another random picture immediately. You can also set update interval for automatic change.
|
* Click on picture to choose another random picture immediately. You can also set update interval for automatic change.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### Version 1.01 (release date: 05.07.16)
|
||||||
|
* New Refresh context menu option instead of left mouse click on picture
|
||||||
|
* Code cleaning
|
||||||
|
* Several bug fixes
|
||||||
|
|
||||||
### Version 1.0 (release date: 29.02.16)
|
### Version 1.0 (release date: 29.02.16)
|
||||||
* Initial version
|
* Initial version
|
||||||
|
|||||||
BIN
icons/refresh.png
Normal file
BIN
icons/refresh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
15
kwin_rules-5.x.kwinrule
Normal file
15
kwin_rules-5.x.kwinrule
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[Параметры приложения для photoframe]
|
||||||
|
Description=Параметры приложения для photoframe
|
||||||
|
clientmachine=localhost
|
||||||
|
clientmachinematch=0
|
||||||
|
desktop=-1
|
||||||
|
desktoprule=2
|
||||||
|
fsplevel=2
|
||||||
|
fsplevelrule=2
|
||||||
|
skippager=true
|
||||||
|
skippagerrule=2
|
||||||
|
skiptaskbar=true
|
||||||
|
skiptaskbarrule=2
|
||||||
|
wmclass=photoframe
|
||||||
|
wmclasscomplete=false
|
||||||
|
wmclassmatch=1
|
||||||
@@ -61,7 +61,7 @@ class Window(QDialog):
|
|||||||
|
|
||||||
self.ui = Ui_PhotoFrame()
|
self.ui = Ui_PhotoFrame()
|
||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
self.setWindowFlags(MainWindowType | Qt.WindowStaysOnBottomHint | Qt.FramelessWindowHint)
|
self.setWindowFlags(MainWindowType | Qt.FramelessWindowHint)
|
||||||
self.locked = True
|
self.locked = True
|
||||||
self.resize(SizeX, SizeY)
|
self.resize(SizeX, SizeY)
|
||||||
self.move(PosX,PosY)
|
self.move(PosX,PosY)
|
||||||
@@ -84,7 +84,7 @@ class Window(QDialog):
|
|||||||
menu.addAction(QAction(QIcon(':icons/unlock.png'),"&Unlock", self, triggered=self.Unlock))
|
menu.addAction(QAction(QIcon(':icons/unlock.png'),"&Unlock", self, triggered=self.Unlock))
|
||||||
else:
|
else:
|
||||||
menu.addAction(QAction(QIcon(':icons/lock.png'),"&Lock", self, triggered=self.Lock))
|
menu.addAction(QAction(QIcon(':icons/lock.png'),"&Lock", self, triggered=self.Lock))
|
||||||
|
menu.addAction(QAction(QIcon(':icons/refresh.png'),"&Refresh", self, triggered=self.Refresh))
|
||||||
menu.addAction(QAction(QIcon(':icons/settings.png'),"&Settings", self, triggered=settings.show))
|
menu.addAction(QAction(QIcon(':icons/settings.png'),"&Settings", self, triggered=settings.show))
|
||||||
menu.addAction(QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit))
|
menu.addAction(QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit))
|
||||||
menu.popup(self.mapToGlobal(point))
|
menu.popup(self.mapToGlobal(point))
|
||||||
@@ -95,7 +95,7 @@ class Window(QDialog):
|
|||||||
window.show()
|
window.show()
|
||||||
|
|
||||||
def Lock(self):
|
def Lock(self):
|
||||||
window.setWindowFlags(MainWindowType | Qt.FramelessWindowHint | Qt.WindowStaysOnBottomHint)
|
window.setWindowFlags(MainWindowType | Qt.FramelessWindowHint)
|
||||||
self.locked = True
|
self.locked = True
|
||||||
window.show()
|
window.show()
|
||||||
|
|
||||||
@@ -103,8 +103,8 @@ class Window(QDialog):
|
|||||||
SettingsSave()
|
SettingsSave()
|
||||||
QApplication.instance().quit()
|
QApplication.instance().quit()
|
||||||
|
|
||||||
def mousePressEvent(self,event):
|
def Refresh(self):
|
||||||
if ((event.buttons() == QtCore.Qt.LeftButton) and (SettingsExist())):
|
if (SettingsExist()):
|
||||||
setPicture(programSettings.value("directory"))
|
setPicture(programSettings.value("directory"))
|
||||||
|
|
||||||
def resizeEvent(self,event):
|
def resizeEvent(self,event):
|
||||||
@@ -113,15 +113,12 @@ class Window(QDialog):
|
|||||||
|
|
||||||
|
|
||||||
def moveEvent(self,event):
|
def moveEvent(self,event):
|
||||||
|
if (self.locked):
|
||||||
|
# The following hack is for KWin 5.x because it can move even locked windows, even frameless windows. Now if you try to move locked window, it goes back.
|
||||||
|
self.move(int(programSettings.value("PosX")),int(programSettings.value("PosY")))
|
||||||
|
event.ignore()
|
||||||
programSettings.setValue("PosX",window.x())
|
programSettings.setValue("PosX",window.x())
|
||||||
programSettings.setValue("PosY",window.y())
|
programSettings.setValue("PosY",window.y())
|
||||||
if (window.x() > 1920 or window.y() > 1000):
|
|
||||||
PosX = 1700
|
|
||||||
PosY = 1000
|
|
||||||
window.move(PosX,PosY)
|
|
||||||
if (window.x() < 0):
|
|
||||||
PosX = 0
|
|
||||||
window.move(PosX,window.y())
|
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.timer.setInterval(settings.ui.spinUpdateInterval.value()*1000*60)
|
self.timer.setInterval(settings.ui.spinUpdateInterval.value()*1000*60)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
<file>icons/refresh.png</file>
|
||||||
<file>icons/dummy.png</file>
|
<file>icons/dummy.png</file>
|
||||||
<file>icons/menu_quit.png</file>
|
<file>icons/menu_quit.png</file>
|
||||||
<file>icons/settings.png</file>
|
<file>icons/settings.png</file>
|
||||||
<file>icons/lock.png</file>
|
<file>icons/lock.png</file>
|
||||||
<file>icons/unlock.png</file>
|
<file>icons/unlock.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
4680
resources_rc.py
4680
resources_rc.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user