Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Item {

property bool showVerticalHeader: false
property bool horizontalHeaderNavigationEnabled: true
property bool displayTruncatedTextOnHover: false

property var currentEditedCell: null

Expand Down Expand Up @@ -77,6 +78,7 @@ Item {
}

signal handleItem(var index, var item)
signal horizontalHeaderClicked(int column)

QtObject {
id: prv
Expand Down Expand Up @@ -136,6 +138,10 @@ Item {
onFormatChangeRequested: function(formatId) {
display.currentFormatId = formatId
}

onClicked: {
root.horizontalHeaderClicked(index)
}
}
}

Expand Down Expand Up @@ -237,6 +243,7 @@ Item {
preferredWidth: hHeaderData.preferredWidth

sourceComponentCallback: root.sourceComponentCallback
displayTruncatedTextOnHover: root.displayTruncatedTextOnHover

isSelected: tableView.selectionModel.hasSelection && tableView.selectionModel.isSelected(tableView.model.index(row, column))
evenMargins: showVerticalHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ ItemMultiSelectionModel* AbstractTableViewModel::selectionModel() const

void AbstractTableViewModel::setTable(const QVector<QVector<TableViewCell*> >& table)
{
if (table.isEmpty()) {
return;
}

for (const auto& row : std::as_const(m_table)) {
for (TableViewCell* cell : row) {
if (cell) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ TableViewDelegate {

property bool isSelected: false
property bool evenMargins: false
property bool displayTruncatedTextOnHover: false

property alias navigation: listItem.navigation

Expand Down Expand Up @@ -517,6 +518,7 @@ TableViewDelegate {
text: root.cellType === TableViewCellType.List ? root.itemData.current : val
textFormat: Text.PlainText
horizontalAlignment: Text.AlignLeft
displayTruncatedTextOnHover: root.displayTruncatedTextOnHover
}
}
}
Expand Down
Loading