Compare commits

...

10 Commits

7 changed files with 3231 additions and 1511 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
__pycache__

View File

@@ -1,6 +1,6 @@
## 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
![Main window in MATE](https://raw.github.com/rinaldus/photoframe/master/screenshots/screen1.jpg)
@@ -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.
## 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)
* Initial version

BIN
icons/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

15
kwin_rules-5.x.kwinrule Normal file
View 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

View File

@@ -61,7 +61,7 @@ class Window(QDialog):
self.ui = Ui_PhotoFrame()
self.ui.setupUi(self)
self.setWindowFlags(MainWindowType | Qt.WindowStaysOnBottomHint | Qt.FramelessWindowHint)
self.setWindowFlags(MainWindowType | Qt.FramelessWindowHint)
self.locked = True
self.resize(SizeX, SizeY)
self.move(PosX,PosY)
@@ -84,7 +84,7 @@ class Window(QDialog):
menu.addAction(QAction(QIcon(':icons/unlock.png'),"&Unlock", self, triggered=self.Unlock))
else:
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/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit))
menu.popup(self.mapToGlobal(point))
@@ -95,7 +95,7 @@ class Window(QDialog):
window.show()
def Lock(self):
window.setWindowFlags(MainWindowType | Qt.FramelessWindowHint | Qt.WindowStaysOnBottomHint)
window.setWindowFlags(MainWindowType | Qt.FramelessWindowHint)
self.locked = True
window.show()
@@ -103,8 +103,8 @@ class Window(QDialog):
SettingsSave()
QApplication.instance().quit()
def mousePressEvent(self,event):
if ((event.buttons() == QtCore.Qt.LeftButton) and (SettingsExist())):
def Refresh(self):
if (SettingsExist()):
setPicture(programSettings.value("directory"))
def resizeEvent(self,event):
@@ -113,15 +113,12 @@ class Window(QDialog):
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("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):
self.timer.setInterval(settings.ui.spinUpdateInterval.value()*1000*60)

View File

@@ -1,9 +1,10 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>icons/dummy.png</file>
<file>icons/menu_quit.png</file>
<file>icons/settings.png</file>
<file>icons/lock.png</file>
<file>icons/unlock.png</file>
</qresource>
<RCC>
<qresource prefix="/">
<file>icons/refresh.png</file>
<file>icons/dummy.png</file>
<file>icons/menu_quit.png</file>
<file>icons/settings.png</file>
<file>icons/lock.png</file>
<file>icons/unlock.png</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff