Commit c6731da3 authored by whitlocb's avatar whitlocb

Merge Qt4 changes into trunk.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@5692 18c085ea-50e0-402c-830e-de6fd14e8384
parent ec9892d3
......@@ -1781,11 +1781,6 @@ avtStreamlineFilter::Initialize()
// Dave Pugmire, Wed Aug 13 14:11:04 EST 2008
// Add dataSpatialDimension and optimization for reclinear grids.
//
// Dave Pugmire, Mon Nov 24 14:39:29 EST 2008
// Fix to rectilinear optimization. If there are ghost zones, need to do the
// full check. Otherwise, points in ghost zones are reported as inside the
// domain.
//
// ****************************************************************************
bool
......@@ -1818,11 +1813,7 @@ avtStreamlineFilter::PointInDomain(pt3d &pt, int domain)
{
return false;
}
//If we don't have ghost zones, then we can rest assured that the
//point is in this domain. For ghost zones, we have to check cells.
if (ds->GetCellData()->GetArray("avtGhostZones") == NULL)
return true;
return true;
}
vtkVisItCellLocator *cellLocator = domainToCellLocatorMap[domain];
......@@ -1830,6 +1821,7 @@ avtStreamlineFilter::PointInDomain(pt3d &pt, int domain)
{
cellLocator = vtkVisItCellLocator::New();
cellLocator->SetDataSet(ds);
//cellLocator->IgnoreGhostsOff();
cellLocator->IgnoreGhostsOn();
cellLocator->BuildLocator();
domainToCellLocatorMap[domain] = cellLocator;
......
......@@ -47,7 +47,6 @@
#include <vtkInterpolatedVelocityField.h>
#include <vtkDoubleArray.h>
#include <vtkPointData.h>
#include <DebugStream.h>
// ****************************************************************************
......@@ -89,12 +88,6 @@ avtIVPVTKField::~avtIVPVTKField()
// Programmer: Christoph Garth
// Creation: February 25, 2008
//
// Modifications:
//
// Dave Pugmire, Mon Nov 24 14:39:29 EST 2008
// Added debug information for printing out evaluations and showing the
// node values.
//
// ****************************************************************************
avtVec
......@@ -102,35 +95,11 @@ avtIVPVTKField::operator()(const double& t, const avtVecRef& x) const
{
avtVec y( x.dim() ), param( pad(x,t));
//debug1<<"Field( "<<x<<" ) = ";
int result = iv->FunctionValues( param.values(), y.values() );
if( !result )
{
//debug1<<"NOT IN DOMAIN\n";
throw Undefined();
}
//debug1<<y<<endl;
// Print out cell info for debugging purposes....
/*
vtkIdType cellID = iv->GetLastCellId();
vtkDataSet *ds = iv->GetLastDataSet();
vtkCell *cell = ds->GetCell(iv->GetLastCellId());
debug1<<"Cell: nPts= "<<cell->GetPointIds()->GetNumberOfIds()<<endl;
vtkDataArray *vectors = ds->GetPointData()->GetVectors();
int numPts = cell->GetPointIds()->GetNumberOfIds();
for (int i=0; i < numPts; i++)
{
double vec[3], len;
vectors->GetTuple(cell->PointIds->GetId(i), vec);
len = sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
debug1<<" "<<i<<": ["<<vec[0]<<" "<<vec[1]<<" "<<vec[2]<<" ] len= "<<len<<endl;
}
debug1<<endl;
*/
if ( normalized )
{
double len = y.length();
......
......@@ -50,9 +50,7 @@
#include <WindowMetrics.h>
#endif
#if QT_VERSION >= 300
#include <qcursor.h>
#endif
#include <QCursor>
// ****************************************************************************
// Method: VisWinRenderingWithWindow constructor
......@@ -559,6 +557,10 @@ VisWinRenderingWithWindow::SetLargeIcons(bool val)
//
// Gunther H. Weber, Wed Mar 19 16:10:11 PDT 2008
// Added SPREADSHEET_PICK
//
// Brad Whitlock, Fri May 9 14:22:17 PDT 2008
// Qt 4.
//
// ****************************************************************************
void
......@@ -582,29 +584,16 @@ VisWinRenderingWithWindow::SetCursorForMode(INTERACTION_MODE m)
{
cursorIndex = newCursorIndex;
#if QT_VERSION >= 300
switch(cursorIndex)
{
default:
case 0:
renWin->setCursor(QCursor::ArrowCursor);
renWin->setCursor(QCursor(Qt::ArrowCursor));
break;
case 1:
renWin->setCursor(QCursor::CrossCursor);
renWin->setCursor(QCursor(Qt::CrossCursor));
break;
}
#else
switch(cursorIndex)
{
default:
case 0:
renWin->setCursor(ArrowCursor);
break;
case 1:
renWin->setCursor(CrossCursor);
break;
}
#endif
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* XPM */
static const char * silchecked_xpm[] = {
"13 13 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
".............",
".............",
"..+++++++++..",
"..++++++..+..",
"..+++++...+..",
"....++...++..",
"........+++..",
"..+....++++..",
"..++..+++++..",
"..+++++++++..",
"..+++++++++..",
".............",
"............."};
/* XPM */
static const char * silmixed_xpm[] = {
"13 13 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
".............",
".............",
"..+++++++....",
"..++++++.....",
"..+++++...+..",
"..++++...++..",
"..+++...+++..",
"..++...++++..",
"..+...+++++..",
".....++++++..",
"....+++++++..",
".............",
"............."};
/* XPM */
static const char * silunchecked_xpm[] = {
"13 13 3 1",
" c None",
". c #000000",
"+ c #FFFFFF",
".............",
".............",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
"..+++++++++..",
".............",
"............."};
......@@ -139,6 +139,9 @@ class ViewerPlot;
// Made the GUI plugin info return QString so we can internationalize
// plot names. Added const to strings returned from GeneralPlotPluginInfo.
//
// Cyrus Harrison, Tue Jul 22 10:24:33 PDT 2008
// Removed the name argument to CreatePluginWizard.
//
// ****************************************************************************
class PLUGIN_API GeneralPlotPluginInfo
......@@ -169,7 +172,7 @@ class PLUGIN_API GUIPlotPluginInfo : public virtual CommonPlotPluginInfo
QvisNotepadArea *notepad) = 0;
virtual QvisWizard *CreatePluginWizard(AttributeSubject *attr, QWidget *parent,
const std::string &varName, const avtDatabaseMetaData *md,
const ExpressionList *expList, const char *name =0)
const ExpressionList *expList)
{
return 0;
}
......
This diff is collapsed.
......@@ -25,8 +25,9 @@ AppearanceAttributes::InitializeStyle()
style = "windows";
#elif defined(__APPLE__)
style = "aqua";
style = "macintosh";
#else
style = "motif";
#endif
}
......@@ -79,15 +79,26 @@ public:
void SelectForeground();
void SelectFontName();
void SelectStyle();
void SelectDefaultForeground();
void SelectDefaultBackground();
void SelectDefaultFontName();
void SelectDefaultStyle();
// Property setting methods
void SetUseSystemDefault(bool useSystemDefault_);
void SetBackground(const std::string &background_);
void SetForeground(const std::string &foreground_);
void SetFontName(const std::string &fontName_);
void SetStyle(const std::string &style_);
void SetOrientation(int orientation_);
void SetDefaultForeground(const std::string &defaultForeground_);
void SetDefaultBackground(const std::string &defaultBackground_);
void SetDefaultFontName(const std::string &defaultFontName_);
void SetDefaultStyle(const std::string &defaultStyle_);
void SetDefaultOrientation(int defaultOrientation_);
// Property getting methods
bool GetUseSystemDefault() const;
const std::string &GetBackground() const;
std::string &GetBackground();
const std::string &GetForeground() const;
......@@ -97,6 +108,15 @@ public:
const std::string &GetStyle() const;
std::string &GetStyle();
int GetOrientation() const;
const std::string &GetDefaultForeground() const;
std::string &GetDefaultForeground();
const std::string &GetDefaultBackground() const;
std::string &GetDefaultBackground();
const std::string &GetDefaultFontName() const;
std::string &GetDefaultFontName();
const std::string &GetDefaultStyle() const;
std::string &GetDefaultStyle();
int GetDefaultOrientation() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -114,19 +134,31 @@ public:
// IDs that can be used to identify fields in case statements
enum {
ID_background = 0,
ID_useSystemDefault = 0,
ID_background,
ID_foreground,
ID_fontName,
ID_style,
ID_orientation
ID_orientation,
ID_defaultForeground,
ID_defaultBackground,
ID_defaultFontName,
ID_defaultStyle,
ID_defaultOrientation
};
private:
bool useSystemDefault;
std::string background;
std::string foreground;
std::string fontName;
std::string style;
int orientation;
std::string defaultForeground;
std::string defaultBackground;
std::string defaultFontName;
std::string defaultStyle;
int defaultOrientation;
// Static class format string for type map.
static const char *TypeMapFormatString;
......
<?xml version="1.0"?>
<Attribute name="AppearanceAttributes" purpose="This class contains the GUI/viewer appearance attributes." exportAPI="STATE_API" exportInclude="state_exports.h" codefile="AppearanceAttributes.code">
<Field name="background" type="string">#c0c0c0</Field>
<Field name="foreground" type="string">#000000</Field>
<Field name="fontName" type="string">Helvetica,12,-1,5,50,0,0,0,0,0</Field>
<Field name="style" type="string" init="true">motif</Field>
<Field name="orientation" type="int">0</Field>
<Attribute name="AppearanceAttributes" purpose="This class contains the GUI/viewer appearance attributes." persistent="true" keyframe="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="AppearanceAttributes.code">
<Field name="useSystemDefault" label="useSystemDefault" type="bool">
true
</Field>
<Field name="background" label="background" type="string" enabler="useSystemDefault:false">
#c0c0c0
</Field>
<Field name="foreground" label="foreground" type="string" enabler="useSystemDefault:false">
#000000
</Field>
<Field name="fontName" label="fontName" type="string" enabler="useSystemDefault:false">
Helvetica,12,-1,5,50,0,0,0,0,0
</Field>
<Field name="style" label="style" type="string" enabler="useSystemDefault:false" init="true">
motif
</Field>
<Field name="orientation" label="orientation" type="int" enabler="useSystemDefault:false">
0
</Field>
<Field name="defaultForeground" label="defaultForeground" type="string">
</Field>
<Field name="defaultBackground" label="defaultBackground" type="string">
</Field>
<Field name="defaultFontName" label="defaultFontName" type="string">
</Field>
<Field name="defaultStyle" label="defaultStyle" type="string">
</Field>
<Field name="defaultOrientation" label="defaultOrientation" type="int">
</Field>
<Function name="InitializeStyle" user="true" member="true">
</Function>
</Attribute>
......@@ -61,7 +61,7 @@ KeyframeAttributes::KeyframeAttributes() :
AttributeSubject(KeyframeAttributes::TypeMapFormatString)
{
enabled = false;
nFrames = 0;
nFrames = 20;
nFramesWasUserSet = false;
}
......
......@@ -4,7 +4,7 @@
false
</Field>
<Field name="nFrames" label="Number of animation frames" type="int">
0
20
</Field>
<Field name="nFramesWasUserSet" label="Number frames was set by the user" type="bool">
false
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <Utility.h>
#include <stdlib.h>
// ****************************************************************************
// Function: PointSorter
//
// Purpose:
// Used to sort points using the qsort routine.
//
// Programmer: Hank Childs
// Creation: October 3, 2003
//
// ****************************************************************************
static int
PointSorter(const void *p1, const void *p2)
{
const float *f1 = (const float *) p1;
const float *f2 = (const float *) p2;