mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
6a58ce1273
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
34 lines
830 B
C++
34 lines
830 B
C++
#pragma once
|
|
|
|
#include "widgets/dialogs/switcher/AbstractSwitcherItem.hpp"
|
|
|
|
namespace chatterino {
|
|
|
|
class NewPopupItem : public AbstractSwitcherItem
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Construct a new NewPopupItem that opens a passed channel in a new
|
|
* popup.
|
|
*
|
|
* @param channelName name of channel to open
|
|
*/
|
|
NewPopupItem(const QString &channelName);
|
|
|
|
/**
|
|
* @brief Open the channel passed in the constructor in a new popup.
|
|
*/
|
|
virtual void action() override;
|
|
|
|
virtual void paint(QPainter *painter, const QRect &rect) const override;
|
|
virtual QSize sizeHint(const QRect &rect) const override;
|
|
|
|
private:
|
|
static constexpr const char *TEXT_FORMAT =
|
|
"Open channel \"%1\" in new popup";
|
|
QString channelName_;
|
|
QString text_;
|
|
};
|
|
|
|
} // namespace chatterino
|