~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/gui/widgets/tablemodel.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
class TableModel
58
58
{
59
59
public:
60
 
    TableModel() :
61
 
        listeners()
62
 
    {
63
 
    }
64
60
    virtual ~TableModel()
65
61
    { }
66
62
 
95
91
    virtual void removeListener(TableModelListener *const listener);
96
92
 
97
93
protected:
 
94
    TableModel() :
 
95
        listeners()
 
96
    {
 
97
    }
 
98
 
98
99
    /**
99
100
     * Tells all listeners that the table is about to see an update
100
101
     */
117
118
 
118
119
    A_DELETE_COPY(StaticTableModel)
119
120
 
120
 
    virtual ~StaticTableModel();
 
121
    ~StaticTableModel();
121
122
 
122
123
    /**
123
124
     * Inserts a widget into the table model.
124
125
     * The model is resized to accomodate the widget's width and height,
125
126
     * unless column width / row height have been fixed.
126
127
     */
127
 
    virtual void set(const int row, const int column,
128
 
                     gcn::Widget *const widget);
 
128
    void set(const int row, const int column, gcn::Widget *const widget);
129
129
 
130
130
    /**
131
131
     * Fixes the column width for a given column; this overrides dynamic width
133
133
     *
134
134
     * Semantics are undefined for width 0.
135
135
     */
136
 
    virtual void fixColumnWidth(const int column, const int width);
 
136
    void fixColumnWidth(const int column, const int width);
137
137
 
138
138
    /**
139
139
     * Fixes the row height; this overrides dynamic height inference.
140
140
     *
141
141
     * Semantics are undefined for width 0.
142
142
     */
143
 
    virtual void fixRowHeight(const int height);
 
143
    void fixRowHeight(const int height);
144
144
 
145
145
    /**
146
146
     * Resizes the table model
147
147
     */
148
 
    virtual void resize();
 
148
    void resize();
149
149
 
150
 
    virtual int getRows() const override A_WARN_UNUSED;
151
 
    virtual int getColumns() const override A_WARN_UNUSED;
152
 
    virtual int getRowHeight() const override A_WARN_UNUSED;
153
 
    virtual int getWidth() const A_WARN_UNUSED;
154
 
    virtual int getHeight() const A_WARN_UNUSED;
155
 
    virtual int getColumnWidth(const int index) const override A_WARN_UNUSED;
156
 
    virtual gcn::Widget *getElementAt(const int row, const int column)
157
 
                                      const override A_WARN_UNUSED;
 
150
    int getRows() const override A_WARN_UNUSED;
 
151
    int getColumns() const override A_WARN_UNUSED;
 
152
    int getRowHeight() const override A_WARN_UNUSED;
 
153
    int getWidth() const A_WARN_UNUSED;
 
154
    int getHeight() const A_WARN_UNUSED;
 
155
    int getColumnWidth(const int index) const override A_WARN_UNUSED;
 
156
    gcn::Widget *getElementAt(const int row, const int column)
 
157
                              const override A_WARN_UNUSED;
158
158
 
159
159
protected:
160
160
    int mRows, mColumns;