TableTranslator.h

00001 #ifndef TABLETRANSLATOR_H
00002 #define TABLETRANSLATOR_H
00003 // _______    _     _   _______                  _       _             
00004 //|__   __|  | |   | | |__   __|                | |     | |            
00005 //   | | __ _| |__ | | ___| |_ __ __ _ _ __  ___| | __ _| |_ ___  _ __ 
00006 //   | |/ _` | '_ \| |/ _ \ | '__/ _` | '_ \/ __| |/ _` | __/ _ \| '__|
00007 //   | | (_| | |_) | |  __/ | | | (_| | | | \__ \ | (_| | || (_) | |   
00008 //   |_|\__,_|_.__/|_|\___|_|_|  \__,_|_| |_|___/_|\__,_|\__\___/|_|  
00009 //
00010 #include <qtable.h>
00011 
00013 
00016 class TableTranslator
00017 {
00018 public :
00019         QTable* _Table;
00020         TableTranslator(QTable* Table){_Table = Table;};
00021         float GetTableElement(int i, int j)
00022         {
00023                 bool* OK = new bool;
00024                 QString S = _Table->text(i,j);
00025                 float F = S.toFloat(OK);
00026                 return F;
00027         };
00028         void SetTableElement(int i, int j, float F){_Table->setText(i,j,QString::number(F));};
00029         void SetTableElement(int i, int j, QString S){_Table->setText(i,j,S);};
00030         void SetTableSize(int Lines, int Columns){_Table->setNumRows(Lines);_Table->setNumCols(Columns);};
00031 
00032 };
00033 #endif

Generated on Thu Sep 28 09:43:42 2006 by  doxygen 1.4.7