mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
1043f9f803
* refactor: remove unnecessary includes in headers * fix: formatting * chore: changelog * fix: scrollbar * fix: suggestions and old appbase remains * fix: suggestion * fix: missing Qt forward declarations * fix: another qt include * fix: includes for precompiled-headers=off * Add missing `<memory>` includes * Add missing `#pragma once` * Fix tests Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
71 lines
1.5 KiB
C++
71 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include "widgets/BaseWindow.hpp"
|
|
|
|
#include <pajlada/signals/signal.hpp>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include <QRadioButton>
|
|
|
|
namespace chatterino {
|
|
|
|
class Notebook;
|
|
class EditableModelView;
|
|
class IndirectChannel;
|
|
class Channel;
|
|
using ChannelPtr = std::shared_ptr<Channel>;
|
|
|
|
class SelectChannelDialog final : public BaseWindow
|
|
{
|
|
public:
|
|
SelectChannelDialog(QWidget *parent = nullptr);
|
|
|
|
void setSelectedChannel(IndirectChannel selectedChannel_);
|
|
IndirectChannel getSelectedChannel() const;
|
|
bool hasSeletedChannel() const;
|
|
|
|
pajlada::Signals::NoArgSignal closed;
|
|
|
|
protected:
|
|
virtual void closeEvent(QCloseEvent *) override;
|
|
virtual void themeChangedEvent() override;
|
|
|
|
private:
|
|
class EventFilter : public QObject
|
|
{
|
|
public:
|
|
SelectChannelDialog *dialog;
|
|
|
|
protected:
|
|
virtual bool eventFilter(QObject *watched, QEvent *event) override;
|
|
};
|
|
|
|
struct {
|
|
Notebook *notebook;
|
|
struct {
|
|
QRadioButton *channel;
|
|
QLineEdit *channelName;
|
|
QRadioButton *whispers;
|
|
QRadioButton *mentions;
|
|
QRadioButton *watching;
|
|
QRadioButton *live;
|
|
} twitch;
|
|
struct {
|
|
QLineEdit *channel;
|
|
EditableModelView *servers;
|
|
} irc;
|
|
} ui_;
|
|
|
|
EventFilter tabFilter_;
|
|
|
|
ChannelPtr selectedChannel_;
|
|
bool hasSelectedChannel_ = false;
|
|
|
|
void ok();
|
|
friend class EventFilter;
|
|
|
|
void addShortcuts() override;
|
|
};
|
|
|
|
} // namespace chatterino
|