00001 //-------------------------------------------------------------------- 00002 // 00003 // File: TxqEditTable.h 00004 // 00005 // Purpose: This class is a QTable capable of editting a TxAttributeSet. 00006 // 00007 // Version: $Id: TxqEditTable.h,v 1.2 2001/11/04 16:54:17 kgl Exp $ 00008 // 00009 // Copyright (c) 2001 by Tech-X Corporation. All rights reserved. 00010 // 00011 // Author: Kelly G. Luetkemeyer 00012 // 00013 //-------------------------------------------------------------------- 00014 00015 #ifndef TXQ_EDIT_TABLE_H 00016 #define TXQ_EDIT_TABLE_H 00017 00018 // Qt includes 00019 #include <qtable.h> 00020 #include <qapplication.h> 00021 00022 // Txmath includes 00023 #include <TxAttributeSet.h> 00024 00025 // Txq includes 00026 #include "TxqTableItem.h" 00027 #include "TxqStringTableItem.h" 00028 #include "TxqParamTableItem.h" 00029 #include "TxqParamVecTableItem.h" 00030 #include "TxqPrmVecTableItem.h" 00031 #include "TxqOptionTableItem.h" 00032 #include "TxqOptionVecTableItem.h" 00033 #include "TxqOptVecTableItem.h" 00034 00035 // system includes 00036 #include <vector> 00037 #include <string> 00038 00039 #if defined(__BCPLUSPLUS__) 00040 using std::vector; 00041 using std::string; 00042 #endif 00043 00049 class TxqEditTable: public QTable 00050 { 00051 Q_OBJECT 00052 00053 public: 00054 00060 TxqEditTable( QWidget * parent = 0, const char * name = 0 ); 00061 00068 void setAttribute(TxAttributeSet *a); 00069 00076 void setAttributeFilter(vector<string> &fn); 00077 00084 void addStringItem(const QString name, const QString value, const int row); 00085 00092 void addOptionItem(const QString name, const int value, const int row); 00093 00103 void addOptionVecItem(const QString name, const int value, const int row, 00104 const QString attribName, const int index); 00105 00112 void addParamItem(const QString name, const double value, const int row); 00113 00123 void addParamVecItem(const QString name, const double value, const int row, 00124 const QString attribName, const int index); 00125 00126 00133 void addOptVecItem(const QString name, const vector<int> &value, const int row); 00134 00141 void addPrmVecItem(const QString name, const vector<double> &value, const int row); 00142 00148 void hideRows(const int begin, const int size); 00149 00156 void showRows(const int begin, const int size, const int rh); 00157 00161 void hideHeader(); 00162 00166 void showHeader(); 00167 00168 public slots: 00169 00170 00171 private slots: 00172 00173 protected: 00174 00179 void resizeEvent( QResizeEvent *e ); 00180 00184 void updateNumRows(); 00185 00189 vector<string> filterNames; 00190 00191 private: 00192 00196 TxAttributeSet *attrib; 00197 00201 vector<string> attribNames; 00202 00203 }; 00204 #endif 00205
Copyright Tech-X Corporation, all rights reserved.