|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef TableViewContent_H
2 #define TableViewContent_H
12 #include <QAbstractScrollArea>
21 template<
typename T >
class QList;
29 class AbstractTreeItem;
30 class AbstractTableModel;
33 class TableColumnList;
111 void clearActiveCell();
112 void clearColumnSelection();
113 void copyCellSelection(
bool);
114 void createActions();
115 void selectAllRows();
116 int getColumnFromScreenX(
int screenX)
const;
117 int getRowFromScreenY(
int screenY)
const;
118 bool hasActiveCell()
const;
119 bool hasRowSelection()
const;
120 bool mouseInCellSelection(QPoint)
const;
121 bool mouseInRowSelection(QPoint)
const;
122 bool rowIsValid(
int rowNum)
const;
123 bool columnIsValid(
int colNum)
const;
124 bool cellIsEditable(
int,
int)
const;
125 bool isDataColumn(
int)
const;
126 void paintRow(QPainter *,
int, QPoint, QPoint);
127 void updateActiveCell(QPoint);
128 void updateHoveredCell(QPoint,
bool);
131 void finishEditing();
132 void moveActiveCellDown();
133 void moveActiveCellUp();
134 void moveActiveCellLeft();
135 void moveActiveCellRight();
139 void copySelection();
141 void deleteSelectedRows();
143 void updateItemList();
144 void showContextMenu(QPoint);
156 bool m_lastShiftArrowDirectionUp;
178 QAction *m_applyToSelectionAct;
189 QAction *m_deleteSelectedRowsAct;
194 QAction *m_editControlPointAct;
196 bool m_activeControlNet;
200 static const int ITEM_PADDING = 7;
201 static const int ITEM_INDENTATION = 3;
virtual QVariant getData() const =0
void paintEvent(QPaintEvent *event)
Paints the table when there is a paint event.
Definition: TableViewContent.cpp:862
void mouseMoveEvent(QMouseEvent *event)
Overrides QWidget::mouseMoveEvent.
Definition: TableViewContent.cpp:487
virtual const AbstractTableDelegate * getDelegate() const
Definition: AbstractTableModel.cpp:164
@ Point
Definition: AbstractTreeItem.h:46
int size() const
Definition: TableColumnList.cpp:166
AbstractTreeItem * parent() const
Definition: AbstractTreeItem.cpp:46
virtual int indexOfVisibleItem(AbstractTreeItem const *item) const =0
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
void editControlPoint(ControlPoint *controlPoint, QString serialNumber)
@ Measure
Definition: AbstractTreeItem.h:47
void leaveEvent(QEvent *event)
Overrides QWidget::leaveEvent.
Definition: TableViewContent.cpp:553
virtual void readData(QWidget *, AbstractTreeItem *, TableColumn const *) const =0
Definition: TableView.h:43
void mousePressEvent(QMouseEvent *event)
Overrides QWidget::mousePressEvent.
Definition: TableViewContent.cpp:352
Definition: TableColumn.h:26
TableColumnList getVisibleColumns()
Definition: TableColumnList.cpp:204
void scrollTo(QList< AbstractTreeItem * >)
Scrolls to the selected items.
Definition: TableViewContent.cpp:274
Translates the tree model into a table model.
Definition: AbstractTableModel.h:48
virtual QList< AbstractTreeItem * > getItems(int, int)=0
virtual void setSelected(bool newState)
Definition: AbstractTreeItem.cpp:126
virtual bool isSelected() const
Definition: AbstractTreeItem.cpp:136
virtual QWidget * getWidget(TableColumn const *) const =0
A single control point.
Definition: ControlPoint.h:354
void resizeEvent(QResizeEvent *event)
Updates the table when it is resized.
Definition: TableViewContent.cpp:985
void keyPressEvent(QKeyEvent *event)
Overrides QWidget::keyPressEvent.
Definition: TableViewContent.cpp:563
Definition: TableColumnList.h:30
AbstractTableModel * getModel()
Returns the model.
Definition: TableViewContent.cpp:167
virtual void saveData(QWidget *, AbstractTreeItem *, TableColumn const *) const =0
virtual QList< AbstractTreeItem * > getChildren() const =0
QSize sizeHint() const
Returns the minimum size hint.
Definition: TableViewContent.cpp:157
virtual TableColumnList * getColumns()
Definition: AbstractTableModel.cpp:154
QPair< int, int > getVisibleXRange(int visibleColumn)
Definition: TableColumnList.cpp:184
void tableSelectionChanged()
TableViewContent(AbstractTableModel *someModel)
Constructor.
Definition: TableViewContent.cpp:51
virtual int getVisibleRowCount() const =0
void mouseDoubleClickEvent(QMouseEvent *event)
Overrides QWidget::mouseDoubleClickEvent.
Definition: TableViewContent.cpp:325
QString getTitle() const
Definition: TableColumn.cpp:49
virtual ~TableViewContent()
Destructor.
Definition: TableViewContent.cpp:108
QSize minimumSizeHint() const
Returns the minimum size hint.
Definition: TableViewContent.cpp:145
#define ASSERT(x)
Definition: IsisDebug.h:134
virtual QString getWarningMessage(AbstractTreeItem const *, TableColumn const *, QString valueToSave) const =0
virtual QList< AbstractTreeItem * > getSelectedItems()=0
bool eventFilter(QObject *target, QEvent *event)
Overrides QObject::eventFilter.
Definition: TableViewContent.cpp:315
void updateHorizontalScrollBar(bool scrollRight=false)
Updates the horizontal scroll bar.
Definition: TableViewContent.cpp:251
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
void tableSelectionChanged(QList< AbstractTreeItem * >)
void setActiveControlNet(bool activeNet)
Sets if there is an active control net.
Definition: TableViewContent.cpp:216
Base class for delegates which create, read, and save data in the tables.
Definition: AbstractTableDelegate.h:33
virtual InternalPointerType getPointerType() const =0
virtual void setGlobalSelection(bool selected)=0
void rebuildModels(QList< AbstractTreeItem * >)
int getVisibleWidth() const
Definition: TableColumnList.cpp:228
void mouseReleaseEvent(QMouseEvent *event)
Overrides QWidget::mouseReleaseEvent.
Definition: TableViewContent.cpp:478
void horizontalScrollBarValueChanged(int)
void refresh()
Refreshes the table and viewport.
Definition: TableViewContent.cpp:224
Base class for an item in the tree.
Definition: AbstractTreeItem.h:39
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
virtual bool isFiltering() const
Definition: AbstractTableModel.cpp:118
Definition: TableViewContent.h:60
void scrollContentsBy(int dx, int dy)
Updates the item list when the user scrolls.
Definition: TableViewContent.cpp:998