Isis 3 Programmer Reference
TableView.h
1 #ifndef TableView_H
2 #define TableView_H
3 
4 #include <QWidget>
5 
6 #include "AbstractTableModel.h"
7 
8 class QLabel;
9 template<typename T> class QList;
10 class QString;
11 
12 namespace Isis {
13  class AbstractTableModel;
14  class AbstractTreeItem;
15  class ControlPoint;
16  class TableViewContent;
17  class TableViewHeader;
18  class TableColumnList;
19 
35  class TableView : public QWidget {
36  Q_OBJECT
37 
38  public:
39  TableView(AbstractTableModel *someModel,
40  QString pathForSettigs, QString objName);
41  virtual ~TableView();
42  // QSize sizeHint() const;
43  QFont getContentFont() const;
45 
46  QStringList getTitles() const;
47  void setTitles(QStringList someTitle);
48 
49  void setColumnVisible(QString, bool);
50 
52  // void setModel(AbstractTableModel * newModel);
53  void readSettings();
54  void writeSettings();
56 
57 
58  public slots:
59  void displayWarning(AbstractTableModel::Warning);
62 
63 
64  signals:
65  void activated();
66  void rebuildModels(QList< AbstractTreeItem * >);
67  void selectionChanged();
68  void modelDataChanged();
69  void tableSelectionChanged(QList< AbstractTreeItem * >);
70  void filterCountsChanged(int visibleRows, int totalRows);
71 
72  void editControlPoint(ControlPoint *, QString);
73 
74  private:
75  // disable copying and assigning of this class
76  TableView(const TableView &);
77  TableView &operator=(const TableView &other);
78 
79  // methods
80  void nullify();
81 
82  // data
87  QString *m_settingsPath;
88  QLabel *m_warningLabel;
89  };
90 }
91 
92 #endif
TableViewContent * m_content
The content of the header.
Definition: TableView.h:84
TableViewContent * content()
Returns the content of the table.
Definition: TableView.cpp:191
TableColumnList * m_columns
The columns of the table.
Definition: TableView.h:85
AbstractTableModel * getModel()
Returns the model.
Definition: TableView.cpp:181
AbstractTableModel * m_model
The model of the table.
Definition: TableView.h:86
TableViewHeader * getHorizontalHeader()
Returns the horizontal header.
Definition: TableView.cpp:156
Translates the tree model into a table model.
A single control point.
Definition: ControlPoint.h:369
void setColumnVisible(QString, bool)
Sets the specified column visible or invisible.
Definition: TableView.cpp:167
void nullify()
Sets all member variables to NULL.
Definition: TableView.cpp:289
virtual ~TableView()
Destructor.
Definition: TableView.cpp:119
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QString * m_settingsPath
Path of where to read/write the settings.
Definition: TableView.h:87
void handleModelSelectionChanged()
Handles refreshing the content when the model selection is changed.
Definition: TableView.cpp:275
TableView(AbstractTableModel *someModel, QString pathForSettigs, QString objName)
Constructor.
Definition: TableView.cpp:28
TableViewHeader * m_header
The table header.
Definition: TableView.h:83
void displayWarning(AbstractTableModel::Warning)
Displays warnings for a table.
Definition: TableView.cpp:249
QLabel * m_warningLabel
Label of any warnings.
Definition: TableView.h:88