diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
commit | 10a9dbacd9334caede10f1b21d42cdf7e1efcd03 (patch) | |
tree | def2baead68de5a9ccc842e25b3cdcfe9a638c9b /src/gui/table_model.cpp | |
parent | e7f4e78f76972ca3882b9d2763ae9cab31675d3a (diff) | |
download | mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.gz mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.bz2 mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.xz mana-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.zip |
Style cleanups throughout most of the code. Splitting function type from
the function names should no longer be around.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/table_model.cpp')
-rw-r--r-- | src/gui/table_model.cpp | 39 |
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; } |