mirror of
https://github.com/vale981/rmview
synced 2025-03-05 09:11:39 -05:00
Global menu bar
This commit is contained in:
parent
173c0e8d2a
commit
7593b7d9ad
1 changed files with 17 additions and 14 deletions
|
@ -67,6 +67,7 @@ class rMViewApp(QApplication):
|
||||||
self.trailDelay = self.config.get('pen_trail', 200)
|
self.trailDelay = self.config.get('pen_trail', 200)
|
||||||
self.trail = None if self.trailDelay == 0 else False
|
self.trail = None if self.trailDelay == 0 else False
|
||||||
|
|
||||||
|
self.bar = QMenuBar()
|
||||||
self.setWindowIcon(QIcon(':/assets/rmview.svg'))
|
self.setWindowIcon(QIcon(':/assets/rmview.svg'))
|
||||||
|
|
||||||
self.viewer = QtImageViewer()
|
self.viewer = QtImageViewer()
|
||||||
|
@ -96,20 +97,22 @@ class rMViewApp(QApplication):
|
||||||
self.autoResize(HEIGHT / WIDTH)
|
self.autoResize(HEIGHT / WIDTH)
|
||||||
self.orient = True
|
self.orient = True
|
||||||
|
|
||||||
# bar = QMenuBar()
|
# Setup global menu
|
||||||
# menu = bar.addMenu('&View')
|
menu = self.bar.addMenu('&View')
|
||||||
# act = QAction('Rotate clockwise', self)
|
act = QAction('Rotate clockwise', self)
|
||||||
# act.setShortcut('Ctrl+Right')
|
act.setShortcut('Ctrl+Right')
|
||||||
# act.triggered.connect(self.viewer.rotateCW)
|
act.triggered.connect(self.viewer.rotateCW)
|
||||||
# menu.addAction(act)
|
menu.addAction(act)
|
||||||
# act = QAction('Rotate counter-clockwise', self)
|
act = QAction('Rotate counter-clockwise', self)
|
||||||
# act.setShortcut('Ctrl+Left')
|
act.setShortcut('Ctrl+Left')
|
||||||
# act.triggered.connect(self.viewer.rotateCCW)
|
act.triggered.connect(self.viewer.rotateCCW)
|
||||||
# menu.addAction(act)
|
menu.addAction(act)
|
||||||
# menu.addSeparator()
|
menu.addSeparator()
|
||||||
# act = QAction('Save screenshot', self)
|
act = QAction('Save screenshot', self)
|
||||||
# act.setShortcut('Ctrl+S')
|
act.setShortcut('Ctrl+S')
|
||||||
# act.triggered.connect(self.viewer.screenshot)
|
act.triggered.connect(self.viewer.screenshot)
|
||||||
|
menu.addAction(act)
|
||||||
|
menu.addSeparator()
|
||||||
|
|
||||||
|
|
||||||
if not self.ensureConnConfig(): # I know, it's ugly
|
if not self.ensureConnConfig(): # I know, it's ugly
|
||||||
|
|
Loading…
Add table
Reference in a new issue