Show webfinger if displayName is unknown for an author.
[larjonas-pumpa.git] / src / objectlistwidget.cpp
bloba12982c9ab97d60e1c3da0d3180fdb8a4d9192ca
1 /*
2 Copyright 2013-2015 Mats Sjöberg
4 This file is part of the Pumpa programme.
6 Pumpa is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Pumpa is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Pumpa. If not, see <http://www.gnu.org/licenses/>.
20 #include "objectlistwidget.h"
21 #include "pumpa_defines.h"
22 #include "activitywidget.h"
24 #include <QDebug>
26 //------------------------------------------------------------------------------
28 ObjectListWidget::ObjectListWidget(QWidget* parent) :
29 ASWidget(parent)
32 //------------------------------------------------------------------------------
34 QASAbstractObjectList* ObjectListWidget::initList(QString endpoint,
35 QObject* parent) {
36 m_asMode = QAS_OBJECTLIST;
37 return QASObjectList::initObjectList(endpoint, parent);
40 //------------------------------------------------------------------------------
42 void ObjectListWidget::update() {
43 ASWidget::update();
44 fetchOlder(200);
47 //------------------------------------------------------------------------------
49 ObjectWidgetWithSignals*
50 ObjectListWidget::createWidget(QASAbstractObject* aObj) {
51 QASObject* obj = qobject_cast<QASObject*>(aObj);
52 if (!obj) {
53 qDebug() << "ERROR ObjectListWidget::createWidget passed non-object";
54 return NULL;
57 ObjectWidget* ow = new ObjectWidget(obj, this);
58 connect(ow, SIGNAL(showContext(QASObject*)),
59 this, SIGNAL(showContext(QASObject*)));
60 return ow;
63 //------------------------------------------------------------------------------
65 QASObjectList* ObjectListWidget::objectList() const {
66 return qobject_cast<QASObjectList*>(m_list);