Skip to content

Commit

Permalink
NeuralStyler 2.0 for windows ready
Browse files Browse the repository at this point in the history
  • Loading branch information
rupeshs committed Nov 6, 2016
1 parent f3f528b commit 45a41bc
Show file tree
Hide file tree
Showing 37 changed files with 5,089 additions and 148 deletions.
21 changes: 18 additions & 3 deletions NeuralStyler.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,28 @@ SOURCES += main.cpp\
ffmpegprocess.cpp \
paths.cpp \
stylechainer.cpp \
aboutdialog.cpp
aboutdialog.cpp \
mpvwidget.cpp \
qxtspanslider.cpp \
styleintensitydialog.cpp \
framedialog.cpp

HEADERS += neuralstylerwindow.h \
ffmpegprocess.h \
paths.h \
stylechainer.h \
aboutdialog.h \
WinVersion.h
WinVersion.h \
qxtspanslider_p.h \
qxtspanslider.h \
mpvwidget.h \
styleintensitydialog.h \
framedialog.h

FORMS += neuralstylerwindow.ui \
aboutdialog.ui
aboutdialog.ui \
styleintensitydialog.ui \
framedialog.ui

unix{

Expand All @@ -36,6 +47,10 @@ TARGET=neuralstyler

}

INCLUDEPATH += $$PWD/mpv
win32: LIBS += -L$$PWD/mpv/lib -lmpv.dll
else:unix: LIBS += -L$$OUT_PWD/../../../projects/mylib/ -lmylib

RESOURCES += \
neuralstyler.qrc
RC_FILE = neuralstyler.rc
10 changes: 5 additions & 5 deletions WinVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#ifndef WINVERSION_H
#define WINVERSION_H

#define VER_FILEVERSION 1,0,0,0
#define VER_FILEVERSION_STR "1.0.0.0\0"
#define VER_FILEVERSION 2,0,0,0
#define VER_FILEVERSION_STR "2.0.0.0\0"

#define VER_PRODUCTVERSION 1,0,0,0
#define VER_PRODUCTVERSION_STR "1.0.0.0\0"
#define VER_PRODUCTVERSION 2,0,0,0
#define VER_PRODUCTVERSION_STR "2.0.0.0\0"

#define VER_COMPANYNAME_STR "Rupesh Sreeraman\0"
#define VER_FILEDESCRIPTION_STR "NeuralStyler 1.0.0 \0"
#define VER_FILEDESCRIPTION_STR "NeuralStyler 2.0.0 \0"
#define VER_INTERNALNAME_STR "neuralstyler\0"
#define VER_LEGALCOPYRIGHT_STR "Copyright (c)2016 Rupesh Sreeraman\0"
#define VER_ORIGINALFILENAME_STR "neuralstyler.exe\0"
Expand Down
2 changes: 1 addition & 1 deletion aboutdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;NeuralStyler v1.0.0&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Artistic style for your videos&lt;/p&gt;&lt;p&gt;For more styles &lt;a href=&quot;http://www.neuralstyler.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;www.neuralstyler.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Copyright &amp;copy; 2016 &lt;a href=&quot;https://github.com/rupeshs&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Rupesh Sreeraman&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;NeuralStyler v2.0.0&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Artistic style for your videos/photos/GIF&lt;/p&gt;&lt;p&gt;FFmpeg Copyright © 2000-2015 the FFmpeg developers&lt;/p&gt;&lt;p&gt;For more styles &lt;a href=&quot;http://www.neuralstyler.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;www.neuralstyler.com&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Copyright © 2016 &lt;a href=&quot;https://github.com/rupeshs&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Rupesh Sreeraman&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
Expand Down
1 change: 1 addition & 0 deletions ffmpegprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void FfmpegProcess::startFfmpeg()
#ifdef Q_OS_LINUX
this->start("./ffmpeg",arguments());
# endif
// qDebug()<<arguments();

}
void FfmpegProcess::readyReadStandardError()
Expand Down
2 changes: 2 additions & 0 deletions ffmpegprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ static QRegExp rx_duration("Duration:\\s*(\\d+:\\d+:\\d*\\.\\d+)");
static QRegExp rx_fps("(\\d*\\.\\d+)*.fps");
static QRegExp rx_fps_num("(\\d+)*.fps");
static QRegExp rx_frame_ct("frame=\\s*(\\d+)");
static QRegExp rx_width("(\\d+)x.*");
static QRegExp rx_height(".*x(\\d+)");
class FfmpegProcess : public QProcess
{
Q_OBJECT
Expand Down
18 changes: 18 additions & 0 deletions framedialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "framedialog.h"
#include "ui_framedialog.h"

FrameDialog::FrameDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::FrameDialog)
{
ui->setupUi(this);
}

FrameDialog::~FrameDialog()
{
delete ui;
}
void FrameDialog::LoadFrame(QString path)
{
ui->labelFrame->setPixmap(QPixmap(path));
}
24 changes: 24 additions & 0 deletions framedialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef FRAMEDIALOG_H
#define FRAMEDIALOG_H

#include <QDialog>

namespace Ui {
class FrameDialog;
}

class FrameDialog : public QDialog
{
Q_OBJECT

public:
explicit FrameDialog(QWidget *parent = 0);
~FrameDialog();

private:
Ui::FrameDialog *ui;
public slots:
void LoadFrame(QString path);
};

#endif // FRAMEDIALOG_H
36 changes: 36 additions & 0 deletions framedialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FrameDialog</class>
<widget class="QDialog" name="FrameDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="windowTitle">
<string>Styled Frame Preview</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelFrame">
<property name="styleSheet">
<string notr="true">background-color: rgb(0, 0, 0);
font: 75 8pt &quot;MS Shell Dlg 2&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Please wait...</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Binary file added images/fileopen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/filesave .png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/paint-cancel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/paint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@

int main(int argc, char *argv[])
{
int currentExitCode = 0;
do {
QApplication a(argc, argv);
NeuralStylerWindow w;
w.show();
currentExitCode = a.exec();
} while( currentExitCode == NeuralStylerWindow::EXIT_CODE_REBOOT );

return currentExitCode;

return a.exec();
}
Loading

0 comments on commit 45a41bc

Please sign in to comment.