source: trunk/tools/writing_editor/ui/editor_ui.py @ 243

Revision 227, 6.7 KB checked in by bretzel_parpg, 11 years ago (diff)

Merged help with the editor and help with scripting into one help. Added syntax highlighting

Line 
1#!/usr/bin/python
2
3#   This file is part of PARPG.
4
5#   PARPG is free software: you can redistribute it and/or modify
6#   it under the terms of the GNU General Public License as published by
7#   the Free Software Foundation, either version 3 of the License, or
8#   (at your option) any later version.
9
10#   PARPG is distributed in the hope that it will be useful,
11#   but WITHOUT ANY WARRANTY; without even the implied warranty of
12#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13#   GNU General Public License for more details.
14
15#   You should have received a copy of the GNU General Public License
16#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>.
17
18from PyQt4 import QtCore, QtGui
19
20class Ui_writingEditor(object): 
21    def setupUi(self, writingEditor):
22        """
23        Configure the Ui
24        """
25        self.writingEditor = writingEditor
26        self.writingEditor.setObjectName("writingEditor")
27        self.writingEditor.resize(800, 456)
28        self.centralwidget = QtGui.QWidget(self.writingEditor)
29        self.centralwidget.setObjectName("centralwidget")
30
31        self.main_tabs = QtGui.QTabWidget(self.centralwidget)
32        self.main_tabs.setGeometry(QtCore.QRect(0, 0, 801, 421))
33        self.main_tabs.setObjectName("main_tabs")
34        self.editor_tab = QtGui.QWidget()
35        self.editor_tab.setObjectName("editor_tab")
36        self.main_edit = QtGui.QTextEdit(self.editor_tab)
37        self.main_edit.setGeometry(QtCore.QRect(0, 0, 791, 381))
38        self.main_edit.setObjectName("main_edit")
39        self.main_tabs.addTab(self.editor_tab, "")
40        self.dialog_map_tab = QtGui.QWidget()
41        self.dialog_map_tab.setObjectName("dialog_map_tab")
42        self.main_tabs.addTab(self.dialog_map_tab, "")
43        self.writingEditor.setCentralWidget(self.centralwidget)
44
45        self.menubar = QtGui.QMenuBar(self.writingEditor)
46        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26))
47        self.menubar.setObjectName("menubar")
48        self.menuFile = QtGui.QMenu(self.menubar)
49        self.menuFile.setObjectName("menuFile")
50        self.menuRecent_Files = QtGui.QMenu(self.menuFile)
51        self.menuRecent_Files.setObjectName("menuRecent_Files")
52        self.menuEdit = QtGui.QMenu(self.menubar)
53        self.menuEdit.setObjectName("menuEdit")
54        self.menuHelp = QtGui.QMenu(self.menubar)
55        self.menuHelp.setObjectName("menuHelp")
56        self.writingEditor.setMenuBar(self.menubar)
57
58        self.statusbar = QtGui.QStatusBar(self.writingEditor)
59        self.statusbar.setObjectName("statusbar")
60        self.writingEditor.setStatusBar(self.statusbar)
61
62        self.actionNew_File = QtGui.QAction(self.writingEditor)
63        self.actionNew_File.setObjectName("actionNew_File")
64        self.actionOpen_File = QtGui.QAction(self.writingEditor)
65        self.actionOpen_File.setObjectName("actionOpen_File")
66        self.actionSave = QtGui.QAction(self.writingEditor)
67        self.actionSave.setObjectName("actionSave")
68        self.actionSave_As = QtGui.QAction(self.writingEditor)
69        self.actionSave_As.setObjectName("actionSave_As")
70        self.actionPrint = QtGui.QAction(self.writingEditor)
71        self.actionPrint.setObjectName("actionPrint")
72        self.actionExit = QtGui.QAction(self.writingEditor)
73        self.actionExit.setObjectName("actionExit")
74
75        self.actionUndo = QtGui.QAction(self.writingEditor)
76        self.actionUndo.setObjectName("actionUndo")
77        self.actionRedo = QtGui.QAction(self.writingEditor)
78        self.actionRedo.setObjectName("actionRedo")
79        self.actionCopy = QtGui.QAction(self.writingEditor)
80        self.actionCopy.setObjectName("actionCopy")
81        self.actionCut = QtGui.QAction(self.writingEditor)
82        self.actionCut.setObjectName("actionCut")
83        self.actionPaste = QtGui.QAction(self.writingEditor)
84        self.actionPaste.setObjectName("actionPaste")
85        self.actionPreferences = QtGui.QAction(self.writingEditor)
86        self.actionPreferences.setObjectName("actionPreferences")
87
88        self.actionHelp = QtGui.QAction(self.writingEditor)
89        self.actionHelp.setObjectName("actionHelp")
90        self.actionAbout = QtGui.QAction(self.writingEditor)
91        self.actionAbout.setObjectName("actionAbout")
92
93        self.actionNone = QtGui.QAction(self.writingEditor)
94        self.actionNone.setObjectName("actionNone")
95        self.menuRecent_Files.addAction(self.actionNone)
96
97        self.menuFile.addAction(self.actionNew_File)
98        self.menuFile.addAction(self.actionOpen_File)
99        self.menuFile.addAction(self.menuRecent_Files.menuAction())
100        self.menuFile.addSeparator()
101        self.menuFile.addAction(self.actionSave)
102        self.menuFile.addAction(self.actionSave_As)
103        self.menuFile.addAction(self.actionPrint)
104        self.menuFile.addSeparator()
105        self.menuFile.addAction(self.actionExit)
106
107        self.menuEdit.addAction(self.actionUndo)
108        self.menuEdit.addAction(self.actionRedo)
109        self.menuEdit.addSeparator()
110        self.menuEdit.addAction(self.actionCopy)
111        self.menuEdit.addAction(self.actionCut)
112        self.menuEdit.addAction(self.actionPaste)
113        self.menuEdit.addSeparator()
114        self.menuEdit.addAction(self.actionPreferences)
115
116        self.menuHelp.addAction(self.actionHelp)
117        self.menuHelp.addAction(self.actionAbout)
118
119        self.menubar.addAction(self.menuFile.menuAction())
120        self.menubar.addAction(self.menuEdit.menuAction())
121        self.menubar.addAction(self.menuHelp.menuAction())
122
123        self.retranslateUi()
124        self.main_tabs.setCurrentIndex(0)
125        QtCore.QMetaObject.connectSlotsByName(self.writingEditor)
126
127    def retranslateUi(self):
128        """
129        Set all of the text
130        """
131        self.writingEditor.setWindowTitle(QtGui.QApplication.translate("writingEditor", "PARPG Writing Editor", None, QtGui.QApplication.UnicodeUTF8))
132        self.writingEditor.setWindowIcon(QtGui.QIcon('data/images/window_icon.png'))
133        self.main_tabs.setTabText(self.main_tabs.indexOf(self.editor_tab), QtGui.QApplication.translate("writingEditor", "Editor", None, QtGui.QApplication.UnicodeUTF8))
134        self.main_tabs.setTabText(self.main_tabs.indexOf(self.dialog_map_tab), QtGui.QApplication.translate("writingEditor", "Dialog Map", None, QtGui.QApplication.UnicodeUTF8))
135        self.menuFile.setTitle(QtGui.QApplication.translate("writingEditor", "File", None, QtGui.QApplication.UnicodeUTF8))
136        self.menuRecent_Files.setTitle(QtGui.QApplication.translate("writingEditor", "Recent Files", None, QtGui.QApplication.UnicodeUTF8))
137        self.menuEdit.setTitle(QtGui.QApplication.translate("writingEditor", "Edit", None, QtGui.QApplication.UnicodeUTF8))
138        self.menuHelp.setTitle(QtGui.QApplication.translate("writingEditor", "Help", None, QtGui.QApplication.UnicodeUTF8))
139
Note: See TracBrowser for help on using the repository browser.