-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* An update dialog skelton * Update update-checker.cpp * Update plugin-main.c
- Loading branch information
Showing
7 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "UpdateDialog.hpp" | ||
|
||
UpdateDialog::UpdateDialog(QWidget *parent) | ||
: QDialog(parent), layout(new QVBoxLayout) | ||
{ | ||
setWindowTitle("Update available!"); | ||
setLayout(layout); | ||
QLabel *label = new QLabel("OBS Background Removal: Update available!"); | ||
layout->addWidget(label); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <QtWidgets> | ||
|
||
class UpdateDialog : public QDialog { | ||
Q_OBJECT | ||
public: | ||
UpdateDialog(QWidget *parent = nullptr); | ||
|
||
private: | ||
QVBoxLayout *layout; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <QTimer> | ||
|
||
#include "update-checker.h" | ||
#include "UpdateDialog.hpp" | ||
|
||
#include <obs-frontend-api.h> | ||
|
||
UpdateDialog *update_dialog; | ||
|
||
void check_update(void) | ||
{ | ||
update_dialog = | ||
new UpdateDialog((QWidget *)obs_frontend_get_main_window()); | ||
QTimer::singleShot(2000, update_dialog, &UpdateDialog::exec); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void check_update(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |