USGS

Isis 3.0 Developer's Reference (API)

Home

TableColumnList.h

Go to the documentation of this file.
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   namespace CnetViz {
00011     class TableColumn;
00012 
00019     class TableColumnList : public QObject {
00020         Q_OBJECT
00021 
00022       public:
00023         TableColumnList();
00024         TableColumnList(TableColumnList const &);
00025         virtual ~TableColumnList();
00026 
00027         TableColumn * &operator[](int index);
00028         TableColumn * &operator[](QString title);
00029 
00030         void append(TableColumn *newCol);
00031         void prepend(TableColumn *newCol);
00032 
00033         int indexOf(TableColumn const *someCol) const;
00034         bool contains(TableColumn const *someCol) const;
00035         bool contains(QString columnTitle) const;
00036 
00037         QPair< int, int > getVisibleXRange(int visibleColumn);
00038         TableColumnList getVisibleColumns();
00039 
00040         int getVisibleWidth() const;
00041 
00042         QList< TableColumn * > getSortingOrder();
00043         QStringList getSortingOrderAsStrings() const;
00044         void setSortingOrder(QStringList newOrder);
00045         void lower(TableColumn *col, bool emitSortOutDated = true);
00046         void lower(int visibleColumnIndex, bool emitSortOutDated = true);
00047         void raise(TableColumn *col, bool emitSortOutDated = true);
00048         void raise(int visibleColumnIndex, bool emitSortOutDated = true);
00049         void raiseToTop(TableColumn *col);
00050         void raiseToTop(int visibleColumnIndex);
00051 
00052         int size() const;
00053 
00054         TableColumnList &operator=(TableColumnList other);
00055 
00056 
00057       signals:
00058         void sortOutDated();
00059 
00060 
00061       private:
00062         void checkIndexRange(int index);
00063         void nullify();
00064 
00065 
00066       private:
00067         QList< TableColumn * > * m_cols;
00068         QList< TableColumn * > * m_sortingOrder;
00069     };
00070   }
00071 }
00072 
00073 #endif
00074