Commit ae84ced5 authored by hrchilds's avatar hrchilds
Browse files

Update from April 13, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@219 18c085ea-50e0-402c-830e-de6fd14e8384
parent debfa518
......@@ -59,6 +59,10 @@
# Brad Whitlock, Wed Apr 7 17:21:25 PST 2004
# I removed keyframing tests from the skip list.
#
# Brad Whitlock, Tue Apr 13 11:30:09 PDT 2004
# I added -notrackmem to runtest so memory checking will be disabled so
# we can see if that is what was hanging the test suite.
#
# Mark C. Miller, Mon Apr 12 17:11:22 PDT 2004
# I removed multi-format2.py, operators.py, and gradient.py tests
# from scalable,parallel skip
......@@ -200,7 +204,7 @@ skipList="parallel:tests/databases/samrai.py \
error=0
cd test
for m in $modes; do
./runtest -q -p -s "$skipList" -m "$m" -d "$curdate"
./runtest -q -p -s "$skipList" -m "$m" -d "$curdate" -notrackmem
curerror=$?
if test ! "$curerror" = "0"; then
error=1
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -110,6 +110,11 @@ avtQueryFactory::Instance()
// Programmer: Kathleen Bonnell
// Creation: March 30, 2004
//
// Modifications:
//
// Hank Childs, Tue Apr 13 12:50:51 PDT 2004
// Allow for surface area to have multiple aliases.
//
// ****************************************************************************
......@@ -121,7 +126,8 @@ avtQueryFactory::CreateQuery(const QueryAttributes *qa)
avtDataObjectQuery *query = NULL;
if (qname == "Surface area")
if (qname == "Surface area" || qname == "2D area" ||
qname == "3D surface area")
{
query = new avtTotalSurfaceAreaQuery();
}
......
......@@ -374,6 +374,9 @@ GUIBase::RestoreCursor()
// renamed the method and ripped out the code that told the viewer to
// open the database. I removed the addDefaultPlots argument.
//
// Brad Whitlock, Tue Apr 6 08:26:37 PDT 2004
// I removed some code that set globalAtts.
//
// ****************************************************************************
bool
......@@ -381,9 +384,7 @@ GUIBase::SetOpenDataFile(const QualifiedFilename &qf, int timeState,
SimpleObserver *sob, bool reOpen)
{
bool retval = true;
#ifdef BEFORE_NEW_FILE_SELECTION
GlobalAttributes *globalAtts = viewer->GetGlobalAttributes();
#endif
//
// Clears any information about the specified file and causes it to be
// read again from the mdserver.
......@@ -392,6 +393,8 @@ GUIBase::SetOpenDataFile(const QualifiedFilename &qf, int timeState,
{
fileServer->ClearFile(qf);
fileServer->CloseFile();
if(sob)
sob->SetUpdate(false);
fileServer->Notify();
}
......@@ -404,8 +407,16 @@ GUIBase::SetOpenDataFile(const QualifiedFilename &qf, int timeState,
{
// Display a message while we open the file.
QString msg;
msg.sprintf("Opening %s on %s", qf.filename.c_str(),
qf.host.c_str());
if(reOpen)
{
msg.sprintf("Reopening %s on %s", qf.filename.c_str(),
qf.host.c_str());
}
else
{
msg.sprintf("Opening %s on %s", qf.filename.c_str(),
qf.host.c_str());
}
Status(msg);
// Tell the fileServer to open the file specified by filename.
......@@ -420,14 +431,6 @@ GUIBase::SetOpenDataFile(const QualifiedFilename &qf, int timeState,
sob->SetUpdate(false);
fileServer->Notify();
ClearStatus();
#ifdef BEFORE_NEW_FILE_SELECTION
// Set some important values in the globalAtts and tell the viewer.
globalAtts->SetCurrentFile(qf.FullName());
if(sob)
sob->SetUpdate(false);
globalAtts->Notify();
#endif
}
CATCH2(GetMetaDataException, gmde)
{
......
......@@ -164,6 +164,9 @@ const int FileTree::FileTreeNode::DATABASE_NODE = 3;
// Brad Whitlock, Tue Jan 27 18:14:38 PST 2004
// I renamed some slots and added the active time slider.
//
// Brad Whitlock, Tue Apr 6 14:07:34 PST 2004
// I added allowFileSelectionChange.
//
// ****************************************************************************
QvisFilePanel::QvisFilePanel(QWidget *parent, const char *name) :
......@@ -171,6 +174,7 @@ QvisFilePanel::QvisFilePanel(QWidget *parent, const char *name) :
timeStateFormat()
{
showSelectedFiles = true;
allowFileSelectionChange = true;
// Create the top layout that will contain the widgets.
QVBoxLayout *topLayout = new QVBoxLayout(this);
......@@ -628,6 +632,7 @@ QvisFilePanel::RepopulateFileList()
// Highlight the selected file.
UpdateFileSelection();
// Set the width of the zeroeth column.
QTimer::singleShot(100, this, SLOT(updateHeaderWidth()));
}
......@@ -1137,6 +1142,10 @@ QvisFilePanel::ExpandDatabases()
// I changed the code so we can correctly display virtual databases that
// have multiple time states per file.
//
// Brad Whitlock, Tue Apr 6 12:23:11 PDT 2004
// I changed the code so it sets the time state for files that we've
// never seen before to 0 so it is not the default -1.
//
// ****************************************************************************
void
......@@ -1175,7 +1184,9 @@ QvisFilePanel::ExpandDatabaseItem(QvisListViewFileItem *item)
// Creation: Mon Dec 29 12:22:41 PDT 2003
//
// Modifications:
//
// Brad Whitlock, Tue Apr 6 12:22:24 PDT 2004
// I made it set files with 1 time state to have their time state be 0.
//
// ****************************************************************************
void
......@@ -1183,25 +1194,32 @@ QvisFilePanel::ExpandDatabaseItemUsingMetaData(QvisListViewFileItem *item)
{
// See if the file is a database
const avtDatabaseMetaData *md = fileServer->GetMetaData(item->file);
if(md != 0 && md->GetNumStates() > 1)
{
fileListView->blockSignals(true);
bool useVirtualDBInfo = DisplayVirtualDBInformation(item->file);
for(int i = 0; i < md->GetNumStates(); ++i)
if(md != 0)
{
if(md->GetNumStates() > 1)
{
QvisListViewFileItem *fi = new QvisListViewFileItem(
item, CreateItemLabel(md, i, useVirtualDBInfo),
item->file, QvisListViewFileItem::FILE_NODE, i);
fi->setOpen(false);
}
fileListView->blockSignals(true);
bool useVirtualDBInfo = DisplayVirtualDBInformation(item->file);
for(int i = 0; i < md->GetNumStates(); ++i)
{
QvisListViewFileItem *fi = new QvisListViewFileItem(
item, CreateItemLabel(md, i, useVirtualDBInfo),
item->file, QvisListViewFileItem::FILE_NODE, i);
fi->setOpen(false);
}
// Set the database pixmap.
item->setPixmap(0, *databasePixmap);
fileListView->blockSignals(false);
// Set the database pixmap.
item->setPixmap(0, *databasePixmap);
fileListView->blockSignals(false);
// Remember that the item now has the correct information
// displayed through its children.
SetFileShowsCorrectData(item->file, true);
// Remember that the item now has the correct information
// displayed through its children.
SetFileShowsCorrectData(item->file, true);
}
#if 0
else
item->timeState = 0;
#endif
}
}
......@@ -1460,6 +1478,10 @@ QvisFilePanel::DisplayVirtualDBInformation(const QualifiedFilename &file) const
// Brad Whitlock, Sat Jan 24 21:38:48 PST 2004
// I modified it to use the active time slider and database correlation.
//
// Brad Whitlock, Tue Apr 6 14:05:42 PST 2004
// I changed it so it returns early if we're not allowing file
// selection changes.
//
// ****************************************************************************
void
......@@ -1491,7 +1513,7 @@ QvisFilePanel::UpdateFileSelection()
//
QualifiedFilename activeSource(windowInfo->GetActiveSource());
DatabaseCorrelation *correlation = 0;
int dbStateForActiveSource = 0;
int dbStateForActiveSource = -1;
// Get the index of the active time slider.
int activeTS = windowInfo->GetActiveTimeSlider();
if(activeTS >= 0)
......@@ -1595,8 +1617,10 @@ QvisFilePanel::UpdateFileSelection()
}
}
// Make sure the selected item is visible.
if(selectedItem != 0)
// Make sure the selected item is visible if we're allowing selection
// change or if the currently highlighted item is invalid.
if(selectedItem != 0 && (allowFileSelectionChange ||
HighlightedItemIsInvalid()))
{
fileListView->setSelected(selectedItem, true);
fileListView->setCurrentItem(selectedItem);
......@@ -1608,6 +1632,59 @@ QvisFilePanel::UpdateFileSelection()
blockSignals(false);
}
// ****************************************************************************
// Method: QvisFilePanel::HighlightedItemIsInvalid
//
// Purpose:
// Returns whether the currently highlighted item is an invalid selection.
//
// Returns: True if the highlighted item is not valid; false otherwise.
//
// Programmer: Brad Whitlock
// Creation: Tue Apr 13 14:00:08 PST 2004
//
// Modifications:
//
// ****************************************************************************
bool
QvisFilePanel::HighlightedItemIsInvalid() const
{
bool currentItemInvalid = false;
if(fileListView->currentItem() != 0)
{
QvisListViewFileItem *ci = (QvisListViewFileItem *)
fileListView->currentItem();
// If the highlighted item is not a file, then it is not valid and
// we are allowed to change the highlight.
if(ci->isFile())
{
// If we've opened the file before and it is supposed to be
// expanded
if(fileServer->HaveOpenedFile(ci->file) &&
HaveFileInformation(ci->file) &&
FileIsExpanded(ci->file))
{
const avtDatabaseMetaData *md = fileServer->
GetMetaData(ci->file);
if(md != 0)
{
// We've opened the file before. If the highlighted item
// is an MT database and a time state < 0 is highlighted
// then the highlight is wrong. Change it.
currentItemInvalid = (md->GetNumStates() > 1) &&
(ci->timeState < 0);
}
}
}
else
currentItemInvalid = true;
}
return currentItemInvalid;
}
// ****************************************************************************
// Method: QvisFilePanel::SubjectRemoved
//
......@@ -1937,13 +2014,20 @@ QvisFilePanel::HaveFileInformation(const QualifiedFilename &filename) const
// Creation: Fri Mar 1 13:22:04 PST 2002
//
// Modifications:
//
// Brad Whitlock, Tue Apr 13 14:07:48 PST 2004
// I made the method be const.
//
// ****************************************************************************
bool
QvisFilePanel::FileIsExpanded(const QualifiedFilename &filename)
QvisFilePanel::FileIsExpanded(const QualifiedFilename &filename) const
{
return displayInfo[filename.FullName()].expanded;
bool retval = true;
FileDisplayInformationMap::const_iterator pos =
displayInfo.find(filename.FullName());
if(pos != displayInfo.end())
retval = pos->second.expanded;
return retval;
}
// ****************************************************************************
......@@ -2106,6 +2190,52 @@ QvisFilePanel::GetShowSelectedFiles() const
return showSelectedFiles;
}
// ****************************************************************************
// Method: QvisFilePanel::SetAllowFileSelectionChange
//
// Purpose:
// Sets whether setting the file selection is allowed.
//
// Arguments:
// val : The new value for allowFileSelectionChange.
//
// Programmer: Brad Whitlock
// Creation: Tue Apr 6 14:10:10 PST 2004
//
// Modifications:
//
// ****************************************************************************
void
QvisFilePanel::SetAllowFileSelectionChange(bool val)
{
if(allowFileSelectionChange != val)
{
allowFileSelectionChange = val;
if(val)
UpdateFileSelection();
}
}
// ****************************************************************************
// Method: QvisFilePanel::GetAllowFileSelectionChange
//
// Purpose:
// Returns whether the file panel will update the file selection.
//
// Programmer: Brad Whitlock
// Creation: Fri Apr 9 14:57:47 PST 2004
//
// Modifications:
//
// ****************************************************************************
bool
QvisFilePanel::GetAllowFileSelectionChange() const
{
return allowFileSelectionChange;
}
//
// Qt slot functions.
//
......
......@@ -93,6 +93,9 @@ class ViewerProxy;
// WindowAttributes. I also made it possible to not display the selected
// files list.
//
// Brad Whitlock, Tue Apr 6 14:06:25 PST 2004
// I added allowFileSelectionChange.
//
// ****************************************************************************
class GUI_API QvisFilePanel : public QWidget, public SimpleObserver, public GUIBase
......@@ -139,6 +142,8 @@ public:
bool GetShowSelectedFiles() const;
void SetShowSelectedFiles(bool);
bool GetAllowFileSelectionChange() const;
void SetAllowFileSelectionChange(bool);
signals:
void reopenOnNextFrame();
private:
......@@ -160,9 +165,10 @@ private:
void ExpandDatabaseItemUsingVirtualDBDefinition(QvisListViewFileItem *item);
void RemoveExpandedFile(const QualifiedFilename &filename);
void SetFileExpanded(const QualifiedFilename &filename, bool);
bool FileIsExpanded(const QualifiedFilename &filename);
bool FileIsExpanded(const QualifiedFilename &filename) const;
bool FileShowsCorrectData(const QualifiedFilename &filename);
void SetFileShowsCorrectData(const QualifiedFilename &filename, bool);
bool HighlightedItemIsInvalid() const;
QString CreateItemLabel(const avtDatabaseMetaData *md, int ts, bool);
QString FormattedCycleString(const int cycle) const;
......@@ -210,6 +216,7 @@ private:
WindowInformation *windowInfo;
bool allowFileSelectionChange;
int sliderVal;
FileDisplayInformationMap displayInfo;
TimeFormat timeStateFormat;
......
......@@ -102,7 +102,8 @@
// Some defines
#define VISIT_GUI_CONFIG_FILE "guiconfig"
#define VIEWER_READY_TAG 100
#define VIEWER_READY_TAG 100
#define SET_FILE_HIGHLIGHT_TAG 101
// Some internal prototypes.
static void QPrinterToPrinterAttributes(QPrinter *, PrinterAttributes *);
......@@ -291,6 +292,9 @@ LongFileName(const char *shortName)
// Brad Whitlock, Fri Mar 12 13:47:37 PST 2004
// I added keepAliveTimer.
//
// Brad Whitlock, Fri Apr 9 14:09:03 PST 2004
// I added allowFileSelectionChange.
//
// ****************************************************************************
QvisGUIApplication::QvisGUIApplication(int &argc, char **argv) :
......@@ -333,6 +337,7 @@ QvisGUIApplication::QvisGUIApplication(int &argc, char **argv) :
fromViewer = 0;
allowSocketRead = false;
keepAliveTimer = 0;
allowFileSelectionChange = true;
// Create the viewer, statusSubject, and fileServer for GUIBase.
viewer = new ViewerProxy;
......@@ -730,7 +735,9 @@ QvisGUIApplication::Synchronize(int tag)
// Creation: Wed Jun 18 16:12:18 PST 2003
//
// Modifications:
//
// Brad Whitlock, Fri Apr 9 12:24:44 PDT 2004
// Added a tag to set the file panel's file highlight mode.
//
// ****************************************************************************
void
......@@ -740,6 +747,12 @@ QvisGUIApplication::HandleSynchronize(int val)
{
QTimer::singleShot(10, this, SLOT(FinalInitialization()));
}
else if(val == SET_FILE_HIGHLIGHT_TAG)
{
// Set the appropriate file highlight for the file panel now that
// we're ready for user operation.
mainWin->SetAllowFileSelectionChange(allowFileSelectionChange);
}
}
// ****************************************************************************
......@@ -1659,6 +1672,9 @@ QvisGUIApplication::CreateMainWindow()
// Kathleen Bonnell, Wed Mar 31 10:13:43 PST 2004
// Added QueryOverTime window.
//
// Brad Whitlock, Fri Apr 9 14:32:05 PST 2004
// I connected a new signal from the preferences window.
//
// ****************************************************************************
bool
......@@ -1911,6 +1927,8 @@ QvisGUIApplication::CreateWindows(int startPercent, int endPercent)
mainWin, SLOT(SetTimeStateFormat(const TimeFormat &)));
connect(preferencesWin, SIGNAL(showSelectedFiles(bool)),
mainWin, SLOT(SetShowSelectedFiles(bool)));
connect(preferencesWin, SIGNAL(allowFileSelectionChange(bool)),
mainWin, SLOT(SetAllowFileSelectionChange(bool)));
otherWindows.push_back(preferencesWin);
break;
case 24:
......@@ -1928,6 +1946,7 @@ QvisGUIApplication::CreateWindows(int startPercent, int endPercent)
// engine window.
engineWin->ConnectStatusAttributes(viewer->GetStatusAttributes());
mainWin->ConnectViewerStatusAttributes(viewer->GetStatusAttributes());
break;
case 25:
// Create the database correlation list window.
SplashScreenProgress("Creating Correlation window...", PERCENT);
......@@ -2166,6 +2185,10 @@ QvisGUIApplication::CreatePluginWindows()
// database name. The actual plots won't get saved anyway, due to
// ViewerPlotList::CreateNode.
//
// Brad Whitlock, Fri Apr 9 14:00:49 PST 2004
// Added code to save whether we're allowing the file panel's selection
// to be updated.
//
// ****************************************************************************
void
......@@ -2228,6 +2251,10 @@ QvisGUIApplication::WriteConfigFile(const char *filename)
// Save whether the selected files list should be shown.
guiNode->AddNode(
new DataNode("showSelectedFiles", mainWin->GetShowSelectedFiles()));
// Save whether the selected files list highlight should ever get changed.
guiNode->AddNode(
new DataNode("allowFileSelectionChange",
mainWin->GetAllowFileSelectionChange()));
// Try to open the output file.
if((fp = fopen(filename, "wt")) == 0)
......@@ -2609,6 +2636,10 @@ QvisGUIApplication::ProcessConfigSettings(DataNode *node, bool systemConfig)
// Brad Whitlock, Fri Jan 30 14:41:50 PST 2004
// I added code to set whether the selected files should be shown.
//
// Brad Whitlock, Fri Apr 9 14:03:51 PST 2004
// I added code to set whether the file panel's highlight should ever
// be changed.
//
// ****************************************************************************
void
......@@ -2663,6 +2694,15 @@ QvisGUIApplication::ProcessWindowConfigSettings(DataNode *node)
preferencesWin->SetShowSelectedFiles(ssfNode->AsBool());
}
// Get whether the selected files should be shown.
DataNode *afscNode = 0;
if((afscNode = guiNode->GetNode("allowFileSelectionChange")) != 0)
{
allowFileSelectionChange = afscNode->AsBool();
mainWin->SetAllowFileSelectionChange(afscNode->AsBool());
preferencesWin->SetAllowFileSelectionChange(afscNode->AsBool());
}
// Read the config file stuff for the plugin windows.
ReadPluginWindowConfigs(guiNode, configVersion);
}
......@@ -3121,6 +3161,10 @@ QvisGUIApplication::RefreshFileListAndNextFrame()
// I added code to prevent the file from being loaded if a session file
// name was given on the command line.
//
// Brad Whitlock, Tue Apr 6 14:39:18 PST 2004
// I added code to allow the file selection to change when we're loading
// a file.
//
// ****************************************************************************
void
......@@ -3135,6 +3179,9 @@ QvisGUIApplication::LoadFile(bool addDefaultPlots)
{
int timeid = visitTimer->StartTimer();
// Let the file panel highlight the new file.
mainWin->SetAllowFileSelectionChange(true);
// Temporarily save the old settings.
std::string oldHost(fileServer->GetHost());
std::string oldPath(fileServer->GetPath());
......@@ -3273,6 +3320,10 @@ QvisGUIApplication::LoadFile(bool addDefaultPlots)
}
ENDTRY
// Create a trigger that will cause the GUI to prevent the file
// panel from updating once the viewer is done loading the file.
Synchronize(SET_FILE_HIGHLIGHT_TAG);
visitTimer->StopTimer(timeid, "Loading initial file.");
}
}
......
......@@ -221,6 +221,10 @@ class SplashScreen;
// Kathleen Bonnell, Wed Mar 31 10:13:43 PST 2004
// Added QueryOverTime window.
//
// Brad Whitlock, Fri Apr 9 14:11:11 PST 2004
// I added allowFileSelectionChange, which is an internal flag only used
// at startup.
//
// ****************************************************************************
class GUI_API QvisGUIApplication : public QObject, public ConfigManager, public GUIBase
......@@ -371,6 +375,7 @@ private:
// File to load on startup.
QualifiedFilename loadFile;
bool allowFileSelectionChange;
// Session variables
QString sessionFile;
......
......@@ -1788,6 +1788,49 @@ QvisMainWindow::GetShowSelectedFiles() const
return filePanel->GetShowSelectedFiles();
}
// ****************************************************************************
// Method: QvisMainWindow::GetAllowFileSelectionChange
//
// Purpose:
// Returns whether the selected files' selection should be changed when
// the source changes.
//
// Programmer: Brad Whitlock
// Creation: Fri Apr 9 14:37:38 PST 2004
//
// Modifications:
//
// ****************************************************************************
bool
QvisMainWindow::GetAllowFileSelectionChange() const
{
return filePanel->GetAllowFileSelectionChange();
}
// ****************************************************************************
// Method: QvisMainWindow::SetAllowFileSelectionChange
//
// Purpose:
// Sets whether the file panel is allowed to change the file selection.
//
// Arguments:
// val : True if it the file panel should be allowed to change the file
// selection; false otherwise.
//
// Programmer: Brad Whitlock
// Creation: Tue Apr 6 14:36:53 PST 2004
//
// Modifications:
//
// ****************************************************************************
void
QvisMainWindow::SetAllowFileSelectionChange(bool val)
{
filePanel->SetAllowFileSelectionChange(val);
}