-(1) Install SFA command line tools (sfi.py): http://svn.planet-lab.org/wiki/SFAInstallationGuide
+(1) Install SFA command line tools (sfi.py):
+
+Please find the installation instructions at http://svn.planet-lab.org/wiki/SFAInstallationGuide
+
+
(2) Install PyQt4
For Linux:
+----------
You can use the package manager to install PyQt4
For Mac:
+--------
You'll need to download and install Qt, PyQt and Sip from the following
links:
http://qt.nokia.com/downloads
http://www.riverbankcomputing.co.uk/software/sip/download
-http://www.riverbankcomputing.co.uk/software/pyqt/download
\ No newline at end of file
+http://www.riverbankcomputing.co.uk/software/pyqt/download
+
+For Windows:
+------------
+Install ActivePython from ActiveState: http://www.activestate.com/activepython/downloads
+Install PyQt4 binaries: http://www.riverbankcomputing.co.uk/software/pyqt/download
+
#!/bin/bash
-#export PATH=$HOME/stree/sfa//trunk/:$PATH
-
-PYTHONPATH=/opt/local/lib/python2.5/site-packages/
-PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:$PYTHONPATH
-PYTHONPATH=$HOME/stree/sfa/trunk:$PYTHONPATH
+PYTHONPATH=$PYTHONPATH:/opt/local/lib/python2.5/site-packages/
+# thierry : I have this in my .bashrc now
+#PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:$PYTHONPATH
+# ditto
+#PYTHONPATH=$HOME/stree/sfa/trunk:$PYTHONPATH
export PYTHONPATH
+echo Using PYTHONPATH=$PYTHONPATH
+
+sfacedir=$(dirname $0)
+cd $sfacedir
+echo Running from directory $(pwd)
+
exec python sface.py "$@" &
QWidget.__init__(self, parent)
self.setWindowTitle("SFI Log")
self.text = QTextBrowser(self)
+ self.text.ensureCursorVisible()
layout = QVBoxLayout()
layout.addWidget(self.text)
def update(self):
self.text.setText(self.logio.getText())
+ c = self.text.textCursor()
+ c.movePosition(QTextCursor.End)
+ self.text.setTextCursor(c)
self.setStatus("Already showing %s" % curr_screen.getTitleText(), timeout=1000)
return
+ # This is an optimization to have a smoother animation. We
+ # render the widget into a pixmap and animate that instead of
+ # moving the whole widget around.
pixmap = QPixmap(self.screens.size())
curr_screen.render(pixmap)
self.screens.setCurrentWidget(self.pix)
self.status.set(msg, timeout)
def nodeSelectionChanged(self, hostname):
- self.rspecWindow.showNode(hostname)
+ if self.rspecWindow.isVisible():
+ self.rspecWindow.showNode(hostname)
self.collapseAll()
self.expandToDepth(0)
+ model = self.model()
+
def recursiveExpand(index):
parent = index.parent()
if parent and parent.isValid():
if index.data().toString() == txt:
recursiveExpand(index)
self.scrollTo(index, self.PositionAtCenter)
+ return
rows = model.rowCount(index)
for r in range(rows):
child_index = index.child(r, 0)
search(child_index)
- model = self.model()
root_rows = model.rowCount()
for r in range(root_rows):
index = model.index(r, 0)
if config.is_true(config.get(field)):
edit.setCheckState(Qt.Checked)
else:
- edit=QLineEdit(config.get(field), self)
+ edit=QLineEdit(config.get(field) or "", self)
edit.setAttribute(Qt.WA_MacShowFocusRect, 0)
setattr(self,field,edit)
slice = SliceWidget(self)
self.init(slice, "Main Window", "OneLab Federation GUI")
+ def rspecUpdated(self):
+ self.mainwin.rspecWindow.updateView()
+
def configurationChanged(self):
self.widget.updateSliceName()
self.widget.updateView()
+ self.mainwin.rspecWindow.updateView()
def nodeSelectionChanged(self, hostname):
self.mainwin.nodeSelectionChanged(hostname)