2014-03-23 01:07:54 -07:00
|
|
|
/******************************************************************************
|
|
|
|
Copyright (C) 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 <QDialog>
|
2015-01-13 18:03:52 -08:00
|
|
|
#include <QDialogButtonBox>
|
2015-07-20 19:09:55 -07:00
|
|
|
#include <QPointer>
|
2016-10-02 17:22:58 -07:00
|
|
|
#include <QSplitter>
|
2015-07-20 19:09:55 -07:00
|
|
|
#include "qt-display.hpp"
|
2014-03-23 01:07:54 -07:00
|
|
|
#include <obs.hpp>
|
|
|
|
|
2015-03-23 21:27:18 -07:00
|
|
|
class OBSPropertiesView;
|
2014-03-23 01:07:54 -07:00
|
|
|
class OBSBasic;
|
|
|
|
|
|
|
|
class OBSBasicProperties : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
2015-07-20 19:09:55 -07:00
|
|
|
QPointer<OBSQTDisplay> preview;
|
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
OBSBasic *main;
|
|
|
|
bool acceptClicked;
|
|
|
|
|
|
|
|
OBSSource source;
|
|
|
|
OBSSignal removedSignal;
|
|
|
|
OBSSignal renamedSignal;
|
|
|
|
OBSSignal updatePropertiesSignal;
|
|
|
|
OBSData oldSettings;
|
2014-03-23 01:07:54 -07:00
|
|
|
OBSPropertiesView *view;
|
2015-01-13 18:03:52 -08:00
|
|
|
QDialogButtonBox *buttonBox;
|
2016-10-02 17:22:58 -07:00
|
|
|
QSplitter *windowSplitter;
|
2014-03-23 01:07:54 -07:00
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
OBSSource sourceA;
|
|
|
|
OBSSource sourceB;
|
|
|
|
OBSSource sourceClone;
|
|
|
|
bool direction = true;
|
2019-05-11 22:13:38 -07:00
|
|
|
|
2014-09-25 17:44:05 -07:00
|
|
|
static void SourceRemoved(void *data, calldata_t *params);
|
2015-03-24 06:48:10 -07:00
|
|
|
static void SourceRenamed(void *data, calldata_t *params);
|
2014-09-30 06:43:41 -07:00
|
|
|
static void UpdateProperties(void *data, calldata_t *params);
|
2014-03-23 01:07:54 -07:00
|
|
|
static void DrawPreview(void *data, uint32_t cx, uint32_t cy);
|
2019-06-22 22:13:45 -07:00
|
|
|
static void DrawTransitionPreview(void *data, uint32_t cx, uint32_t cy);
|
2019-05-11 22:13:38 -07:00
|
|
|
void UpdateCallback(void *obj, obs_data_t *settings);
|
2015-01-13 18:03:52 -08:00
|
|
|
bool ConfirmQuit();
|
2019-06-22 22:13:45 -07:00
|
|
|
int CheckSettings();
|
2015-03-22 15:24:01 -07:00
|
|
|
void Cleanup();
|
2014-03-23 01:07:54 -07:00
|
|
|
|
2014-08-27 18:18:26 -07:00
|
|
|
private slots:
|
2015-01-13 18:03:52 -08:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2019-05-11 22:13:38 -07:00
|
|
|
void AddPreviewButton();
|
2014-08-27 18:18:26 -07:00
|
|
|
|
2014-03-23 01:07:54 -07:00
|
|
|
public:
|
|
|
|
OBSBasicProperties(QWidget *parent, OBSSource source_);
|
2015-03-02 00:46:43 -08:00
|
|
|
~OBSBasicProperties();
|
2014-03-23 01:07:54 -07:00
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
protected:
|
2014-04-17 08:18:51 -07:00
|
|
|
virtual void closeEvent(QCloseEvent *event) override;
|
2015-03-22 15:24:01 -07:00
|
|
|
virtual void reject() override;
|
2014-03-23 01:07:54 -07:00
|
|
|
};
|