1 #ifndef TableViewContent_H 2 #define TableViewContent_H 4 #include <QAbstractScrollArea> 13 template<
typename T >
class QList;
21 class AbstractTreeItem;
22 class AbstractTableModel;
25 class TableColumnList;
67 void modelDataChanged();
68 void tableSelectionChanged();
70 void horizontalScrollBarValueChanged(
int);
107 void selectAllRows();
118 void paintRow(QPainter *,
int, QPoint, QPoint);
120 void updateHoveredCell(QPoint,
bool);
148 bool m_lastShiftArrowDirectionUp;
188 bool m_activeControlNet;
192 static const int ITEM_PADDING = 7;
193 static const int ITEM_INDENTATION = 3;
virtual ~TableViewContent()
Destructor.
void leaveEvent(QEvent *event)
Overrides QWidget::leaveEvent.
void cellDataChanged(TableColumn const *col)
Rebuilds the models when the data is changed.
void scrollTo(QList< AbstractTreeItem * >)
Scrolls to the selected items.
void mousePressEvent(QMouseEvent *event)
Overrides QWidget::mousePressEvent.
void updateHorizontalScrollBar(bool scrollRight=false)
Updates the horizontal scroll bar.
void resizeEvent(QResizeEvent *event)
Updates the table when it is resized.
void copyAll()
Copies all of the cells.
void copyCellSelection(bool)
Copies the selected cells.
void editControlPoint()
Retrieves the control point from the selected cells for editing.
void finishEditing()
Saves the data from the cell the user was modifying.
void mouseMoveEvent(QMouseEvent *event)
Overrides QWidget::mouseMoveEvent.
void refresh()
Refreshes the table and viewport.
QAction * m_applyToAllAct
This action applies (copies) the contents of the active cell to all of the cells in the active cell's...
int getColumnFromScreenX(int screenX) const
Calculates the visible range of a column and returns the index of the column.
void deleteSelectedRows()
Deletes the selected rows.
void moveActiveCellDown()
Changes the viewport when the active cell is moved.
QAction * m_applyToSelectionAct
This action applies (copies) the contents of the active cell to the current selection.
void paintEvent(QPaintEvent *event)
Paints the table when there is a paint event.
void mouseDoubleClickEvent(QMouseEvent *event)
Overrides QWidget::mouseDoubleClickEvent.
bool isDataColumn(int) const
Checks if the column has a non empty title.
bool eventFilter(QObject *target, QEvent *event)
Overrides QObject::eventFilter.
void updateColumnGroupSelection(AbstractTreeItem *)
Updates which column is selected.
Translates the tree model into a table model.
void setActiveControlNet(bool activeNet)
Sets if there is an active control net.
bool mouseInCellSelection(QPoint) const
Checks if the mouse is in the selected cells.
void mouseReleaseEvent(QMouseEvent *event)
Overrides QWidget::mouseReleaseEvent.
void copySelection()
Copies selected cells.
bool hasRowSelection() const
Checks if there is a row selected.
void updateActiveCell(QPoint)
Updates which cell is active.
QList< AbstractTreeItem *> updateRowGroupSelection(int lastRow)
Updates which row is selected.
bool cellIsEditable(int, int) const
Checks if the cell is editable.
void moveActiveCellLeft()
Changes the viewport when the active cell is moved.
bool mouseInRowSelection(QPoint) const
Checks if the mouse is in the selected row.
void scrollContentsBy(int dx, int dy)
Updates the item list when the user scrolls.
void clearActiveCell()
Clears the active cell.
AbstractTableModel * getModel()
Returns the model.
void paintRow(QPainter *, int, QPoint, QPoint)
Repaints the row.
Namespace for ISIS/Bullet specific routines.
bool columnIsValid(int colNum) const
Checks if the column number is valid.
QSize sizeHint() const
Returns the minimum size hint.
void moveActiveCellUp()
Shifts the active cell up.
void moveActiveCellRight()
Changes the viewport when the active cell is moved.
void keyPressEvent(QKeyEvent *event)
Overrides QWidget::keyPressEvent.
int getRowFromScreenY(int screenY) const
Calculates the visible range of a row and returns the index of the column.
Base class for an item in the tree.
void nullify()
Clears all member variables.
void createActions()
Builds the menus.
QSize minimumSizeHint() const
Returns the minimum size hint.
bool hasActiveCell() const
Checks if there is an active cell.
QAction * m_editControlPointAct
This action edits selected control point or if measure selected, edit parent control pt...
QList< AbstractTreeItem *> * rowsWithActiveColumnSelected
Stores a list of the rows that have their active column cells selected.
void showContextMenu(QPoint)
Populates the context menus based on where the user clicked.
void clearColumnSelection()
Clears the selected column.
AbstractTreeItem * m_lastDirectlySelectedRow
This is the last row that was selected by either a control-click or normal click. ...
bool rowIsValid(int rowNum) const
Checks if the row number is valid.
TableViewContent(AbstractTableModel *someModel)
Constructor.
void updateItemList()
Updates the item list.
QAction * m_deleteSelectedRowsAct
This action deletes the selected rows.