summaryrefslogtreecommitdiff
path: root/src/gui/table_model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/table_model.cpp')
-rw-r--r--src/gui/table_model.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/src/gui/table_model.cpp b/src/gui/table_model.cpp
index e1afef96..9911eec3 100644
--- a/src/gui/table_model.cpp
+++ b/src/gui/table_model.cpp
@@ -25,27 +25,23 @@
#include "table_model.h"
-void
-TableModel::installListener(TableModelListener *listener)
+void TableModel::installListener(TableModelListener *listener)
{
listeners.insert(listener);
}
-void
-TableModel::removeListener(TableModelListener *listener)
+void TableModel::removeListener(TableModelListener *listener)
{
listeners.erase(listener);
}
-void
-TableModel::signalBeforeUpdate(void)
+void TableModel::signalBeforeUpdate(void)
{
for (std::set<TableModelListener *>::const_iterator it = listeners.begin(); it != listeners.end(); it++)
(*it)->modelUpdated(false);
}
-void
-TableModel::signalAfterUpdate(void)
+void TableModel::signalAfterUpdate(void)
{
for (std::set<TableModelListener *>::const_iterator it = listeners.begin(); it != listeners.end(); it++)
(*it)->modelUpdated(true);
@@ -72,16 +68,14 @@ StaticTableModel::~StaticTableModel(void)
delete *it;
}
-void
-StaticTableModel::resize(void)
+void StaticTableModel::resize(void)
{
mRows = getRows();
mColumns = getColumns();
mTableModel.resize(mRows * mColumns, NULL);
}
-void
-StaticTableModel::set(int row, int column, gcn::Widget *widget)
+void StaticTableModel::set(int row, int column, gcn::Widget *widget)
{
if (row >= mRows || row < 0
|| column >= mColumns || column < 0)
@@ -106,14 +100,12 @@ StaticTableModel::set(int row, int column, gcn::Widget *widget)
signalAfterUpdate();
}
-gcn::Widget *
-StaticTableModel::getElementAt(int row, int column)
+gcn::Widget* StaticTableModel::getElementAt(int row, int column)
{
return mTableModel[WIDGET_AT(row, column)];
}
-void
-StaticTableModel::fixColumnWidth(int column, int width)
+void StaticTableModel::fixColumnWidth(int column, int width)
{
if (width < 0
|| column < 0 || column >= mColumns)
@@ -122,8 +114,7 @@ StaticTableModel::fixColumnWidth(int column, int width)
mWidths[column] = -width; // Negate to tag as fixed
}
-void
-StaticTableModel::fixRowHeight(int height)
+void StaticTableModel::fixRowHeight(int height)
{
if (height < 0)
return;
@@ -131,14 +122,12 @@ StaticTableModel::fixRowHeight(int height)
mHeight = -height;
}
-int
-StaticTableModel::getRowHeight(void)
+int StaticTableModel::getRowHeight(void)
{
return abs(mHeight);
}
-int
-StaticTableModel::getColumnWidth(int column)
+int StaticTableModel::getColumnWidth(int column)
{
if (column < 0 || column >= mColumns)
return 0;
@@ -146,14 +135,12 @@ StaticTableModel::getColumnWidth(int column)
return abs(mWidths[column]);
}
-int
-StaticTableModel::getRows(void)
+int StaticTableModel::getRows(void)
{
return mRows;
}
-int
-StaticTableModel::getColumns(void)
+int StaticTableModel::getColumns(void)
{
return mColumns;
}