You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.3 KiB
34 lines
1.3 KiB
# -*- coding: utf-8 -*-
|
|
|
|
from PySide import QtGui
|
|
|
|
class MainMenu():
|
|
def __init__(self, parent):
|
|
image_path = '/usr/share/icons/hicolor/48x48/client-gui/'
|
|
exitAction = QtGui.QAction(QtGui.QIcon(image_path + 'Exit.png'), \
|
|
'&Exit', parent)
|
|
exitAction.setShortcut('Ctrl+Q')
|
|
exitAction.setStatusTip('Exit application')
|
|
exitAction.triggered.connect(parent.close)
|
|
|
|
toolAction = QtGui.QAction(QtGui.QIcon(image_path + 'tool.png'), \
|
|
'&Tool', parent)
|
|
toolAction.setShortcut('Ctrl+T')
|
|
toolAction.setStatusTip('Tool application')
|
|
toolAction.triggered.connect(parent.tools)
|
|
|
|
helpAction = QtGui.QAction(QtGui.QIcon(image_path + 'help.png'), \
|
|
'&Help', parent)
|
|
helpAction.setShortcut('Ctrl+H')
|
|
helpAction.setStatusTip('Help')
|
|
helpAction.triggered.connect(parent.help)
|
|
|
|
parent.toolbar = parent.addToolBar('Main')
|
|
|
|
parent.toolbar.addAction(toolAction)
|
|
parent.toolbar.addAction(helpAction)
|
|
parent.toolbar.addAction(exitAction)
|
|
|
|
# menubar = parent.menuBar()
|
|
# fileMenu = menubar.addMenu('&File')
|
|
# fileMenu.addAction(exitAction) |