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

View File

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

File diff suppressed because it is too large Load Diff