Added missing TableRowsChanged() to TableModelListener and made Table
handle it, too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31120 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -51,6 +51,13 @@ TableModelListener::TableRowsRemoved(TableModel* model, int32 rowIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TableModelListener::TableRowsChanged(TableModel* model, int32 rowIndex,
|
||||||
|
int32 count)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - TableModel
|
// #pragma mark - TableModel
|
||||||
|
|
||||||
|
|
||||||
@@ -93,6 +100,16 @@ TableModel::NotifyRowsRemoved(int32 rowIndex, int32 count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TableModel::NotifyRowsChanged(int32 rowIndex, int32 count)
|
||||||
|
{
|
||||||
|
for (ListenerList::Iterator it = fListeners.GetIterator();
|
||||||
|
TableModelListener* listener = it.Next();) {
|
||||||
|
listener->TableRowsChanged(this, rowIndex, count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - TableSelectionModel
|
// #pragma mark - TableSelectionModel
|
||||||
|
|
||||||
TableSelectionModel::TableSelectionModel(Table* table)
|
TableSelectionModel::TableSelectionModel(Table* table)
|
||||||
@@ -496,6 +513,17 @@ Table::TableRowsRemoved(TableModel* model, int32 rowIndex, int32 count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Table::TableRowsChanged(TableModel* model, int32 rowIndex, int32 count)
|
||||||
|
{
|
||||||
|
int32 endIndex = rowIndex + count;
|
||||||
|
for (int32 i = rowIndex; i < endIndex; i++) {
|
||||||
|
if (BRow* row = fRows.ItemAt(i))
|
||||||
|
UpdateRow(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Table::ItemInvoked()
|
Table::ItemInvoked()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ public:
|
|||||||
int32 rowIndex, int32 count);
|
int32 rowIndex, int32 count);
|
||||||
virtual void TableRowsRemoved(TableModel* model,
|
virtual void TableRowsRemoved(TableModel* model,
|
||||||
int32 rowIndex, int32 count);
|
int32 rowIndex, int32 count);
|
||||||
|
virtual void TableRowsChanged(TableModel* model,
|
||||||
|
int32 rowIndex, int32 count);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -49,6 +51,7 @@ protected:
|
|||||||
protected:
|
protected:
|
||||||
void NotifyRowsAdded(int32 rowIndex, int32 count);
|
void NotifyRowsAdded(int32 rowIndex, int32 count);
|
||||||
void NotifyRowsRemoved(int32 rowIndex, int32 count);
|
void NotifyRowsRemoved(int32 rowIndex, int32 count);
|
||||||
|
void NotifyRowsChanged(int32 rowIndex, int32 count);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ListenerList fListeners;
|
ListenerList fListeners;
|
||||||
@@ -118,6 +121,8 @@ private:
|
|||||||
int32 rowIndex, int32 count);
|
int32 rowIndex, int32 count);
|
||||||
virtual void TableRowsRemoved(TableModel* model,
|
virtual void TableRowsRemoved(TableModel* model,
|
||||||
int32 rowIndex, int32 count);
|
int32 rowIndex, int32 count);
|
||||||
|
virtual void TableRowsChanged(TableModel* model,
|
||||||
|
int32 rowIndex, int32 count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Column;
|
class Column;
|
||||||
|
|||||||
Reference in New Issue
Block a user