Resource file and enhanced article dialog
[biaweb_qt.git] / ui_article_dialog.py
index 4c17e77..3c62d78 100644 (file)
@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'article_dialog.ui'
 #
-# Created: Fri Nov 26 21:22:47 2010
+# Created: Sat Nov 27 10:58:22 2010
 #      by: PyQt4 UI code generator 4.7.4
 #
 # WARNING! All changes made in this file will be lost!
@@ -12,7 +12,9 @@ from PyQt4 import QtCore, QtGui
 class Ui_ArticleDialog(object):
     def setupUi(self, ArticleDialog):
         ArticleDialog.setObjectName("ArticleDialog")
-        ArticleDialog.resize(660, 506)
+        ArticleDialog.resize(624, 544)
+        ArticleDialog.setSizeGripEnabled(True)
+        ArticleDialog.setModal(True)
         self.gridLayout = QtGui.QGridLayout(ArticleDialog)
         self.gridLayout.setObjectName("gridLayout")
         self.label = QtGui.QLabel(ArticleDialog)
@@ -20,53 +22,200 @@ class Ui_ArticleDialog(object):
         self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
         self.article_title = QtGui.QLineEdit(ArticleDialog)
         self.article_title.setObjectName("article_title")
-        self.gridLayout.addWidget(self.article_title, 0, 1, 1, 4)
+        self.gridLayout.addWidget(self.article_title, 0, 3, 1, 14)
         self.label_2 = QtGui.QLabel(ArticleDialog)
         self.label_2.setObjectName("label_2")
-        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
+        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 2)
         self.keywords = QtGui.QLineEdit(ArticleDialog)
         self.keywords.setObjectName("keywords")
-        self.gridLayout.addWidget(self.keywords, 1, 1, 1, 4)
+        self.gridLayout.addWidget(self.keywords, 1, 3, 1, 14)
         self.label_3 = QtGui.QLabel(ArticleDialog)
         self.label_3.setObjectName("label_3")
-        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
+        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 2)
         self.summary = QtGui.QPlainTextEdit(ArticleDialog)
         self.summary.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
+        self.summary.setTabChangesFocus(True)
         self.summary.setObjectName("summary")
-        self.gridLayout.addWidget(self.summary, 2, 1, 1, 4)
+        self.gridLayout.addWidget(self.summary, 2, 3, 1, 14)
         self.label_5 = QtGui.QLabel(ArticleDialog)
         self.label_5.setObjectName("label_5")
