Isis 3 Programmer Reference
|
#include <TableViewHeader.h>
Public Slots | |
void | handleFilterCountsChanged (int visibleTopLevelItemCount, int topLevelItemCount) |
Updates the visible columns, and geometry when the filter count changes. More... | |
void | updateHeaderOffset (int) |
Updates the header offset. More... | |
void | updateFilterProgress (int newProgress) |
Updates the current filter progress value. More... | |
void | updateFilterProgressRange (int min, int max) |
Updates the range of the filter progress. More... | |
void | updateRebuildProgress (int newProgress) |
Updates the current rebuild progress value. More... | |
void | updateRebuildProgressRange (int min, int max) |
Updates the range of the rebuild progress. More... | |
void | updateSortProgress (int newProgress) |
Updates the current sort progress value. More... | |
void | updateSortProgressRange (int min, int max) |
Updates the range of the sort progress. More... | |
Signals | |
void | columnResized (bool lastColumn) |
void | requestedGlobalSelection (bool select) |
void | requestedColumnSelection (int columnNum, bool select) |
void | sortingEnabled (bool) |
Public Member Functions | |
TableViewHeader (AbstractTableModel *someModel) | |
Constructor. More... | |
virtual | ~TableViewHeader () |
Destructor. More... | |
virtual void | setColumns (TableColumnList *) |
Sets the column list. More... | |
QSize | minimumSizeHint () const |
Returns the minimum size based on the font. More... | |
QSize | sizeHint () const |
Returns the minimum size based on the font. More... | |
void | setModel (AbstractTableModel *someModel) |
Connects the table model to the functions that handle changes. More... | |
Protected Member Functions | |
void | mouseMoveEvent (QMouseEvent *event) |
Overrides QWidget::mouseMoveEvent. More... | |
void | mousePressEvent (QMouseEvent *event) |
Overrides QWidget::mousePressEvent. More... | |
void | mouseReleaseEvent (QMouseEvent *event) |
Overrides QWidget::mouseReleaseEvent. More... | |
void | paintEvent (QPaintEvent *event) |
Repaints the header. More... | |
Private Member Functions | |
TableViewHeader (const TableViewHeader &other) | |
TableViewHeader & | operator= (TableViewHeader other) |
void | nullify () |
Sets all the member variables to NULL. More... | |
QRect | getColumnRect (int column) const |
Returns the visible column rectangle. More... | |
int | getMousedColumn (QPoint mousePos) |
Returns the column under the mouse. More... | |
int | getMousedColumnEdge (QPoint mousePos) |
Returns the edge of the column under the mouse. More... | |
bool | mouseAtResizableColumnEdge (QPoint mousePos) |
Returns if the mouse is at the edge of a resizeable column. More... | |
void | paintHeader (QPainter *painter, int rowheight) |
Repaints the header. More... | |
void | paintProgress (QPainter *painter, const QRect &rect, int min, int max, int value, bool over100) |
Updates the progress bar. More... | |
QRect | getSortingPriorityRect (int visColIndex) |
QRect | getSortingArrowRect (int visColIndex) |
Private Attributes | |
TableColumnList * | m_columns |
int | m_horizontalOffset |
int | m_filterProgress |
int | m_filterProgressMin |
int | m_filterProgressMax |
int | m_rebuildProgress |
int | m_rebuildProgressMin |
int | m_rebuildProgressMax |
int | m_sortProgress |
int | m_sortProgressMin |
int | m_sortProgressMax |
int | m_visibleCount |
int | m_totalCount |
int | m_clickedColumnEdge |
int | m_clickedColumn |
int | ARROW_HEIGHT |
int | ARROW_WIDTH |
AbstractTableModel * | m_model |
Static Private Attributes | |
static int const | SORT_ARROW_MARGIN = 10 |
Definition at line 34 of file TableViewHeader.h.
|
explicit |
Constructor.
someModel | The table model |
Definition at line 41 of file TableViewHeader.cpp.
References nullify(), and setModel().
|
virtual |
Destructor.
Definition at line 72 of file TableViewHeader.cpp.
|
private |
Returns the visible column rectangle.
column | Column to check |
Definition at line 356 of file TableViewHeader.cpp.
Referenced by getMousedColumn(), getMousedColumnEdge(), mouseAtResizableColumnEdge(), mouseMoveEvent(), and paintHeader().
|
private |
Returns the column under the mouse.
mousePos | The mouse position |
Definition at line 382 of file TableViewHeader.cpp.
References getColumnRect().
Referenced by getMousedColumnEdge(), mouseAtResizableColumnEdge(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Returns the edge of the column under the mouse.
mousePos | The mouse position |
Definition at line 404 of file TableViewHeader.cpp.
References getColumnRect(), getMousedColumn(), and mouseAtResizableColumnEdge().
Referenced by mousePressEvent().
|
slot |
Updates the visible columns, and geometry when the filter count changes.
visibleTopLevelItemCount | Number of visible top level items |
topLevelItemCount | Number of top level items |
Definition at line 179 of file TableViewHeader.cpp.
Referenced by setModel().
QSize Isis::TableViewHeader::minimumSizeHint | ( | ) | const |
Returns the minimum size based on the font.
Definition at line 92 of file TableViewHeader.cpp.
Referenced by sizeHint().
|
private |
Returns if the mouse is at the edge of a resizeable column.
mousePos | The mouse position |
Definition at line 431 of file TableViewHeader.cpp.
References getColumnRect(), and getMousedColumn().
Referenced by getMousedColumnEdge(), and mouseMoveEvent().
|
protected |
Overrides QWidget::mouseMoveEvent.
event | The mouse move event |
Definition at line 249 of file TableViewHeader.cpp.
References getColumnRect(), and mouseAtResizableColumnEdge().
|
protected |
Overrides QWidget::mousePressEvent.
event | The mouse press event |
Definition at line 216 of file TableViewHeader.cpp.
References getMousedColumn(), and getMousedColumnEdge().
|
protected |
Overrides QWidget::mouseReleaseEvent.
event | The mouse release event |
Definition at line 285 of file TableViewHeader.cpp.
References getMousedColumn().
|
private |
Sets all the member variables to NULL.
Definition at line 343 of file TableViewHeader.cpp.
Referenced by TableViewHeader().
|
protected |
Repaints the header.
event | The paint event |
Definition at line 325 of file TableViewHeader.cpp.
References paintHeader().
|
private |
Repaints the header.
painter | The QPainter |
rowHeight | The new row height |
Definition at line 464 of file TableViewHeader.cpp.
References getColumnRect(), and paintProgress().
Referenced by paintEvent().
|
private |
Updates the progress bar.
painter | The QPainter |
rect | The progress bar |
min | The minimum progress value |
max | The maximum progress value |
value | Current progress value |
over100 | Bool if the progress can go over 100 |
Definition at line 607 of file TableViewHeader.cpp.
Referenced by paintHeader().
|
virtual |
Sets the column list.
cols | The column list |
Definition at line 82 of file TableViewHeader.cpp.
void Isis::TableViewHeader::setModel | ( | AbstractTableModel * | someModel | ) |
Connects the table model to the functions that handle changes.
someModel | The table model to connect |
Definition at line 116 of file TableViewHeader.cpp.
References handleFilterCountsChanged(), updateFilterProgress(), updateFilterProgressRange(), updateRebuildProgress(), updateRebuildProgressRange(), updateSortProgress(), and updateSortProgressRange().
Referenced by TableViewHeader().
QSize Isis::TableViewHeader::sizeHint | ( | ) | const |
Returns the minimum size based on the font.
Definition at line 106 of file TableViewHeader.cpp.
References minimumSizeHint().
|
slot |
Updates the current filter progress value.
newProgress | New progress value |
Definition at line 630 of file TableViewHeader.cpp.
Referenced by setModel().
|
slot |
Updates the range of the filter progress.
min | The minimum progress |
max | The maximum progress |
Definition at line 642 of file TableViewHeader.cpp.
Referenced by setModel().
|
slot |
Updates the header offset.
newOffset | The new header offset |
Definition at line 205 of file TableViewHeader.cpp.
|
slot |
Updates the current rebuild progress value.
newProgress | New progress value |
Definition at line 654 of file TableViewHeader.cpp.
Referenced by setModel().
|
slot |
Updates the range of the rebuild progress.
min | The minimum progress |
max | The maximum progress |
Definition at line 666 of file TableViewHeader.cpp.
Referenced by setModel().
|
slot |
Updates the current sort progress value.
newProgress | New progress value |
Definition at line 678 of file TableViewHeader.cpp.
Referenced by setModel().
|
slot |
Updates the range of the sort progress.
min | The minimum progress |
max | The maximum progress |
Definition at line 690 of file TableViewHeader.cpp.
Referenced by setModel().