First commit
authorHarishankar <v.harishankar@gmail.com>
Wed, 24 Nov 2010 08:57:02 +0000 (14:27 +0530)
committerHarishankar <v.harishankar@gmail.com>
Wed, 24 Nov 2010 08:57:02 +0000 (14:27 +0530)
First commit of the project. Created and displayed the main
application window.

biaweb_qt [new file with mode: 0755]
category_dialog.ui [new file with mode: 0644]
main_window.py [new file with mode: 0644]
main_window.ui [new file with mode: 0644]
ui_category_dialog.py [new file with mode: 0644]
ui_main_window.py [new file with mode: 0644]

diff --git a/biaweb_qt b/biaweb_qt
new file mode 100755 (executable)
index 0000000..320516c
--- /dev/null
+++ b/biaweb_qt
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+# BiaWeb Website content manager (c) 2010 V.Harishankar
+# Main script
+
+import sys
+import PyQt4
+import main_window
+
+# main function
+def main ():
+       app = PyQt4.QtGui.QApplication (sys.argv)
+       wnd = main_window.MainWindow ()
+       wnd.show ()
+       sys.exit (app.exec_ ())
+
+# run the application
+if __name__=="__main__":
+       main ()
\ No newline at end of file
diff --git a/category_dialog.ui b/category_dialog.ui
new file mode 100644 (file)
index 0000000..39d2e43
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CategoryDialog</class>
+ <widget class="QDialog" name="CategoryDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>487</width>
+    <height>216</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Category</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Category name</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="category_name"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Category description</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLineEdit" name="category_desc"/>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>Stub (directory)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QLineEdit" name="category_stub"/>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <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>CategoryDialog</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>CategoryDialog</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/main_window.py b/main_window.py
new file mode 100644 (file)
index 0000000..258e0d4
--- /dev/null
@@ -0,0 +1,17 @@
+# BiaWeb Website content manager (c) 2010 V.Harishankar
+# Main Window class
+
+import PyQt4
+import ui_main_window
+import sys
+
+class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow):
+       def __init__ (self):
+               PyQt4.QtGui.QMainWindow.__init__ (self)
+               self.setupUi (self)
+
+       def onFileNew (self):
+               print "New triggered"
+
+       def onFileQuit (self):
+               sys.exit (0)
diff --git a/main_window.ui b/main_window.ui
new file mode 100644 (file)
index 0000000..662825b
--- /dev/null
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>633</width>
+    <height>458</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>BiaWeb</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="QLabel" name="label">
+      <property name="text">
+       <string>Categories</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="2">
+     <widget class="QLabel" name="label_2">
+      <property name="text">
+       <string>Articles in category</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0">
+     <widget class="QListWidget" name="categories_list"/>
+    </item>
+    <item row="1" column="2">
+     <widget class="QListWidget" name="articles_list"/>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>633</width>
+     <height>25</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
+     <string>&amp;File</string>
+    </property>
+    <addaction name="actionNew_site"/>
+    <addaction name="action_Open_site"/>
+    <addaction name="separator"/>
+    <addaction name="action_Quit"/>
+   </widget>
+   <widget class="QMenu" name="menu_Category">
+    <property name="title">
+     <string>&amp;Category</string>
+    </property>
+    <addaction name="action_Add"/>
+    <addaction name="action_Edit"/>
+    <addaction name="action_Delete"/>
+   </widget>
+   <widget class="QMenu" name="menu_Articles">
+    <property name="title">
+     <string>&amp;Articles</string>
+    </property>
+    <addaction name="action_New"/>
+    <addaction name="action_Edit_2"/>
+    <addaction name="action_Delete_2"/>
+   </widget>
+   <widget class="QMenu" name="menu_Web">
+    <property name="title">
+     <string>&amp;Web</string>
+    </property>
+    <addaction name="action_Generate_Site"/>
+    <addaction name="actionGenerate_Search_Index"/>
+   </widget>
+   <widget class="QMenu" name="menu_About">
+    <property name="title">
+     <string>&amp;Help</string>
+    </property>
+    <addaction name="action_About"/>
+   </widget>
+   <addaction name="menu_File"/>
+   <addaction name="menu_Category"/>
+   <addaction name="menu_Articles"/>
+   <addaction name="menu_Web"/>
+   <addaction name="menu_About"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionOpen_DB">
+   <property name="text">
+    <string>Open existing site...</string>
+   </property>
+  </action>
+  <action name="action_Quit">
+   <property name="text">
+    <string>&amp;Quit</string>
+   </property>
+  </action>
+  <action name="action_Add">
+   <property name="text">
+    <string>&amp;Add...</string>
+   </property>
+  </action>
+  <action name="action_Edit">
+   <property name="text">
+    <string>&amp;Edit...</string>
+   </property>
+  </action>
+  <action name="action_Delete">
+   <property name="text">
+    <string>&amp;Delete</string>
+   </property>
+  </action>
+  <action name="action_New">
+   <property name="text">
+    <string>&amp;Add...</string>
+   </property>
+  </action>
+  <action name="action_Edit_2">
+   <property name="text">
+    <string>&amp;Edit...</string>
+   </property>
+  </action>
+  <action name="action_Delete_2">
+   <property name="text">
+    <string>&amp;Delete</string>
+   </property>
+  </action>
+  <action name="action_Generate_Site">
+   <property name="text">
+    <string>Generate &amp;Site...</string>
+   </property>
+  </action>
+  <action name="actionGenerate_Search_Index">
+   <property name="text">
+    <string>Generate Search &amp;Index...</string>
+   </property>
+  </action>
+  <action name="action_About">
+   <property name="text">
+    <string>&amp;About</string>
+   </property>
+  </action>
+  <action name="actionNew_site">
+   <property name="text">
+    <string>&amp;New site...</string>
+   </property>
+  </action>
+  <action name="action_Open_site">
+   <property name="text">
+    <string>&amp;Open site...</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>actionNew_site</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>onFileNew()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>316</x>
+     <y>228</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_Quit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>onFileQuit()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>316</x>
+     <y>228</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>onFileNew()</slot>
+  <slot>onFileQuit()</slot>
+ </slots>
+</ui>
diff --git a/ui_category_dialog.py b/ui_category_dialog.py
new file mode 100644 (file)
index 0000000..a27f428
--- /dev/null
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'category_dialog.ui'
+#
+# Created: Wed Nov 24 14:12:44 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_CategoryDialog(object):
+    def setupUi(self, CategoryDialog):
+        CategoryDialog.setObjectName("CategoryDialog")
+        CategoryDialog.resize(487, 216)
+        self.gridLayout = QtGui.QGridLayout(CategoryDialog)
+        self.gridLayout.setObjectName("gridLayout")
+        self.label = QtGui.QLabel(CategoryDialog)
+        self.label.setObjectName("label")
+        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
+        self.category_name = QtGui.QLineEdit(CategoryDialog)
+        self.category_name.setObjectName("category_name")
+        self.gridLayout.addWidget(self.category_name, 0, 1, 1, 1)
+        self.label_2 = QtGui.QLabel(CategoryDialog)
+        self.label_2.setObjectName("label_2")
+        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
+        self.category_desc = QtGui.QLineEdit(CategoryDialog)
+        self.category_desc.setObjectName("category_desc")
+        self.gridLayout.addWidget(self.category_desc, 1, 1, 1, 1)
+        self.label_3 = QtGui.QLabel(CategoryDialog)
+        self.label_3.setObjectName("label_3")
+        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
+        self.category_stub = QtGui.QLineEdit(CategoryDialog)
+        self.category_stub.setObjectName("category_stub")
+        self.gridLayout.addWidget(self.category_stub, 2, 1, 1, 1)
+        self.buttonBox = QtGui.QDialogButtonBox(CategoryDialog)
+        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
+        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
+        self.buttonBox.setObjectName("buttonBox")
+        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 2)
+
+        self.retranslateUi(CategoryDialog)
+        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), CategoryDialog.accept)
+        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), CategoryDialog.reject)
+        QtCore.QMetaObject.connectSlotsByName(CategoryDialog)
+
+    def retranslateUi(self, CategoryDialog):
+        CategoryDialog.setWindowTitle(QtGui.QApplication.translate("CategoryDialog", "Category", None, QtGui.QApplication.UnicodeUTF8))
+        self.label.setText(QtGui.QApplication.translate("CategoryDialog", "Category name", None, QtGui.QApplication.UnicodeUTF8))
+        self.label_2.setText(QtGui.QApplication.translate("CategoryDialog", "Category description", None, QtGui.QApplication.UnicodeUTF8))
+        self.label_3.setText(QtGui.QApplication.translate("CategoryDialog", "Stub (directory)", None, QtGui.QApplication.UnicodeUTF8))
+
diff --git a/ui_main_window.py b/ui_main_window.py
new file mode 100644 (file)
index 0000000..6219cbe
--- /dev/null
@@ -0,0 +1,122 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'main_window.ui'
+#
+# Created: Wed Nov 24 14:22:45 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_MainWindow(object):
+    def setupUi(self, MainWindow):
+        MainWindow.setObjectName("MainWindow")
+        MainWindow.resize(633, 458)
+        self.centralwidget = QtGui.QWidget(MainWindow)
+        self.centralwidget.setObjectName("centralwidget")
+        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
+        self.gridLayout.setObjectName("gridLayout")
+        self.label = QtGui.QLabel(self.centralwidget)
+        self.label.setObjectName("label")
+        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
+        self.label_2 = QtGui.QLabel(self.centralwidget)
+        self.label_2.setObjectName("label_2")
+        self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1)
+        self.categories_list = QtGui.QListWidget(self.centralwidget)
+        self.categories_list.setObjectName("categories_list")
+        self.gridLayout.addWidget(self.categories_list, 1, 0, 1, 1)
+        self.articles_list = QtGui.QListWidget(self.centralwidget)
+        self.articles_list.setObjectName("articles_list")
+        self.gridLayout.addWidget(self.articles_list, 1, 2, 1, 1)
+        MainWindow.setCentralWidget(self.centralwidget)
+        self.menubar = QtGui.QMenuBar(MainWindow)
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 633, 25))
+        self.menubar.setObjectName("menubar")
+        self.menu_File = QtGui.QMenu(self.menubar)
+        self.menu_File.setObjectName("menu_File")
+        self.menu_Category = QtGui.QMenu(self.menubar)
+        self.menu_Category.setObjectName("menu_Category")
+        self.menu_Articles = QtGui.QMenu(self.menubar)
+        self.menu_Articles.setObjectName("menu_Articles")
+        self.menu_Web = QtGui.QMenu(self.menubar)
+        self.menu_Web.setObjectName("menu_Web")
+        self.menu_About = QtGui.QMenu(self.menubar)
+        self.menu_About.setObjectName("menu_About")
+        MainWindow.setMenuBar(self.menubar)
+        self.statusbar = QtGui.QStatusBar(MainWindow)
+        self.statusbar.setObjectName("statusbar")
+        MainWindow.setStatusBar(self.statusbar)
+        self.actionOpen_DB = QtGui.QAction(MainWindow)
+        self.actionOpen_DB.setObjectName("actionOpen_DB")
+        self.action_Quit = QtGui.QAction(MainWindow)
+        self.action_Quit.setObjectName("action_Quit")
+        self.action_Add = QtGui.QAction(MainWindow)
+        self.action_Add.setObjectName("action_Add")
+        self.action_Edit = QtGui.QAction(MainWindow)
+        self.action_Edit.setObjectName("action_Edit")
+        self.action_Delete = QtGui.QAction(MainWindow)
+        self.action_Delete.setObjectName("action_Delete")
+        self.action_New = QtGui.QAction(MainWindow)
+        self.action_New.setObjectName("action_New")
+        self.action_Edit_2 = QtGui.QAction(MainWindow)
+        self.action_Edit_2.setObjectName("action_Edit_2")
+        self.action_Delete_2 = QtGui.QAction(MainWindow)
+        self.action_Delete_2.setObjectName("action_Delete_2")
+        self.action_Generate_Site = QtGui.QAction(MainWindow)
+        self.action_Generate_Site.setObjectName("action_Generate_Site")
+        self.actionGenerate_Search_Index = QtGui.QAction(MainWindow)
+        self.actionGenerate_Search_Index.setObjectName("actionGenerate_Search_Index")
+        self.action_About = QtGui.QAction(MainWindow)
+        self.action_About.setObjectName("action_About")
+        self.actionNew_site = QtGui.QAction(MainWindow)
+        self.actionNew_site.setObjectName("actionNew_site")
+        self.action_Open_site = QtGui.QAction(MainWindow)
+        self.action_Open_site.setObjectName("action_Open_site")
+        self.menu_File.addAction(self.actionNew_site)
+        self.menu_File.addAction(self.action_Open_site)
+        self.menu_File.addSeparator()
+        self.menu_File.addAction(self.action_Quit)
+        self.menu_Category.addAction(self.action_Add)
+        self.menu_Category.addAction(self.action_Edit)
+        self.menu_Category.addAction(self.action_Delete)
+        self.menu_Articles.addAction(self.action_New)
+        self.menu_Articles.addAction(self.action_Edit_2)
+        self.menu_Articles.addAction(self.action_Delete_2)
+        self.menu_Web.addAction(self.action_Generate_Site)
+        self.menu_Web.addAction(self.actionGenerate_Search_Index)
+        self.menu_About.addAction(self.action_About)
+        self.menubar.addAction(self.menu_File.menuAction())
+        self.menubar.addAction(self.menu_Category.menuAction())
+        self.menubar.addAction(self.menu_Articles.menuAction())
+        self.menubar.addAction(self.menu_Web.menuAction())
+        self.menubar.addAction(self.menu_About.menuAction())
+
+        self.retranslateUi(MainWindow)
+        QtCore.QObject.connect(self.actionNew_site, QtCore.SIGNAL("triggered()"), MainWindow.onFileNew)
+        QtCore.QObject.connect(self.action_Quit, QtCore.SIGNAL("triggered()"), MainWindow.onFileQuit)
+        QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+    def retranslateUi(self, MainWindow):
+        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "BiaWeb", None, QtGui.QApplication.UnicodeUTF8))
+        self.label.setText(QtGui.QApplication.translate("MainWindow", "Categories", None, QtGui.QApplication.UnicodeUTF8))
+        self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Articles in category", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_Category.setTitle(QtGui.QApplication.translate("MainWindow", "&Category", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_Articles.setTitle(QtGui.QApplication.translate("MainWindow", "&Articles", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_Web.setTitle(QtGui.QApplication.translate("MainWindow", "&Web", None, QtGui.QApplication.UnicodeUTF8))
+        self.menu_About.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8))
+        self.actionOpen_DB.setText(QtGui.QApplication.translate("MainWindow", "Open existing site...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Add.setText(QtGui.QApplication.translate("MainWindow", "&Add...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Edit.setText(QtGui.QApplication.translate("MainWindow", "&Edit...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Delete.setText(QtGui.QApplication.translate("MainWindow", "&Delete", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_New.setText(QtGui.QApplication.translate("MainWindow", "&Add...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Edit_2.setText(QtGui.QApplication.translate("MainWindow", "&Edit...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Delete_2.setText(QtGui.QApplication.translate("MainWindow", "&Delete", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Generate_Site.setText(QtGui.QApplication.translate("MainWindow", "Generate &Site...", None, QtGui.QApplication.UnicodeUTF8))
+        self.actionGenerate_Search_Index.setText(QtGui.QApplication.translate("MainWindow", "Generate Search &Index...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_About.setText(QtGui.QApplication.translate("MainWindow", "&About", None, QtGui.QApplication.UnicodeUTF8))
+        self.actionNew_site.setText(QtGui.QApplication.translate("MainWindow", "&New site...", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_Open_site.setText(QtGui.QApplication.translate("MainWindow", "&Open site...", None, QtGui.QApplication.UnicodeUTF8))
+