Article dialog created
authorHarishankar <v.harishankar@gmail.com>
Fri, 26 Nov 2010 15:58:26 +0000 (21:28 +0530)
committerHarishankar <v.harishankar@gmail.com>
Fri, 26 Nov 2010 15:58:26 +0000 (21:28 +0530)
Added an article create/edit dialog

article_dialog.ui [new file with mode: 0644]
ui_article_dialog.py [new file with mode: 0644]

diff --git a/article_dialog.ui b/article_dialog.ui
new file mode 100644 (file)
index 0000000..375fe2a
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ArticleDialog</class>
+ <widget class="QDialog" name="ArticleDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>660</width>
+    <height>506</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Article</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Title</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="4">
+    <widget class="QLineEdit" name="article_title"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Keywords</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" colspan="4">
+    <widget class="QLineEdit" name="keywords"/>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>Summary</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1" colspan="4">
+    <widget class="QPlainTextEdit" name="summary">
+     <property name="verticalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOn</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QLabel" name="label_5">
+     <property name="text">
+      <string>Article content</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="5">
+    <widget class="QPlainTextEdit" name="content">
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>210</height>
+      </size>
+     </property>
+     <property name="verticalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOn</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Category</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" colspan="2">
+    <widget class="QComboBox" name="category"/>
+   </item>
+   <item row="5" column="3">
+    <widget class="QLabel" name="label_6">
+     <property name="text">
+      <string>Rating</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="4">
+    <widget class="QSpinBox" name="rating">
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0" colspan="2">
+    <widget class="QLabel" name="label_7">
+     <property name="text">
+      <string>Stub (file name without HTML extension)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="2" colspan="3">
+    <widget class="QLineEdit" name="stub"/>
+   </item>
+   <item row="7" column="0" colspan="5">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>ArticleDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>ArticleDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/ui_article_dialog.py b/ui_article_dialog.py
new file mode 100644 (file)
index 0000000..4c17e77
--- /dev/null
@@ -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))
+