Isis 3 Developer Reference
TableColumnList.h
Go to the documentation of this file.
1 #ifndef TableColumnList_H
2 #define TableColumnList_H
3 
4 #include <QObject>
5 
6 template<typename A, typename B> struct QPair;
7 
8 
9 namespace Isis {
10  class TableColumn;
11 
22  class TableColumnList : public QObject {
23  Q_OBJECT
24 
25  public:
28  virtual ~TableColumnList();
29 
30  TableColumn * &operator[](int index);
31  TableColumn * &operator[](QString title);
32 
33  void append(TableColumn *newCol);
34  void prepend(TableColumn *newCol);
35 
36  int indexOf(TableColumn const *someCol) const;
37  bool contains(TableColumn const *someCol) const;
38  bool contains(QString columnTitle) const;
39 
40  QPair< int, int > getVisibleXRange(int visibleColumn);
42 
43  int getVisibleWidth() const;
44 
47  void setSortingOrder(QStringList newOrder);
48  void lower(TableColumn *col, bool emitSortOutDated = true);
49  // void lower(int visibleColumnIndex, bool emitSortOutDated = true);
50  void raise(TableColumn *col, bool emitSortOutDated = true);
51  // void raise(int visibleColumnIndex, bool emitSortOutDated = true);
52  void raiseToTop(TableColumn *col);
53  // void raiseToTop(int visibleColumnIndex);
54 
55  int size() const;
56 
58 
59 
60  signals:
61  void sortOutDated();
62 
63 
64  private:
65  void checkIndexRange(int index);
66  void nullify();
67 
68 
69  private:
70  QList< TableColumn * > * m_cols;
71  QList< TableColumn * > * m_sortingOrder;
72  };
73 }
74 
75 #endif
QPair< int, int > getVisibleXRange(int visibleColumn)
Definition: TableColumnList.cpp:176
QList< TableColumn *> getSortingOrder()
Definition: TableColumnList.cpp:233
int getVisibleWidth() const
Definition: TableColumnList.cpp:220
TableColumnList & operator=(TableColumnList other)
Definition: TableColumnList.cpp:164
void lower(TableColumn *col, bool emitSortOutDated=true)
Definition: TableColumnList.cpp:105
void append(TableColumn *newCol)
Definition: TableColumnList.cpp:64
TableColumnList()
Definition: TableColumnList.cpp:20
void raiseToTop(TableColumn *col)
Definition: TableColumnList.cpp:145
void setSortingOrder(QStringList newOrder)
Definition: TableColumnList.cpp:255
Definition: TableColumn.h:18
Definition: TableColumnList.h:22
TableColumnList getVisibleColumns()
Definition: TableColumnList.cpp:196
virtual ~TableColumnList()
Definition: TableColumnList.cpp:36
TableColumn *& operator[](int index)
Definition: TableColumnList.cpp:45
bool contains(TableColumn const *someCol) const
Definition: TableColumnList.cpp:92
int size() const
Definition: TableColumnList.cpp:158
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Definition: CubeIoHandler.h:39
void prepend(TableColumn *newCol)
Definition: TableColumnList.cpp:76
int indexOf(TableColumn const *someCol) const
Definition: TableColumnList.cpp:82
QStringList getSortingOrderAsStrings() const
Definition: TableColumnList.cpp:245