Isis 3 Programmer Reference
TableView.h
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 
54  QStringList getTitles() const;
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:
67  void displayWarning(AbstractTableModel::Warning);
70 
71 
72  signals:
73  void activated();
74  void rebuildModels(QList< AbstractTreeItem * >);
75  void selectionChanged();
76  void modelDataChanged();
77  void tableSelectionChanged(QList< AbstractTreeItem * >);
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
95  QString *m_settingsPath;
96  QLabel *m_warningLabel;
97  };
98 }
99 
100 #endif
Isis::TableView::getModel
AbstractTableModel * getModel()
Returns the model.
Definition: TableView.cpp:189
QWidget
Isis::TableView::m_settingsPath
QString * m_settingsPath
Path of where to read/write the settings.
Definition: TableView.h:95
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::TableView::getHorizontalHeader
TableViewHeader * getHorizontalHeader()
Returns the horizontal header.
Definition: TableView.cpp:164
Isis::TableView::m_model
AbstractTableModel * m_model
The model of the table.
Definition: TableView.h:94
Isis::TableView
Definition: TableView.h:43
Isis::AbstractTableModel
Translates the tree model into a table model.
Definition: AbstractTableModel.h:48
QStringList
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::TableColumnList
Definition: TableColumnList.h:30
Isis::TableView::nullify
void nullify()
Sets all member variables to NULL.
Definition: TableView.cpp:297
Isis::TableView::setColumnVisible
void setColumnVisible(QString, bool)
Sets the specified column visible or invisible.
Definition: TableView.cpp:175
Isis::TableView::TableView
TableView(AbstractTableModel *someModel, QString pathForSettigs, QString objName)
Constructor.
Definition: TableView.cpp:36
Isis::TableView::~TableView
virtual ~TableView()
Destructor.
Definition: TableView.cpp:127
Isis::TableView::handleModelSelectionChanged
void handleModelSelectionChanged()
Handles refreshing the content when the model selection is changed.
Definition: TableView.cpp:283
Isis::TableView::m_columns
TableColumnList * m_columns
The columns of the table.
Definition: TableView.h:93
Isis::TableView::m_header
TableViewHeader * m_header
The table header.
Definition: TableView.h:91
Isis::TableView::m_content
TableViewContent * m_content
The content of the header.
Definition: TableView.h:92
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
Isis::TableView::m_warningLabel
QLabel * m_warningLabel
Label of any warnings.
Definition: TableView.h:96