2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Jussi Laitinen - jussi.laitinen@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 #ifndef EXTENDEDLISTITEMSTUB_H
23 #define EXTENDEDLISTITEMSTUB_H
25 #include "../../src/ui/personlistitem.h"
27 #include "../../src/coordinates/geocoordinate.h"
30 class ExtendedListItemStub : public StubBase
33 virtual void ExtendedListItemConstructor(QListWidget *parent, int type);
34 virtual void addSubItem(const QString &text, const QPixmap &icon = QPixmap());
35 virtual void clearSubItems();
36 virtual void setSelected(bool selected);
37 virtual void setSubitemTextWidth(int width);
38 virtual bool toggleSelection();
42 void ExtendedListItemStub::ExtendedListItemConstructor(QListWidget *parent, int type)
48 void ExtendedListItemStub::addSubItem(const QString &text, const QPixmap &icon)
50 QList<ParameterBase *> params;
51 params.append(new Parameter<const QString &>(text));
52 params.append(new Parameter<const QPixmap &>(icon));
53 stubMethodEntered("addSubItem", params);
56 void ExtendedListItemStub::clearSubItems()
58 stubMethodEntered("clearSubItems");
61 void ExtendedListItemStub::setSelected(bool selected)
63 QList<ParameterBase *> params;
64 params.append(new Parameter<bool>(selected));
65 stubMethodEntered("setSelected", params);
68 void ExtendedListItemStub::setSubitemTextWidth(int width)
70 QList<ParameterBase *> params;
71 params.append(new Parameter<int>(width));
72 stubMethodEntered("setSubitemTextWidth", params);
75 QString ExtendedListItemStub::toggleSelection()
77 stubMethodEntered("toggleSelection");
80 //Create a stub instance
81 ExtendedListItemStub defaultExtendedListItemStub;
82 ExtendedListItemStub *extendedListItemStub = &defaultExtendedListItemStub;
84 ExtendedListItem::ExtendedListItem(QListWidget *parent, int type)
85 : ListItem(parent, type)
87 extendedListItemStub->ExtendedListItemConstructor(parent, type);
90 void ExtendedListItemStub::addSubItem(const QString &text, const QPixmap &icon)
92 extendedListItemStub->addSubItem(text, icon);
95 void ExtendedListItemStub::clearSubItems()
97 extendedListItemStub->clearSubItems();
100 void ExtendedListItemStub::setSelected(bool selected)
102 extendedListItemStub->setSelected(selected);
105 void ExtendedListItemStub::setSubitemTextWidth(int width)
107 extendedListItemStub->setSubitemTextWidth(width);
110 void ExtendedListItemStub::toggleSelection()
112 extendedListItemStub->toggleSelection();
115 #endif // EXTENDEDLISTITEMSTUB_H