Isis 3 Programmer Reference
TableColumnList.h
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);
41  TableColumnList getVisibleColumns();
42 
43  int getVisibleWidth() const;
44 
45  QList< TableColumn * > getSortingOrder();
46  QStringList getSortingOrderAsStrings() const;
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 
57  TableColumnList &operator=(TableColumnList other);
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)
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31