Show webfinger if displayName is unknown for an author.
[larjonas-pumpa.git] / src / shortobjectwidget.h
blobbbca27836a25fbc19768a818c8af8d4cdd500abf
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 #ifndef _SHORTOBJECTWIDGET_H_
21 #define _SHORTOBJECTWIDGET_H_
23 #include <QFrame>
24 #include <QWidget>
26 #include "qactivitystreams.h"
27 #include "texttoolbutton.h"
28 #include "richtextlabel.h"
29 #include "actorwidget.h"
31 //------------------------------------------------------------------------------
33 class ShortObjectWidget : public QFrame {
34 Q_OBJECT
36 public:
37 ShortObjectWidget(QASObject* obj, QWidget* parent = 0);
38 virtual ~ShortObjectWidget();
40 virtual void changeObject(QASAbstractObject* obj);
42 QASObject* object() const { return m_object; }
44 virtual void refreshTimeLabels() {};
46 void updateMenu() {
47 if (m_actorWidget)
48 m_actorWidget->updateMenu();
51 signals:
52 void follow(QString, bool);
53 void moreClicked();
55 private slots:
56 void onChanged();
58 private:
59 void updateText();
61 TextToolButton* m_moreButton;
62 RichTextLabel* m_textLabel;
63 ActorWidget* m_actorWidget;
64 QASObject* m_object;
65 QASActor* m_actor;
68 #endif /* _SHORTOBJECTWIDGET_H_ */