new Refresh context menu option instead of left mouse click on picture

This commit is contained in:
Rinaldus 2016-03-01 10:48:03 +03:00
parent 7043c22c95
commit 96664ad16a
4 changed files with 3202 additions and 1501 deletions

BIN
icons/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -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))
@ -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):

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