summaryrefslogtreecommitdiff
path: root/cad/src/ne1_ui/menus/Ui_EditMenu.py
blob: 9e8e15d38a65b9fa0f279cfb4fbc137675d1ed7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 2004-2007 Nanorex, Inc.  See LICENSE file for details. 
"""
$Id$
"""

from PyQt4 import QtGui

def setupUi(win):
    """
    Populates the "Edit" menu which appears in the main window menu bar.

    @param win: NE1's main window object.
    @type  win: Ui_MainWindow
    """

    # Populate the "Edit" menu.
    win.editMenu.addAction(win.editMakeCheckpointAction) # hidden by default.
    win.editMenu.addAction(win.editUndoAction)
    win.editMenu.addAction(win.editRedoAction)
    win.editMenu.addAction(win.editAutoCheckpointingAction)
    win.editMenu.addAction(win.editClearUndoStackAction)
    win.editMenu.addSeparator()
    win.editMenu.addAction(win.editCutAction)
    win.editMenu.addAction(win.editCopyAction)
    win.editMenu.addAction(win.editPasteAction)
    win.editMenu.addAction(win.pasteFromClipboardAction)
    win.editMenu.addAction(win.editDeleteAction)
    win.editMenu.addSeparator()
    win.editMenu.addAction(win.editDnaDisplayStyleAction)
    win.editMenu.addAction(win.editProteinDisplayStyleAction)
    win.editMenu.addSeparator()
    win.editMenu.addAction(win.dispObjectColorAction)
    win.editMenu.addAction(win.dispObjectColorAction)
    win.editMenu.addSeparator()
    win.editMenu.addAction(win.dispObjectColorAction)
    win.editMenu.addAction(win.resetChunkColorAction)
    win.editMenu.addAction(win.colorSchemeAction)
    win.editMenu.addAction(win.lightingSchemeAction)
    win.editMenu.addSeparator()
    win.editMenu.addAction(win.editRenameSelectionAction)
    win.editMenu.addAction(win.editAddSuffixAction)

def retranslateUi(win):
    """
    Sets text related attributes for the "Edit" menu.

    @param win: NE1's mainwindow object.
    @type  win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>}
    """
    win.editMenu.setTitle(
        QtGui.QApplication.translate(
            "MainWindow", "&Edit", 
            None, QtGui.QApplication.UnicodeUTF8))