mirror-chatterino2/src/widgets/selectchanneldialog.hpp

62 lines
1.3 KiB
C++
Raw Normal View History

2018-04-18 09:12:29 +02:00
#pragma once
#include "channel.hpp"
#include "widgets/basewindow.hpp"
#include "widgets/notebook.hpp"
#include <pajlada/signals/signal.hpp>
#include <QLabel>
#include <QRadioButton>
namespace chatterino {
namespace widgets {
class SelectChannelDialog : public BaseWindow
{
public:
SelectChannelDialog();
void setSelectedChannel(ChannelPtr selectedChannel);
ChannelPtr getSelectedChannel() const;
bool hasSeletedChannel() const;
pajlada::Signals::NoArgSignal closed;
protected:
virtual void closeEvent(QCloseEvent *) override;
2018-04-18 09:33:05 +02:00
virtual void themeRefreshEvent() override;
2018-04-18 09:12:29 +02:00
private:
class EventFilter : public QObject
{
public:
SelectChannelDialog *dialog;
protected:
virtual bool eventFilter(QObject *watched, QEvent *event) override;
};
struct {
Notebook2 *notebook;
struct {
QRadioButton *channel;
QLineEdit *channelName;
QRadioButton *whispers;
QRadioButton *mentions;
QRadioButton *watching;
} twitch;
} ui;
EventFilter tabFilter;
ChannelPtr selectedChannel;
bool _hasSelectedChannel = false;
void ok();
friend class EventFilter;
};
} // namespace widgets
} // namespace chatterino