Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Makes a QTableView last column feel as if it was being resized from its left border. More...
#include <guiutil.h>
Public Member Functions | |
TableViewLastColumnResizingFixer (QTableView *table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent) | |
Initializes all internal variables and prepares the the resize modes of the last 2 columns of the table and. More... | |
void | stretchColumnWidth (int column) |
Private Slots | |
void | on_sectionResized (int logicalIndex, int oldSize, int newSize) |
void | on_geometriesChanged () |
Private Member Functions | |
void | adjustTableColumnsWidth () |
int | getAvailableWidthForColumn (int column) |
int | getColumnsWidth () |
void | connectViewHeadersSignals () |
void | disconnectViewHeadersSignals () |
void | setViewHeaderResizeMode (int logicalIndex, QHeaderView::ResizeMode resizeMode) |
void | resizeColumn (int nColumnIndex, int width) |
Private Attributes | |
QTableView * | tableView |
int | lastColumnMinimumWidth |
int | allColumnsMinimumWidth |
int | lastColumnIndex |
int | columnCount |
int | secondToLastColumnIndex |
Detailed Description
Makes a QTableView last column feel as if it was being resized from its left border.
Also makes sure the column widths are never larger than the table's viewport. In Qt, all columns are resizable from the right, but it's not intuitive resizing the last column from the right. Usually our second to last columns behave as if stretched, and when on strech mode, columns aren't resizable interactively or programmatically.
This helper object takes care of this issue.
Constructor & Destructor Documentation
◆ TableViewLastColumnResizingFixer()
GUIUtil::TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer | ( | QTableView * | table, |
int | lastColMinimumWidth, | ||
int | allColsMinimumWidth, | ||
QObject * | parent | ||
) |
Initializes all internal variables and prepares the the resize modes of the last 2 columns of the table and.
Definition at line 847 of file guiutil.cpp.
References allColumnsMinimumWidth, columnCount, lastColumnIndex, secondToLastColumnIndex, setViewHeaderResizeMode(), and tableView.
Member Function Documentation
◆ adjustTableColumnsWidth()
|
private |
Definition at line 798 of file guiutil.cpp.
References connectViewHeadersSignals(), disconnectViewHeadersSignals(), getAvailableWidthForColumn(), getColumnsWidth(), lastColumnIndex, resizeColumn(), secondToLastColumnIndex, and tableView.
Referenced by on_sectionResized().
◆ connectViewHeadersSignals()
|
private |
Definition at line 743 of file guiutil.cpp.
References on_geometriesChanged(), on_sectionResized(), and tableView.
Referenced by adjustTableColumnsWidth(), on_geometriesChanged(), and stretchColumnWidth().
◆ disconnectViewHeadersSignals()
|
private |
Definition at line 750 of file guiutil.cpp.
References on_geometriesChanged(), on_sectionResized(), and tableView.
Referenced by adjustTableColumnsWidth(), on_geometriesChanged(), and stretchColumnWidth().
◆ getAvailableWidthForColumn()
|
private |
Definition at line 783 of file guiutil.cpp.
References getColumnsWidth(), lastColumnMinimumWidth, and tableView.
Referenced by adjustTableColumnsWidth(), on_geometriesChanged(), on_sectionResized(), and stretchColumnWidth().
◆ getColumnsWidth()
|
private |
Definition at line 773 of file guiutil.cpp.
References columnCount, and tableView.
Referenced by adjustTableColumnsWidth(), getAvailableWidthForColumn(), and on_geometriesChanged().
◆ on_geometriesChanged
|
privateslot |
Definition at line 833 of file guiutil.cpp.
References connectViewHeadersSignals(), disconnectViewHeadersSignals(), getAvailableWidthForColumn(), getColumnsWidth(), resizeColumn(), secondToLastColumnIndex, and tableView.
Referenced by connectViewHeadersSignals(), and disconnectViewHeadersSignals().
◆ on_sectionResized
|
privateslot |
Definition at line 821 of file guiutil.cpp.
References adjustTableColumnsWidth(), getAvailableWidthForColumn(), and resizeColumn().
Referenced by connectViewHeadersSignals(), and disconnectViewHeadersSignals().
◆ resizeColumn()
|
private |
Definition at line 767 of file guiutil.cpp.
References tableView.
Referenced by adjustTableColumnsWidth(), on_geometriesChanged(), on_sectionResized(), and stretchColumnWidth().
◆ setViewHeaderResizeMode()
|
private |
Definition at line 758 of file guiutil.cpp.
References tableView.
Referenced by TableViewLastColumnResizingFixer().
◆ stretchColumnWidth()
void GUIUtil::TableViewLastColumnResizingFixer::stretchColumnWidth | ( | int | column | ) |
Definition at line 813 of file guiutil.cpp.
References connectViewHeadersSignals(), disconnectViewHeadersSignals(), getAvailableWidthForColumn(), and resizeColumn().
Referenced by ReceiveCoinsDialog::resizeEvent(), and TransactionView::resizeEvent().
Member Data Documentation
◆ allColumnsMinimumWidth
|
private |
Definition at line 232 of file guiutil.h.
Referenced by TableViewLastColumnResizingFixer().
◆ columnCount
|
private |
Definition at line 234 of file guiutil.h.
Referenced by getColumnsWidth(), and TableViewLastColumnResizingFixer().
◆ lastColumnIndex
|
private |
Definition at line 233 of file guiutil.h.
Referenced by adjustTableColumnsWidth(), and TableViewLastColumnResizingFixer().
◆ lastColumnMinimumWidth
|
private |
Definition at line 231 of file guiutil.h.
Referenced by getAvailableWidthForColumn().
◆ secondToLastColumnIndex
|
private |
Definition at line 235 of file guiutil.h.
Referenced by adjustTableColumnsWidth(), on_geometriesChanged(), and TableViewLastColumnResizingFixer().
◆ tableView
|
private |
Definition at line 230 of file guiutil.h.
Referenced by adjustTableColumnsWidth(), connectViewHeadersSignals(), disconnectViewHeadersSignals(), getAvailableWidthForColumn(), getColumnsWidth(), on_geometriesChanged(), resizeColumn(), setViewHeaderResizeMode(), and TableViewLastColumnResizingFixer().
The documentation for this class was generated from the following files:
- src/qt/guiutil.h
- src/qt/guiutil.cpp