00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00020 #ifndef UTILS_H
00021 #define UTILS_H
00022
00024
00025
00026 #include <vector>
00027 using std::vector;
00028
00030 class QCheckBox;
00031 class QString;
00032 class QStringList;
00033 class QTable;
00034
00035
00037
00039 QString inputLine(const QString keyword, const double a, const double b = 0.0, const double c = 0.0);
00040 QString inputLine(const QString keyword, const int a, const int b = 0, const int c = 0);
00041 QString inputLine(const QString keyword, const int a, const double b);
00042 QString validatedSYMMLine(QCheckBox* bx, QCheckBox* by, QCheckBox* bz, QCheckBox* bxy, QCheckBox* bxz, QCheckBox* byz, QCheckBox* bxyz);
00043
00045 template<typename T> void limitRange(const T& min, T& value, const T& max);
00046
00048 void resetTable(QTable* table);
00049 void saveTable(const QTable* table, unsigned int& numLines, vector<unsigned int>& hPos, vector<unsigned int>& vPos, QStringList& contents);
00050 void restoreTable(QTable* table, const unsigned int& numLines, const vector<unsigned int>& hPos, const vector<unsigned int>& vPos, const QStringList& contents);
00051 void checkTableOverflow(QTable* table, const int row, const int col);
00052 void addTableRow(QTable* table);
00053 bool removeTableRow(QTable* table);
00054 bool clearTableSelection(QTable* table);
00055 QStringList tableContents(const QTable* table);
00056 bool emptyTableRow(const QTable* table, const int row);
00057 int firstEmptyTableRow(QTable* table);
00058
00059 #endif
00060