2019-09-08 22:27:57 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Application.hpp"
|
|
|
|
#include "common/Channel.hpp"
|
|
|
|
#include "widgets/BaseWindow.hpp"
|
|
|
|
|
|
|
|
#include <pajlada/signals/signal.hpp>
|
|
|
|
#include <QLabel>
|
2021-05-08 15:57:00 +02:00
|
|
|
#include <QLineEdit>
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <QRadioButton>
|
2021-05-08 15:57:00 +02:00
|
|
|
|
2019-09-08 22:27:57 +02:00
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class Notebook;
|
2019-09-18 13:03:16 +02:00
|
|
|
class EditableModelView;
|
2019-09-08 22:27:57 +02:00
|
|
|
|
|
|
|
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;
|
2021-05-09 16:17:04 +02:00
|
|
|
QRadioButton *live;
|
2019-09-08 22:27:57 +02:00
|
|
|
} twitch;
|
2019-09-18 13:03:16 +02:00
|
|
|
struct {
|
|
|
|
QLineEdit *channel;
|
|
|
|
EditableModelView *servers;
|
|
|
|
} irc;
|
2019-09-08 22:27:57 +02:00
|
|
|
} ui_;
|
|
|
|
|
|
|
|
EventFilter tabFilter_;
|
|
|
|
|
|
|
|
ChannelPtr selectedChannel_;
|
|
|
|
bool hasSelectedChannel_ = false;
|
|
|
|
|
|
|
|
void ok();
|
|
|
|
friend class EventFilter;
|
2021-11-21 18:46:21 +01:00
|
|
|
|
|
|
|
void addShortcuts() override;
|
2019-09-08 22:27:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|