From 16ae2cf83fb95a5d87220d3f06608c8560afe5a6 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Thu, 25 Nov 2010 13:18:33 +0530 Subject: [PATCH] Added the Site Configuration dialog Added the site configuration dialog for the new website dialog and website configuration. --- main_window.py | 4 +++- main_window.ui | 19 +++++++++++++++++++ ui_main_window.py | 15 ++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/main_window.py b/main_window.py index 258e0d4..d191866 100644 --- a/main_window.py +++ b/main_window.py @@ -3,6 +3,7 @@ import PyQt4 import ui_main_window +import site_configuration_dialog as scd import sys class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): @@ -11,7 +12,8 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): self.setupUi (self) def onFileNew (self): - print "New triggered" + dlg = scd.SiteConfigDialog (self) + dlg.exec_ () def onFileQuit (self): sys.exit (0) diff --git a/main_window.ui b/main_window.ui index 662825b..ff16abc 100644 --- a/main_window.ui +++ b/main_window.ui @@ -84,9 +84,18 @@ + + + &Settings + + + + + + @@ -156,6 +165,16 @@ &Open site... + + + &Configuration... + + + + + Templates... + + diff --git a/ui_main_window.py b/ui_main_window.py index 6219cbe..749af07 100644 --- a/ui_main_window.py +++ b/ui_main_window.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'main_window.ui' # -# Created: Wed Nov 24 14:22:45 2010 +# Created: Wed Nov 24 16:04:24 2010 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! @@ -43,6 +43,8 @@ class Ui_MainWindow(object): self.menu_Web.setObjectName("menu_Web") self.menu_About = QtGui.QMenu(self.menubar) self.menu_About.setObjectName("menu_About") + self.menu_Settings = QtGui.QMenu(self.menubar) + self.menu_Settings.setObjectName("menu_Settings") MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") @@ -73,6 +75,10 @@ class Ui_MainWindow(object): self.actionNew_site.setObjectName("actionNew_site") self.action_Open_site = QtGui.QAction(MainWindow) self.action_Open_site.setObjectName("action_Open_site") + self.action_Configuration = QtGui.QAction(MainWindow) + self.action_Configuration.setObjectName("action_Configuration") + self.actionTemplates = QtGui.QAction(MainWindow) + self.actionTemplates.setObjectName("actionTemplates") self.menu_File.addAction(self.actionNew_site) self.menu_File.addAction(self.action_Open_site) self.menu_File.addSeparator() @@ -86,9 +92,13 @@ class Ui_MainWindow(object): self.menu_Web.addAction(self.action_Generate_Site) self.menu_Web.addAction(self.actionGenerate_Search_Index) self.menu_About.addAction(self.action_About) + self.menu_Settings.addAction(self.action_Configuration) + self.menu_Settings.addSeparator() + self.menu_Settings.addAction(self.actionTemplates) 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_Settings.menuAction()) self.menubar.addAction(self.menu_Web.menuAction()) self.menubar.addAction(self.menu_About.menuAction()) @@ -106,6 +116,7 @@ class Ui_MainWindow(object): 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.menu_Settings.setTitle(QtGui.QApplication.translate("MainWindow", "&Settings", 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)) @@ -119,4 +130,6 @@ class Ui_MainWindow(object): 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)) + self.action_Configuration.setText(QtGui.QApplication.translate("MainWindow", "&Configuration...", None, QtGui.QApplication.UnicodeUTF8)) + self.actionTemplates.setText(QtGui.QApplication.translate("MainWindow", "Templates...", None, QtGui.QApplication.UnicodeUTF8)) -- 2.20.1