summaryrefslogtreecommitdiff
path: root/src/gui/table_model.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-03 14:38:40 -0700
committerIra Rice <irarice@gmail.com>2009-02-03 14:38:40 -0700
commit8857a59c3818c1ce6eeb6c054cb5543bfc35c087 (patch)
tree792fca4acae0c9372cf145a4f0b4cb995b1c3c78 /src/gui/table_model.cpp
parent6c5d9cd16b750ae9404407171a5641b5e0ee78b5 (diff)
downloadmana-client-8857a59c3818c1ce6eeb6c054cb5543bfc35c087.tar.gz
mana-client-8857a59c3818c1ce6eeb6c054cb5543bfc35c087.tar.bz2
mana-client-8857a59c3818c1ce6eeb6c054cb5543bfc35c087.tar.xz
mana-client-8857a59c3818c1ce6eeb6c054cb5543bfc35c087.zip
Fixed up table class to allow for different background colors, as well
as defining whether the given table is opaque or not. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/table_model.cpp')
-rw-r--r--src/gui/table_model.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/gui/table_model.cpp b/src/gui/table_model.cpp
index 0b31369f..5ee7e9ab 100644
--- a/src/gui/table_model.cpp
+++ b/src/gui/table_model.cpp
@@ -54,13 +54,10 @@ void TableModel::signalAfterUpdate(void)
#define WIDGET_AT(row, column) (((row) * mColumns) + (column))
#define DYN_SIZE(h) ((h) >= 0) // determines whether this size is tagged for auto-detection
-StaticTableModel::StaticTableModel(int row, int column,
- gcn::Color backgroundColor, bool opacity) :
+StaticTableModel::StaticTableModel(int row, int column) :
mRows(row),
mColumns(column),
- mHeight(1),
- mOpaque(opacity),
- mBackgroundColor(backgroundColor)
+ mHeight(1)
{
mTableModel.resize(row * column, NULL);
mWidths.resize(column, 1);
@@ -165,24 +162,3 @@ int StaticTableModel::getHeight(void)
return (mColumns * mHeight);
}
-void StaticTableModel::drawBackground(gcn::Graphics *graphics)
-{
- if (isOpaque())
- {
- for (unsigned int i = 0; i < mTableModel.size(); i++)
- {
- mTableModel[i]->setBackgroundColor(mBackgroundColor);
- }
- }
-}
-
-void StaticTableModel::setOpaque(bool opaque)
-{
- mOpaque = opaque;
-}
-
-bool StaticTableModel::isOpaque() const
-{
- return mOpaque;
-}
-