Isis 3.0 Application Source Code Reference |
Home |
00001 #ifndef TableColumnList_H 00002 #define TableColumnList_H 00003 #include <SpecialPixel.h> 00004 00005 00006 template<typename A, typename B> class QPair; 00007 00008 00009 namespace Isis 00010 { 00011 namespace CnetViz 00012 { 00013 class TableColumn; 00014 00015 /** 00016 * @author ????-??-?? Unknown 00017 * 00018 * @internal 00019 */ 00020 class TableColumnList : public QObject 00021 { 00022 Q_OBJECT 00023 00024 public: 00025 TableColumnList(); 00026 TableColumnList(TableColumnList const &); 00027 virtual ~TableColumnList(); 00028 00029 TableColumn *& operator[](int index); 00030 TableColumn *& operator[](QString title); 00031 00032 void append(TableColumn * newCol); 00033 void prepend(TableColumn * newCol); 00034 00035 int indexOf(TableColumn const * someCol) const; 00036 bool contains(TableColumn const * someCol) const; 00037 bool contains(QString columnTitle) const; 00038 00039 QPair< int, int > getVisibleXRange(int visibleColumn); 00040 TableColumnList getVisibleColumns(); 00041 00042 int getVisibleWidth() const; 00043 00044 QList< TableColumn * > getSortingOrder(); 00045 QStringList getSortingOrderAsStrings() const; 00046 void setSortingOrder(QStringList newOrder); 00047 void lower(TableColumn * col, bool emitSortOutDated = true); 00048 void lower(int visibleColumnIndex, bool emitSortOutDated = true); 00049 void raise(TableColumn * col, bool emitSortOutDated = true); 00050 void raise(int visibleColumnIndex, bool emitSortOutDated = true); 00051 void raiseToTop(TableColumn * col); 00052 void raiseToTop(int visibleColumnIndex); 00053 00054 int size() const; 00055 00056 TableColumnList & operator=(TableColumnList other); 00057 00058 00059 signals: 00060 void sortOutDated(); 00061 00062 00063 private: 00064 void checkIndexRange(int index); 00065 void nullify(); 00066 00067 00068 private: 00069 QList< TableColumn * > * cols; 00070 QList< TableColumn * > * sortingOrder; 00071 }; 00072 } 00073 } 00074 00075 #endif 00076