QvisPoincarePlotWindow.C 67.3 KB
Newer Older
pugmire's avatar
pugmire committed
1
2
/*****************************************************************************
*
brugger's avatar
 
brugger committed
3
* Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC
pugmire's avatar
pugmire committed
4
* Produced at the Lawrence Livermore National Laboratory
brugger's avatar
 
brugger committed
5
* LLNL-CODE-442911
pugmire's avatar
pugmire committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
* 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 "QvisPoincarePlotWindow.h"

#include <PoincareAttributes.h>
#include <ViewerProxy.h>

allens's avatar
allens committed
44
#include <QTabWidget>
45
46
47
48
49
50
#include <QCheckBox>
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QSpinBox>
#include <QButtonGroup>
allens's avatar
allens committed
51
52
#include <QComboBox>
#include <QGroupBox>
53
#include <QRadioButton>
pugmire's avatar
pugmire committed
54
55
56
57
#include <QvisColorTableButton.h>
#include <QvisOpacitySlider.h>
#include <QvisColorButton.h>
#include <QvisLineWidthWidget.h>
pugmire's avatar
pugmire committed
58
#include <QvisLineStyleWidget.h>
pugmire's avatar
pugmire committed
59
#include <QvisVariableButton.h>
pugmire's avatar
pugmire committed
60
#include <QvisPointControl.h>
pugmire's avatar
pugmire committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

#include <stdio.h>
#include <string>

using std::string;

// ****************************************************************************
// Method: QvisPoincarePlotWindow::QvisPoincarePlotWindow
//
// Purpose: 
//   Constructor
//
// Note:       Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

QvisPoincarePlotWindow::QvisPoincarePlotWindow(const int type,
                         PoincareAttributes *subj,
                         const QString &caption,
                         const QString &shortName,
                         QvisNotepadArea *notepad)
    : QvisPostableWindowObserver(subj, caption, shortName, notepad)
{
    plotType = type;
    atts = subj;
}


// ****************************************************************************
// Method: QvisPoincarePlotWindow::~QvisPoincarePlotWindow
//
// Purpose: 
//   Destructor
//
// Note:       Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

QvisPoincarePlotWindow::~QvisPoincarePlotWindow()
{
}


// ****************************************************************************
// Method: QvisPoincarePlotWindow::CreateWindowContents
//
// Purpose: 
//   Creates the widgets for the window.
//
// Note:       Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation:   omitted
//
pugmire's avatar
pugmire committed
125
// Modifications:
pugmire's avatar
pugmire committed
126
//   
127
128
129
//   Allen Sanderson, Sun Mar  7 12:49:56 PST 2010
//   Change layout of window for 2.0 interface changes.
//
130
131
132
//   Jeremy Meredith, Fri Apr 30 13:05:20 EDT 2010
//   Fixed all the parents.
//
pugmire's avatar
pugmire committed
133
134
135
136
137
// ****************************************************************************

void
QvisPoincarePlotWindow::CreateWindowContents()
{
allens's avatar
allens committed
138
139
140
141
142
143
144
145
146
147
148
149
    propertyTabs = new QTabWidget(central);
    topLayout->addWidget(propertyTabs);

    // ----------------------------------------------------------------------
    // First tab
    // ----------------------------------------------------------------------
    firstTab = new QWidget(central);
    propertyTabs->addTab(firstTab, tr("Streamlines"));
    
    QGridLayout *mainLayout = new QGridLayout(firstTab);

   // Create the source group box.
150
    QGroupBox *sourceGroup = new QGroupBox(firstTab);
allens's avatar
allens committed
151
    sourceGroup->setTitle(tr("Source"));
152
    mainLayout->addWidget(sourceGroup, 0, 0);
allens's avatar
allens committed
153
154
//    mainLayout->setStretchFactor(sourceGroup, 100);
    QGridLayout *sourceLayout = new QGridLayout(sourceGroup);
155
    sourceLayout->setMargin(5);
allens's avatar
allens committed
156
    sourceLayout->setSpacing(10);
allens's avatar
allens committed
157

158
    sourceTypeLabel = new QLabel(tr("Source Type"), sourceGroup);
allens's avatar
allens committed
159
160
    sourceLayout->addWidget(sourceTypeLabel, 0, 0);

161
    sourceTypeCombo = new QComboBox(sourceGroup);
allens's avatar
allens committed
162
163
164
165
166
167
168
    sourceTypeCombo->addItem(tr("Point"));
    sourceTypeCombo->addItem(tr("Line"));
    connect(sourceTypeCombo, SIGNAL(activated(int)),
           this, SLOT(sourceTypeChanged(int)));
    sourceLayout->addWidget(sourceTypeCombo, 0, 1);


169
    pointSourceLabel = new QLabel(tr("Location"), sourceGroup);
170
    sourceLayout->addWidget(pointSourceLabel, 0, 2);
171
    pointSource = new QLineEdit(sourceGroup);
172
173
    connect(pointSource, SIGNAL(returnPressed()),
            this, SLOT(pointSourceProcessText()));
174
175
176
    sourceLayout->addWidget(pointSource, 0, 3);


allens's avatar
allens committed
177

178
    lineStartLabel = new QLabel(tr("Start Point"), sourceGroup);
179
    sourceLayout->addWidget(lineStartLabel, 0, 2);
180
    lineStart = new QLineEdit(sourceGroup);
181
182
    connect(lineStart, SIGNAL(returnPressed()),
            this, SLOT(lineStartProcessText()));
183
    sourceLayout->addWidget(lineStart, 0, 3);
184

185
    lineEndLabel = new QLabel(tr("End Point"), sourceGroup);
186
    sourceLayout->addWidget(lineEndLabel, 1, 2);
187
    lineEnd = new QLineEdit(sourceGroup);
188
189
    connect(lineEnd, SIGNAL(returnPressed()),
            this, SLOT(lineEndProcessText()));
190
    sourceLayout->addWidget(lineEnd, 1, 3);
191

192
    pointDensityLabel = new QLabel(tr("Point density"), sourceGroup);
193
    sourceLayout->addWidget(pointDensityLabel, 2, 2);
194
    pointDensity = new QSpinBox(sourceGroup);
195
196
197
198
    pointDensity->setMinimum(1);
    pointDensity->setMaximum(10000);
    connect(pointDensity, SIGNAL(valueChanged(int)),
            this, SLOT(pointDensityChanged(int)));
199
    sourceLayout->addWidget(pointDensity, 2, 3);
allens's avatar
allens committed
200
201

   // Create the integration group box.
202
    QGroupBox *integrationGroup = new QGroupBox(firstTab);
allens's avatar
allens committed
203
    integrationGroup->setTitle(tr("Integration"));
allens's avatar
allens committed
204
    mainLayout->addWidget(integrationGroup, 1, 0);
allens's avatar
allens committed
205
206
//    mainLayout->setStretchFactor(integrationGroup, 100);
    QGridLayout *integrationLayout = new QGridLayout(integrationGroup);
207
    integrationLayout->setMargin(5);
allens's avatar
allens committed
208
209
    integrationLayout->setSpacing(10);

210
    integrationTypeLabel = new QLabel(tr("Integrator:"), integrationGroup);
allens's avatar
allens committed
211
212
    integrationLayout->addWidget(integrationTypeLabel,0,0);

213
    integrationTypeCombo = new QComboBox(integrationGroup);
214
215
    integrationTypeCombo->addItem(tr("Dormand-Prince (Runge-Kutta)"));
    integrationTypeCombo->addItem(tr("Adams-Bashforth (Multi-step)"));
216
217
    integrationTypeCombo->addItem(tr("M3D-C1 2D Integrator (M3D-C1 2D data only)"));
    integrationTypeCombo->addItem(tr("M3D-C1 3D Integrator (M3D-C1 3D data only)"));
218
//    integrationTypeCombo->addItem(tr("NIMROD Integrator (NIMROD data only)"));
allens's avatar
allens committed
219
220
221
    connect(integrationTypeCombo, SIGNAL(activated(int)),
           this, SLOT(integrationTypeChanged(int)));
    integrationLayout->addWidget(integrationTypeCombo, 0, 1);
222

223
    maxStepLengthLabel = new QLabel(tr("Maxiumum step length"), integrationGroup);
allens's avatar
allens committed
224
    integrationLayout->addWidget(maxStepLengthLabel,1,0);
225
    maxStepLength = new QLineEdit(integrationGroup);
allens's avatar
allens committed
226
227
    connect(maxStepLength, SIGNAL(returnPressed()),
            this, SLOT(maxStepLengthProcessText()));
allens's avatar
allens committed
228
    integrationLayout->addWidget(maxStepLength, 1,1);
229

230
    relTolLabel = new QLabel(tr("Relative tolerance"), integrationGroup);
allens's avatar
allens committed
231
    integrationLayout->addWidget(relTolLabel,2,0);
232
    relTol = new QLineEdit(integrationGroup);
allens's avatar
allens committed
233
234
    connect(relTol, SIGNAL(returnPressed()),
            this, SLOT(relTolProcessText()));
allens's avatar
allens committed
235
    integrationLayout->addWidget(relTol, 2,1);
236

237
    absTolLabel = new QLabel(tr("Absolute tolerance"), integrationGroup);
allens's avatar
allens committed
238
    integrationLayout->addWidget(absTolLabel,3,0);
239
    absTol = new QLineEdit(integrationGroup);
allens's avatar
allens committed
240
241
    connect(absTol, SIGNAL(returnPressed()),
            this, SLOT(absTolProcessText()));
allens's avatar
allens committed
242
243
    integrationLayout->addWidget(absTol, 3,1);

pugmire's avatar
pugmire committed
244
245
246
247
248
249
    forceNodalLabel = new QLabel(tr("Force node centering"), integrationGroup);
    forceNodal = new QCheckBox(integrationGroup);
    connect(forceNodal, SIGNAL(toggled(bool)), this, SLOT(forceNodalChanged(bool)));
    integrationLayout->addWidget(forceNodalLabel, 4,0);
    integrationLayout->addWidget(forceNodal, 4, 1);

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271

    // Create the coordinate group
//     QGroupBox *coordinateGroup = new QGroupBox(firstTab);
//     coordinateGroup->setTitle(tr("Coordinate System"));
//     mainLayout->addWidget(coordinateGroup, 2, 0);

//     QGridLayout *coordinateLayout = new QGridLayout(coordinateGroup);
//     coordinateLayout->setMargin(5);
//     coordinateLayout->setSpacing(10);

//     coordinateButtonGroup = new QButtonGroup(coordinateGroup);
//     QRadioButton *cartesianButton = new QRadioButton(tr("Cartesian"), coordinateGroup);
//     QRadioButton *cylindricalButton = new QRadioButton(tr("Cylindrical"), coordinateGroup);
//     coordinateButtonGroup->addButton(cartesianButton, 0);
//     coordinateButtonGroup->addButton(cylindricalButton, 1);

//     coordinateLayout->addWidget(cartesianButton, 0, 0);
//     coordinateLayout->addWidget(cylindricalButton, 0, 1);

//     connect(coordinateButtonGroup, SIGNAL(buttonClicked(int)), this,
//          SLOT(coordinateButtonGroupChanged(int)));

allens's avatar
allens committed
272
273
274
    // Create the punctures group box.
    QGroupBox *puncturesGroup = new QGroupBox(firstTab);
    puncturesGroup->setTitle(tr("Punctures"));
275
    mainLayout->addWidget(puncturesGroup, 3, 0);
allens's avatar
allens committed
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
//    mainLayout->setStretchFactor(puncturesGroup, 100);

    QGridLayout *puncturesLayout = new QGridLayout(puncturesGroup);
    puncturesLayout->setMargin(5);
    puncturesLayout->setSpacing(10);

    minPuncturesLabel = new QLabel(tr("Minimum"), puncturesGroup);
    puncturesLayout->addWidget(minPuncturesLabel, 0, 0);
    minPunctures = new QSpinBox(central);
    minPunctures->setMinimum(1);
    minPunctures->setMaximum(10000);
    connect(minPunctures, SIGNAL(valueChanged(int)),
            this, SLOT(minPuncturesChanged(int)));
    puncturesLayout->addWidget(minPunctures, 0, 1);

    maxPuncturesLabel = new QLabel(tr("Maximum"), puncturesGroup);
    puncturesLayout->addWidget(maxPuncturesLabel, 0, 2);
    maxPunctures = new QSpinBox(central);
    maxPunctures->setMinimum(1);
    maxPunctures->setMaximum(10000);
    connect(maxPunctures, SIGNAL(valueChanged(int)),
            this, SLOT(maxPuncturesChanged(int)));
    puncturesLayout->addWidget(maxPunctures, 0, 3);

300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319

    puncturePlaneLabel = new QLabel(tr("Puncture Plane"), firstTab);
    puncturesLayout->addWidget(puncturePlaneLabel, 1, 0);
    puncturePlane = new QWidget(firstTab);
    puncturePlaneButtonGroup= new QButtonGroup(puncturePlane);
    QHBoxLayout *puncturePlaneLayout = new QHBoxLayout(puncturePlane);
    puncturePlaneLayout->setMargin(0);
    puncturePlaneLayout->setSpacing(10);
    QRadioButton *puncturePlaneTypePoloidal =
      new QRadioButton(tr("Poloidal"), puncturePlane);
    puncturePlaneButtonGroup->addButton(puncturePlaneTypePoloidal,0);
    puncturePlaneLayout->addWidget(puncturePlaneTypePoloidal);
    QRadioButton *puncturePlaneTypeTorodial =
      new QRadioButton(tr("Toroidal"), puncturePlane);
    puncturePlaneButtonGroup->addButton(puncturePlaneTypeTorodial,1);
    puncturePlaneLayout->addWidget(puncturePlaneTypeTorodial);
    connect(puncturePlaneButtonGroup, SIGNAL(buttonClicked(int)),
            this, SLOT(puncturePlaneChanged(int)));
    puncturesLayout->addWidget(puncturePlane, 1, 1, 1, 2);

allens's avatar
allens committed
320
321
322
323
324
325
326
327
    // ----------------------------------------------------------------------
    // Second tab
    // ----------------------------------------------------------------------
    secondTab = new QWidget(central);
    propertyTabs->addTab(secondTab, tr("Analysis"));
    
    mainLayout = new QGridLayout(secondTab);

allens's avatar
allens committed
328
    analysisLabel = new QLabel(tr("Analysis type"), secondTab);
329
330
331
332
333
334
335
    mainLayout->addWidget(analysisLabel, 0, 0, Qt::AlignTop);
    analysis = new QWidget(secondTab);
    analysisButtonGroup= new QButtonGroup(analysis);
    QHBoxLayout *analysisTypeLayout = new QHBoxLayout(analysis);
    analysisTypeLayout->setMargin(0);
    analysisTypeLayout->setSpacing(10);
    QRadioButton *analysisTypeNone =
allens's avatar
allens committed
336
      new QRadioButton(tr("None - Punctures only"), analysis);
337
338
339
    analysisButtonGroup->addButton(analysisTypeNone,0);
    analysisTypeLayout->addWidget(analysisTypeNone);
    QRadioButton *analysisTypeNormal =
allens's avatar
allens committed
340
      new QRadioButton(tr("Full"), analysis);
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
    analysisButtonGroup->addButton(analysisTypeNormal,1);
    analysisTypeLayout->addWidget(analysisTypeNormal);
    connect(analysisButtonGroup, SIGNAL(buttonClicked(int)),
            this, SLOT(analysisChanged(int)));
    mainLayout->addWidget(analysis, 0, 1, Qt::AlignTop);


   // Create the analysis group box.
    QGroupBox *analysisGroup = new QGroupBox(secondTab);
    analysisGroup->setTitle(tr("Analysis"));
    mainLayout->addWidget(analysisGroup, 1, 0, 5, 3, Qt::AlignTop);

    QGridLayout *analysisLayout = new QGridLayout(analysisGroup);
    analysisLayout->setMargin(5);
    analysisLayout->setSpacing(10);

    maximumToroidalWindingLabel =
      new QLabel(tr("Maximum toroidal winding"), secondTab);
    analysisLayout->addWidget(maximumToroidalWindingLabel, 0, 0);
    maximumToroidalWinding = new QSpinBox(secondTab);
    maximumToroidalWinding->setMinimum(0);
    maximumToroidalWinding->setMaximum(1000);
    connect(maximumToroidalWinding, SIGNAL(valueChanged(int)),
            this, SLOT(maximumToroidalWindingChanged(int)));
    analysisLayout->addWidget(maximumToroidalWinding, 0, 1);
366

allens's avatar
allens committed
367
    overrideToroidalWindingLabel =
368
369
      new QLabel(tr("Override toroidal winding"), secondTab);
    analysisLayout->addWidget(overrideToroidalWindingLabel, 1, 0);
370
    overrideToroidalWinding = new QSpinBox(secondTab);
371
372
373
374
    overrideToroidalWinding->setMinimum(0);
    overrideToroidalWinding->setMaximum(1000);
    connect(overrideToroidalWinding, SIGNAL(valueChanged(int)),
            this, SLOT(overrideToroidalWindingChanged(int)));
375
    analysisLayout->addWidget(overrideToroidalWinding, 1, 1);
pugmire's avatar
pugmire committed
376

allens's avatar
allens committed
377
378
379
380
381
382
383
384
385
386
    overridePoloidalWindingLabel =
      new QLabel(tr("Override poloidal winding"), secondTab);
    analysisLayout->addWidget(overridePoloidalWindingLabel, 2, 0);
    overridePoloidalWinding = new QSpinBox(secondTab);
    overridePoloidalWinding->setMinimum(0);
    overridePoloidalWinding->setMaximum(1000);
    connect(overridePoloidalWinding, SIGNAL(valueChanged(int)),
            this, SLOT(overridePoloidalWindingChanged(int)));
    analysisLayout->addWidget(overridePoloidalWinding, 2, 1);

387
    windingPairConfidenceLabel =
388
      new QLabel(tr("Winding pair confidence"), secondTab);
allens's avatar
allens committed
389
    analysisLayout->addWidget(windingPairConfidenceLabel, 3, 0);
390
391
392
    windingPairConfidence = new QLineEdit(secondTab);
    connect(windingPairConfidence, SIGNAL(returnPressed()),
            this, SLOT(windingPairConfidenceProcessText()));
allens's avatar
allens committed
393
    analysisLayout->addWidget(windingPairConfidence, 3, 1);
394

395
396
397
398
399
400
401
402
403

    rationalTemplateSeedParmLabel =
      new QLabel(tr("Rational Template Seed Parameter"), secondTab);
    analysisLayout->addWidget(rationalTemplateSeedParmLabel, 4, 0);
    rationalTemplateSeedParm = new QLineEdit(secondTab);
    connect(rationalTemplateSeedParm, SIGNAL(returnPressed()),
            this, SLOT(rationalTemplateSeedParmProcessText()));
    analysisLayout->addWidget(rationalTemplateSeedParm, 4, 1);

404
   // Create the O/X Point group box.
405
    QGroupBox *criticalPointGroup = new QGroupBox(secondTab);
406
    criticalPointGroup->setTitle(tr("Critical Points"));
407
    mainLayout->addWidget(criticalPointGroup, 5, 0, 1, 3, Qt::AlignTop);
408
409
410
411
412

    QGridLayout *criticalPointLayout = new QGridLayout(criticalPointGroup);
    criticalPointLayout->setMargin(5);
    criticalPointLayout->setSpacing(10);

413
    showOPoints = new QCheckBox(tr("Detect O Points"), criticalPointGroup);
414
415
416
417
418
419
420
    connect(showOPoints, SIGNAL(toggled(bool)),
            this, SLOT(showOPointsChanged(bool)));
    criticalPointLayout->addWidget(showOPoints, 0, 0);

    OPointMaxIterationsLabel =
      new QLabel(tr(" Maximum iterations"), criticalPointGroup);
    OPointMaxIterations = new QSpinBox(criticalPointGroup);
allens's avatar
allens committed
421
    OPointMaxIterations->setRange(0, 10);
422
423
424
425
426
    connect(OPointMaxIterations, SIGNAL(valueChanged(int)), 
            this, SLOT(OPointMaxIterationsChanged(int)));
    criticalPointLayout->addWidget( OPointMaxIterationsLabel, 0, 2);
    criticalPointLayout->addWidget( OPointMaxIterations, 0, 3);

allens's avatar
allens committed
427
//    criticalPointGroup->hide();
428

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

    // Create the overlaps group box.
    QGroupBox *overlapsGroup = new QGroupBox(secondTab);
    overlapsGroup->setTitle(tr("Overlaps"));
    mainLayout->addWidget(overlapsGroup, 6, 0, 1, 3, Qt::AlignTop);

    QGridLayout *overlapsLayout = new QGridLayout(overlapsGroup);
    overlapsLayout->setMargin(5);
    overlapsLayout->setSpacing(10);

    overlapsLabel = new QLabel(tr("Overlaping curve sections"), secondTab);
    overlapsLayout->addWidget(overlapsLabel, 0, 0, Qt::AlignTop);
    overlaps = new QWidget(secondTab);
    overlapsButtonGroup= new QButtonGroup(overlaps);
    QHBoxLayout *overlapTypeLayout = new QHBoxLayout(overlaps);
    overlapTypeLayout->setMargin(0);
    overlapTypeLayout->setSpacing(10);
    QRadioButton *overlapTypeRaw =
      new QRadioButton(tr("Raw"), overlaps);
    overlapsButtonGroup->addButton(overlapTypeRaw,0);
    overlapTypeLayout->addWidget(overlapTypeRaw);
    QRadioButton *overlapTypeRemove =
      new QRadioButton(tr("Remove"), overlaps);
    overlapsButtonGroup->addButton(overlapTypeRemove,1);
    overlapTypeLayout->addWidget(overlapTypeRemove);
    QRadioButton *overlapTypeMerge =
      new QRadioButton(tr("Merge"), overlaps);
    overlapsButtonGroup->addButton(overlapTypeMerge,2);
    overlapTypeLayout->addWidget(overlapTypeMerge);
    QRadioButton *overlapTypeSmooth =
      new QRadioButton(tr("Smooth"), overlaps);
    overlapsButtonGroup->addButton(overlapTypeSmooth,3);
    overlapTypeLayout->addWidget(overlapTypeSmooth);
    connect(overlapsButtonGroup, SIGNAL(buttonClicked(int)),
            this, SLOT(overlapsChanged(int)));
    overlapsLayout->addWidget(overlaps, 0, 1, Qt::AlignTop);


    // Create the options group box.
468
    QGroupBox *analysisOptionsGroup = new QGroupBox(secondTab);
469
    analysisOptionsGroup->setTitle(tr("Options"));
470
    mainLayout->addWidget(analysisOptionsGroup, 7, 0, 1, 3, Qt::AlignTop);
471
472
473
474
475

    QGridLayout *analysisOptionsLayout = new QGridLayout(analysisOptionsGroup);
    analysisOptionsLayout->setMargin(5);
    analysisOptionsLayout->setSpacing(10);

476
    showIslands = new QCheckBox(tr("Show islands only"), analysisOptionsGroup);
477
478
479
480
    connect(showIslands, SIGNAL(toggled(bool)),
            this, SLOT(showIslandsChanged(bool)));
    analysisOptionsLayout->addWidget(showIslands, 0, 0);

allens's avatar
allens committed
481
    showChaotic =
482
      new QCheckBox(tr("Show chaotic fieldlines (as points)"), analysisOptionsGroup);
483
484
485
486
    connect(showChaotic, SIGNAL(toggled(bool)),
            this, SLOT(showChaoticChanged(bool)));
    analysisOptionsLayout->addWidget(showChaotic, 0, 1);

allens's avatar
allens committed
487
488
489
490
    show1DPlots = new QCheckBox(tr("Show 1D plots (distance/ridgelines)"), analysisOptionsGroup);
    connect(show1DPlots, SIGNAL(toggled(bool)),
            this, SLOT(show1DPlotsChanged(bool)));
    analysisOptionsLayout->addWidget(show1DPlots, 1, 0);
491

492
    verboseFlag = new QCheckBox(tr("Verbose"), analysisOptionsGroup);
493
494
495
496
    connect(verboseFlag, SIGNAL(toggled(bool)),
            this, SLOT(verboseFlagChanged(bool)));
    analysisOptionsLayout->addWidget(verboseFlag, 1, 1);

allens's avatar
allens committed
497
498
499
500
501

    // ----------------------------------------------------------------------
    // Third tab
    // ----------------------------------------------------------------------
    thirdTab = new QWidget(central);
502
    propertyTabs->addTab(thirdTab, tr("Appearance"));
allens's avatar
allens committed
503
504
505
    
    mainLayout = new QGridLayout(thirdTab);

506
    // Create the data group box.
507
    QGroupBox *dataGroup = new QGroupBox(thirdTab);
508
509
    dataGroup->setTitle(tr("Data"));
    mainLayout->addWidget(dataGroup, 0, 0);
510

511
512
513
514
515
516
    QGridLayout *dataLayout = new QGridLayout(dataGroup);
    dataLayout->setMargin(5);
    dataLayout->setSpacing(10);
    dataLayout->setColumnStretch(2, 10);


517
    dataValueLabel = new QLabel(tr("Data value:"), dataGroup);
518
519
    dataLayout->addWidget(dataValueLabel, 0, 0);

520
    dataValueCombo = new QComboBox(dataGroup);
allens's avatar
allens committed
521
    dataValueCombo->addItem(tr("None"));
allens's avatar
allens committed
522
523
524
    dataValueCombo->addItem(tr("Original Value"));
    dataValueCombo->addItem(tr("Input Order"));
    dataValueCombo->addItem(tr("Point Index"));
525
    dataValueCombo->addItem(tr("Plane"));
allens's avatar
allens committed
526
527
528
529
530
531
    dataValueCombo->addItem(tr("Winding Group"));
    dataValueCombo->addItem(tr("Winding Point Order"));
    dataValueCombo->addItem(tr("Winding Point Order Modulo"));
    dataValueCombo->addItem(tr("Toroidal Windings"));
    dataValueCombo->addItem(tr("Poloidal Windings"));
    dataValueCombo->addItem(tr("Safety Factor"));
532
533
534
535
    connect(dataValueCombo, SIGNAL(activated(int)),
           this, SLOT(dataValueChanged(int)));
    dataLayout->addWidget(dataValueCombo, 0, 1);

536
    dataLayout->addWidget(new QLabel(tr("   "), dataGroup), 0, 2);
537
538


539
    // Create the limits group box.
540
    QGroupBox *limitsGroup = new QGroupBox(thirdTab);
541
542
543
544
545
546
    dataLayout->addWidget(limitsGroup, 1, 0, 1, 3);

    QGridLayout *limitsLayout = new QGridLayout(limitsGroup);
    limitsLayout->setMargin(5);
    limitsLayout->setSpacing(10);

547
    limitsLayout->addWidget(new QLabel(tr("Limits"), limitsGroup), 0, 0);
548

549
    minFlag = new QCheckBox(tr("Minimum"), limitsGroup);
550
551
552
    limitsLayout->addWidget(minFlag, 0, 1);
    connect(minFlag, SIGNAL(toggled(bool)),
            this, SLOT(minFlagChanged(bool)));
553
    min = new QLineEdit(limitsGroup);
554
555
556
557
    connect(min, SIGNAL(returnPressed()),
            this, SLOT(minProcessText()));
    limitsLayout->addWidget(min, 0, 2);

558
    maxFlag = new QCheckBox(tr("Maximum"), limitsGroup);
559
560
561
562
    connect(maxFlag, SIGNAL(toggled(bool)),
            this, SLOT(maxFlagChanged(bool)));
    limitsLayout->addWidget(maxFlag, 0, 3);

563
    max = new QLineEdit(limitsGroup);
564
565
566
567
568
    connect(max, SIGNAL(returnPressed()),
            this, SLOT(maxProcessText()));
    limitsLayout->addWidget(max, 0, 4);


allens's avatar
allens committed
569
   // Create the color group box.
570
    QGroupBox *colorGroup = new QGroupBox(thirdTab);
allens's avatar
allens committed
571
    colorGroup->setTitle(tr("Color"));
allens's avatar
allens committed
572
    mainLayout->addWidget(colorGroup, 1, 0);
allens's avatar
allens committed
573
574
//    mainLayout->setStretchFactor(colorGroup, 100);
    QGridLayout *colorLayout = new QGridLayout(colorGroup);
575
    colorLayout->setMargin(5);
allens's avatar
allens committed
576
    colorLayout->setSpacing(10);
allens's avatar
allens committed
577
//    colorLayout->setColumnStretch(2, 10);
578

allens's avatar
allens committed
579
    singleColorLabel = new QLabel(tr("Single color"), colorGroup);
580
    singleColor = new QvisColorButton(colorGroup);
581
582
    connect(singleColor, SIGNAL(selectedColor(const QColor&)),
            this, SLOT(singleColorChanged(const QColor&)));
allens's avatar
allens committed
583
    colorLayout->addWidget(singleColorLabel, 0, 0, Qt::AlignLeft);
584
585
    colorLayout->addWidget(singleColor, 0, 1, Qt::AlignLeft);

allens's avatar
allens committed
586
    colorTableNameLabel = new QLabel(tr("Color table"), colorGroup);
587
    colorTableName = new QvisColorTableButton(colorGroup);
allens's avatar
allens committed
588
589
    connect(colorTableName, SIGNAL(selectedColorTable(bool, const QString&)),
            this, SLOT(colorTableNameChanged(bool, const QString&)));
allens's avatar
allens committed
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
    colorLayout->addWidget(colorTableNameLabel, 0, 0, Qt::AlignLeft);
    colorLayout->addWidget(colorTableName, 0, 1, Qt::AlignLeft);


    // Create the use-color-table-opacity checkbox

    // Create the radio buttons
    opacityButtonsLabel = new QLabel(tr("Opacity"), central);
    colorLayout->addWidget(opacityButtonsLabel, 0, 2, Qt::AlignRight);

    opacityButtons = new QButtonGroup(central);

    opacityButtonSetExplicit = new QRadioButton(tr("Set explicitly"), central);
    opacityButtonSetExplicit->setChecked(true);
    opacityButtons->addButton(opacityButtonSetExplicit, 0);
    colorLayout->addWidget(opacityButtonSetExplicit, 0, 3, Qt::AlignLeft);
    opacityButtonColorTable = new QRadioButton(tr("From color table"), central);
    opacityButtons->addButton(opacityButtonColorTable, 1);
    colorLayout->addWidget(opacityButtonColorTable, 0, 4);

    // Each time a radio button is clicked, call the scale clicked slot.
    connect(opacityButtons, SIGNAL(buttonClicked(int)),
            this, SLOT(setOpaacityClicked(int)));

    //
    // Create the opacity slider
    //
//    opacitySliderLabel = new QLabel(tr("Opacity"), central);
//    colorLayout->addWidget(opacitySliderLabel, 1, 2);

    opacitySlider = new QvisOpacitySlider(0, 255, 25, 255, central);
    opacitySlider->setTickInterval(64);
    opacitySlider->setGradientColor(QColor(0, 0, 0));
    connect(opacitySlider, SIGNAL(valueChanged(int, const void*)),
            this, SLOT(changedOpacity(int, const void*)));
    colorLayout->addWidget(opacitySlider, 1, 3, 1, 2);
allens's avatar
allens committed
626
627


allens's avatar
allens committed
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
    // Create the display group box.
    QGroupBox *displayGroup = new QGroupBox(thirdTab);
    displayGroup->setTitle(tr("Display"));
    mainLayout->addWidget(displayGroup, 2, 0);
//    mainLayout->setStretchFactor(displayGroup, 100);
    QGridLayout *displayLayout = new QGridLayout(displayGroup);
    displayLayout->setMargin(5);
    displayLayout->setSpacing(10);

    meshTypeLabel = new QLabel(tr("Mesh type:"), displayGroup);
    displayLayout->addWidget(meshTypeLabel, 0, 0);

    meshTypeCombo = new QComboBox(displayGroup);
    meshTypeCombo->addItem(tr("Curves"));
    meshTypeCombo->addItem(tr("Surfaces"));
    connect(meshTypeCombo, SIGNAL(activated(int)),
           this, SLOT(meshTypeChanged(int)));
    displayLayout->addWidget(meshTypeCombo, 0, 1);

    numberPlanesLabel = new QLabel(tr("Number of planes"), displayGroup);
    displayLayout->addWidget(numberPlanesLabel, 1, 0);
    numberPlanes = new QSpinBox(displayGroup);
    numberPlanes->setMinimum(1);
    numberPlanes->setMaximum(250);
    connect(numberPlanes, SIGNAL(valueChanged(int)),
            this, SLOT(numberPlanesChanged(int)));
    displayLayout->addWidget(numberPlanes, 1, 1);

    singlePlaneLabel = new QLabel(tr("Base plane (degrees)"), displayGroup);
    displayLayout->addWidget(singlePlaneLabel, 1, 2);
    singlePlane = new QLineEdit(displayGroup);
    connect(singlePlane, SIGNAL(returnPressed()),
            this, SLOT(singlePlaneProcessText()));
    displayLayout->addWidget(singlePlane, 1, 3);

    adjustPlaneLabel = new QLabel(tr("Adjust plane index"), displayGroup);
    displayLayout->addWidget(adjustPlaneLabel, 1, 2);
    adjustPlane = new QSpinBox(displayGroup);
    adjustPlane->setMinimum(-1);
    adjustPlane->setMaximum(250);
    connect(adjustPlane, SIGNAL(valueChanged(int)),
            this, SLOT(adjustPlaneChanged(int)));
    displayLayout->addWidget(adjustPlane, 1, 3);


allens's avatar
allens committed
673
   // Create the options group box.
674
    QGroupBox *optionsGroup = new QGroupBox(thirdTab);
allens's avatar
allens committed
675
676
    optionsGroup->setTitle(tr("Options"));
    mainLayout->addWidget(optionsGroup, 3, 0);
677

allens's avatar
allens committed
678
    QGridLayout *optionsLayout = new QGridLayout(optionsGroup);
679
    optionsLayout->setMargin(5);
allens's avatar
allens committed
680
681
    optionsLayout->setSpacing(10);

682
    showLines = new QCheckBox(tr("Show Lines"), optionsGroup);
allens's avatar
allens committed
683
684
    connect(showLines, SIGNAL(toggled(bool)),
            this, SLOT(showLinesChanged(bool)));
allens's avatar
allens committed
685
686
    optionsLayout->addWidget(showLines, 0, 0);

pugmire's avatar
pugmire committed
687
688
689
690
691
692
    lineStyleLabel = new QLabel(tr("Line style"), central);
    optionsLayout->addWidget(lineStyleLabel, 1, 0, Qt::AlignRight);
    lineStyle = new QvisLineStyleWidget(0, central);
    connect(lineStyle, SIGNAL(lineStyleChanged(int)),this, SLOT(lineStyleChanged(int)));
    optionsLayout->addWidget(lineStyle, 1, 1);
    
allens's avatar
allens committed
693
    lineWidthLabel = new QLabel(tr("Line width"), central);
pugmire's avatar
pugmire committed
694
    optionsLayout->addWidget(lineWidthLabel, 1, 2, Qt::AlignRight);
allens's avatar
allens committed
695
    lineWidth = new QvisLineWidthWidget(0, central);
pugmire's avatar
pugmire committed
696
697
    connect(lineWidth, SIGNAL(lineWidthChanged(int)), this, SLOT(lineWidthChanged(int)));
    optionsLayout->addWidget(lineWidth, 1, 3, Qt::AlignLeft);
allens's avatar
allens committed
698

699
    showPoints = new QCheckBox(tr("Show Points"), optionsGroup);
pugmire's avatar
pugmire committed
700
701
702
703
704
705
706
    connect(showPoints, SIGNAL(toggled(bool)), this, SLOT(showPointsChanged(bool)));
    optionsLayout->addWidget(showPoints, 2, 0);
    pointControl = new QvisPointControl(central, false);
    connect(pointControl, SIGNAL(pointSizeChanged(double)), this, SLOT(pointSizeChanged(double)));
    connect(pointControl, SIGNAL(pointSizePixelsChanged(int)), this, SLOT(pointSizePixelsChanged(int)));
    connect(pointControl, SIGNAL(pointTypeChanged(int)), this, SLOT(pointTypeChanged(int)));
    optionsLayout->addWidget(pointControl, 3, 1, 1,4);
707
708
709
710

    //
    // Create the misc stuff
    //
711
    QGroupBox * miscGroup = new QGroupBox(thirdTab);
712
    miscGroup->setTitle(tr("Misc"));
713
    mainLayout->addWidget(miscGroup, 4, 0);
714
715
716
717
718
719

    QGridLayout *miscLayout = new QGridLayout(miscGroup);
    miscLayout->setMargin(5);
    miscLayout->setSpacing(10);
 
    // Create the legend toggle
720
    legendToggle = new QCheckBox(tr("Legend"), miscGroup);
721
722
723
724
725
    connect(legendToggle, SIGNAL(toggled(bool)),
            this, SLOT(legendToggled(bool)));
    miscLayout->addWidget(legendToggle, 0, 0);

    // Create the lighting toggle
726
    lightingToggle = new QCheckBox(tr("Lighting"), miscGroup);
727
728
729
    connect(lightingToggle, SIGNAL(toggled(bool)),
            this, SLOT(lightingToggled(bool)));
    miscLayout->addWidget(lightingToggle, 0, 1);
730
731

    // ----------------------------------------------------------------------
732
    // Fourth tab
733
    // ----------------------------------------------------------------------
734
735
    fourthTab = new QWidget(central);
    propertyTabs->addTab(fourthTab, tr("Parallel"));
736
    
737
    mainLayout = new QGridLayout(fourthTab);
738

739
    QGroupBox *algoGrp = new QGroupBox(fourthTab);
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
    algoGrp->setTitle(tr("Parallel streamline options"));
    mainLayout->addWidget(algoGrp, 0, 0, 1, 4);

    // Algorithm group.
    QGridLayout *algoGLayout = new QGridLayout(algoGrp);
    algoGLayout->setSpacing(10);
    algoGLayout->setColumnStretch(1,10);

    slAlgoLabel = new QLabel(tr("Parallelize across"), algoGrp);
    slAlgo = new QComboBox(algoGrp);
    slAlgo->addItem(tr("Streamlines"));
    slAlgo->addItem(tr("Domains"));
    slAlgo->addItem(tr("Streamlines and Domains"));
    connect(slAlgo, SIGNAL(activated(int)),
            this, SLOT(streamlineAlgorithmChanged(int)));
    algoGLayout->addWidget( slAlgoLabel, 1,0);
    algoGLayout->addWidget( slAlgo, 1,1);
    
    maxSLCountLabel = new QLabel(tr("Communication threshold"), algoGrp);
    maxSLCount = new QSpinBox(algoGrp);
    maxSLCount->setMinimum(1);
    maxSLCount->setMaximum(100000);
    connect(maxSLCount, SIGNAL(valueChanged(int)), 
            this, SLOT(maxSLCountChanged(int)));
    algoGLayout->addWidget( maxSLCountLabel, 2,0);
    algoGLayout->addWidget( maxSLCount,2,1);

    maxDomainCacheLabel = new QLabel(tr("Domain cache size"), algoGrp);
    maxDomainCache = new QSpinBox(algoGrp);
    maxDomainCache->setMinimum(1);
    maxDomainCache->setMaximum(100000);
    connect(maxDomainCache, SIGNAL(valueChanged(int)),
            this, SLOT(maxDomainCacheChanged(int)));
    algoGLayout->addWidget( maxDomainCacheLabel, 3,0);
    algoGLayout->addWidget( maxDomainCache, 3,1);

    workGroupSizeLabel = new QLabel(tr("Work group size"), algoGrp);
    workGroupSize = new QSpinBox(algoGrp);
    workGroupSize->setMinimum(2);
    workGroupSize->setMaximum(1000000);
    connect(workGroupSize, SIGNAL(valueChanged(int)),
            this, SLOT(workGroupSizeChanged(int)));
    algoGLayout->addWidget( workGroupSizeLabel, 4,0);
    algoGLayout->addWidget( workGroupSize, 4,1);
pugmire's avatar
pugmire committed
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
}


// ****************************************************************************
// Method: QvisPoincarePlotWindow::UpdateWindow
//
// Purpose: 
//   Updates the widgets in the window when the subject changes.
//
// Note:       Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation:   omitted
//
// Modifications:
//   
// ****************************************************************************

void
QvisPoincarePlotWindow::UpdateWindow(bool doAll)
{

    for(int i = 0; i < atts->NumAttributes(); ++i)
    {
        if(!doAll)
        {
            if(!atts->IsSelected(i))
            {
                continue;
            }
        }

        switch(i)
        {
allens's avatar
allens committed
818
          case PoincareAttributes::ID_minPunctures:
819
820
821
            minPunctures->blockSignals(true);
            minPunctures->setValue(atts->GetMinPunctures());
            minPunctures->blockSignals(false);
allens's avatar
allens committed
822
823
            break;
          case PoincareAttributes::ID_maxPunctures:
824
825
826
            maxPunctures->blockSignals(true);
            maxPunctures->setValue(atts->GetMaxPunctures());
            maxPunctures->blockSignals(false);
allens's avatar
allens committed
827
            break;
828
829
830
831
832
833
          case PoincareAttributes::ID_puncturePlane:
            puncturePlaneButtonGroup->blockSignals(true);
            if(puncturePlaneButtonGroup->button((int)atts->GetPuncturePlane()) != 0)
                puncturePlaneButtonGroup->button((int)atts->GetPuncturePlane())->setChecked(true);
            puncturePlaneButtonGroup->blockSignals(false);
            break;
834
835
          case PoincareAttributes::ID_sourceType:
            if (atts->GetSourceType() == PoincareAttributes::SpecifiedPoint)
836
            {
837
                pointSource->setEnabled(true);
allens's avatar
allens committed
838
839
840
841
                pointSourceLabel->setEnabled(true);

                pointSource->show();
                pointSourceLabel->show();
842
843
844
            }
            else
            {
845
                pointSource->setEnabled(false);
allens's avatar
allens committed
846
847
848
849
                pointSourceLabel->setEnabled(false);

                pointSource->hide();
                pointSourceLabel->hide();
850
            }
851
            if (atts->GetSourceType() == PoincareAttributes::SpecifiedLine)
852
            {
853
                lineStart->setEnabled(true);
allens's avatar
allens committed
854
855
856
857
858
                lineStartLabel->setEnabled(true);

                lineStartLabel->show();
                lineStart->show();

859
                lineEnd->setEnabled(true);
allens's avatar
allens committed
860
861
862
863
864
                lineEndLabel->setEnabled(true);

                lineEndLabel->show();
                lineEnd->show();

865
                pointDensity->setEnabled(true);
allens's avatar
allens committed
866
867
868
869
                pointDensityLabel->setEnabled(true);

                pointDensityLabel->show();
                pointDensity->show();
870
871
872
            }
            else
            {
allens's avatar
allens committed
873
874
875
876
877
878
879
880
881
882
883
884
885
                lineStart->setEnabled(false);
                lineStartLabel->setEnabled(false);

                lineStartLabel->hide();
                lineStart->hide();

                lineEnd->setEnabled(false);
                lineEndLabel->setEnabled(false);

                lineEndLabel->hide();
                lineEnd->hide();

                pointDensityLabel->setEnabled(false);
886
                pointDensity->setEnabled(false);
allens's avatar
allens committed
887
888
889

                pointDensityLabel->hide();
                pointDensity->hide();
890
            }
allens's avatar
allens committed
891
892
893
894

            sourceTypeCombo->blockSignals(true);
            sourceTypeCombo->setCurrentIndex((int)atts->GetSourceType());
            sourceTypeCombo->blockSignals(false);
895
896
            break;
          case PoincareAttributes::ID_pointSource:
897
            pointSource->setText(DoublesToQString(atts->GetPointSource(), 3));
898
899
            break;
          case PoincareAttributes::ID_lineStart:
900
            lineStart->setText(DoublesToQString(atts->GetLineStart(), 3));
901
902
            break;
          case PoincareAttributes::ID_lineEnd:
903
            lineEnd->setText(DoublesToQString(atts->GetLineEnd(), 3));
904
            break;
905
          case PoincareAttributes::ID_pointDensity:
906
907
908
            pointDensity->blockSignals(true);
            pointDensity->setValue(atts->GetPointDensity());
            pointDensity->blockSignals(false);
909
            break;
910
          case PoincareAttributes::ID_integrationType:
911
912
913
            // Update lots of widget visibility and enabled states.
            UpdateIntegrationAttributes();

allens's avatar
allens committed
914
915
916
            integrationTypeCombo->blockSignals(true);
            integrationTypeCombo->setCurrentIndex((int)atts->GetIntegrationType());
            integrationTypeCombo->blockSignals(false);
pugmire's avatar
pugmire committed
917
            break;
allens's avatar
allens committed
918
919
          case PoincareAttributes::ID_maxStepLength:
            maxStepLength->setText(DoubleToQString(atts->GetMaxStepLength()));
920
            break;
allens's avatar
allens committed
921
922
          case PoincareAttributes::ID_relTol:
            relTol->setText(DoubleToQString(atts->GetRelTol()));
923
            break;
allens's avatar
allens committed
924
925
          case PoincareAttributes::ID_absTol:
            absTol->setText(DoubleToQString(atts->GetAbsTol()));
926
            break;
927
928
929
930
931
          case PoincareAttributes::ID_coordinateSystem:
//          coordinateButtonGroup->blockSignals(true);
//             coordinateButtonGroup->button(atts->GetCoordinateSystem())->setChecked(true);;
//             coordinateButtonGroup->blockSignals(false);
            break;
932
933
934
935
936
937
938
939
940
941
942
943
944
          case PoincareAttributes::ID_analysis:
            analysisButtonGroup->blockSignals(true);
            if(analysisButtonGroup->button((int)atts->GetAnalysis()) != 0)
                analysisButtonGroup->button((int)atts->GetAnalysis())->setChecked(true);
            showLines->setChecked(atts->GetAnalysis());
            showPoints->setChecked(!atts->GetAnalysis());

            analysisButtonGroup->blockSignals(false);
            break;
          case PoincareAttributes::ID_maximumToroidalWinding:
            maximumToroidalWinding->blockSignals(true);
            maximumToroidalWinding->setValue(atts->GetMaximumToroidalWinding());
            maximumToroidalWinding->blockSignals(false);
945
            break;
pugmire's avatar
pugmire committed
946
          case PoincareAttributes::ID_overrideToroidalWinding:
947
948
949
            overrideToroidalWinding->blockSignals(true);
            overrideToroidalWinding->setValue(atts->GetOverrideToroidalWinding());
            overrideToroidalWinding->blockSignals(false);
950
            break;
allens's avatar
allens committed
951
952
953
954
955
          case PoincareAttributes::ID_overridePoloidalWinding:
            overridePoloidalWinding->blockSignals(true);
            overridePoloidalWinding->setValue(atts->GetOverridePoloidalWinding());
            overridePoloidalWinding->blockSignals(false);
            break;
956
957
958
          case PoincareAttributes::ID_windingPairConfidence:
            windingPairConfidence->setText(DoubleToQString(atts->GetWindingPairConfidence()));
            break;
959
960

          case PoincareAttributes::ID_rationalTemplateSeedParm:
961
            rationalTemplateSeedParm->setText(DoubleToQString(atts->GetRationalTemplateSeedParm()));
962
            break;
pugmire's avatar
pugmire committed
963
          case PoincareAttributes::ID_adjustPlane:
964
965
966
            adjustPlane->blockSignals(true);
            adjustPlane->setValue(atts->GetAdjustPlane());
            adjustPlane->blockSignals(false);
967
            break;
pugmire's avatar
pugmire committed
968
          case PoincareAttributes::ID_overlaps:
969
970
971
972
            overlapsButtonGroup->blockSignals(true);
            if(overlapsButtonGroup->button((int)atts->GetOverlaps()) != 0)
                overlapsButtonGroup->button((int)atts->GetOverlaps())->setChecked(true);
            overlapsButtonGroup->blockSignals(false);
973
            break;
allens's avatar
allens committed
974
          case PoincareAttributes::ID_meshType:
975
            UpdateMeshTypeAttributes();
allens's avatar
allens committed
976
977
978
            meshTypeCombo->blockSignals(true);
            meshTypeCombo->setCurrentIndex((int)atts->GetMeshType());
            meshTypeCombo->blockSignals(false);
allens's avatar
allens committed
979
980
            break;
          case PoincareAttributes::ID_numberPlanes:
981
982
            // Disconnect the slot before setting the toggle and
            // reconnect it after. This prevents multiple updates.
983
984
985
            disconnect(numberPlanes, SIGNAL(valueChanged(int)),
                       this, SLOT(numberPlanesChanged(int)));
            numberPlanes->setValue(atts->GetNumberPlanes());
986
987
            singlePlaneLabel->setEnabled( atts->GetNumberPlanes() == 1 );
            singlePlane->setEnabled( atts->GetNumberPlanes() == 1 );
988
989
            connect(numberPlanes, SIGNAL(valueChanged(int)),
                    this, SLOT(numberPlanesChanged(int)));
990
991
992
            break;
          case PoincareAttributes::ID_singlePlane:
            singlePlane->setText(DoubleToQString(atts->GetSinglePlane()));
allens's avatar
allens committed
993
            break;
pugmire's avatar
pugmire committed
994
          case PoincareAttributes::ID_min:
995
            min->setText(DoubleToQString(atts->GetMin()));
996
            break;
pugmire's avatar
pugmire committed
997
          case PoincareAttributes::ID_max:
998
            max->setText(DoubleToQString(atts->GetMax()));
999
            break;
pugmire's avatar
pugmire committed
1000
          case PoincareAttributes::ID_minFlag:
allens's avatar
allens committed
1001
1002
1003
1004
            // Disconnect the slot before setting the toggle and
            // reconnect it after. This prevents multiple updates.
            disconnect(minFlag, SIGNAL(toggled(bool)),
                       this, SLOT(minFlagChanged(bool)));
1005
            minFlag->setChecked(atts->GetMinFlag());
allens's avatar
allens committed
1006
1007
1008
            min->setEnabled(atts->GetMinFlag());
            connect(minFlag, SIGNAL(toggled(bool)),
                    this, SLOT(minFlagChanged(bool)));
1009
            break;
pugmire's avatar
pugmire committed
1010
          case PoincareAttributes::ID_maxFlag:
allens's avatar
allens committed
1011
1012
1013
1014
            // Disconnect the slot before setting the toggle and
            // reconnect it after. This prevents multiple updates.
            disconnect(maxFlag, SIGNAL(toggled(bool)),
                       this, SLOT(maxFlagChanged(bool)));
1015
            maxFlag->setChecked(atts->GetMaxFlag());
allens's avatar
allens committed
1016
1017
1018
            max->setEnabled(atts->GetMaxFlag());
            connect(maxFlag, SIGNAL(toggled(bool)),
                    this, SLOT(maxFlagChanged(bool)));
1019
            break;
allens's avatar
allens committed
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
          case PoincareAttributes::ID_singleColor:
            { // new scope
                QColor tempcolor = QColor(atts->GetSingleColor().Red(),
                                   atts->GetSingleColor().Green(),
                                   atts->GetSingleColor().Blue());
                singleColor->blockSignals(true);
                singleColor->setButtonColor(tempcolor);
                singleColor->blockSignals(false);
            }
            break;
          case PoincareAttributes::ID_colorTableName:
            colorTableName->blockSignals(true);
            colorTableName->setColorTable(QString(atts->GetColorTableName().c_str()));
            colorTableName->blockSignals(false);
            break;
allens's avatar
allens committed
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
          case PoincareAttributes::ID_opacity:
            opacitySlider->blockSignals(true);
            opacitySlider->setValue(int((float)atts->GetOpacity() * 255.f));
            opacitySlider->blockSignals(false);
            break;
          case PoincareAttributes::ID_opacityType:
            opacityButtons->blockSignals(true);
            opacityButtons->button(atts->GetOpacityType())->setChecked(true);
            opacitySlider->setEnabled(!atts->GetOpacityType());
//            opacitySliderLabel->setEnabled(!atts->GetOpacityType());
            opacityButtons->blockSignals(false);
            break;
           case PoincareAttributes::ID_dataValue:
1048
1049
            dataValueCombo->blockSignals(true);
            dataValueCombo->setCurrentIndex((int)atts->GetDataValue());
allens's avatar
allens committed
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087

            if( (int) atts->GetDataValue() == 0 )
            {
              singleColorLabel->setEnabled(true);
              singleColorLabel->show();
              singleColor->setEnabled(true);
              singleColor->show();
              
              colorTableNameLabel->setEnabled(false);
              colorTableNameLabel->hide();
              colorTableName->setEnabled(false);
              colorTableName->hide();

              opacityButtonsLabel->setEnabled(false);
              opacityButtonSetExplicit->setEnabled(false);
              opacityButtonColorTable->setEnabled(false);
//            opacitySliderLabel->setEnabled(false);
              opacitySlider->setEnabled(false);
            }
            else
            {
              singleColorLabel->setEnabled(false);
              singleColorLabel->hide();
              singleColor->setEnabled(false);
              singleColor->hide();
              
              colorTableNameLabel->setEnabled(true);
              colorTableNameLabel->show();
              colorTableName->setEnabled(true);
              colorTableName->show();

              opacityButtonsLabel->setEnabled(true);
              opacityButtonSetExplicit->setEnabled(true);
              opacityButtonColorTable->setEnabled(true);
//            opacitySliderLabel->setEnabled(!atts->GetOpacityType());
              opacitySlider->setEnabled(!atts->GetOpacityType());
            }

1088
1089
1090
1091
1092
1093
            dataValueCombo->blockSignals(false);
            break;
          case PoincareAttributes::ID_showOPoints:
            showOPoints->blockSignals(true);
            showOPoints->setChecked(atts->GetShowOPoints());
            showOPoints->blockSignals(false);
allens's avatar
allens committed
1094
            break;
allens's avatar
allens committed
1095
1096
1097
1098
1099
          case PoincareAttributes::ID_OPointMaxIterations:
            OPointMaxIterations->blockSignals(true);
            OPointMaxIterations->setValue(atts->GetOPointMaxIterations());
            OPointMaxIterations->blockSignals(false);
            break;
allens's avatar
allens committed
1100
1101
1102
1103
1104
          case PoincareAttributes::ID_showIslands:
            showIslands->blockSignals(true);
            showIslands->setChecked(atts->GetShowIslands());
            showIslands->blockSignals(false);
            break;
1105
1106
1107
1108
1109
          case PoincareAttributes::ID_showChaotic:
            showChaotic->blockSignals(true);
            showChaotic->setChecked(atts->GetShowChaotic());
            showChaotic->blockSignals(false);
            break;
allens's avatar
allens committed
1110
1111
1112
          case PoincareAttributes::ID_showLines:
            showLines->blockSignals(true);
            showLines->setChecked(atts->GetShowLines());
allens's avatar
allens committed
1113
            lineWidthLabel->setEnabled( (atts->GetShowLines() == true ) );
pugmire's avatar
pugmire committed
1114
            lineStyleLabel->setEnabled( (atts->GetShowLines() == true ) );
allens's avatar
allens committed
1115
            lineWidth->setEnabled( (atts->GetShowLines() == true ) );
pugmire's avatar
pugmire committed
1116
            lineStyle->setEnabled( (atts->GetShowLines() == true ) );
allens's avatar
allens committed
1117
1118
            showLines->blockSignals(false);
            break;
allens's avatar
allens committed
1119
1120
1121
1122
          case PoincareAttributes::ID_lineWidth:
            lineWidth->blockSignals(true);
            lineWidth->SetLineWidth(atts->GetLineWidth());
            lineWidth->blockSignals(false);
allens's avatar
allens committed
1123
1124
1125
          case PoincareAttributes::ID_showPoints:
            showPoints->blockSignals(true);
            showPoints->setChecked(atts->GetShowPoints());
pugmire's avatar
pugmire committed
1126
            pointControl->setEnabled( (atts->GetShowPoints() == true ) );
allens's avatar
allens committed
1127
1128
            showPoints->blockSignals(false);
            break;
allens's avatar
allens committed
1129
          case PoincareAttributes::ID_pointSize: