From c7e7a2cb5b87c9e8cbf63931b1d38021081cfafe Mon Sep 17 00:00:00 2001 From: Harishankar Date: Fri, 26 Nov 2010 21:28:26 +0530 Subject: [PATCH] Article dialog created Added an article create/edit dialog --- article_dialog.ui | 155 +++++++++++++++++++++++++++++++++++++++++++ ui_article_dialog.py | 85 ++++++++++++++++++++++++ 2 files changed, 240 insertions(+) create mode 100644 article_dialog.ui create mode 100644 ui_article_dialog.py diff --git a/article_dialog.ui b/article_dialog.ui new file mode 100644 index 0000000..375fe2a --- /dev/null +++ b/article_dialog.ui @@ -0,0 +1,155 @@ + + + ArticleDialog + + + + 0 + 0 + 660 + 506 + + + + Article + + + + + + Title + + + + + + + + + + Keywords + + + + + + + + + + Summary + + + + + + + Qt::ScrollBarAlwaysOn + + + + + + + Article content + + + + + + + + 0 + 210 + + + + Qt::ScrollBarAlwaysOn + + + + + + + Category + + + + + + + + + + Rating + + + + + + + 1 + + + 10 + + + + + + + Stub (file name without HTML extension) + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + ArticleDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ArticleDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/ui_article_dialog.py b/ui_article_dialog.py new file mode 100644 index 0000000..4c17e77 --- /dev/null +++ b/ui_article_dialog.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'article_dialog.ui' +# +# Created: Fri Nov 26 21:22:47 2010 +# by: PyQt4 UI code generator 4.7.4 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_ArticleDialog(object): + def setupUi(self, ArticleDialog): + ArticleDialog.setObjectName("ArticleDialog") + ArticleDialog.resize(660, 506) + self.gridLayout = QtGui.QGridLayout(ArticleDialog) + self.gridLayout.setObjectName("gridLayout") + self.label = QtGui.QLabel(ArticleDialog) + self.label.setObjectName("label") + 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.label_2 = QtGui.QLabel(ArticleDialog) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + self.keywords = QtGui.QLineEdit(ArticleDialog) + self.keywords.setObjectName("keywords") + self.gridLayout.addWidget(self.keywords, 1, 1, 1, 4) + self.label_3 = QtGui.QLabel(ArticleDialog) + self.label_3.setObjectName("label_3") + self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) + self.summary = QtGui.QPlainTextEdit(ArticleDialog) + self.summary.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) + self.summary.setObjectName("summary") + self.gridLayout.addWidget(self.summary, 2, 1, 1, 4) + self.label_5 = QtGui.QLabel(ArticleDialog) + self.label_5.setObjectName("label_5") + self.gridLayout.addWidget(self.label_5, 3, 0, 1, 2) + 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.label_4 = QtGui.QLabel(ArticleDialog) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 5, 0, 1, 1) + self.category = QtGui.QComboBox(ArticleDialog) + self.category.setObjectName("category") + self.gridLayout.addWidget(self.category, 5, 1, 1, 2) + self.label_6 = QtGui.QLabel(ArticleDialog) + self.label_6.setObjectName("label_6") + self.gridLayout.addWidget(self.label_6, 5, 3, 1, 1) + 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.label_7 = QtGui.QLabel(ArticleDialog) + self.label_7.setObjectName("label_7") + self.gridLayout.addWidget(self.label_7, 6, 0, 1, 2) + self.stub = QtGui.QLineEdit(ArticleDialog) + self.stub.setObjectName("stub") + self.gridLayout.addWidget(self.stub, 6, 2, 1, 3) + 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.retranslateUi(ArticleDialog) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), ArticleDialog.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), ArticleDialog.reject) + QtCore.QMetaObject.connectSlotsByName(ArticleDialog) + + def retranslateUi(self, ArticleDialog): + ArticleDialog.setWindowTitle(QtGui.QApplication.translate("ArticleDialog", "Article", None, QtGui.QApplication.UnicodeUTF8)) + self.label.setText(QtGui.QApplication.translate("ArticleDialog", "Title", None, QtGui.QApplication.UnicodeUTF8)) + 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.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)) + -- 2.20.1