feat: add command line argument to select/add tab with a channel (#5111)

This commit is contained in:
nerix
2024-01-20 13:20:40 +01:00
committed by GitHub
parent acee654bd2
commit 7951af6104
6 changed files with 174 additions and 2 deletions
+14 -2
View File
@@ -1,5 +1,7 @@
#pragma once
#include "common/ProviderId.hpp"
#include <QJsonObject>
#include <QList>
#include <QRect>
@@ -95,12 +97,22 @@ struct WindowDescriptor {
class WindowLayout
{
public:
static WindowLayout loadFromFile(const QString &path);
// A complete window layout has a single emote popup position that is shared among all windows
QPoint emotePopupPos_;
std::vector<WindowDescriptor> windows_;
/// Selects the split containing the channel specified by @a name for the specified
/// @a provider. Currently, only Twitch is supported as the provider
/// and special channels (such as /mentions) are ignored.
///
/// Tabs with fewer splits are preferred.
/// Channels without filters are preferred.
///
/// If no split with the channel exists, a new one is added.
/// If no window exists, a new one is added.
void activateOrAddChannel(ProviderId provider, const QString &name);
static WindowLayout loadFromFile(const QString &path);
};
} // namespace chatterino