added demonotice and fixed mac icon

This commit is contained in:
itsmattkc
2018-09-04 19:45:00 +10:00
parent 9d185e0a40
commit ff4bb37394
6 changed files with 155 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
#include "demonotice.h"
#include "ui_demonotice.h"
DemoNotice::DemoNotice(QWidget *parent) :
QDialog(parent),
ui(new Ui::DemoNotice)
{
ui->setupUi(this);
}
DemoNotice::~DemoNotice()
{
delete ui;
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef DEMONOTICE_H
#define DEMONOTICE_H
#include <QDialog>
namespace Ui {
class DemoNotice;
}
class DemoNotice : public QDialog
{
Q_OBJECT
public:
explicit DemoNotice(QWidget *parent = 0);
~DemoNotice();
private:
Ui::DemoNotice *ui;
};
#endif // DEMONOTICE_H
+97
View File
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DemoNotice</class>
<widget class="QDialog" name="DemoNotice">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>511</width>
<height>249</height>
</rect>
</property>
<property name="windowTitle">
<string>Welcome</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>12</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/olive-splash.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:14pt;&quot;&gt;Welcome to Olive!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Olive is a free open-source video editor released under the GNU GPL. If you have paid for this software, you have been scammed.&lt;/p&gt;&lt;p&gt;This software is currently in ALPHA which means it is unstable and very likely to crash, have bugs, and have missing features. We offer no warranty so use at your own risk. Please report any bugs or feature requests at &lt;a href=&quot;https://olivevideoeditor.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;www.olivevideoeditor.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Thank you for trying Olive and we hope you enjoy it!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DemoNotice</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DemoNotice</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
+13 -2
View File
@@ -19,6 +19,7 @@
#include "dialogs/newsequencedialog.h"
#include "dialogs/exportdialog.h"
#include "dialogs/preferencesdialog.h"
#include "dialogs/demonotice.h"
#include "playback/audio.h"
#include "playback/playback.h"
@@ -39,6 +40,7 @@
QTimer autorecovery_timer;
QString config_dir;
QString appName = "Olive (August 2018 | Alpha)";
bool demoNoticeShown = false;
void MainWindow::setup_layout() {
panel_project->show();
@@ -139,7 +141,7 @@ MainWindow::MainWindow(QWidget *parent) :
config_dir = data_dir + "/config.xml";
config.load(config_dir);
}
}
}
}
MainWindow::~MainWindow() {
@@ -367,7 +369,16 @@ void MainWindow::closeEvent(QCloseEvent *e) {
e->accept();
} else {
e->ignore();
}
}
}
void MainWindow::paintEvent(QPaintEvent *event) {
QMainWindow::paintEvent(event);
if (!demoNoticeShown) {
DemoNotice* d = new DemoNotice(this);
d->open();
demoNoticeShown = true;
}
}
void MainWindow::on_action_Save_Project_triggered()
+2 -1
View File
@@ -21,7 +21,8 @@ public:
~MainWindow();
protected:
void closeEvent(QCloseEvent *);
void closeEvent(QCloseEvent *);
void paintEvent(QPaintEvent *event);
private slots:
void on_action_Import_triggered();
+7 -3
View File
@@ -77,7 +77,8 @@ SOURCES += \
effects/video/cropeffect.cpp \
effects/video/flipeffect.cpp \
effects/audio/audionoiseeffect.cpp \
effects/video/boxblureffect.cpp
effects/video/boxblureffect.cpp \
dialogs/demonotice.cpp
HEADERS += \
mainwindow.h \
@@ -131,7 +132,8 @@ HEADERS += \
effects/video/cropeffect.h \
effects/video/flipeffect.h \
effects/audio/audionoiseeffect.h \
effects/video/boxblureffect.h
effects/video/boxblureffect.h \
dialogs/demonotice.h
FORMS += \
mainwindow.ui \
@@ -142,7 +144,8 @@ FORMS += \
dialogs/aboutdialog.ui \
dialogs/newsequencedialog.ui \
dialogs/exportdialog.ui \
dialogs/preferencesdialog.ui
dialogs/preferencesdialog.ui \
dialogs/demonotice.ui
win32 {
RC_ICONS = icons/olive.ico
@@ -151,6 +154,7 @@ win32 {
mac {
LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lswscale -lswresample
ICON = icons/olive.icns
INCLUDEPATH = /usr/local/include
}