arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

FieldVecProbes.cpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //
00003 //   Joe Kniss
00004 //     6-20-03
00005 //                   ________    ____   ___ 
00006 //                  |        \  /    | /  /
00007 //                  +---+     \/     |/  /
00008 //                  +--+|  |\    /|     < 
00009 //                  |  ||  | \  / |  |\  \ 
00010 //                  |      |  \/  |  | \  \ 
00011 //                   \_____|      |__|  \__\
00012 //                       Copyright  2003 
00013 //                      Joe Michael Kniss
00014 //                   <<< jmk@cs.utah.edu >>>
00015 //               "All Your Base are Belong to Us"
00016 //-------------------------------------------------------------------------
00017 
00018 /// FieldProbes.cpp
00019 ///  simianUI
00020 
00021 
00022 #include "FieldVecProbes.h"
00023 #include <qlayout.h>
00024 #include "FieldProbes.h"
00025 
00026 
00027 FieldVecProbes::FieldVecProbes(VolumeSP vol, QWidget *parent, const char *name, WFlags wf)
00028 :QWidget(parent, name, wf), _vol(vol)
00029 {
00030    conf();
00031 }
00032 
00033 FieldVecProbes::~FieldVecProbes()
00034 {
00035 
00036 }
00037 
00038 //////////////////////////////////////////////////////////////////////////
00039 //////////////////////////////////////////////////////////////////////////
00040 /// Public Slots
00041 //////////////////////////////////////////////////////////////////////////
00042 //////////////////////////////////////////////////////////////////////////
00043 
00044 void FieldVecProbes::setProbePos(int xp, int yp, int zp)
00045 {
00046    probePosChanged(xp,yp,zp);
00047 }
00048 
00049 //////////////////////////////////////////////////////////////////////////
00050 //////////////////////////////////////////////////////////////////////////
00051 /// Protected Members
00052 //////////////////////////////////////////////////////////////////////////
00053 //////////////////////////////////////////////////////////////////////////
00054 
00055 //////////////////////////////////////////////////////////////////////////
00056 /// configure
00057 //////////////////////////////////////////////////////////////////////////
00058 void FieldVecProbes::conf()
00059 {
00060    if(_vol.isNull()) return;
00061    if(_vol->fields.empty()) return;
00062 
00063    // Create a layout to position the widgets
00064    QHBoxLayout *topLayout = new QHBoxLayout( this, 5 );
00065    topLayout->setAlignment(Qt::AlignTop);
00066 
00067    QGridLayout *grid = new QGridLayout(topLayout, _vol->fields.size(), 1);
00068 
00069    for(int i=0; i<int(_vol->fields.size()); ++i)
00070    {
00071       FieldProbes *f = new FieldProbes(_vol->fields.getField(i),this, "field probe");
00072       f->connect(this,SIGNAL(probePosChanged(int,int,int)),SLOT(setProbePos(int,int,int)));
00073       grid->addWidget(f,i,0);
00074    }
00075 }
00076 

Send questions, comments, and bug reports to:
jmk