refactor: move Notebook enums to their own file (#6220)

Co-authored-by: Mm2PL <miau@mail.kotmisia.pl>
This commit is contained in:
pajlada
2025-05-18 14:02:11 +02:00
committed by GitHub
parent 0d4a45161e
commit 062b492dab
12 changed files with 31 additions and 19 deletions
+1 -11
View File
@@ -1,6 +1,7 @@
#pragma once
#include "widgets/BaseWidget.hpp"
#include "widgets/NotebookEnums.hpp"
#include <pajlada/signals/signal.hpp>
#include <pajlada/signals/signalholder.hpp>
@@ -21,17 +22,6 @@ class NotebookTab;
class SplitContainer;
class Split;
enum NotebookTabLocation { Top = 0, Left = 1, Right = 2, Bottom = 3 };
// Controls the visibility of tabs in this notebook
enum NotebookTabVisibility : int {
// Show all tabs
AllTabs = 0,
// Only show tabs containing splits that are live
LiveOnly = 1,
};
using TabVisibilityFilter = std::function<bool(const NotebookTab *)>;
class Notebook : public BaseWidget
+16
View File
@@ -0,0 +1,16 @@
#pragma once
namespace chatterino {
enum NotebookTabLocation { Top = 0, Left = 1, Right = 2, Bottom = 3 };
// Controls the visibility of tabs in this notebook
enum NotebookTabVisibility : int {
// Show all tabs
AllTabs = 0,
// Only show tabs containing splits that are live
LiveOnly = 1,
};
} // namespace chatterino
+1
View File
@@ -20,6 +20,7 @@
#include <QGraphicsEffect>
#include <QGridLayout>
#include <QKeySequence>
#include <QMessageBox>
#include <QSizeGrip>
#ifdef Q_OS_WIN
+1 -2
View File
@@ -3,7 +3,6 @@
#include "Application.hpp"
#include "common/Channel.hpp"
#include "common/Literals.hpp"
#include "common/network/NetworkRequest.hpp"
#include "common/QLogging.hpp"
#include "controllers/accounts/AccountController.hpp"
#include "controllers/commands/CommandController.hpp"
@@ -15,7 +14,6 @@
#include "providers/IvrApi.hpp"
#include "providers/pronouns/Pronouns.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/ChannelPointReward.hpp"
#include "providers/twitch/TwitchAccount.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
@@ -34,6 +32,7 @@
#include "widgets/helper/InvisibleSizeGrip.hpp"
#include "widgets/helper/Line.hpp"
#include "widgets/Label.hpp"
#include "widgets/Notebook.hpp"
#include "widgets/Scrollbar.hpp"
#include "widgets/splits/Split.hpp"
#include "widgets/Window.hpp"
+1
View File
@@ -41,6 +41,7 @@
#include "widgets/helper/EffectLabel.hpp"
#include "widgets/helper/ScrollbarHighlight.hpp"
#include "widgets/helper/SearchPopup.hpp"
#include "widgets/Notebook.hpp"
#include "widgets/Scrollbar.hpp"
#include "widgets/splits/Split.hpp"
#include "widgets/splits/SplitInput.hpp"
@@ -10,6 +10,7 @@
#include "widgets/helper/EditableModelView.hpp"
#include <QHeaderView>
#include <QMessageBox>
#include <QTableView>
namespace chatterino {
@@ -28,6 +28,7 @@
#include <QFontDialog>
#include <QFormLayout>
#include <QLabel>
#include <QMessageBox>
#include <QScrollArea>
namespace {