-        self.gridLayout.addWidget(self.label_5, 3, 0, 1, 2)
+        self.gridLayout.addWidget(self.label_5, 3, 0, 1, 3)
+        self.bold = QtGui.QToolButton(ArticleDialog)
+        font = QtGui.QFont()
+        font.setWeight(75)
+        font.setBold(True)
+        self.bold.setFont(font)
+        self.bold.setText("")
+        icon = QtGui.QIcon()
+        icon.addPixmap(QtGui.QPixmap(":/bia/resources/bold.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.bold.setIcon(icon)
+        self.bold.setAutoRaise(False)
+        self.bold.setObjectName("bold")
+        self.gridLayout.addWidget(self.bold, 4, 0, 1, 1)
+        self.italic = QtGui.QToolButton(ArticleDialog)
+        font = QtGui.QFont()
+        font.setItalic(True)
+        self.italic.setFont(font)
+        self.italic.setText("")
+        icon1 = QtGui.QIcon()
+        icon1.addPixmap(QtGui.QPixmap(":/bia/resources/italic.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.italic.setIcon(icon1)
+        self.italic.setAutoRaise(False)
+        self.italic.setObjectName("italic")
+        self.gridLayout.addWidget(self.italic, 4, 1, 1, 1)
+        self.preformat = QtGui.QToolButton(ArticleDialog)
+        self.preformat.setText("")
+        icon2 = QtGui.QIcon()
+        icon2.addPixmap(QtGui.QPixmap(":/bia/resources/pre.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.preformat.setIcon(icon2)
+        self.preformat.setAutoRaise(False)
+        self.preformat.setObjectName("preformat")
+        self.gridLayout.addWidget(self.preformat, 4, 2, 1, 1)
+        self.paraleft = QtGui.QToolButton(ArticleDialog)
+        self.paraleft.setText("")
+        icon3 = QtGui.QIcon()
+        icon3.addPixmap(QtGui.QPixmap(":/bia/resources/left.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.paraleft.setIcon(icon3)
+        self.paraleft.setAutoRaise(False)
+        self.paraleft.setObjectName("paraleft")
+        self.gridLayout.addWidget(self.paraleft, 4, 3, 1, 1)
+        self.paracenter = QtGui.QToolButton(ArticleDialog)
+        self.paracenter.setText("")
+        icon4 = QtGui.QIcon()
+        icon4.addPixmap(QtGui.QPixmap(":/bia/resources/center.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.paracenter.setIcon(icon4)
+        self.paracenter.setAutoRaise(False)
+        self.paracenter.setObjectName("paracenter")
+        self.gridLayout.addWidget(self.paracenter, 4, 4, 1, 1)
+        self.pararight = QtGui.QToolButton(ArticleDialog)
+        self.pararight.setText("")
+        icon5 = QtGui.QIcon()
+        icon5.addPixmap(QtGui.QPixmap(":/bia/resources/right.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.pararight.setIcon(icon5)
+        self.pararight.setAutoRaise(False)
+        self.pararight.setObjectName("pararight")
+        self.gridLayout.addWidget(self.pararight, 4, 5, 1, 1)
+        self.parajustify = QtGui.QToolButton(ArticleDialog)
+        self.parajustify.setText("")
+        icon6 = QtGui.QIcon()
+        icon6.addPixmap(QtGui.QPixmap(":/bia/resources/justify.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.parajustify.setIcon(icon6)
+        self.parajustify.setAutoRaise(False)
+        self.parajustify.setObjectName("parajustify")
+        self.gridLayout.addWidget(self.parajustify, 4, 6, 1, 1)
+        self.image = QtGui.QToolButton(ArticleDialog)
+        font = QtGui.QFont()
+        font.setUnderline(True)
+        self.image.setFont(font)
+        self.image.setText("")
+        icon7 = QtGui.QIcon()
+        icon7.addPixmap(QtGui.QPixmap(":/bia/resources/img.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.image.setIcon(icon7)
+        self.image.setAutoRaise(False)
+        self.image.setObjectName("image")
+        self.gridLayout.addWidget(self.image, 4, 7, 1, 1)
+        self.flash = QtGui.QToolButton(ArticleDialog)
+        self.flash.setText("")
+        icon8 = QtGui.QIcon()
+        icon8.addPixmap(QtGui.QPixmap(":/bia/resources/flash.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.flash.setIcon(icon8)
+        self.flash.setAutoRaise(False)
+        self.flash.setObjectName("flash")
+        self.gridLayout.addWidget(self.flash, 4, 8, 1, 1)
+        self.bullets = QtGui.QToolButton(ArticleDialog)
+        self.bullets.setText("")
+        icon9 = QtGui.QIcon()
+        icon9.addPixmap(QtGui.QPixmap(":/bia/resources/bullets.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.bullets.setIcon(icon9)
+        self.bullets.setAutoRaise(False)
+        self.bullets.setObjectName("bullets")
+        self.gridLayout.addWidget(self.bullets, 4, 9, 1, 1)
+        self.numbered = QtGui.QToolButton(ArticleDialog)
+        self.numbered.setText("")
+        icon10 = QtGui.QIcon()
+        icon10.addPixmap(QtGui.QPixmap(":/bia/resources/numbers.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.numbered.setIcon(icon10)
+        self.numbered.setAutoRaise(False)
+        self.numbered.setObjectName("numbered")
+        self.gridLayout.addWidget(self.numbered, 4, 10, 1, 1)
+        self.codeblock = QtGui.QToolButton(ArticleDialog)
+        self.codeblock.setText("")
+        icon11 = QtGui.QIcon()
+        icon11.addPixmap(QtGui.QPixmap(":/bia/resources/code.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.codeblock.setIcon(icon11)
+        self.codeblock.setAutoRaise(False)
+        self.codeblock.setObjectName("codeblock")
+        self.gridLayout.addWidget(self.codeblock, 4, 11, 1, 1)
+        self.table = QtGui.QToolButton(ArticleDialog)
+        self.table.setText("")
+        icon12 = QtGui.QIcon()
+        icon12.addPixmap(QtGui.QPixmap(":/bia/resources/table.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.table.setIcon(icon12)
+        self.table.setAutoRaise(False)
+        self.table.setObjectName("table")
+        self.gridLayout.addWidget(self.table, 4, 12, 1, 1)
+        self.blockquote = QtGui.QToolButton(ArticleDialog)
+        self.blockquote.setText("")
+        icon13 = QtGui.QIcon()
+        icon13.addPixmap(QtGui.QPixmap(":/bia/resources/bquote.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.blockquote.setIcon(icon13)
+        self.blockquote.setAutoRaise(False)
+        self.blockquote.setObjectName("blockquote")
+        self.gridLayout.addWidget(self.blockquote, 4, 13, 1, 1)
+        self.hrule = QtGui.QToolButton(ArticleDialog)
+        self.hrule.setText("")
+        icon14 = QtGui.QIcon()
+        icon14.addPixmap(QtGui.QPixmap(":/bia/resources/hr.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.hrule.setIcon(icon14)
+        self.hrule.setAutoRaise(False)
+        self.hrule.setObjectName("hrule")
+        self.gridLayout.addWidget(self.hrule, 4, 14, 1, 1)
+        self.paragraph = QtGui.QToolButton(ArticleDialog)
+        self.paragraph.setText("")
+        icon15 = QtGui.QIcon()
+        icon15.addPixmap(QtGui.QPixmap(":/bia/resources/par.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.paragraph.setIcon(icon15)
+        self.paragraph.setAutoRaise(False)
+        self.paragraph.setObjectName("paragraph")
+        self.gridLayout.addWidget(self.paragraph, 4, 15, 1, 1)
+        self.linebreak = QtGui.QToolButton(ArticleDialog)
+        self.linebreak.setText("")
+        icon16 = QtGui.QIcon()
+        icon16.addPixmap(QtGui.QPixmap(":/bia/resources/br.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.linebreak.setIcon(icon16)
+        self.linebreak.setAutoRaise(False)
+        self.linebreak.setObjectName("linebreak")
+        self.gridLayout.addWidget(self.linebreak, 4, 16, 1, 1)
         self.content = QtGui.QPlainTextEdit(ArticleDialog)
         self.content.setMinimumSize(QtCore.QSize(0, 210))
         self.content.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
         self.content.setObjectName("content")
-        self.gridLayout.addWidget(self.content, 4, 0, 1, 5)
+        self.gridLayout.addWidget(self.content, 5, 0, 1, 17)
         self.label_4 = QtGui.QLabel(ArticleDialog)
         self.label_4.setObjectName("label_4")
-        self.gridLayout.addWidget(self.label_4, 5, 0, 1, 1)
+        self.gridLayout.addWidget(self.label_4, 6, 0, 1, 2)
         self.category = QtGui.QComboBox(ArticleDialog)
         self.category.setObjectName("category")
-        self.gridLayout.addWidget(self.category, 5, 1, 1, 2)
+        self.gridLayout.addWidget(self.category, 6, 2, 1, 7)
         self.label_6 = QtGui.QLabel(ArticleDialog)
         self.label_6.setObjectName("label_6")
-        self.gridLayout.addWidget(self.label_6, 5, 3, 1, 1)
+        self.gridLayout.addWidget(self.label_6, 6, 9, 1, 2)
         self.rating = QtGui.QSpinBox(ArticleDialog)
         self.rating.setMinimum(1)
         self.rating.setMaximum(10)
         self.rating.setObjectName("rating")
-        self.gridLayout.addWidget(self.rating, 5, 4, 1, 1)
+        self.gridLayout.addWidget(self.rating, 6, 11, 1, 6)
         self.label_7 = QtGui.QLabel(ArticleDialog)
         self.label_7.setObjectName("label_7")
-        self.gridLayout.addWidget(self.label_7, 6, 0, 1, 2)
+        self.gridLayout.addWidget(self.label_7, 7, 0, 1, 8)
         self.stub = QtGui.QLineEdit(ArticleDialog)
         self.stub.setObjectName("stub")
-        self.gridLayout.addWidget(self.stub, 6, 2, 1, 3)
+        self.gridLayout.addWidget(self.stub, 7, 8, 1, 9)
         self.buttonBox = QtGui.QDialogButtonBox(ArticleDialog)
         self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
         self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
         self.buttonBox.setObjectName("buttonBox")
-        self.gridLayout.addWidget(self.buttonBox, 7, 0, 1, 5)
+        self.gridLayout.addWidget(self.buttonBox, 8, 0, 1, 17)
 
         self.retranslateUi(ArticleDialog)
         QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), ArticleDialog.accept)
@@ -79,7 +228,24 @@ class Ui_ArticleDialog(object):
         self.label_2.setText(QtGui.QApplication.translate("ArticleDialog", "Keywords", None, QtGui.QApplication.UnicodeUTF8))
         self.label_3.setText(QtGui.QApplication.translate("ArticleDialog", "Summary", None, QtGui.QApplication.UnicodeUTF8))
         self.label_5.setText(QtGui.QApplication.translate("ArticleDialog", "Article content", None, QtGui.QApplication.UnicodeUTF8))
+        self.bold.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Bold", None, QtGui.QApplication.UnicodeUTF8))
+        self.italic.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Italic", None, QtGui.QApplication.UnicodeUTF8))
+        self.preformat.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Preformatted text", None, QtGui.QApplication.UnicodeUTF8))
+        self.paraleft.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Left align para", None, QtGui.QApplication.UnicodeUTF8))
+        self.paracenter.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Center para", None, QtGui.QApplication.UnicodeUTF8))
+        self.pararight.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Right align para", None, QtGui.QApplication.UnicodeUTF8))
+        self.parajustify.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Justify para", None, QtGui.QApplication.UnicodeUTF8))
+        self.image.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Insert image", None, QtGui.QApplication.UnicodeUTF8))
+        self.flash.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Insert flash object", None, QtGui.QApplication.UnicodeUTF8))
+        self.bullets.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Bulleted list", None, QtGui.QApplication.UnicodeUTF8))
+        self.numbered.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Numbered list", None, QtGui.QApplication.UnicodeUTF8))
+        self.codeblock.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Code block", None, QtGui.QApplication.UnicodeUTF8))
+        self.table.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Table", None, QtGui.QApplication.UnicodeUTF8))
+        self.blockquote.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Blockquote", None, QtGui.QApplication.UnicodeUTF8))
+        self.hrule.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Horizontal rule", None, QtGui.QApplication.UnicodeUTF8))
+        self.linebreak.setToolTip(QtGui.QApplication.translate("ArticleDialog", "Line break", None, QtGui.QApplication.UnicodeUTF8))
         self.label_4.setText(QtGui.QApplication.translate("ArticleDialog", "Category", None, QtGui.QApplication.UnicodeUTF8))
         self.label_6.setText(QtGui.QApplication.translate("ArticleDialog", "Rating", None, QtGui.QApplication.UnicodeUTF8))
         self.label_7.setText(QtGui.QApplication.translate("ArticleDialog", "Stub (file name without HTML extension)", None, QtGui.QApplication.UnicodeUTF8))
 
+import biaweb_rc_rc