[Avida-SVN] r2615 - branches/developers/avida-edward/source/python/AvidaGui2
kaben at myxo.css.msu.edu
kaben at myxo.css.msu.edu
Sun Jun 8 16:23:43 PDT 2008
Author: kaben
Date: 2008-06-08 19:23:43 -0400 (Sun, 08 Jun 2008)
New Revision: 2615
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyHelpScreenCtrl.py
Log:
Added support code for Avida-ED changelog and buglist.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2008-06-08 23:21:37 UTC (rev 2614)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceCtrl.py 2008-06-08 23:23:43 UTC (rev 2615)
@@ -656,14 +656,27 @@
# public slot
def helpIndex(self):
- help_dialog = pyHelpScreenCtrl()
- help_dialog.showDialog()
+ home = QDir("./documentation/index.html").absPath()
+ help_screen = pyHelpScreenCtrl(home, ".", None)
+ #help_dialog.showDialog()
+ help_screen.show()
+ def helpChanges(self):
+ home = QDir("./documentation/changes.html").absPath()
+ help_screen = pyHelpScreenCtrl(home, ".", None)
+ help_screen.show()
+
+ def helpKnownBugs(self):
+ home = QDir("./documentation/bugs.html").absPath()
+ help_screen = pyHelpScreenCtrl(home, ".", None)
+ help_screen.show()
+
# public slot
def helpContents(self):
- help_dialog = pyHelpScreenCtrl()
- help_dialog.showDialog()
+ pass
+ #help_dialog = pyHelpScreenCtrl()
+ #help_dialog.showDialog()
# public slot
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceView.ui 2008-06-08 23:21:37 UTC (rev 2614)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyEduWorkspaceView.ui 2008-06-08 23:23:43 UTC (rev 2615)
@@ -227,8 +227,10 @@
<action name="windowMinimize_WindowAction"/>
</item>
<item text="&Help" name="helpMenu">
+ <action name="helpIndexAction"/>
<action name="helpContentsAction"/>
- <action name="helpIndexAction"/>
+ <action name="helpChangesAction"/>
+ <action name="helpKnownBugsAction"/>
<separator/>
<action name="helpAboutAction"/>
</item>
@@ -237,6 +239,25 @@
</toolbars>
<customwidgets>
<customwidget>
+ <class>pyNewIconView</class>
+ <header location="global">1</header>
+ <sizehint>
+ <width>-1</width>
+ <height>0</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>0</hordata>
+ <verdata>0</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image1</pixmap>
+ <property type="0">3</property>
+ <property type="1">pyNewIconView</property>
+ <property type="3">-1</property>
+ </customwidget>
+ <customwidget>
<class>pyFreezerCtrl</class>
<header location="global">1</header>
<sizehint>
@@ -316,6 +337,10 @@
<property type="0">-1</property>
<property type="1">pyFreezerView</property>
<property type="0">-1</property>
+ <property type="1">pyFreezerView</property>
+ <property type="0">-1</property>
+ <property type="1">pyFreezerView</property>
+ <property type="0">-1</property>
<property type="pyFreezerView"></property>
<property type="-1">1</property>
</customwidget>
@@ -399,28 +424,13 @@
<property type="0">-1</property>
<property type="1">pyNavBarView</property>
<property type="0">-1</property>
+ <property type="1">pyNavBarView</property>
+ <property type="0">-1</property>
+ <property type="1">pyNavBarView</property>
+ <property type="0">-1</property>
<property type="pyNavBarView"></property>
<property type="-1">1</property>
</customwidget>
- <customwidget>
- <class>pyNewIconView</class>
- <header location="global">1</header>
- <sizehint>
- <width>-1</width>
- <height>0</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>0</hordata>
- <verdata>0</verdata>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- <pixmap>image1</pixmap>
- <property type="0">3</property>
- <property type="1">pyNewIconView</property>
- <property type="3">-1</property>
- </customwidget>
</customwidgets>
<actions>
<action>
@@ -657,7 +667,7 @@
<bool>true</bool>
</property>
<property name="text">
- <string>Contents</string>
+ <string>&Contents...</string>
</property>
<property name="menuText">
<string>&Contents...</string>
@@ -963,6 +973,28 @@
<string>Open Highlighted Freezer Item</string>
</property>
</action>
+ <action>
+ <property name="name">
+ <cstring>helpChangesAction</cstring>
+ </property>
+ <property name="text">
+ <string>Changes...</string>
+ </property>
+ <property name="menuText">
+ <string>Changes...</string>
+ </property>
+ </action>
+ <action>
+ <property name="name">
+ <cstring>helpKnownBugsAction</cstring>
+ </property>
+ <property name="text">
+ <string>Known Bugs...</string>
+ </property>
+ <property name="menuText">
+ <string>Known Bugs...</string>
+ </property>
+ </action>
</actions>
<images>
<image name="image0">
@@ -1070,12 +1102,6 @@
<slot>editCut()</slot>
</connection>
<connection>
- <sender>editCopyAction</sender>
- <signal>activated()</signal>
- <receiver>pyEduWorkspaceView</receiver>
- <slot>editCopy()</slot>
- </connection>
- <connection>
<sender>editPasteAction</sender>
<signal>activated()</signal>
<receiver>pyEduWorkspaceView</receiver>
@@ -1135,10 +1161,19 @@
<receiver>pyEduWorkspaceView</receiver>
<slot>fileOpenItemSlot()</slot>
</connection>
+ <connection>
+ <sender>helpChangesAction</sender>
+ <signal>activated()</signal>
+ <receiver>pyEduWorkspaceView</receiver>
+ <slot>helpChanges()</slot>
+ </connection>
+ <connection>
+ <sender>helpKnownBugsAction</sender>
+ <signal>activated()</signal>
+ <receiver>pyEduWorkspaceView</receiver>
+ <slot>helpKnownBugs()</slot>
+ </connection>
</connections>
-<includes>
- <include location="local" impldecl="in implementation">pyEduWorkspaceView.ui.h</include>
-</includes>
<slots>
<slot>fileNew()</slot>
<slot>fileOpen()</slot>
@@ -1151,7 +1186,7 @@
<slot>editUndo()</slot>
<slot>editRedo()</slot>
<slot>editCut()</slot>
- <slot>editCopy()</slot>
+ <slot>helpChanges()</slot>
<slot>editPaste()</slot>
<slot>editFind()</slot>
<slot>helpIndex()</slot>
@@ -1162,6 +1197,7 @@
<slot>fileExportItemSlot()</slot>
<slot>fileDeleteItemSlot()</slot>
<slot>fileOpenItemSlot()</slot>
+ <slot>helpKnownBugs()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyHelpScreenCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyHelpScreenCtrl.py 2008-06-08 23:21:37 UTC (rev 2614)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyHelpScreenCtrl.py 2008-06-08 23:23:43 UTC (rev 2615)
@@ -1,11 +1,57 @@
+from descr import *
+from pyHelpScreenView import pyHelpScreenView
from qt import *
-from pyHelpScreenView import pyHelpScreenView
# Simple class to pop up help message. Place holder for a real help sysem
-class pyHelpScreenCtrl (pyHelpScreenView):
- def __init__(self):
- pyHelpScreenView.__init__(self)
+#class pyHelpScreenCtrl (pyHelpScreenView):
+# def __init__(self):
+# pyHelpScreenView.__init__(self)
+#
+# def showDialog(self):
+# self.exec_loop()
- def showDialog(self):
- self.exec_loop()
+class pyHelpScreenCtrl(QMainWindow):
+ def __init__(self, home, path, parent = None, name = None, fl = 0):
+ QMainWindow.__init__(self,parent,name,fl)
+
+ self.browser = QTextBrowser(self)
+ descr("path:", path)
+ #self.browser.mimeSourceFactory().setFilePath(QString(path))
+ #self.connect(self.browser, PYSIGNAL("sourceChanged"), self.sourceChangedSlot)
+ self.setCentralWidget(self.browser)
+
+ if not home == "":
+ self.browser.setSource(home)
+
+
+ #toolbar = QToolBar(self)
+ #self.addDockWindow(toolbar, "Toolbar")
+
+ #back_button = QToolButton(Qt.LeftArrow, toolbar)
+ #self.connect(back_button, SIGNAL("clicked()"), self.browser.backward)
+
+ #forward_button = QToolButton(Qt.RightArrow, toolbar)
+ #self.connect(forward_button, SIGNAL("clicked()"), self.browser.forward)
+
+ #home_button = QToolButton(toolbar)
+ #home_button.setTextLabel("Home")
+ #home_button.setUsesTextLabel(True)
+ #self.connect(home_button, SIGNAL("clicked()"), self.browser.home)
+
+ #toolbar.addSeparator()
+
+ #self.path_combo = QComboBox(True, toolbar)
+ #toolbar.setStretchableWidget(path_combo)
+ #self.setRightJustification(True)
+ #self.setDockEnabled(Qt.DockLeft, False)
+ #self.setDockEnabled(Qt.DockRight, False)
+ #
+
+ #self.path_combo.insertItem(home)
+ self.browser.setFocus()
+
+ self.setGeometry(50, 50, 800, 600)
+
+ def __del__(self):
+ descr("deleting...")
More information about the Avida-cvs
mailing list