1
0

window-basic-main.hpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. /******************************************************************************
  2. Copyright (C) 2013-2014 by Hugh Bailey <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ******************************************************************************/
  14. #pragma once
  15. #include <QBuffer>
  16. #include <QAction>
  17. #include <QSystemTrayIcon>
  18. #include <obs.hpp>
  19. #include <vector>
  20. #include <memory>
  21. #include "window-main.hpp"
  22. #include "window-basic-interaction.hpp"
  23. #include "window-basic-properties.hpp"
  24. #include "window-basic-transform.hpp"
  25. #include "window-basic-adv-audio.hpp"
  26. #include "window-basic-filters.hpp"
  27. #include "window-projector.hpp"
  28. #include <obs-frontend-internal.hpp>
  29. #include <util/platform.h>
  30. #include <util/threading.h>
  31. #include <util/util.hpp>
  32. #include <QPointer>
  33. class QMessageBox;
  34. class QListWidgetItem;
  35. class VolControl;
  36. class QNetworkReply;
  37. class OBSBasicStats;
  38. #include "ui_OBSBasic.h"
  39. #define DESKTOP_AUDIO_1 Str("DesktopAudioDevice1")
  40. #define DESKTOP_AUDIO_2 Str("DesktopAudioDevice2")
  41. #define AUX_AUDIO_1 Str("AuxAudioDevice1")
  42. #define AUX_AUDIO_2 Str("AuxAudioDevice2")
  43. #define AUX_AUDIO_3 Str("AuxAudioDevice3")
  44. #define SIMPLE_ENCODER_X264 "x264"
  45. #define SIMPLE_ENCODER_X264_LOWCPU "x264_lowcpu"
  46. #define SIMPLE_ENCODER_QSV "qsv"
  47. #define SIMPLE_ENCODER_NVENC "nvenc"
  48. #define SIMPLE_ENCODER_AMD "amd"
  49. #define PREVIEW_EDGE_SIZE 10
  50. struct BasicOutputHandler;
  51. enum class QtDataRole {
  52. OBSRef = Qt::UserRole,
  53. OBSSignals,
  54. };
  55. struct SavedProjectorInfo {
  56. ProjectorType type;
  57. int monitor;
  58. std::string geometry;
  59. std::string name;
  60. };
  61. struct QuickTransition {
  62. QPushButton *button = nullptr;
  63. OBSSource source;
  64. obs_hotkey_id hotkey = 0;
  65. int duration = 0;
  66. int id = 0;
  67. inline QuickTransition() {}
  68. inline QuickTransition(OBSSource source_, int duration_, int id_)
  69. : source (source_),
  70. duration (duration_),
  71. id (id_),
  72. renamedSignal (std::make_shared<OBSSignal>(
  73. obs_source_get_signal_handler(source),
  74. "rename", SourceRenamed, this))
  75. {}
  76. private:
  77. static void SourceRenamed(void *param, calldata_t *data);
  78. std::shared_ptr<OBSSignal> renamedSignal;
  79. };
  80. class OBSBasic : public OBSMainWindow {
  81. Q_OBJECT
  82. friend class OBSBasicPreview;
  83. friend class OBSBasicStatusBar;
  84. friend class OBSBasicSourceSelect;
  85. friend class OBSBasicSettings;
  86. friend struct OBSStudioAPI;
  87. enum class MoveDir {
  88. Up,
  89. Down,
  90. Left,
  91. Right
  92. };
  93. enum DropType {
  94. DropType_RawText,
  95. DropType_Text,
  96. DropType_Image,
  97. DropType_Media,
  98. DropType_Html
  99. };
  100. private:
  101. obs_frontend_callbacks *api = nullptr;
  102. std::vector<VolControl*> volumes;
  103. std::vector<OBSSignal> signalHandlers;
  104. bool loaded = false;
  105. long disableSaving = 1;
  106. bool projectChanged = false;
  107. bool previewEnabled = true;
  108. bool fullscreenInterface = false;
  109. const char *copyString;
  110. const char *copyFiltersString;
  111. bool copyVisible = true;
  112. QScopedPointer<QThread> updateCheckThread;
  113. QScopedPointer<QThread> introCheckThread;
  114. QScopedPointer<QThread> logUploadThread;
  115. QPointer<OBSBasicInteraction> interaction;
  116. QPointer<OBSBasicProperties> properties;
  117. QPointer<OBSBasicTransform> transformWindow;
  118. QPointer<OBSBasicAdvAudio> advAudioWindow;
  119. QPointer<OBSBasicFilters> filters;
  120. QPointer<QTimer> cpuUsageTimer;
  121. os_cpu_usage_info_t *cpuUsageInfo = nullptr;
  122. OBSService service;
  123. std::unique_ptr<BasicOutputHandler> outputHandler;
  124. bool streamingStopping = false;
  125. bool recordingStopping = false;
  126. bool replayBufferStopping = false;
  127. gs_vertbuffer_t *box = nullptr;
  128. gs_vertbuffer_t *boxLeft = nullptr;
  129. gs_vertbuffer_t *boxTop = nullptr;
  130. gs_vertbuffer_t *boxRight = nullptr;
  131. gs_vertbuffer_t *boxBottom = nullptr;
  132. gs_vertbuffer_t *circle = nullptr;
  133. bool sceneChanging = false;
  134. bool ignoreSelectionUpdate = false;
  135. int previewX = 0, previewY = 0;
  136. int previewCX = 0, previewCY = 0;
  137. float previewScale = 0.0f;
  138. ConfigFile basicConfig;
  139. std::vector<SavedProjectorInfo*> savedProjectorsArray;
  140. QPointer<QWidget> projectors[10];
  141. QList<QPointer<QWidget>> windowProjectors;
  142. QPointer<QWidget> stats;
  143. QPointer<QWidget> remux;
  144. QPointer<QMenu> startStreamMenu;
  145. QPointer<QPushButton> replayBufferButton;
  146. QScopedPointer<QSystemTrayIcon> trayIcon;
  147. QPointer<QAction> sysTrayStream;
  148. QPointer<QAction> sysTrayRecord;
  149. QPointer<QAction> sysTrayReplayBuffer;
  150. QPointer<QAction> showHide;
  151. QPointer<QAction> exit;
  152. QPointer<QMenu> trayMenu;
  153. QPointer<QMenu> multiviewProjectorMenu;
  154. void UpdateMultiviewProjectorMenu();
  155. void DrawBackdrop(float cx, float cy);
  156. void SetupEncoders();
  157. void CreateFirstRunSources();
  158. void CreateDefaultScene(bool firstStart);
  159. void UpdateVolumeControlsDecayRate();
  160. void UpdateVolumeControlsPeakMeterType();
  161. void ClearVolumeControls();
  162. void UploadLog(const char *subdir, const char *file);
  163. void Save(const char *file);
  164. void Load(const char *file);
  165. void InitHotkeys();
  166. void CreateHotkeys();
  167. void ClearHotkeys();
  168. bool InitService();
  169. bool InitBasicConfigDefaults();
  170. bool InitBasicConfig();
  171. void InitOBSCallbacks();
  172. void InitPrimitives();
  173. void OnFirstLoad();
  174. OBSSceneItem GetSceneItem(QListWidgetItem *item);
  175. OBSSceneItem GetCurrentSceneItem();
  176. bool QueryRemoveSource(obs_source_t *source);
  177. void TimedCheckForUpdates();
  178. void CheckForUpdates(bool manualUpdate);
  179. void GetFPSCommon(uint32_t &num, uint32_t &den) const;
  180. void GetFPSInteger(uint32_t &num, uint32_t &den) const;
  181. void GetFPSFraction(uint32_t &num, uint32_t &den) const;
  182. void GetFPSNanoseconds(uint32_t &num, uint32_t &den) const;
  183. void GetConfigFPS(uint32_t &num, uint32_t &den) const;
  184. void UpdatePreviewScalingMenu();
  185. void LoadSceneListOrder(obs_data_array_t *array);
  186. obs_data_array_t *SaveSceneListOrder();
  187. void ChangeSceneIndex(bool relative, int idx, int invalidIdx);
  188. void TempFileOutput(const char *path, int vBitrate, int aBitrate);
  189. void TempStreamOutput(const char *url, const char *key,
  190. int vBitrate, int aBitrate);
  191. void CloseDialogs();
  192. void ClearSceneData();
  193. void Nudge(int dist, MoveDir dir);
  194. OBSProjector *OpenProjector(obs_source_t *source, int monitor,
  195. QString title, ProjectorType type);
  196. void GetAudioSourceFilters();
  197. void GetAudioSourceProperties();
  198. void VolControlContextMenu();
  199. void ToggleVolControlLayout();
  200. void ToggleMixerLayout(bool vertical);
  201. void RefreshSceneCollections();
  202. void ChangeSceneCollection();
  203. void LogScenes();
  204. void LoadProfile();
  205. void ResetProfileData();
  206. bool AddProfile(bool create_new, const char *title, const char *text,
  207. const char *init_text = nullptr);
  208. void DeleteProfile(const char *profile_name, const char *profile_dir);
  209. void RefreshProfiles();
  210. void ChangeProfile();
  211. void CheckForSimpleModeX264Fallback();
  212. void SaveProjectNow();
  213. int GetTopSelectedSourceItem();
  214. obs_hotkey_pair_id streamingHotkeys, recordingHotkeys,
  215. replayBufHotkeys;
  216. obs_hotkey_id forceStreamingStopHotkey;
  217. void InitDefaultTransitions();
  218. void InitTransition(obs_source_t *transition);
  219. obs_source_t *FindTransition(const char *name);
  220. OBSSource GetCurrentTransition();
  221. obs_data_array_t *SaveTransitions();
  222. void LoadTransitions(obs_data_array_t *transitions);
  223. obs_source_t *fadeTransition;
  224. void CreateProgramDisplay();
  225. void CreateProgramOptions();
  226. void AddQuickTransitionId(int id);
  227. void AddQuickTransition();
  228. void AddQuickTransitionHotkey(QuickTransition *qt);
  229. void RemoveQuickTransitionHotkey(QuickTransition *qt);
  230. void LoadQuickTransitions(obs_data_array_t *array);
  231. obs_data_array_t *SaveQuickTransitions();
  232. void ClearQuickTransitionWidgets();
  233. void RefreshQuickTransitions();
  234. void CreateDefaultQuickTransitions();
  235. QMenu *CreatePerSceneTransitionMenu();
  236. QuickTransition *GetQuickTransition(int id);
  237. int GetQuickTransitionIdx(int id);
  238. QMenu *CreateTransitionMenu(QWidget *parent, QuickTransition *qt);
  239. void ClearQuickTransitions();
  240. void QuickTransitionClicked();
  241. void QuickTransitionChange();
  242. void QuickTransitionChangeDuration(int value);
  243. void QuickTransitionRemoveClicked();
  244. void SetPreviewProgramMode(bool enabled);
  245. void ResizeProgram(uint32_t cx, uint32_t cy);
  246. void SetCurrentScene(obs_scene_t *scene, bool force = false,
  247. bool direct = false);
  248. static void RenderProgram(void *data, uint32_t cx, uint32_t cy);
  249. std::vector<QuickTransition> quickTransitions;
  250. QPointer<QWidget> programOptions;
  251. QPointer<OBSQTDisplay> program;
  252. OBSWeakSource lastScene;
  253. OBSWeakSource swapScene;
  254. OBSWeakSource programScene;
  255. bool editPropertiesMode = false;
  256. bool sceneDuplicationMode = true;
  257. bool swapScenesMode = true;
  258. volatile bool previewProgramMode = false;
  259. obs_hotkey_id togglePreviewProgramHotkey = 0;
  260. obs_hotkey_id transitionHotkey = 0;
  261. int quickTransitionIdCounter = 1;
  262. bool overridingTransition = false;
  263. int programX = 0, programY = 0;
  264. int programCX = 0, programCY = 0;
  265. float programScale = 0.0f;
  266. int disableOutputsRef = 0;
  267. inline void OnActivate();
  268. inline void OnDeactivate();
  269. void AddDropSource(const char *file, DropType image);
  270. void dragEnterEvent(QDragEnterEvent *event) override;
  271. void dragLeaveEvent(QDragLeaveEvent *event) override;
  272. void dragMoveEvent(QDragMoveEvent *event) override;
  273. void dropEvent(QDropEvent *event) override;
  274. void ReplayBufferClicked();
  275. bool sysTrayMinimizeToTray();
  276. void EnumDialogs();
  277. QList<QDialog*> visDialogs;
  278. QList<QDialog*> modalDialogs;
  279. QList<QMessageBox*> visMsgBoxes;
  280. QList<QPoint> visDlgPositions;
  281. QByteArray startingDockLayout;
  282. obs_data_array_t *SaveProjectors();
  283. void LoadSavedProjectors(obs_data_array_t *savedProjectors);
  284. void ReceivedIntroJson(const QString &text);
  285. bool NoSourcesConfirmation();
  286. public slots:
  287. void DeferSaveBegin();
  288. void DeferSaveEnd();
  289. void StartStreaming();
  290. void StopStreaming();
  291. void ForceStopStreaming();
  292. void StreamDelayStarting(int sec);
  293. void StreamDelayStopping(int sec);
  294. void StreamingStart();
  295. void StreamStopping();
  296. void StreamingStop(int errorcode, QString last_error);
  297. void StartRecording();
  298. void StopRecording();
  299. void RecordingStart();
  300. void RecordStopping();
  301. void RecordingStop(int code);
  302. void StartReplayBuffer();
  303. void StopReplayBuffer();
  304. void ReplayBufferStart();
  305. void ReplayBufferSave();
  306. void ReplayBufferStopping();
  307. void ReplayBufferStop(int code);
  308. void SaveProjectDeferred();
  309. void SaveProject();
  310. void SetTransition(OBSSource transition);
  311. void TransitionToScene(OBSScene scene, bool force = false,
  312. bool direct = false);
  313. void TransitionToScene(OBSSource scene, bool force = false,
  314. bool direct = false, bool quickTransition = false);
  315. void SetCurrentScene(OBSSource scene, bool force = false,
  316. bool direct = false);
  317. bool AddSceneCollection(
  318. bool create_new,
  319. const QString &name = QString());
  320. private slots:
  321. void AddSceneItem(OBSSceneItem item);
  322. void AddScene(OBSSource source);
  323. void RemoveScene(OBSSource source);
  324. void RenameSources(OBSSource source, QString newName, QString prevName);
  325. void SelectSceneItem(OBSScene scene, OBSSceneItem item, bool select);
  326. void ActivateAudioSource(OBSSource source);
  327. void DeactivateAudioSource(OBSSource source);
  328. void DuplicateSelectedScene();
  329. void RemoveSelectedScene();
  330. void RemoveSelectedSceneItem();
  331. void ToggleAlwaysOnTop();
  332. void ReorderSources(OBSScene scene);
  333. void ProcessHotkey(obs_hotkey_id id, bool pressed);
  334. void AddTransition();
  335. void RenameTransition();
  336. void TransitionClicked();
  337. void TransitionStopped();
  338. void TransitionFullyStopped();
  339. void TriggerQuickTransition(int id);
  340. void SetDeinterlacingMode();
  341. void SetDeinterlacingOrder();
  342. void SetScaleFilter();
  343. void IconActivated(QSystemTrayIcon::ActivationReason reason);
  344. void SetShowing(bool showing);
  345. void ToggleShowHide();
  346. void HideAudioControl();
  347. void UnhideAllAudioControls();
  348. void ToggleHideMixer();
  349. void MixerRenameSource();
  350. void on_vMixerScrollArea_customContextMenuRequested();
  351. void on_hMixerScrollArea_customContextMenuRequested();
  352. void on_actionCopySource_triggered();
  353. void on_actionPasteRef_triggered();
  354. void on_actionPasteDup_triggered();
  355. void on_actionCopyFilters_triggered();
  356. void on_actionPasteFilters_triggered();
  357. private:
  358. /* OBS Callbacks */
  359. static void SceneReordered(void *data, calldata_t *params);
  360. static void SceneItemAdded(void *data, calldata_t *params);
  361. static void SceneItemSelected(void *data, calldata_t *params);
  362. static void SceneItemDeselected(void *data, calldata_t *params);
  363. static void SourceCreated(void *data, calldata_t *params);
  364. static void SourceRemoved(void *data, calldata_t *params);
  365. static void SourceActivated(void *data, calldata_t *params);
  366. static void SourceDeactivated(void *data, calldata_t *params);
  367. static void SourceRenamed(void *data, calldata_t *params);
  368. static void RenderMain(void *data, uint32_t cx, uint32_t cy);
  369. void ResizePreview(uint32_t cx, uint32_t cy);
  370. void AddSource(const char *id);
  371. QMenu *CreateAddSourcePopupMenu();
  372. void AddSourcePopupMenu(const QPoint &pos);
  373. void copyActionsDynamicProperties();
  374. static void HotkeyTriggered(void *data, obs_hotkey_id id, bool pressed);
  375. public:
  376. OBSSource GetProgramSource();
  377. OBSScene GetCurrentScene();
  378. void SysTrayNotify(const QString &text, QSystemTrayIcon::MessageIcon n);
  379. inline OBSSource GetCurrentSceneSource()
  380. {
  381. OBSScene curScene = GetCurrentScene();
  382. return OBSSource(obs_scene_get_source(curScene));
  383. }
  384. obs_service_t *GetService();
  385. void SetService(obs_service_t *service);
  386. inline bool IsPreviewProgramMode() const
  387. {
  388. return os_atomic_load_bool(&previewProgramMode);
  389. }
  390. bool StreamingActive() const;
  391. bool Active() const;
  392. void ResetUI();
  393. int ResetVideo();
  394. bool ResetAudio();
  395. void ResetOutputs();
  396. void ResetAudioDevice(const char *sourceId, const char *deviceId,
  397. const char *deviceDesc, int channel);
  398. void NewProject();
  399. void LoadProject();
  400. inline void GetDisplayRect(int &x, int &y, int &cx, int &cy)
  401. {
  402. x = previewX;
  403. y = previewY;
  404. cx = previewCX;
  405. cy = previewCY;
  406. }
  407. inline bool SavingDisabled() const
  408. {
  409. return disableSaving;
  410. }
  411. inline double GetCPUUsage() const
  412. {
  413. return os_cpu_usage_info_query(cpuUsageInfo);
  414. }
  415. void SaveService();
  416. bool LoadService();
  417. inline void EnableOutputs(bool enable)
  418. {
  419. if (enable) {
  420. if (--disableOutputsRef < 0)
  421. disableOutputsRef = 0;
  422. } else {
  423. disableOutputsRef++;
  424. }
  425. }
  426. QMenu *AddDeinterlacingMenu(obs_source_t *source);
  427. QMenu *AddScaleFilteringMenu(obs_sceneitem_t *item);
  428. void CreateSourcePopupMenu(int idx, bool preview);
  429. void UpdateTitleBar();
  430. void UpdateSceneSelection(OBSSource source);
  431. void SystemTrayInit();
  432. void SystemTray(bool firstStarted);
  433. void OpenSavedProjectors();
  434. void CreateInteractionWindow(obs_source_t *source);
  435. void CreatePropertiesWindow(obs_source_t *source);
  436. void CreateFiltersWindow(obs_source_t *source);
  437. protected:
  438. virtual void closeEvent(QCloseEvent *event) override;
  439. virtual void changeEvent(QEvent *event) override;
  440. private slots:
  441. void on_actionFullscreenInterface_triggered();
  442. void on_actionShow_Recordings_triggered();
  443. void on_actionRemux_triggered();
  444. void on_action_Settings_triggered();
  445. void on_actionAdvAudioProperties_triggered();
  446. void on_advAudioProps_clicked();
  447. void on_advAudioProps_destroyed();
  448. void on_actionShowLogs_triggered();
  449. void on_actionUploadCurrentLog_triggered();
  450. void on_actionUploadLastLog_triggered();
  451. void on_actionViewCurrentLog_triggered();
  452. void on_actionCheckForUpdates_triggered();
  453. void on_actionShowCrashLogs_triggered();
  454. void on_actionUploadLastCrashLog_triggered();
  455. void on_actionEditTransform_triggered();
  456. void on_actionCopyTransform_triggered();
  457. void on_actionPasteTransform_triggered();
  458. void on_actionRotate90CW_triggered();
  459. void on_actionRotate90CCW_triggered();
  460. void on_actionRotate180_triggered();
  461. void on_actionFlipHorizontal_triggered();
  462. void on_actionFlipVertical_triggered();
  463. void on_actionFitToScreen_triggered();
  464. void on_actionStretchToScreen_triggered();
  465. void on_actionCenterToScreen_triggered();
  466. void on_scenes_currentItemChanged(QListWidgetItem *current,
  467. QListWidgetItem *prev);
  468. void on_scenes_customContextMenuRequested(const QPoint &pos);
  469. void on_actionAddScene_triggered();
  470. void on_actionRemoveScene_triggered();
  471. void on_actionSceneUp_triggered();
  472. void on_actionSceneDown_triggered();
  473. void on_sources_customContextMenuRequested(const QPoint &pos);
  474. void on_scenes_itemDoubleClicked(QListWidgetItem *item);
  475. void on_actionAddSource_triggered();
  476. void on_actionRemoveSource_triggered();
  477. void on_actionInteract_triggered();
  478. void on_actionSourceProperties_triggered();
  479. void on_actionSourceUp_triggered();
  480. void on_actionSourceDown_triggered();
  481. void on_actionMoveUp_triggered();
  482. void on_actionMoveDown_triggered();
  483. void on_actionMoveToTop_triggered();
  484. void on_actionMoveToBottom_triggered();
  485. void on_actionLockPreview_triggered();
  486. void on_scalingMenu_aboutToShow();
  487. void on_actionScaleWindow_triggered();
  488. void on_actionScaleCanvas_triggered();
  489. void on_actionScaleOutput_triggered();
  490. void on_streamButton_clicked();
  491. void on_recordButton_clicked();
  492. void on_settingsButton_clicked();
  493. void on_actionHelpPortal_triggered();
  494. void on_actionWebsite_triggered();
  495. void on_preview_customContextMenuRequested(const QPoint &pos);
  496. void on_program_customContextMenuRequested(const QPoint &pos);
  497. void on_previewDisabledLabel_customContextMenuRequested(
  498. const QPoint &pos);
  499. void on_actionNewSceneCollection_triggered();
  500. void on_actionDupSceneCollection_triggered();
  501. void on_actionRenameSceneCollection_triggered();
  502. void on_actionRemoveSceneCollection_triggered();
  503. void on_actionImportSceneCollection_triggered();
  504. void on_actionExportSceneCollection_triggered();
  505. void on_actionNewProfile_triggered();
  506. void on_actionDupProfile_triggered();
  507. void on_actionRenameProfile_triggered();
  508. void on_actionRemoveProfile_triggered();
  509. void on_actionImportProfile_triggered();
  510. void on_actionExportProfile_triggered();
  511. void on_actionShowSettingsFolder_triggered();
  512. void on_actionShowProfileFolder_triggered();
  513. void on_actionAlwaysOnTop_triggered();
  514. void on_toggleListboxToolbars_toggled(bool visible);
  515. void on_toggleStatusBar_toggled(bool visible);
  516. void on_transitions_currentIndexChanged(int index);
  517. void on_transitionAdd_clicked();
  518. void on_transitionRemove_clicked();
  519. void on_transitionProps_clicked();
  520. void on_modeSwitch_clicked();
  521. void on_autoConfigure_triggered();
  522. void on_stats_triggered();
  523. void on_resetUI_triggered();
  524. void on_lockUI_toggled(bool lock);
  525. void logUploadFinished(const QString &text, const QString &error);
  526. void updateCheckFinished();
  527. void AddSourceFromAction();
  528. void MoveSceneToTop();
  529. void MoveSceneToBottom();
  530. void EditSceneName();
  531. void EditSceneItemName();
  532. void SceneNameEdited(QWidget *editor,
  533. QAbstractItemDelegate::EndEditHint endHint);
  534. void OpenSceneFilters();
  535. void OpenFilters();
  536. void EnablePreviewDisplay(bool enable);
  537. void TogglePreview();
  538. void NudgeUp();
  539. void NudgeDown();
  540. void NudgeLeft();
  541. void NudgeRight();
  542. void OpenStudioProgramProjector();
  543. void OpenPreviewProjector();
  544. void OpenSourceProjector();
  545. void OpenMultiviewProjector();
  546. void OpenSceneProjector();
  547. void OpenStudioProgramWindow();
  548. void OpenPreviewWindow();
  549. void OpenSourceWindow();
  550. void OpenMultiviewWindow();
  551. void OpenSceneWindow();
  552. void DeferredLoad(const QString &file, int requeueCount);
  553. void StackedMixerAreaContextMenuRequested();
  554. public slots:
  555. void on_actionResetTransform_triggered();
  556. public:
  557. explicit OBSBasic(QWidget *parent = 0);
  558. virtual ~OBSBasic();
  559. virtual void OBSInit() override;
  560. virtual config_t *Config() const override;
  561. virtual int GetProfilePath(char *path, size_t size, const char *file)
  562. const override;
  563. private:
  564. std::unique_ptr<Ui::OBSBasic> ui;
  565. };