# HG changeset patch # User Aziz K?ksal # Date 1192113262 -7200 # Node ID 0dba4c0e5234a5b6bb4c29301c9b3c00eaffa1c2 # Parent 156d6301d79e143371a384119d5950b8329a37ed Added AboutDialog to translator. diff -r 156d6301d79e -r 0dba4c0e5234 trunk/src/translator/about.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/translator/about.ui Thu Oct 11 16:34:22 2007 +0200 @@ -0,0 +1,70 @@ + + AboutDialog + + + Qt::WindowModal + + + + 0 + 0 + 414 + 157 + + + + About + + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A tool for managing message catalogues in different languages.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These catalogues can be used to make an application multilingual.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2007 by Aziz Köksal &lt;aziz.koeksal@gmail.com&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Licensed under the GPL2.</p></body></html> + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + AboutDialog + close() + + + 346 + 274 + + + 317 + 256 + + + + + diff -r 156d6301d79e -r 0dba4c0e5234 trunk/src/translator/translator.py --- a/trunk/src/translator/translator.py Tue Oct 09 20:57:16 2007 +0200 +++ b/trunk/src/translator/translator.py Thu Oct 11 16:34:22 2007 +0200 @@ -6,11 +6,26 @@ from PyQt4 import QtCore, QtGui from ui_translator import Ui_MainWindow +from ui_about import Ui_AboutDialog + +class MainWindow(QtGui.QMainWindow, Ui_MainWindow): + def __init__(self): + QtGui.QMainWindow.__init__(self) + self.setupUi(self) + + # Modifications + + # Custom connections + QtCore.QObject.connect(self.actionAbout, QtCore.SIGNAL("triggered()"), self.aboutDialog) + + def aboutDialog(self): + about = QtGui.QDialog() + Ui_AboutDialog().setupUi(about) + about.exec_() if __name__ == "__main__": - app = QtGui.QApplication(sys.argv) - main = QtGui.QMainWindow() - Ui_MainWindow().setupUi(main) - main.show() - sys.exit(app.exec_()) + app = QtGui.QApplication(sys.argv) + main = MainWindow() + main.show() + sys.exit(app.exec_()) diff -r 156d6301d79e -r 0dba4c0e5234 trunk/src/translator/translator.ui --- a/trunk/src/translator/translator.ui Tue Oct 09 20:57:16 2007 +0200 +++ b/trunk/src/translator/translator.ui Thu Oct 11 16:34:22 2007 +0200 @@ -82,7 +82,14 @@ + + + &Help + + + + @@ -93,6 +100,11 @@ Ctrl+Q + + + &About + + listView diff -r 156d6301d79e -r 0dba4c0e5234 trunk/src/translator/ui_about.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/translator/ui_about.py Thu Oct 11 16:34:22 2007 +0200 @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'about.ui' +# +# Created: Thu Oct 11 13:54:26 2007 +# by: PyQt4 UI code generator 4.1 +# +# WARNING! All changes made in this file will be lost! + +import sys +from PyQt4 import QtCore, QtGui + +class Ui_AboutDialog(object): + def setupUi(self, AboutDialog): + AboutDialog.setObjectName("AboutDialog") + AboutDialog.setWindowModality(QtCore.Qt.WindowModal) + AboutDialog.resize(QtCore.QSize(QtCore.QRect(0,0,414,157).size()).expandedTo(AboutDialog.minimumSizeHint())) + + self.vboxlayout = QtGui.QVBoxLayout(AboutDialog) + self.vboxlayout.setObjectName("vboxlayout") + + self.label1 = QtGui.QLabel(AboutDialog) + self.label1.setTextFormat(QtCore.Qt.RichText) + self.label1.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.label1.setWordWrap(True) + self.label1.setObjectName("label1") + self.vboxlayout.addWidget(self.label1) + + self.buttonBox = QtGui.QDialogButtonBox(AboutDialog) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.vboxlayout.addWidget(self.buttonBox) + + self.retranslateUi(AboutDialog) + QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("accepted()"),AboutDialog.close) + QtCore.QMetaObject.connectSlotsByName(AboutDialog) + + def retranslateUi(self, AboutDialog): + AboutDialog.setWindowTitle(QtGui.QApplication.translate("AboutDialog", "About", None, QtGui.QApplication.UnicodeUTF8)) + self.label1.setText(QtGui.QApplication.translate("AboutDialog", "\n" + "

A tool for managing message catalogues in different languages.

\n" + "

These catalogues can be used to make an application multilingual.

\n" + "

\n" + "

Copyright © 2007 by Aziz Köksal <aziz.koeksal@gmail.com>

\n" + "

Licensed under the GPL2.

", None, QtGui.QApplication.UnicodeUTF8)) + diff -r 156d6301d79e -r 0dba4c0e5234 trunk/src/translator/ui_translator.py --- a/trunk/src/translator/ui_translator.py Tue Oct 09 20:57:16 2007 +0200 +++ b/trunk/src/translator/ui_translator.py Thu Oct 11 16:34:22 2007 +0200 @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'translator.ui' # -# Created: Tue Oct 9 20:36:01 2007 +# Created: Wed Oct 10 22:04:31 2007 # by: PyQt4 UI code generator 4.1 # # WARNING! All changes made in this file will be lost! @@ -63,6 +63,9 @@ self.menu_File = QtGui.QMenu(self.menubar) self.menu_File.setObjectName("menu_File") + + self.menu_Help = QtGui.QMenu(self.menubar) + self.menu_Help.setObjectName("menu_Help") MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) @@ -71,8 +74,13 @@ self.actionQuit = QtGui.QAction(MainWindow) self.actionQuit.setObjectName("actionQuit") + + self.actionAbout = QtGui.QAction(MainWindow) + self.actionAbout.setObjectName("actionAbout") self.menu_File.addAction(self.actionQuit) + self.menu_Help.addAction(self.actionAbout) self.menubar.addAction(self.menu_File.menuAction()) + self.menubar.addAction(self.menu_Help.menuAction()) self.retranslateUi(MainWindow) QtCore.QObject.connect(self.pushButton,QtCore.SIGNAL("clicked()"),MainWindow.close) @@ -86,6 +94,8 @@ MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Translator", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8)) self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) + self.menu_Help.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8)) self.actionQuit.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8)) self.actionQuit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8)) + self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "&About", None, QtGui.QApplication.UnicodeUTF8))