Path: blob/devel/ElmerGUI/Application/vtkpost/vector.h
3203 views
/*****************************************************************************1* *2* Elmer, A Finite Element Software for Multiphysical Problems *3* *4* Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland *5* *6* This program is free software; you can redistribute it and/or *7* modify it under the terms of the GNU General Public License *8* as published by the Free Software Foundation; either version 2 *9* of the License, or (at your option) any later version. *10* *11* This program is distributed in the hope that it will be useful, *12* but WITHOUT ANY WARRANTY; without even the implied warranty of *13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *14* GNU General Public License for more details. *15* *16* You should have received a copy of the GNU General Public License *17* along with this program (in file fem/GPL-2); if not, write to the *18* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *19* Boston, MA 02110-1301, USA. *20* *21*****************************************************************************/2223/*****************************************************************************24* *25* ElmerGUI vector *26* *27*****************************************************************************28* *29* Authors: Mikko Lyly, Juha Ruokolainen and Peter Råback *30* Email: [email protected] *31* Web: http://www.csc.fi/elmer *32* Address: CSC - IT Center for Science Ltd. *33* Keilaranta 14 *34* 02101 Espoo, Finland *35* *36* Original Date: 15 Mar 2008 *37* *38*****************************************************************************/3940#ifndef VECTOR_H41#define VECTOR_H4243#include <QWidget>44#include "ui_vector.h"4546class VtkPost;47class TimeStep;48class ScalarField;4950class Vector : public QDialog51{52Q_OBJECT5354public:55Vector(QWidget *parent = 0);56~Vector();5758Ui::vectorDialog ui;5960void populateWidgets(VtkPost*);61void draw(VtkPost*, TimeStep*);6263public slots:64QString GetFieldName(); // get field name65QString GetColorName(); // get color name66QString GetThresholdName(); // get threshold name67bool SetFieldName(QString); // set field name68bool SetColorName(QString); // set color name69bool SetThresholdName(QString); // set threshold name70void SetLength(int); // set arrow length71void SetQuality(int); // set arrow quality72void SetEveryNth(int); // reduce arrows73void SetClipPlane(bool); // set clipping on/off74void ComputeNormals(bool); // draw better arrows75void SetRandomMode(bool); // randomly reduce data76void ScaleByMagnitude(bool); // scale arrows77void SetMinColorVal(double); // set color min78void SetMaxColorVal(double); // set color max79void KeepColorLimits(bool); // keep color limits80void SetMinThresholdVal(double); // set threshold min81void SetMaxThresholdVal(double); // set threshold max82void UseThreshold(bool); // use threshold83void KeepThresholdLimits(bool); // keep threshold limits8485signals:86void drawVectorSignal();87void hideVectorSignal();8889private slots:90void cancelButtonClicked();91void okButtonClicked();92void applyButtonClicked();93void colorSelectionChanged(int);94void thresholdSelectionChanged(int);95void keepLimitsSlot(int);96void keepThresholdLimitsSlot(int);97void nullColorButtonClicked();9899private:100ScalarField *scalarField;101int scalarFields;102QColor nullColor;103void setNullColor(QColor);104};105106#endif // VECTOR_H107108109