Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Commit

Permalink
New ui and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nesakko committed Jul 15, 2020
1 parent 9d76a53 commit c5eb79d
Show file tree
Hide file tree
Showing 15 changed files with 2,003 additions and 838 deletions.
12 changes: 12 additions & 0 deletions BlenderRender.pro
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
Res/Icons.qrc \
Translations/Translations.qrc

DISTFILES += \
Res/CSS/Style.css \
Res/Icons/Bitmaps/Diaspora.png \
Res/Icons/Bitmaps/GitHub-Mark-Light-64px.png \
Res/Icons/Bitmaps/TwitterLight.png \
Res/Icons/Bitmaps/blenderLight.png \
Res/Icons/Vertors/Diaspora-asterisk.svg \
Res/Icons/Vertors/MenuLight.svg \
Res/Icons/Vertors/TwitterLight.svg \
Res/Icons/Vertors/blenderLight.svg
324 changes: 324 additions & 0 deletions BlenderRender.pro.qtds

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion BlenderRender.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.12.2, 2020-06-25T05:55:43. -->
<!-- Written by QtCreator 4.12.3, 2020-07-15T18:50:35. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
Empty file removed Res/CSS/Style.css
Empty file.
3 changes: 3 additions & 0 deletions Res/Icons.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<RCC>
<qresource prefix="Logos">
<file>Icons/Bitmaps/Moins.png</file>
<file>Icons/Bitmaps/UpArrow.png</file>
<file>Icons/Bitmaps/DownArrow.png</file>
<file>Icons/Bitmaps/Misskey_Light.png</file>
<file>Icons/Bitmaps/blenderLight.png</file>
<file>Icons/Bitmaps/Diaspora.png</file>
Expand Down
Binary file added Res/Icons/Bitmaps/DownArrow.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 Res/Icons/Bitmaps/Misskey_Light.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 Res/Icons/Bitmaps/Moins.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 modified Res/Icons/Bitmaps/TwitterLight.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 Res/Icons/Bitmaps/UpArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 41 additions & 36 deletions Res/Icons/Vertors/TwitterLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>533</width>
<height>418</height>
<width>530</width>
<height>300</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -18,8 +18,8 @@
</property>
<property name="minimumSize">
<size>
<width>360</width>
<height>240</height>
<width>530</width>
<height>300</height>
</size>
</property>
<property name="windowTitle">
Expand All @@ -44,8 +44,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>519</width>
<height>362</height>
<width>516</width>
<height>244</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
Expand Down
102 changes: 80 additions & 22 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QDir>
#include <QDesktopServices>

#include <QDebug>

Expand All @@ -21,21 +22,20 @@ MainWindow::MainWindow(QWidget *parent)
// Default command line on start
ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

//set ui widget default
ui->stackedWidget->setCurrentIndex(0);
ui->btn_ListDown->setVisible(false);
ui->btn_ListUp->setVisible(false);
ui->CommandLine->setVisible(false);

}

MainWindow::~MainWindow()
{
delete ui;
}


// ui actions and buttons

void MainWindow::on_closeButton_clicked()
{
QApplication::quit();
}

void MainWindow::on_actionAbout_Qt_triggered()
{
QMessageBox::aboutQt(this, "About Qt");
Expand All @@ -45,24 +45,20 @@ void MainWindow::on_actionAbout_Qt_triggered()
void MainWindow::on_actionAbout_triggered()
{
about.show();

qDebug() << "Clicked About";

}

void MainWindow::on_frameStart_valueChanged(const QString &arg1)
{
st = arg1;
ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << st;
}

void MainWindow::on_frameEnd_valueChanged(const QString &arg1)
{
end = arg1;
ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << end;
}

Expand Down Expand Up @@ -90,7 +86,6 @@ void MainWindow::on_FormatSelect_activated(int index)
format = " -F HDR";

ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << format;
}

Expand All @@ -111,9 +106,7 @@ void MainWindow::on_checkBox_toggled(bool checked)
end = "";
ui->label_2->setText("Frame to render");
}

ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << animCheck;
}

