window-basic-main.hpp 20 KB

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