diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-08 23:33:49 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-08 23:33:49 +0000 |
commit | baf6ad1f48ef08187f50247115c09a3612ebeec3 (patch) | |
tree | c3c81f530c09b027f9880c8434df82a033a33323 /src/client/inventorylistview.h | |
parent | 106d0cb0cf884dd7a2920564852c001e13af1568 (diff) |
added sorting of listview items
Diffstat (limited to 'src/client/inventorylistview.h')
-rw-r--r-- | src/client/inventorylistview.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/inventorylistview.h b/src/client/inventorylistview.h index 1688560..b937e0e 100644 --- a/src/client/inventorylistview.h +++ b/src/client/inventorylistview.h @@ -13,7 +13,10 @@ namespace client { - + +/** + * @brief a listview displaying the items in an inventory belonging to a specified infotype + */ class InventoryListView : public ui::ListView { public: InventoryListView(ui::Widget *parent = 0); @@ -21,6 +24,15 @@ public: void set_inventory(core::Inventory *inventory, core::InfoType *infotype); + /** + * @brief enable or disable the listing of empty items + * Items are empty if their amount is 0 + */ + inline void set_showempty(const bool showempty) + { + listview_showempty = showempty; + } + inline const core::Inventory *inventory() const { return listview_inventory; } @@ -34,6 +46,7 @@ private: unsigned long listview_timestamp; unsigned long listview_infotimestamp; + bool listview_showempty; core::Inventory *listview_inventory; core::InfoType *listview_infotype; }; |