source: trunk/PARPG/tools/Writing Editor/ui/editor_ui.py @ 217

Revision 217, 7.2 KB checked in by bretzel_parpg, 10 years ago (diff)

This is what I have so far for the writing editor. All the features in it are fully functional except
for the dialog map.
NOTE: You will have to have PyQt4 installed for this application to run. There are some instructions in
the readme but it is incomplete

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.menuHelp_2 = QtGui.QMenu(self.menuHelp)
57        self.menuHelp_2.setObjectName("menuHelp_2")
58        self.writingEditor.setMenuBar(self.menubar)
59
60        self.statusbar = QtGui.QStatusBar(self.writingEditor)
61        self.statusbar.setObjectName("statusbar")
62        self.writingEditor.setStatusBar(self.statusbar)
63
64        self.actionNew_File = QtGui.QAction(self.writingEditor)
65        self.actionNew_File.setObjectName("actionNew_File")
66        self.actionOpen_File = QtGui.QAction(self.writingEditor)
67        self.actionOpen_File.setObjectName("actionOpen_File")
68        self.actionSave = QtGui.QAction(self.writingEditor)
69        self.actionSave.setObjectName("actionSave")
70        self.actionSave_As = QtGui.QAction(self.writingEditor)
71        self.actionSave_As.setObjectName("actionSave_As")
72        self.actionPrint = QtGui.QAction(self.writingEditor)
73        self.actionPrint.setObjectName("actionPrint")
74        self.actionExit = QtGui.QAction(self.writingEditor)
75        self.actionExit.setObjectName("actionExit")
76
77        self.actionUndo = QtGui.QAction(self.writingEditor)
78        self.actionUndo.setObjectName("actionUndo")
79        self.actionRedo = QtGui.QAction(self.writingEditor)
80        self.actionRedo.setObjectName("actionRedo")
81        self.actionCopy = QtGui.QAction(self.writingEditor)
82        self.actionCopy.setObjectName("actionCopy")
83        self.actionCut = QtGui.QAction(self.writingEditor)
84        self.actionCut.setObjectName("actionCut")
85        self.actionPaste = QtGui.QAction(self.writingEditor)
86        self.actionPaste.setObjectName("actionPaste")
87        self.actionPreferences = QtGui.QAction(self.writingEditor)
88        self.actionPreferences.setObjectName("actionPreferences")
89
90        self.actionHelp_with_Editor = QtGui.QAction(self.writingEditor)
91        self.actionHelp_with_Editor.setObjectName("actionHelp_with_Editor")
92        self.actionHelp_With_Scripting = QtGui.QAction(self.writingEditor)
93        self.actionHelp_With_Scripting.setObjectName("actionHelp_With_Scripting")
94        self.actionAbout = QtGui.QAction(self.writingEditor)
95        self.actionAbout.setObjectName("actionAbout")
96
97        self.actionNone = QtGui.QAction(self.writingEditor)
98        self.actionNone.setObjectName("actionNone")
99        self.menuRecent_Files.addAction(self.actionNone)
100
101        self.menuFile.addAction(self.actionNew_File)
102        self.menuFile.addAction(self.actionOpen_File)
103        self.menuFile.addAction(self.menuRecent_Files.menuAction())
104        self.menuFile.addSeparator()
105        self.menuFile.addAction(self.actionSave)
106        self.menuFile.addAction(self.actionSave_As)
107        self.menuFile.addAction(self.actionPrint)
108        self.menuFile.addSeparator()
109        self.menuFile.addAction(self.actionExit)
110
111        self.menuEdit.addAction(self.actionUndo)
112        self.menuEdit.addAction(self.actionRedo)
113        self.menuEdit.addSeparator()
114        self.menuEdit.addAction(self.actionCopy)
115        self.menuEdit.addAction(self.actionCut)
116        self.menuEdit.addAction(self.actionPaste)
117        self.menuEdit.addSeparator()
118        self.menuEdit.addAction(self.actionPreferences)
119
120        self.menuHelp_2.addAction(self.actionHelp_with_Editor)
121        self.menuHelp_2.addAction(self.actionHelp_With_Scripting)
122        self.menuHelp.addAction(self.menuHelp_2.menuAction())
123        self.menuHelp.addAction(self.actionAbout)
124
125        self.menubar.addAction(self.menuFile.menuAction())
126        self.menubar.addAction(self.menuEdit.menuAction())
127        self.menubar.addAction(self.menuHelp.menuAction())
128
129        self.retranslateUi()
130        self.main_tabs.setCurrentIndex(0)
131        QtCore.QMetaObject.connectSlotsByName(self.writingEditor)
132
133    def retranslateUi(self):
134        """
135        Set all of the text
136        """
137        self.writingEditor.setWindowTitle(QtGui.QApplication.translate("writingEditor", "PARPG Writing Editor", None, QtGui.QApplication.UnicodeUTF8))
138        self.writingEditor.setWindowIcon(QtGui.QIcon('data/images/window_icon.png'))
139        self.main_tabs.setTabText(self.main_tabs.indexOf(self.editor_tab), QtGui.QApplication.translate("writingEditor", "Editor", None, QtGui.QApplication.UnicodeUTF8))
140        self.main_tabs.setTabText(self.main_tabs.indexOf(self.dialog_map_tab), QtGui.QApplication.translate("writingEditor", "Dialog Map", None, QtGui.QApplication.UnicodeUTF8))
141        self.menuFile.setTitle(QtGui.QApplication.translate("writingEditor", "File", None, QtGui.QApplication.UnicodeUTF8))
142        self.menuRecent_Files.setTitle(QtGui.QApplication.translate("writingEditor", "Recent Files", None, QtGui.QApplication.UnicodeUTF8))
143        self.menuEdit.setTitle(QtGui.QApplication.translate("writingEditor", "Edit", None, QtGui.QApplication.UnicodeUTF8))
144        self.menuHelp.setTitle(QtGui.QApplication.translate("writingEditor", "Help", None, QtGui.QApplication.UnicodeUTF8))
145        self.menuHelp_2.setTitle(QtGui.QApplication.translate("writingEditor", "Help", None, QtGui.QApplication.UnicodeUTF8))
146
Note: See TracBrowser for help on using the repository browser.