Isis Developer Reference
TableView.h
Go to the documentation of this file.
1 #ifndef TableView_H
2 #define TableView_H
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QWidget>
13 
14 #include "AbstractTableModel.h"
15 
16 class QLabel;
17 template<typename T> class QList;
18 class QString;
19 
20 namespace Isis {
21  class AbstractTableModel;
22  class AbstractTreeItem;
23  class ControlPoint;
24  class TableViewContent;
25  class TableViewHeader;
26  class TableColumnList;
27 
43  class TableView : public QWidget {
44  Q_OBJECT
45 
46  public:
47  TableView(AbstractTableModel *someModel,
48  QString pathForSettigs, QString objName);
49  virtual ~TableView();
50  // QSize sizeHint() const;
51  QFont getContentFont() const;
53 
55  void setTitles(QStringList someTitle);
56 
57  void setColumnVisible(QString, bool);
58 
60  // void setModel(AbstractTableModel * newModel);
61  void readSettings();
62  void writeSettings();
64 
65 
66  public slots:
70 
71 
72  signals:
73  void activated();
78  void filterCountsChanged(int visibleRows, int totalRows);
79 
80  void editControlPoint(ControlPoint *, QString);
81 
82  private:
83  // disable copying and assigning of this class
84  TableView(const TableView &);
85  TableView &operator=(const TableView &other);
86 
87  // methods
88  void nullify();
89 
90  // data
91  TableViewHeader *m_header;
92  TableViewContent *m_content;
93  TableColumnList *m_columns;
94  AbstractTableModel *m_model;
95  QString *m_settingsPath;
96  QLabel *m_warningLabel;
97  };
98 }
99 
100 #endif
Isis::AbstractTableModel::sortLimit
virtual int sortLimit() const
Definition: AbstractTableModel.cpp:136
Isis::TableView::getModel
AbstractTableModel * getModel()
Returns the model.
Definition: TableView.cpp:189
Isis::AbstractTableModel::Warning
Warning
Definition: AbstractTableModel.h:54
QWidget
Isis::TableColumnList::size
int size() const
Definition: TableColumnList.cpp:166
TableColumn.h
TableViewContent.h
Isis::TableColumnList::prepend
void prepend(TableColumn *newCol)
Definition: TableColumnList.cpp:84
Isis::TableViewHeader
Definition: TableViewHeader.h:34
Isis::TableView::content
TableViewContent * content()
Returns the content of the table.
Definition: TableView.cpp:199
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::AbstractTableModel::None
@ None
Definition: AbstractTableModel.h:55
Isis::TableView::getHorizontalHeader
TableViewHeader * getHorizontalHeader()
Returns the horizontal header.
Definition: TableView.cpp:164
Isis::TableView::tableSelectionChanged
void tableSelectionChanged(QList< AbstractTreeItem * >)
Isis::AbstractTableModel::SortingDisabled
@ SortingDisabled
Definition: AbstractTableModel.h:56
Isis::TableView::activated
void activated()
Isis::TableColumn::setVisible
void setVisible(bool)
Definition: TableColumn.cpp:74
AbstractTableModel.h
Isis::TableView
Definition: TableView.h:43
Isis::TableColumn
Definition: TableColumn.h:26
Isis::TableColumn::setWidth
void setWidth(int)
Definition: TableColumn.cpp:85
Isis::TableViewContent::scrollTo
void scrollTo(QList< AbstractTreeItem * >)
Scrolls to the selected items.
Definition: TableViewContent.cpp:274
Isis::AbstractTableModel
Translates the tree model into a table model.
Definition: AbstractTableModel.h:48
QStringList
Isis::TableView::writeSettings
void writeSettings()
Isis::TableColumn::sortAscending
bool sortAscending() const
Definition: TableColumn.cpp:101
TableView.h
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::TableView::editControlPoint
void editControlPoint(ControlPoint *, QString)
Isis::TableView::rebuildModels
void rebuildModels(QList< AbstractTreeItem * >)
Isis::TableColumnList
Definition: TableColumnList.h:30
Isis::TableViewContent::getModel
AbstractTableModel * getModel()
Returns the model.
Definition: TableViewContent.cpp:167
Isis::TableColumnList::setSortingOrder
void setSortingOrder(QStringList newOrder)
Definition: TableColumnList.cpp:263
Isis::AbstractTableModel::getColumns
virtual TableColumnList * getColumns()
Definition: AbstractTableModel.cpp:154
Isis::TableView::readSettings
void readSettings()
Isis::TableColumnList::getSortingOrderAsStrings
QStringList getSortingOrderAsStrings() const
Definition: TableColumnList.cpp:253
Isis::TableView::setColumnVisible
void setColumnVisible(QString, bool)
Sets the specified column visible or invisible.
Definition: TableView.cpp:175
Isis::AbstractTableModel::getVisibleRowCount
virtual int getVisibleRowCount() const =0
Isis::TableColumn::getTitle
QString getTitle() const
Definition: TableColumn.cpp:49
Isis::TableView::TableView
TableView(AbstractTableModel *someModel, QString pathForSettigs, QString objName)
Constructor.
Definition: TableView.cpp:36
Isis::IException
Isis exception class.
Definition: IException.h:91
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::TableColumn::getWidth
int getWidth() const
Definition: TableColumn.cpp:80
Isis::TableView::getTitles
QStringList getTitles() const
Isis::TableView::selectionChanged
void selectionChanged()
IException.h
Isis::TableView::filterCountsChanged
void filterCountsChanged(int visibleRows, int totalRows)
Isis::TableView::modelDataChanged
void modelDataChanged()
TableViewHeader.h
Isis::TableView::~TableView
virtual ~TableView()
Destructor.
Definition: TableView.cpp:127
Isis::TableView::getContentFont
QFont getContentFont() const
Isis::TableView::handleModelSelectionChanged
void handleModelSelectionChanged()
Handles refreshing the content when the model selection is changed.
Definition: TableView.cpp:283
Isis::AbstractTableModel::SortingTableSizeLimitReached
@ SortingTableSizeLimitReached
Definition: AbstractTableModel.h:57
Isis::TableColumn::setSortAscending
void setSortAscending(bool ascending)
Definition: TableColumn.cpp:106
IsisDebug.h
Isis::TableView::setTitles
void setTitles(QStringList someTitle)
Isis::TableViewContent::refresh
void refresh()
Refreshes the table and viewport.
Definition: TableViewContent.cpp:224
TableColumnList.h
Isis::TableView::displayWarning
void displayWarning(AbstractTableModel::Warning)
Displays warnings for a table.
Definition: TableView.cpp:257
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::TableViewContent
Definition: TableViewContent.h:60