Isis 3 Programmer Reference
TableColumnList.h
1 #ifndef TableColumnList_H
2 #define TableColumnList_H
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QObject>
13 
14 template<typename A, typename B> struct QPair;
15 
16 
17 namespace Isis {
18  class TableColumn;
19 
30  class TableColumnList : public QObject {
31  Q_OBJECT
32 
33  public:
36  virtual ~TableColumnList();
37 
38  TableColumn * &operator[](int index);
39  TableColumn * &operator[](QString title);
40 
41  void append(TableColumn *newCol);
42  void prepend(TableColumn *newCol);
43 
44  int indexOf(TableColumn const *someCol) const;
45  bool contains(TableColumn const *someCol) const;
46  bool contains(QString columnTitle) const;
47 
48  QPair< int, int > getVisibleXRange(int visibleColumn);
49  TableColumnList getVisibleColumns();
50 
51  int getVisibleWidth() const;
52 
53  QList< TableColumn * > getSortingOrder();
54  QStringList getSortingOrderAsStrings() const;
55  void setSortingOrder(QStringList newOrder);
56  void lower(TableColumn *col, bool emitSortOutDated = true);
57  // void lower(int visibleColumnIndex, bool emitSortOutDated = true);
58  void raise(TableColumn *col, bool emitSortOutDated = true);
59  // void raise(int visibleColumnIndex, bool emitSortOutDated = true);
60  void raiseToTop(TableColumn *col);
61  // void raiseToTop(int visibleColumnIndex);
62 
63  int size() const;
64 
65  TableColumnList &operator=(TableColumnList other);
66 
67 
68  signals:
69  void sortOutDated();
70 
71 
72  private:
73  void checkIndexRange(int index);
74  void nullify();
75 
76 
77  private:
78  QList< TableColumn * > * m_cols;
79  QList< TableColumn * > * m_sortingOrder;
80  };
81 }
82 
83 #endif
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::TableColumn
Definition: TableColumn.h:26
QStringList
Isis::TableColumnList
Definition: TableColumnList.h:30
Isis::TableColumnList::getVisibleXRange
QPair< int, int > getVisibleXRange(int visibleColumn)
Definition: TableColumnList.cpp:184
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
QObject
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16