Expand All @@ -140,7 +133,6 @@ void MainWindow::on_BlendSelect_clicked()
blend = blendfile;

ui->BlendFile->setText(blend);

qDebug() << "File " + blend + " selected";
}

Expand All @@ -160,7 +152,6 @@ void MainWindow::on_BlenderPath_textChanged(const QString &arg1)
void MainWindow::on_BlendFile_textChanged(const QString &arg1)
{
blend = arg1;

ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);
}

Expand All @@ -182,11 +173,10 @@ void MainWindow::on_RenderEngine_currentIndexChanged(int index)
Engine = " -E BLENDER_WORKBENCH";
qDebug() << "Swithed to " + Engine + " render engine";
}

ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);
}

void MainWindow::on_renderButton_clicked()
void MainWindow::on_btn_Render_clicked()
{
QString render;
QString bl;
Expand All @@ -200,8 +190,8 @@ void MainWindow::on_renderButton_clicked()
const char *c_str_bl = inst.data();

if(blend == ""){
QMessageBox::critical(this, "Error", "You can't render nothing, select a blender file to render !! xD ");
system("notify-send 'Blender Render' 'Error !! You have to add a blend file to render first'");
//QMessageBox::critical(this, "Error", "You can't render nothing, select a blender file to render !! xD ");
qDebug() << "MWAHAHAHA errooooooorrrrr !!!";
}
else{
Expand Down Expand Up @@ -233,7 +223,6 @@ void MainWindow::on_SaveRender_textChanged(const QString &arg1)
SaveAs = " -o " + arg1;

ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << "The image save text was changed to : " + SaveAs;
}

Expand All @@ -247,10 +236,79 @@ void MainWindow::on_checkBox_2_toggled(bool checked)
ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);
}

void MainWindow::on_frameStart_2_valueChanged(const QString &arg1)
void MainWindow::on_NumberThread_valueChanged(const QString &arg1)
{
tnum = " -t " + arg1;
ui->CommandLine->setText(binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim);

qDebug() << tnum;
}

void MainWindow::on_btn_GitHub_clicked()
{
QDesktopServices::openUrl(QUrl("https://github.com/Nesakko", QUrl::TolerantMode));
}

void MainWindow::on_btn_Twitter_clicked()
{
QDesktopServices::openUrl(QUrl("https://twitter.com/WiseNesakko", QUrl::TolerantMode));
}

void MainWindow::on_btn_Diaspora_clicked()
{
QDesktopServices::openUrl(QUrl("https://pod.dapor.net/people/61cec8f086010137677d48600054b5a3", QUrl::TolerantMode));
}

void MainWindow::on_btn_Misskey_clicked()
{
QDesktopServices::openUrl(QUrl("https://misskey.io/@Nesakko", QUrl::TolerantMode));
}

void MainWindow::on_BtnSide_Render_clicked()
{
ui->stackedWidget->setCurrentIndex(0);

qDebug() << "page Render";
}

void MainWindow::on_BtnSide_Queue_clicked()
{
ui->stackedWidget->setCurrentIndex(1);
qDebug() << "page Queue";
}

void MainWindow::on_BtnSide_Param_clicked()
{
ui->stackedWidget->setCurrentIndex(2);
qDebug() << "page Optios";
}

void MainWindow::on_BtnSide_Option4_clicked()
{
ui->stackedWidget->setCurrentIndex(3);
qDebug() << "page Other";
}


void MainWindow::on_btn_AddQueue_clicked()
{
QString ToQueue;
ToQueue = binst + " -b " + blend + SaveAs + Engine + format + stdef + st + enddef + end + tnum + anim;
ui->listWidget->addItem(ToQueue);
}

/*
void MainWindow::on_btn_ListUp_clicked()
{
ui->listWidget->
}
void MainWindow::on_btn_ListDown_clicked()
{
}
*/

void MainWindow::on_btn_ListRemove_clicked()
{
delete ui->listWidget->currentItem();
}
Loading

0 comments on commit c5eb79d

Please sign in to comment.