feather/src/widgets/RedditWidget.h

44 lines
854 B
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
2021-06-27 12:51:15 +00:00
#ifndef FEATHER_REDDITWIDGET_H
#define FEATHER_REDDITWIDGET_H
2021-06-27 15:00:09 +00:00
#include <QItemSelection>
#include <QMenu>
#include <QWidget>
#include "model/RedditModel.h"
namespace Ui {
class RedditWidget;
}
class RedditWidget : public QWidget
{
Q_OBJECT
public:
explicit RedditWidget(QWidget *parent = nullptr);
~RedditWidget();
RedditModel* model();
public slots:
void linkClicked();
2020-12-31 00:00:37 +00:00
signals:
void setStatusText(const QString &msg, bool override, int timeout);
private:
void setupTable();
void showContextMenu(const QPoint &pos);
2020-12-31 00:00:37 +00:00
void copyUrl();
QString getLink(const QString &permaLink);
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::RedditWidget> ui;
RedditModel* const m_model;
QMenu *m_contextMenu;
};
2021-06-27 12:51:15 +00:00
#endif // FEATHER_REDDITWIDGET_H