yolobs-studio/UI/window-basic-main.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1053 lines
29 KiB
C++
Raw Normal View History

2016-02-23 23:16:51 +00:00
/******************************************************************************
Copyright (C) 2013-2014 by Hugh Bailey <obs.jim@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#pragma once
#include <QBuffer>
#include <QAction>
2019-07-27 12:47:10 +00:00
#include <QWidgetAction>
2016-10-10 19:01:40 +00:00
#include <QSystemTrayIcon>
2019-07-27 12:47:10 +00:00
#include <QStyledItemDelegate>
2016-02-23 23:16:51 +00:00
#include <obs.hpp>
#include <vector>
#include <memory>
#include "window-main.hpp"
#include "window-basic-interaction.hpp"
#include "window-basic-properties.hpp"
#include "window-basic-transform.hpp"
#include "window-basic-adv-audio.hpp"
#include "window-basic-filters.hpp"
2018-12-16 16:14:58 +00:00
#include "window-projector.hpp"
2019-07-27 12:47:10 +00:00
#include "window-basic-about.hpp"
#include "auth-base.hpp"
2020-10-01 20:15:25 +00:00
#include "log-viewer.hpp"
2016-02-23 23:16:51 +00:00
2016-10-10 19:01:40 +00:00
#include <obs-frontend-internal.hpp>
2016-02-23 23:16:51 +00:00
#include <util/platform.h>
#include <util/threading.h>
#include <util/util.hpp>
#include <QPointer>
2017-04-19 19:54:15 +00:00
class QMessageBox;
2016-02-23 23:16:51 +00:00
class QListWidgetItem;
class VolControl;
2017-06-29 19:01:10 +00:00
class OBSBasicStats;
2016-02-23 23:16:51 +00:00
#include "ui_OBSBasic.h"
2018-12-16 16:14:58 +00:00
#include "ui_ColorSelect.h"
2016-02-23 23:16:51 +00:00
#define DESKTOP_AUDIO_1 Str("DesktopAudioDevice1")
#define DESKTOP_AUDIO_2 Str("DesktopAudioDevice2")
2019-09-22 21:19:10 +00:00
#define AUX_AUDIO_1 Str("AuxAudioDevice1")
#define AUX_AUDIO_2 Str("AuxAudioDevice2")
#define AUX_AUDIO_3 Str("AuxAudioDevice3")
#define AUX_AUDIO_4 Str("AuxAudioDevice4")
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
#define SIMPLE_ENCODER_X264 "x264"
#define SIMPLE_ENCODER_X264_LOWCPU "x264_lowcpu"
#define SIMPLE_ENCODER_QSV "qsv"
#define SIMPLE_ENCODER_NVENC "nvenc"
#define SIMPLE_ENCODER_AMD "amd"
2016-02-23 23:16:51 +00:00
#define PREVIEW_EDGE_SIZE 10
struct BasicOutputHandler;
enum class QtDataRole {
OBSRef = Qt::UserRole,
OBSSignals,
};
2018-12-16 16:14:58 +00:00
struct SavedProjectorInfo {
ProjectorType type;
int monitor;
std::string geometry;
std::string name;
2020-10-01 20:15:25 +00:00
bool alwaysOnTop;
bool alwaysOnTopOverridden;
2018-02-19 19:54:37 +00:00
};
2016-02-23 23:16:51 +00:00
struct QuickTransition {
QPushButton *button = nullptr;
OBSSource source;
2018-12-16 16:14:58 +00:00
obs_hotkey_id hotkey = OBS_INVALID_HOTKEY_ID;
2016-02-23 23:16:51 +00:00
int duration = 0;
int id = 0;
2020-03-25 08:07:22 +00:00
bool fadeToBlack = false;
2016-02-23 23:16:51 +00:00
inline QuickTransition() {}
2020-03-25 08:07:22 +00:00
inline QuickTransition(OBSSource source_, int duration_, int id_,
bool fadeToBlack_ = false)
2019-09-22 21:19:10 +00:00
: source(source_),
duration(duration_),
id(id_),
2020-03-25 08:07:22 +00:00
fadeToBlack(fadeToBlack_),
2019-09-22 21:19:10 +00:00
renamedSignal(std::make_shared<OBSSignal>(
obs_source_get_signal_handler(source), "rename",
SourceRenamed, this))
{
}
2018-12-16 16:14:58 +00:00
private:
static void SourceRenamed(void *param, calldata_t *data);
std::shared_ptr<OBSSignal> renamedSignal;
2016-02-23 23:16:51 +00:00
};
2019-07-27 12:47:10 +00:00
class ColorSelect : public QWidget {
public:
explicit ColorSelect(QWidget *parent = 0);
private:
std::unique_ptr<Ui::ColorSelect> ui;
};
2016-02-23 23:16:51 +00:00
class OBSBasic : public OBSMainWindow {
Q_OBJECT
2020-03-25 08:07:22 +00:00
Q_PROPERTY(QIcon imageIcon READ GetImageIcon WRITE SetImageIcon
DESIGNABLE true)
Q_PROPERTY(QIcon colorIcon READ GetColorIcon WRITE SetColorIcon
DESIGNABLE true)
Q_PROPERTY(QIcon slideshowIcon READ GetSlideshowIcon WRITE
SetSlideshowIcon DESIGNABLE true)
Q_PROPERTY(QIcon audioInputIcon READ GetAudioInputIcon WRITE
SetAudioInputIcon DESIGNABLE true)
Q_PROPERTY(QIcon audioOutputIcon READ GetAudioOutputIcon WRITE
SetAudioOutputIcon DESIGNABLE true)
Q_PROPERTY(QIcon desktopCapIcon READ GetDesktopCapIcon WRITE
SetDesktopCapIcon DESIGNABLE true)
Q_PROPERTY(QIcon windowCapIcon READ GetWindowCapIcon WRITE
SetWindowCapIcon DESIGNABLE true)
Q_PROPERTY(QIcon gameCapIcon READ GetGameCapIcon WRITE SetGameCapIcon
DESIGNABLE true)
Q_PROPERTY(QIcon cameraIcon READ GetCameraIcon WRITE SetCameraIcon
DESIGNABLE true)
Q_PROPERTY(QIcon textIcon READ GetTextIcon WRITE SetTextIcon
DESIGNABLE true)
Q_PROPERTY(QIcon mediaIcon READ GetMediaIcon WRITE SetMediaIcon
DESIGNABLE true)
Q_PROPERTY(QIcon browserIcon READ GetBrowserIcon WRITE SetBrowserIcon
DESIGNABLE true)
Q_PROPERTY(QIcon groupIcon READ GetGroupIcon WRITE SetGroupIcon
DESIGNABLE true)
Q_PROPERTY(QIcon sceneIcon READ GetSceneIcon WRITE SetSceneIcon
DESIGNABLE true)
Q_PROPERTY(QIcon defaultIcon READ GetDefaultIcon WRITE SetDefaultIcon
DESIGNABLE true)
2016-02-23 23:16:51 +00:00
2019-07-27 12:47:10 +00:00
friend class OBSAbout;
2016-02-23 23:16:51 +00:00
friend class OBSBasicPreview;
friend class OBSBasicStatusBar;
2016-08-28 12:07:43 +00:00
friend class OBSBasicSourceSelect;
2017-04-19 19:54:15 +00:00
friend class OBSBasicSettings;
2019-07-27 12:47:10 +00:00
friend class Auth;
friend class AutoConfig;
friend class AutoConfigStreamPage;
2019-09-22 21:19:10 +00:00
friend class RecordButton;
2020-03-25 08:07:22 +00:00
friend class ReplayBufferButton;
2019-09-22 21:19:10 +00:00
friend class ExtraBrowsersModel;
friend class ExtraBrowsersDelegate;
2020-10-01 20:15:25 +00:00
friend class DeviceCaptureToolbar;
friend class DeviceToolbarPropertiesThread;
friend struct BasicOutputHandler;
2016-10-10 19:01:40 +00:00
friend struct OBSStudioAPI;
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
enum class MoveDir { Up, Down, Left, Right };
2016-02-23 23:16:51 +00:00
2017-04-19 19:54:15 +00:00
enum DropType {
DropType_RawText,
DropType_Text,
DropType_Image,
2018-02-19 19:54:37 +00:00
DropType_Media,
2019-09-22 21:19:10 +00:00
DropType_Html,
2020-03-25 08:07:22 +00:00
DropType_Url,
2017-04-19 19:54:15 +00:00
};
2016-02-23 23:16:51 +00:00
private:
2016-10-10 19:01:40 +00:00
obs_frontend_callbacks *api = nullptr;
2019-07-27 12:47:10 +00:00
std::shared_ptr<Auth> auth;
2019-09-22 21:19:10 +00:00
std::vector<VolControl *> volumes;
2016-02-23 23:16:51 +00:00
std::vector<OBSSignal> signalHandlers;
2019-07-27 12:47:10 +00:00
QList<QPointer<QDockWidget>> extraDocks;
2016-02-23 23:16:51 +00:00
bool loaded = false;
long disableSaving = 1;
bool projectChanged = false;
bool previewEnabled = true;
2020-03-25 08:07:22 +00:00
std::list<const char *> copyStrings;
2019-07-27 12:47:10 +00:00
const char *copyFiltersString = nullptr;
2017-06-29 19:01:10 +00:00
bool copyVisible = true;
2020-03-25 08:07:22 +00:00
bool closing = false;
2020-10-01 20:15:25 +00:00
QScopedPointer<QThread> devicePropertiesThread;
2020-03-25 08:07:22 +00:00
QScopedPointer<QThread> whatsNewInitThread;
2018-12-16 16:14:58 +00:00
QScopedPointer<QThread> updateCheckThread;
QScopedPointer<QThread> introCheckThread;
QScopedPointer<QThread> logUploadThread;
2016-02-23 23:16:51 +00:00
QPointer<OBSBasicInteraction> interaction;
QPointer<OBSBasicProperties> properties;
QPointer<OBSBasicTransform> transformWindow;
QPointer<OBSBasicAdvAudio> advAudioWindow;
QPointer<OBSBasicFilters> filters;
2019-07-27 12:47:10 +00:00
QPointer<QDockWidget> statsDock;
QPointer<OBSAbout> about;
2016-02-23 23:16:51 +00:00
2020-10-01 20:15:25 +00:00
OBSLogViewer *logView = nullptr;
2019-09-22 21:19:10 +00:00
QPointer<QTimer> cpuUsageTimer;
QPointer<QTimer> diskFullTimer;
2016-02-23 23:16:51 +00:00
os_cpu_usage_info_t *cpuUsageInfo = nullptr;
OBSService service;
std::unique_ptr<BasicOutputHandler> outputHandler;
2016-10-10 19:01:40 +00:00
bool streamingStopping = false;
bool recordingStopping = false;
2017-04-19 19:54:15 +00:00
bool replayBufferStopping = false;
2016-02-23 23:16:51 +00:00
gs_vertbuffer_t *box = nullptr;
2016-05-24 19:53:01 +00:00
gs_vertbuffer_t *boxLeft = nullptr;
gs_vertbuffer_t *boxTop = nullptr;
gs_vertbuffer_t *boxRight = nullptr;
gs_vertbuffer_t *boxBottom = nullptr;
2016-02-23 23:16:51 +00:00
gs_vertbuffer_t *circle = nullptr;
2019-09-22 21:19:10 +00:00
bool sceneChanging = false;
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
int previewX = 0, previewY = 0;
int previewCX = 0, previewCY = 0;
float previewScale = 0.0f;
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
ConfigFile basicConfig;
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
std::vector<SavedProjectorInfo *> savedProjectorsArray;
2020-03-25 08:07:22 +00:00
std::vector<OBSProjector *> projectors;
2017-06-29 19:01:10 +00:00
QPointer<QWidget> stats;
2018-12-16 16:14:58 +00:00
QPointer<QWidget> remux;
2019-09-22 21:19:10 +00:00
QPointer<QWidget> extraBrowsers;
2020-03-25 08:07:22 +00:00
QPointer<QWidget> importer;
2016-02-23 23:16:51 +00:00
QPointer<QMenu> startStreamMenu;
2019-07-27 12:47:10 +00:00
QPointer<QPushButton> transitionButton;
2017-04-19 19:54:15 +00:00
QPointer<QPushButton> replayBufferButton;
2020-03-25 08:07:22 +00:00
QPointer<QHBoxLayout> replayLayout;
2019-09-22 21:19:10 +00:00
QScopedPointer<QPushButton> pause;
2020-03-25 08:07:22 +00:00
QScopedPointer<QPushButton> replay;
2017-04-19 19:54:15 +00:00
2020-10-01 20:15:25 +00:00
QPointer<QPushButton> vcamButton;
bool vcamEnabled = false;
2018-12-16 16:14:58 +00:00
QScopedPointer<QSystemTrayIcon> trayIcon;
2019-09-22 21:19:10 +00:00
QPointer<QAction> sysTrayStream;
QPointer<QAction> sysTrayRecord;
QPointer<QAction> sysTrayReplayBuffer;
QPointer<QAction> showHide;
QPointer<QAction> exit;
QPointer<QMenu> trayMenu;
QPointer<QMenu> previewProjector;
QPointer<QMenu> studioProgramProjector;
QPointer<QMenu> multiviewProjectorMenu;
QPointer<QMenu> previewProjectorSource;
QPointer<QMenu> previewProjectorMain;
QPointer<QMenu> sceneProjectorMenu;
QPointer<QMenu> sourceProjector;
QPointer<QMenu> scaleFilteringMenu;
QPointer<QMenu> colorMenu;
QPointer<QWidgetAction> colorWidgetAction;
QPointer<ColorSelect> colorSelect;
QPointer<QMenu> deinterlaceMenu;
QPointer<QMenu> perSceneTransitionMenu;
QPointer<QObject> shortcutFilter;
2020-10-01 20:15:25 +00:00
QPointer<QAction> renameScene;
QPointer<QAction> renameSource;
2019-07-27 12:47:10 +00:00
QPointer<QWidget> programWidget;
QPointer<QVBoxLayout> programLayout;
QPointer<QLabel> programLabel;
QScopedPointer<QThread> patronJsonThread;
std::string patronJson;
2016-10-10 19:01:40 +00:00
2019-09-22 21:19:10 +00:00
void UpdateMultiviewProjectorMenu();
2018-05-29 19:13:02 +00:00
2019-09-22 21:19:10 +00:00
void DrawBackdrop(float cx, float cy);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void SetupEncoders();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void CreateFirstRunSources();
void CreateDefaultScene(bool firstStart);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void UpdateVolumeControlsDecayRate();
void UpdateVolumeControlsPeakMeterType();
void ClearVolumeControls();
2016-02-23 23:16:51 +00:00
2020-10-01 20:15:25 +00:00
void UploadLog(const char *subdir, const char *file, const bool crash);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void Save(const char *file);
void Load(const char *file);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void InitHotkeys();
void CreateHotkeys();
void ClearHotkeys();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
bool InitService();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
bool InitBasicConfigDefaults();
void InitBasicConfigDefaults2();
bool InitBasicConfig();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void InitOBSCallbacks();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void InitPrimitives();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void OnFirstLoad();
2018-12-16 16:14:58 +00:00
2019-09-22 21:19:10 +00:00
OBSSceneItem GetSceneItem(QListWidgetItem *item);
OBSSceneItem GetCurrentSceneItem();
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
bool QueryRemoveSource(obs_source_t *source);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void TimedCheckForUpdates();
void CheckForUpdates(bool manualUpdate);
2016-02-23 23:16:51 +00:00
void GetFPSCommon(uint32_t &num, uint32_t &den) const;
void GetFPSInteger(uint32_t &num, uint32_t &den) const;
void GetFPSFraction(uint32_t &num, uint32_t &den) const;
void GetFPSNanoseconds(uint32_t &num, uint32_t &den) const;
void GetConfigFPS(uint32_t &num, uint32_t &den) const;
2017-04-19 19:54:15 +00:00
void UpdatePreviewScalingMenu();
2016-02-23 23:16:51 +00:00
void LoadSceneListOrder(obs_data_array_t *array);
obs_data_array_t *SaveSceneListOrder();
void ChangeSceneIndex(bool relative, int idx, int invalidIdx);
void TempFileOutput(const char *path, int vBitrate, int aBitrate);
2019-09-22 21:19:10 +00:00
void TempStreamOutput(const char *url, const char *key, int vBitrate,
int aBitrate);
2016-02-23 23:16:51 +00:00
void CloseDialogs();
void ClearSceneData();
2020-10-01 20:15:25 +00:00
void ClearProjectors();
2016-02-23 23:16:51 +00:00
void Nudge(int dist, MoveDir dir);
2018-12-16 16:14:58 +00:00
OBSProjector *OpenProjector(obs_source_t *source, int monitor,
2020-03-25 08:07:22 +00:00
ProjectorType type);
2016-02-23 23:16:51 +00:00
void GetAudioSourceFilters();
void GetAudioSourceProperties();
void VolControlContextMenu();
2018-12-16 16:14:58 +00:00
void ToggleVolControlLayout();
void ToggleMixerLayout(bool vertical);
2016-02-23 23:16:51 +00:00
void RefreshSceneCollections();
void ChangeSceneCollection();
2016-08-28 12:07:43 +00:00
void LogScenes();
2016-02-23 23:16:51 +00:00
void LoadProfile();
void ResetProfileData();
bool AddProfile(bool create_new, const char *title, const char *text,
2019-07-27 12:47:10 +00:00
const char *init_text = nullptr, bool rename = false);
2016-02-23 23:16:51 +00:00
void DeleteProfile(const char *profile_name, const char *profile_dir);
void RefreshProfiles();
void ChangeProfile();
2018-02-19 19:54:37 +00:00
void CheckForSimpleModeX264Fallback();
2016-02-23 23:16:51 +00:00
void SaveProjectNow();
2018-12-16 16:14:58 +00:00
int GetTopSelectedSourceItem();
2016-02-23 23:16:51 +00:00
2020-03-25 08:07:22 +00:00
QModelIndexList GetAllSelectedSourceItems();
2019-09-22 21:19:10 +00:00
obs_hotkey_pair_id streamingHotkeys, recordingHotkeys, pauseHotkeys,
2020-10-01 20:15:25 +00:00
replayBufHotkeys, vcamHotkeys, togglePreviewHotkeys,
contextBarHotkeys;
2016-02-23 23:16:51 +00:00
obs_hotkey_id forceStreamingStopHotkey;
void InitDefaultTransitions();
void InitTransition(obs_source_t *transition);
obs_source_t *FindTransition(const char *name);
OBSSource GetCurrentTransition();
2016-05-24 19:53:01 +00:00
obs_data_array_t *SaveTransitions();
void LoadTransitions(obs_data_array_t *transitions);
2016-02-23 23:16:51 +00:00
obs_source_t *fadeTransition;
2020-10-01 20:15:25 +00:00
obs_source_t *cutTransition;
2016-02-23 23:16:51 +00:00
void CreateProgramDisplay();
void CreateProgramOptions();
2020-10-12 20:28:36 +00:00
int TransitionCount();
int AddTransitionBeforeSeparator(const QString &name,
obs_source_t *source);
2016-02-23 23:16:51 +00:00
void AddQuickTransitionId(int id);
void AddQuickTransition();
void AddQuickTransitionHotkey(QuickTransition *qt);
void RemoveQuickTransitionHotkey(QuickTransition *qt);
void LoadQuickTransitions(obs_data_array_t *array);
obs_data_array_t *SaveQuickTransitions();
2017-06-29 19:01:10 +00:00
void ClearQuickTransitionWidgets();
2016-02-23 23:16:51 +00:00
void RefreshQuickTransitions();
2019-07-27 12:47:10 +00:00
void DisableQuickTransitionWidgets();
2020-03-25 08:07:22 +00:00
void EnableTransitionWidgets(bool enable);
2016-02-23 23:16:51 +00:00
void CreateDefaultQuickTransitions();
2018-02-19 19:54:37 +00:00
QMenu *CreatePerSceneTransitionMenu();
2016-02-23 23:16:51 +00:00
QuickTransition *GetQuickTransition(int id);
int GetQuickTransitionIdx(int id);
QMenu *CreateTransitionMenu(QWidget *parent, QuickTransition *qt);
void ClearQuickTransitions();
void QuickTransitionClicked();
void QuickTransitionChange();
void QuickTransitionChangeDuration(int value);
void QuickTransitionRemoveClicked();
void SetPreviewProgramMode(bool enabled);
void ResizeProgram(uint32_t cx, uint32_t cy);
2020-03-25 08:07:22 +00:00
void SetCurrentScene(obs_scene_t *scene, bool force = false);
2016-02-23 23:16:51 +00:00
static void RenderProgram(void *data, uint32_t cx, uint32_t cy);
std::vector<QuickTransition> quickTransitions;
QPointer<QWidget> programOptions;
QPointer<OBSQTDisplay> program;
OBSWeakSource lastScene;
OBSWeakSource swapScene;
OBSWeakSource programScene;
bool editPropertiesMode = false;
bool sceneDuplicationMode = true;
bool swapScenesMode = true;
volatile bool previewProgramMode = false;
obs_hotkey_id togglePreviewProgramHotkey = 0;
obs_hotkey_id transitionHotkey = 0;
2020-03-25 08:07:22 +00:00
obs_hotkey_id statsHotkey = 0;
2020-10-01 20:15:25 +00:00
obs_hotkey_id screenshotHotkey = 0;
obs_hotkey_id sourceScreenshotHotkey = 0;
2016-02-23 23:16:51 +00:00
int quickTransitionIdCounter = 1;
2018-02-19 19:54:37 +00:00
bool overridingTransition = false;
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
int programX = 0, programY = 0;
int programCX = 0, programCY = 0;
2016-02-23 23:16:51 +00:00
float programScale = 0.0f;
2017-06-29 19:01:10 +00:00
int disableOutputsRef = 0;
2016-10-10 19:01:40 +00:00
inline void OnActivate();
inline void OnDeactivate();
2017-04-19 19:54:15 +00:00
void AddDropSource(const char *file, DropType image);
2020-03-25 08:07:22 +00:00
void AddDropURL(const char *url, QString &name, obs_data_t *settings,
const obs_video_info &ovi);
void ConfirmDropUrl(const QString &url);
2016-10-10 19:01:40 +00:00
void dragEnterEvent(QDragEnterEvent *event) override;
void dragLeaveEvent(QDragLeaveEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void dropEvent(QDropEvent *event) override;
2017-04-19 19:54:15 +00:00
void ReplayBufferClicked();
bool sysTrayMinimizeToTray();
void EnumDialogs();
2019-09-22 21:19:10 +00:00
QList<QDialog *> visDialogs;
QList<QDialog *> modalDialogs;
QList<QMessageBox *> visMsgBoxes;
2017-04-19 19:54:15 +00:00
QList<QPoint> visDlgPositions;
2018-02-19 19:54:37 +00:00
QByteArray startingDockLayout;
2017-04-19 19:54:15 +00:00
obs_data_array_t *SaveProjectors();
void LoadSavedProjectors(obs_data_array_t *savedProjectors);
2018-12-16 16:14:58 +00:00
void ReceivedIntroJson(const QString &text);
2020-03-25 08:07:22 +00:00
void ShowWhatsNew(const QString &url);
2018-02-19 19:54:37 +00:00
2019-09-22 21:19:10 +00:00
#ifdef BROWSER_AVAILABLE
QList<QSharedPointer<QDockWidget>> extraBrowserDocks;
QList<QSharedPointer<QAction>> extraBrowserDockActions;
QStringList extraBrowserDockTargets;
void ClearExtraBrowserDocks();
void LoadExtraBrowserDocks();
void SaveExtraBrowserDocks();
void ManageExtraBrowserDocks();
void AddExtraBrowserDock(const QString &title, const QString &url,
bool firstCreate);
#endif
2020-03-25 08:07:22 +00:00
QIcon imageIcon;
QIcon colorIcon;
QIcon slideshowIcon;
QIcon audioInputIcon;
QIcon audioOutputIcon;
QIcon desktopCapIcon;
QIcon windowCapIcon;
QIcon gameCapIcon;
QIcon cameraIcon;
QIcon textIcon;
QIcon mediaIcon;
QIcon browserIcon;
QIcon groupIcon;
QIcon sceneIcon;
QIcon defaultIcon;
QIcon GetImageIcon() const;
QIcon GetColorIcon() const;
QIcon GetSlideshowIcon() const;
QIcon GetAudioInputIcon() const;
QIcon GetAudioOutputIcon() const;
QIcon GetDesktopCapIcon() const;
QIcon GetWindowCapIcon() const;
QIcon GetGameCapIcon() const;
QIcon GetCameraIcon() const;
QIcon GetTextIcon() const;
QIcon GetMediaIcon() const;
QIcon GetBrowserIcon() const;
QIcon GetDefaultIcon() const;
QSlider *tBar;
bool tBarActive = false;
OBSSource GetOverrideTransition(OBSSource source);
int GetOverrideTransitionDuration(OBSSource source);
2020-10-01 20:15:25 +00:00
void UpdateProjectorHideCursor();
void UpdateProjectorAlwaysOnTop(bool top);
void ResetProjectors();
QPointer<QObject> screenshotData;
2016-02-23 23:16:51 +00:00
public slots:
2018-12-16 16:14:58 +00:00
void DeferSaveBegin();
void DeferSaveEnd();
2020-10-01 20:15:25 +00:00
void DisplayStreamStartError();
2016-02-23 23:16:51 +00:00
void StartStreaming();
void StopStreaming();
void ForceStopStreaming();
void StreamDelayStarting(int sec);
void StreamDelayStopping(int sec);
void StreamingStart();
2016-08-28 12:07:43 +00:00
void StreamStopping();
2017-06-29 19:01:10 +00:00
void StreamingStop(int errorcode, QString last_error);
2016-02-23 23:16:51 +00:00
void StartRecording();
void StopRecording();
void RecordingStart();
2016-08-28 12:07:43 +00:00
void RecordStopping();
2019-07-27 12:47:10 +00:00
void RecordingStop(int code, QString last_error);
2016-02-23 23:16:51 +00:00
2019-09-22 21:19:10 +00:00
void ShowReplayBufferPauseWarning();
2017-04-19 19:54:15 +00:00
void StartReplayBuffer();
void StopReplayBuffer();
void ReplayBufferStart();
2018-02-19 19:54:37 +00:00
void ReplayBufferSave();
2017-04-19 19:54:15 +00:00
void ReplayBufferStopping();
void ReplayBufferStop(int code);
2020-10-01 20:15:25 +00:00
void StartVirtualCam();
void StopVirtualCam();
void OnVirtualCamStart();
void OnVirtualCamStop(int code);
2016-02-23 23:16:51 +00:00
void SaveProjectDeferred();
void SaveProject();
2016-10-10 19:01:40 +00:00
void SetTransition(OBSSource transition);
2020-03-25 08:07:22 +00:00
void OverrideTransition(OBSSource transition);
void TransitionToScene(OBSScene scene, bool force = false);
2018-02-19 19:54:37 +00:00
void TransitionToScene(OBSSource scene, bool force = false,
2020-03-25 08:07:22 +00:00
bool quickTransition = false,
int quickDuration = 0, bool black = false,
bool manual = false);
void SetCurrentScene(OBSSource scene, bool force = false);
2016-10-10 19:01:40 +00:00
2019-09-22 21:19:10 +00:00
bool AddSceneCollection(bool create_new,
const QString &name = QString());
2018-12-16 16:14:58 +00:00
2019-07-27 12:47:10 +00:00
void UpdatePatronJson(const QString &text, const QString &error);
2020-10-01 20:15:25 +00:00
void ShowContextBar();
void HideContextBar();
2019-09-22 21:19:10 +00:00
void PauseRecording();
void UnpauseRecording();
2016-02-23 23:16:51 +00:00
private slots:
void AddSceneItem(OBSSceneItem item);
void AddScene(OBSSource source);
void RemoveScene(OBSSource source);
2018-02-19 19:54:37 +00:00
void RenameSources(OBSSource source, QString newName, QString prevName);
2016-02-23 23:16:51 +00:00
void ActivateAudioSource(OBSSource source);
void DeactivateAudioSource(OBSSource source);
void DuplicateSelectedScene();
void RemoveSelectedScene();
void RemoveSelectedSceneItem();
void ToggleAlwaysOnTop();
void ReorderSources(OBSScene scene);
2020-03-25 08:07:22 +00:00
void RefreshSources(OBSScene scene);
2016-02-23 23:16:51 +00:00
void ProcessHotkey(obs_hotkey_id id, bool pressed);
2020-10-01 20:15:25 +00:00
void AddTransition(QString id);
2016-05-24 19:53:01 +00:00
void RenameTransition();
2016-02-23 23:16:51 +00:00
void TransitionClicked();
void TransitionStopped();
2018-02-19 19:54:37 +00:00
void TransitionFullyStopped();
2016-02-23 23:16:51 +00:00
void TriggerQuickTransition(int id);
2016-05-24 19:53:01 +00:00
void SetDeinterlacingMode();
void SetDeinterlacingOrder();
2016-08-28 12:07:43 +00:00
void SetScaleFilter();
2016-10-10 19:01:40 +00:00
void IconActivated(QSystemTrayIcon::ActivationReason reason);
void SetShowing(bool showing);
2017-04-19 19:54:15 +00:00
void ToggleShowHide();
2016-10-10 19:01:40 +00:00
2018-02-19 19:54:37 +00:00
void HideAudioControl();
void UnhideAllAudioControls();
void ToggleHideMixer();
void MixerRenameSource();
2018-12-16 16:14:58 +00:00
void on_vMixerScrollArea_customContextMenuRequested();
void on_hMixerScrollArea_customContextMenuRequested();
2018-02-19 19:54:37 +00:00
2017-06-29 19:01:10 +00:00
void on_actionCopySource_triggered();
void on_actionPasteRef_triggered();
void on_actionPasteDup_triggered();
void on_actionCopyFilters_triggered();
void on_actionPasteFilters_triggered();
2018-12-16 16:14:58 +00:00
void ColorChange();
SourceTreeItem *GetItemWidgetFromSceneItem(obs_sceneitem_t *sceneItem);
2019-07-27 12:47:10 +00:00
void on_actionShowAbout_triggered();
void AudioMixerCopyFilters();
void AudioMixerPasteFilters();
void EnablePreview();
void DisablePreview();
void SceneCopyFilters();
void ScenePasteFilters();
2019-09-22 21:19:10 +00:00
void CheckDiskSpaceRemaining();
2020-03-25 08:07:22 +00:00
void OpenSavedProjector(SavedProjectorInfo *info);
2019-09-22 21:19:10 +00:00
2020-10-01 20:15:25 +00:00
void ScenesReordered();
2019-10-13 19:58:08 +00:00
2020-03-25 08:07:22 +00:00
void ResetStatsHotkey();
void SetImageIcon(const QIcon &icon);
void SetColorIcon(const QIcon &icon);
void SetSlideshowIcon(const QIcon &icon);
void SetAudioInputIcon(const QIcon &icon);
void SetAudioOutputIcon(const QIcon &icon);
void SetDesktopCapIcon(const QIcon &icon);
void SetWindowCapIcon(const QIcon &icon);
void SetGameCapIcon(const QIcon &icon);
void SetCameraIcon(const QIcon &icon);
void SetTextIcon(const QIcon &icon);
void SetMediaIcon(const QIcon &icon);
void SetBrowserIcon(const QIcon &icon);
void SetGroupIcon(const QIcon &icon);
void SetSceneIcon(const QIcon &icon);
void SetDefaultIcon(const QIcon &icon);
void TBarChanged(int value);
void TBarReleased();
void LockVolumeControl(bool lock);
2016-02-23 23:16:51 +00:00
private:
/* OBS Callbacks */
static void SceneReordered(void *data, calldata_t *params);
2020-03-25 08:07:22 +00:00
static void SceneRefreshed(void *data, calldata_t *params);
2016-02-23 23:16:51 +00:00
static void SceneItemAdded(void *data, calldata_t *params);
2018-12-16 16:14:58 +00:00
static void SourceCreated(void *data, calldata_t *params);
2016-02-23 23:16:51 +00:00
static void SourceRemoved(void *data, calldata_t *params);
static void SourceActivated(void *data, calldata_t *params);
static void SourceDeactivated(void *data, calldata_t *params);
2019-09-22 21:19:10 +00:00
static void SourceAudioActivated(void *data, calldata_t *params);
static void SourceAudioDeactivated(void *data, calldata_t *params);
2016-02-23 23:16:51 +00:00
static void SourceRenamed(void *data, calldata_t *params);
static void RenderMain(void *data, uint32_t cx, uint32_t cy);
void ResizePreview(uint32_t cx, uint32_t cy);
void AddSource(const char *id);
QMenu *CreateAddSourcePopupMenu();
void AddSourcePopupMenu(const QPoint &pos);
void copyActionsDynamicProperties();
static void HotkeyTriggered(void *data, obs_hotkey_id id, bool pressed);
2019-07-27 12:47:10 +00:00
void AutoRemux();
2019-09-22 21:19:10 +00:00
void UpdatePause(bool activate = true);
2020-03-25 08:07:22 +00:00
void UpdateReplayBuffer(bool activate = true);
bool OutputPathValid();
void OutputPathInvalidMessage();
2019-09-22 21:19:10 +00:00
bool LowDiskSpace();
void DiskSpaceMessage();
2020-03-25 08:07:22 +00:00
OBSSource prevFTBSource = nullptr;
2016-02-23 23:16:51 +00:00
public:
2018-02-19 19:54:37 +00:00
OBSSource GetProgramSource();
OBSScene GetCurrentScene();
2016-02-23 23:16:51 +00:00
2016-10-10 19:01:40 +00:00
void SysTrayNotify(const QString &text, QSystemTrayIcon::MessageIcon n);
2016-02-23 23:16:51 +00:00
inline OBSSource GetCurrentSceneSource()
{
OBSScene curScene = GetCurrentScene();
return OBSSource(obs_scene_get_source(curScene));
}
obs_service_t *GetService();
2019-09-22 21:19:10 +00:00
void SetService(obs_service_t *service);
2016-02-23 23:16:51 +00:00
2019-07-27 12:47:10 +00:00
int GetTransitionDuration();
2018-02-19 19:54:37 +00:00
inline bool IsPreviewProgramMode() const
{
return os_atomic_load_bool(&previewProgramMode);
}
2020-10-01 20:15:25 +00:00
inline bool VCamEnabled() const { return vcamEnabled; }
2016-08-28 12:07:43 +00:00
bool StreamingActive() const;
bool Active() const;
2016-02-23 23:16:51 +00:00
2018-02-19 19:54:37 +00:00
void ResetUI();
2019-09-22 21:19:10 +00:00
int ResetVideo();
2016-02-23 23:16:51 +00:00
bool ResetAudio();
2020-10-01 20:15:25 +00:00
void AddVCamButton();
2016-02-23 23:16:51 +00:00
void ResetOutputs();
void ResetAudioDevice(const char *sourceId, const char *deviceId,
2019-09-22 21:19:10 +00:00
const char *deviceDesc, int channel);
2016-02-23 23:16:51 +00:00
void NewProject();
void LoadProject();
inline void GetDisplayRect(int &x, int &y, int &cx, int &cy)
{
2019-09-22 21:19:10 +00:00
x = previewX;
y = previewY;
2016-02-23 23:16:51 +00:00
cx = previewCX;
cy = previewCY;
}
2019-09-22 21:19:10 +00:00
inline bool SavingDisabled() const { return disableSaving; }
2018-12-16 16:14:58 +00:00
2016-02-23 23:16:51 +00:00
inline double GetCPUUsage() const
{
return os_cpu_usage_info_query(cpuUsageInfo);
}
void SaveService();
bool LoadService();
2019-09-22 21:19:10 +00:00
inline Auth *GetAuth() { return auth.get(); }
2019-07-27 12:47:10 +00:00
2017-06-29 19:01:10 +00:00
inline void EnableOutputs(bool enable)
{
if (enable) {
if (--disableOutputsRef < 0)
disableOutputsRef = 0;
} else {
disableOutputsRef++;
}
}
2019-07-27 12:47:10 +00:00
QMenu *AddDeinterlacingMenu(QMenu *menu, obs_source_t *source);
QMenu *AddScaleFilteringMenu(QMenu *menu, obs_sceneitem_t *item);
QMenu *AddBackgroundColorMenu(QMenu *menu, QWidgetAction *widgetAction,
2019-09-22 21:19:10 +00:00
ColorSelect *select,
obs_sceneitem_t *item);
2018-12-16 16:14:58 +00:00
void CreateSourcePopupMenu(int idx, bool preview);
2016-02-23 23:16:51 +00:00
void UpdateTitleBar();
void UpdateSceneSelection(OBSSource source);
2016-10-10 19:01:40 +00:00
void SystemTrayInit();
void SystemTray(bool firstStarted);
2017-04-19 19:54:15 +00:00
void OpenSavedProjectors();
2018-12-16 16:14:58 +00:00
void CreateInteractionWindow(obs_source_t *source);
void CreatePropertiesWindow(obs_source_t *source);
void CreateFiltersWindow(obs_source_t *source);
2017-04-19 19:54:15 +00:00
2019-07-27 12:47:10 +00:00
QAction *AddDockWidget(QDockWidget *dock);
static OBSBasic *Get();
2019-10-13 19:58:08 +00:00
const char *GetCurrentOutputPath();
2020-03-25 08:07:22 +00:00
void DeleteProjector(OBSProjector *projector);
void AddProjectorMenuMonitors(QMenu *parent, QObject *target,
const char *slot);
QIcon GetSourceIcon(const char *id) const;
QIcon GetGroupIcon() const;
QIcon GetSceneIcon() const;
2016-02-23 23:16:51 +00:00
protected:
virtual void closeEvent(QCloseEvent *event) override;
virtual void changeEvent(QEvent *event) override;
private slots:
2018-02-19 19:54:37 +00:00
void on_actionFullscreenInterface_triggered();
2016-02-23 23:16:51 +00:00
void on_actionShow_Recordings_triggered();
void on_actionRemux_triggered();
void on_action_Settings_triggered();
void on_actionAdvAudioProperties_triggered();
void on_advAudioProps_clicked();
void on_advAudioProps_destroyed();
void on_actionShowLogs_triggered();
void on_actionUploadCurrentLog_triggered();
void on_actionUploadLastLog_triggered();
void on_actionViewCurrentLog_triggered();
void on_actionCheckForUpdates_triggered();
2018-05-29 19:13:02 +00:00
void on_actionShowCrashLogs_triggered();
void on_actionUploadLastCrashLog_triggered();
2016-02-23 23:16:51 +00:00
void on_actionEditTransform_triggered();
2017-04-19 19:54:15 +00:00
void on_actionCopyTransform_triggered();
void on_actionPasteTransform_triggered();
2016-02-23 23:16:51 +00:00
void on_actionRotate90CW_triggered();
void on_actionRotate90CCW_triggered();
void on_actionRotate180_triggered();
void on_actionFlipHorizontal_triggered();
void on_actionFlipVertical_triggered();
void on_actionFitToScreen_triggered();
void on_actionStretchToScreen_triggered();
void on_actionCenterToScreen_triggered();
2019-07-27 12:47:10 +00:00
void on_actionVerticalCenter_triggered();
void on_actionHorizontalCenter_triggered();
2016-02-23 23:16:51 +00:00
2020-03-25 08:07:22 +00:00
void on_customContextMenuRequested(const QPoint &pos);
2016-02-23 23:16:51 +00:00
void on_scenes_currentItemChanged(QListWidgetItem *current,
2019-09-22 21:19:10 +00:00
QListWidgetItem *prev);
2016-02-23 23:16:51 +00:00
void on_scenes_customContextMenuRequested(const QPoint &pos);
2020-03-25 08:07:22 +00:00
void on_actionGridMode_triggered();
2016-02-23 23:16:51 +00:00
void on_actionAddScene_triggered();
void on_actionRemoveScene_triggered();
void on_actionSceneUp_triggered();
void on_actionSceneDown_triggered();
void on_sources_customContextMenuRequested(const QPoint &pos);
2018-02-19 19:54:37 +00:00
void on_scenes_itemDoubleClicked(QListWidgetItem *item);
2016-02-23 23:16:51 +00:00
void on_actionAddSource_triggered();
void on_actionRemoveSource_triggered();
void on_actionInteract_triggered();
void on_actionSourceProperties_triggered();
void on_actionSourceUp_triggered();
void on_actionSourceDown_triggered();
void on_actionMoveUp_triggered();
void on_actionMoveDown_triggered();
void on_actionMoveToTop_triggered();
void on_actionMoveToBottom_triggered();
2016-08-28 12:07:43 +00:00
void on_actionLockPreview_triggered();
2017-04-19 19:54:15 +00:00
void on_scalingMenu_aboutToShow();
void on_actionScaleWindow_triggered();
void on_actionScaleCanvas_triggered();
void on_actionScaleOutput_triggered();
2016-02-23 23:16:51 +00:00
void on_streamButton_clicked();
void on_recordButton_clicked();
2020-10-01 20:15:25 +00:00
void VCamButtonClicked();
2016-02-23 23:16:51 +00:00
void on_settingsButton_clicked();
2020-10-01 20:15:25 +00:00
void Screenshot(OBSSource source_ = nullptr);
void ScreenshotSelectedSource();
void ScreenshotProgram();
void ScreenshotScene();
2016-02-23 23:16:51 +00:00
2018-02-19 19:54:37 +00:00
void on_actionHelpPortal_triggered();
2016-02-23 23:16:51 +00:00
void on_actionWebsite_triggered();
2018-12-16 16:14:58 +00:00
void on_actionDiscord_triggered();
2016-02-23 23:16:51 +00:00
void on_preview_customContextMenuRequested(const QPoint &pos);
2018-02-19 19:54:37 +00:00
void on_program_customContextMenuRequested(const QPoint &pos);
2019-09-22 21:19:10 +00:00
void PreviewDisabledMenu(const QPoint &pos);
2016-02-23 23:16:51 +00:00
void on_actionNewSceneCollection_triggered();
void on_actionDupSceneCollection_triggered();
void on_actionRenameSceneCollection_triggered();
void on_actionRemoveSceneCollection_triggered();
2017-04-19 19:54:15 +00:00
void on_actionImportSceneCollection_triggered();
void on_actionExportSceneCollection_triggered();
2016-02-23 23:16:51 +00:00
void on_actionNewProfile_triggered();
void on_actionDupProfile_triggered();
void on_actionRenameProfile_triggered();
void on_actionRemoveProfile_triggered();
2017-04-19 19:54:15 +00:00
void on_actionImportProfile_triggered();
void on_actionExportProfile_triggered();
2016-02-23 23:16:51 +00:00
void on_actionShowSettingsFolder_triggered();
void on_actionShowProfileFolder_triggered();
void on_actionAlwaysOnTop_triggered();
2016-08-28 12:07:43 +00:00
void on_toggleListboxToolbars_toggled(bool visible);
2020-10-01 20:15:25 +00:00
void on_toggleContextBar_toggled(bool visible);
2016-08-28 12:07:43 +00:00
void on_toggleStatusBar_toggled(bool visible);
2020-03-25 08:07:22 +00:00
void on_toggleSourceIcons_toggled(bool visible);
2016-08-28 12:07:43 +00:00
2016-02-23 23:16:51 +00:00
void on_transitions_currentIndexChanged(int index);
2016-05-24 19:53:01 +00:00
void on_transitionRemove_clicked();
2016-02-23 23:16:51 +00:00
void on_transitionProps_clicked();
2020-03-25 08:07:22 +00:00
void on_transitionDuration_valueChanged(int value);
2016-02-23 23:16:51 +00:00
void on_modeSwitch_clicked();
2020-10-01 20:15:25 +00:00
// Source Context Buttons
void on_sourcePropertiesButton_clicked();
void on_sourceFiltersButton_clicked();
2017-06-29 19:01:10 +00:00
void on_autoConfigure_triggered();
void on_stats_triggered();
2018-02-19 19:54:37 +00:00
void on_resetUI_triggered();
void on_lockUI_toggled(bool lock);
2019-09-22 21:19:10 +00:00
void PauseToggled();
2016-02-23 23:16:51 +00:00
void logUploadFinished(const QString &text, const QString &error);
2020-10-01 20:15:25 +00:00
void crashUploadFinished(const QString &text, const QString &error);
void openLogDialog(const QString &text, const bool crash);
2016-02-23 23:16:51 +00:00
2017-04-19 19:54:15 +00:00
void updateCheckFinished();
2016-02-23 23:16:51 +00:00
void AddSourceFromAction();
void MoveSceneToTop();
void MoveSceneToBottom();
void EditSceneName();
void EditSceneItemName();
void SceneNameEdited(QWidget *editor,
2019-09-22 21:19:10 +00:00
QAbstractItemDelegate::EndEditHint endHint);
2016-02-23 23:16:51 +00:00
void OpenSceneFilters();
void OpenFilters();
void EnablePreviewDisplay(bool enable);
void TogglePreview();
void NudgeUp();
void NudgeDown();
void NudgeLeft();
void NudgeRight();
2018-02-19 19:54:37 +00:00
void OpenStudioProgramProjector();
2016-02-23 23:16:51 +00:00
void OpenPreviewProjector();
void OpenSourceProjector();
2018-02-19 19:54:37 +00:00
void OpenMultiviewProjector();
2016-02-23 23:16:51 +00:00
void OpenSceneProjector();
2018-02-19 19:54:37 +00:00
void OpenStudioProgramWindow();
2017-06-29 19:01:10 +00:00
void OpenPreviewWindow();
void OpenSourceWindow();
2018-02-19 19:54:37 +00:00
void OpenMultiviewWindow();
2017-06-29 19:01:10 +00:00
void OpenSceneWindow();
2019-07-27 12:47:10 +00:00
void DeferredSysTrayLoad(int requeueCount);
2018-12-16 16:14:58 +00:00
void StackedMixerAreaContextMenuRequested();
2019-07-27 12:47:10 +00:00
void ResizeOutputSizeOfSource();
2016-10-10 19:01:40 +00:00
public slots:
void on_actionResetTransform_triggered();
2019-07-27 12:47:10 +00:00
bool StreamingActive();
bool RecordingActive();
bool ReplayBufferActive();
2020-10-01 20:15:25 +00:00
void ClearContextBar();
void UpdateContextBar();
2016-02-23 23:16:51 +00:00
public:
explicit OBSBasic(QWidget *parent = 0);
virtual ~OBSBasic();
virtual void OBSInit() override;
virtual config_t *Config() const override;
2019-09-22 21:19:10 +00:00
virtual int GetProfilePath(char *path, size_t size,
const char *file) const override;
2016-02-23 23:16:51 +00:00
2019-07-27 12:47:10 +00:00
static void InitBrowserPanelSafeBlock();
2016-02-23 23:16:51 +00:00
private:
std::unique_ptr<Ui::OBSBasic> ui;
};
2018-12-16 16:14:58 +00:00
2019-07-27 12:47:10 +00:00
class SceneRenameDelegate : public QStyledItemDelegate {
Q_OBJECT
2018-12-16 16:14:58 +00:00
public:
2019-07-27 12:47:10 +00:00
SceneRenameDelegate(QObject *parent);
2019-09-22 21:19:10 +00:00
virtual void setEditorData(QWidget *editor,
const QModelIndex &index) const override;
2018-12-16 16:14:58 +00:00
2019-07-27 12:47:10 +00:00
protected:
virtual bool eventFilter(QObject *editor, QEvent *event) override;
2018-12-16 16:14:58 +00:00
};