mirror of
https://github.com/lostjared/glitch.gui.git
synced 2026-06-16 12:33:54 +02:00
resize controls
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
#include"about_window.hpp"
|
||||
#include"version_info.hpp"
|
||||
#include<QTextStream>
|
||||
#include<QVBoxLayout>
|
||||
|
||||
AboutWindow::AboutWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 480);
|
||||
setMinimumSize(500, 400);
|
||||
resize(640, 480);
|
||||
QString text;
|
||||
QTextStream stream(&text);
|
||||
stream << "about glitch.gui v" << APP_VERSION;
|
||||
setWindowTitle(text);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
view = new QWebEngineView(this);
|
||||
view->setGeometry(rect());
|
||||
view->load(QUrl("https://lostsidedead.biz/glitch.gui/index.html"));
|
||||
mainLayout->addWidget(view);
|
||||
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
@@ -3,29 +3,42 @@
|
||||
#include"display_window.hpp"
|
||||
#include<QTextStream>
|
||||
#include<iostream>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
|
||||
Control_Window::Control_Window(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(675, 100);
|
||||
setWindowTitle("Video Controls");
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setMinimumSize(500, 80);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(10);
|
||||
|
||||
QHBoxLayout *ctrlRow = new QHBoxLayout();
|
||||
ctrlRow->setSpacing(10);
|
||||
|
||||
ctrl_pos = new QScrollBar(Qt::Horizontal, this);
|
||||
ctrl_pos->setToolTip(tr("Duration within Video scrollbar"));
|
||||
ctrl_pos->setGeometry(25, 25, 400, 25);
|
||||
ctrl_pos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
ctrl_pos->setEnabled(false);
|
||||
|
||||
connect(ctrl_pos, SIGNAL(valueChanged(int)), this, SLOT(changedIndex(int)));
|
||||
|
||||
|
||||
ctrl_txt = new QLabel("0/0", this);
|
||||
ctrl_txt->setGeometry(445, 25, 100, 25);
|
||||
|
||||
ctrl_txt->setMinimumWidth(80);
|
||||
|
||||
ctrl_set = new QPushButton(tr("Set Pos"), this);
|
||||
ctrl_set->setToolTip(tr("Set location within video"));
|
||||
ctrl_set->setGeometry(545, 25, 100, 25);
|
||||
|
||||
connect(ctrl_set, SIGNAL(clicked()), this, SLOT(setIndex()));
|
||||
|
||||
ctrl_set->setMinimumWidth(80);
|
||||
ctrl_set->setEnabled(false);
|
||||
connect(ctrl_set, SIGNAL(clicked()), this, SLOT(setIndex()));
|
||||
|
||||
ctrlRow->addWidget(ctrl_pos);
|
||||
ctrlRow->addWidget(ctrl_txt);
|
||||
ctrlRow->addWidget(ctrl_set);
|
||||
mainLayout->addLayout(ctrlRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,14 +4,29 @@
|
||||
#include"main_window.hpp"
|
||||
#include"debug_window.hpp"
|
||||
#include"pref_window.hpp"
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
|
||||
CustomEditWindow::CustomEditWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(320, 120);
|
||||
setWindowTitle(tr("Edit Custom Filters"));
|
||||
setMinimumSize(300, 100);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(10);
|
||||
|
||||
filter_names = new QComboBox(this);
|
||||
filter_names->setGeometry(25, 30, 320-50, 30);
|
||||
mainLayout->addWidget(filter_names);
|
||||
|
||||
QHBoxLayout *btnRow = new QHBoxLayout();
|
||||
filter_rmv = new QPushButton(tr("Remove"), this);
|
||||
filter_rmv->setGeometry(30, 30+30, 100, 25);
|
||||
filter_rmv->setMinimumWidth(100);
|
||||
connect(filter_rmv, SIGNAL(clicked()), this, SLOT(removeCustom()));
|
||||
btnRow->addWidget(filter_rmv);
|
||||
btnRow->addStretch();
|
||||
mainLayout->addLayout(btnRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
updateFilterNames();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,87 +7,95 @@
|
||||
#include"pref_window.hpp"
|
||||
#include<QMessageBox>
|
||||
#include<QFileDialog>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
#include<QLabel>
|
||||
|
||||
|
||||
CustomWindow::CustomWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 510);
|
||||
setWindowTitle("Create Custom Filter");
|
||||
setMinimumSize(550, 450);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(8);
|
||||
|
||||
filter_cat = new QComboBox(this);
|
||||
filter_cat->setToolTip(tr("Filter CategorieS"));
|
||||
filter_cat->setGeometry(15, 15, (640-15-15), 25);
|
||||
filter_cat->setToolTip(tr("Filter Categories"));
|
||||
mainLayout->addWidget(filter_cat);
|
||||
|
||||
filter = new QComboBox(this);
|
||||
filter->setToolTip(tr("List of Filters"));
|
||||
filter->setGeometry(15, 15+25+5, (640-15-15), 25);
|
||||
|
||||
mainLayout->addWidget(filter);
|
||||
|
||||
filter_custom = new QListWidget(this);
|
||||
filter_custom->setToolTip(tr("List of Selected Filters"));
|
||||
filter_custom->setGeometry(15, 15+25+5+25+5, (640-15-15), 300);
|
||||
|
||||
filter_custom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
mainLayout->addWidget(filter_custom, 1);
|
||||
|
||||
QHBoxLayout *btnRow1 = new QHBoxLayout();
|
||||
btnRow1->setSpacing(8);
|
||||
btn_add = new QPushButton(tr("Add"), this);
|
||||
btn_add->setToolTip(tr("Add to List"));
|
||||
btn_add->setGeometry(15, 15+25+5+25+5+300+5, 100, 25);
|
||||
|
||||
connect(btn_add, SIGNAL(clicked()), this, SLOT(addFilter()));
|
||||
|
||||
btn_rmv = new QPushButton(tr("Remove"), this);
|
||||
btn_rmv->setToolTip(tr("Remove from List"));
|
||||
|
||||
btn_rmv->setGeometry(15+100+5, 15+25+5+25+5+300+5, 100, 25);
|
||||
|
||||
connect(btn_rmv, SIGNAL(clicked()), this, SLOT(rmvFilter()));
|
||||
|
||||
btn_up = new QPushButton(tr("Move Up"), this);
|
||||
btn_up->setToolTip(tr("Move Selected Filter up in List"));
|
||||
btn_up->setGeometry(15+100+5+100+5, 15+25+5+25+5+300+5, 100, 25);
|
||||
|
||||
connect(btn_up, SIGNAL(clicked()), this, SLOT(move_Up()));
|
||||
|
||||
btn_down = new QPushButton(tr("Move Down"), this);
|
||||
btn_down->setToolTip(tr("Move Select Filter Down in List"));
|
||||
btn_down->setGeometry(15+100+5+100+5+100+5, 15+25+5+25+5+300+5, 100, 25);
|
||||
|
||||
connect(btn_down, SIGNAL(clicked()), this, SLOT(move_Down()));
|
||||
|
||||
btn_playlist = new QPushButton(tr("Save Playlist"), this);
|
||||
btn_playlist->setToolTip(tr("Save as Playlist"));
|
||||
btn_playlist->setGeometry(15+100+5+100+5+100+5+100+5, 15+25+5+25+5+300+5, 100, 25);
|
||||
|
||||
connect(btn_playlist, SIGNAL(clicked()), this, SLOT(setPlaylist()));
|
||||
|
||||
QLabel *f_name = new QLabel(tr("Name: "), this);
|
||||
f_name->setGeometry(25, 15+25+5+25+5+300+5+25+5+10+5, 100, 25);
|
||||
|
||||
btnRow1->addWidget(btn_add);
|
||||
btnRow1->addWidget(btn_rmv);
|
||||
btnRow1->addWidget(btn_up);
|
||||
btnRow1->addWidget(btn_down);
|
||||
btnRow1->addStretch();
|
||||
btnRow1->addWidget(btn_playlist);
|
||||
mainLayout->addLayout(btnRow1);
|
||||
|
||||
QHBoxLayout *nameRow = new QHBoxLayout();
|
||||
nameRow->setSpacing(8);
|
||||
QLabel *f_name = new QLabel(tr("Name:"), this);
|
||||
filter_name = new QLineEdit(this);
|
||||
filter_name->setToolTip(tr("Filter name"));
|
||||
filter_name->setGeometry(50+25+5, 15+25+5+25+5+300+5+25+5+10+5, 200, 25);
|
||||
|
||||
btn_set = new QPushButton(tr("Set Filter"), this);
|
||||
btn_set->setGeometry(640-125-5, 15+25+5+25+5+300+5+25+5+10+5, 100, 25);
|
||||
btn_set->setToolTip(tr("Add as new Custom Filter"));
|
||||
|
||||
filter_name->setMinimumWidth(150);
|
||||
btn_update = new QPushButton(tr("Update"), this);
|
||||
btn_update->setGeometry(640-225-15, 15+25+5+25+5+300+5+25+5+10+5, 100, 25);
|
||||
btn_update->setToolTip(tr("Update custom"));
|
||||
|
||||
connect(btn_update, SIGNAL(clicked()), this, SLOT(updateFilter()));
|
||||
|
||||
btn_set = new QPushButton(tr("Set Filter"), this);
|
||||
btn_set->setToolTip(tr("Add as new Custom Filter"));
|
||||
connect(btn_set, SIGNAL(clicked()), this, SLOT(setFilter()));
|
||||
nameRow->addWidget(f_name);
|
||||
nameRow->addWidget(filter_name);
|
||||
nameRow->addStretch();
|
||||
nameRow->addWidget(btn_update);
|
||||
nameRow->addWidget(btn_set);
|
||||
mainLayout->addLayout(nameRow);
|
||||
|
||||
QHBoxLayout *rgbRow = new QHBoxLayout();
|
||||
rgbRow->setSpacing(12);
|
||||
chk_r = new QCheckBox(tr("Red"), this);
|
||||
chk_r->setGeometry(15,15+25+5+25+5+300+5+25+5+10+5+25+20,50, 25);
|
||||
//chk_r->setChecked(true);
|
||||
chk_r->setToolTip(tr("Restore Red Channel After Filter"));
|
||||
chk_g = new QCheckBox(tr("Green"), this);
|
||||
chk_g->setGeometry(65,15+25+5+25+5+300+5+25+5+10+5+25+20,60, 25);
|
||||
//chk_g->setChecked(true);
|
||||
chk_g->setToolTip(tr("Restore Green Channel After Filter"));
|
||||
chk_b = new QCheckBox(tr("Blue"), this);
|
||||
chk_b->setGeometry(65+50+15,15+25+5+25+5+300+5+25+5+10+5+25+20,60,25);
|
||||
chk_b->setToolTip(tr("Restore Blue Channel After Filter"));
|
||||
//chk_b->setChecked(true);
|
||||
connect(btn_set, SIGNAL(clicked()), this, SLOT(setFilter()));
|
||||
rgbRow->addWidget(chk_r);
|
||||
rgbRow->addWidget(chk_g);
|
||||
rgbRow->addWidget(chk_b);
|
||||
rgbRow->addStretch();
|
||||
mainLayout->addLayout(rgbRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
connect(filter_cat, SIGNAL(currentIndexChanged(int)), this, SLOT(changeCategory(int)));
|
||||
connect(filter, SIGNAL(currentIndexChanged(int)), this, SLOT(changeCustom(int)));
|
||||
|
||||
setWindowTitle("Create Custom Filter");
|
||||
|
||||
filter_cat->addItem(tr("In order"));
|
||||
filter_cat->addItem(tr("Sorted"));
|
||||
filter_cat->addItem(tr("Fast"));
|
||||
|
||||
@@ -2,23 +2,31 @@
|
||||
#include<QIcon>
|
||||
#include<QTextStream>
|
||||
#include"version_info.hpp"
|
||||
#include<QVBoxLayout>
|
||||
|
||||
// Debug Window constructor - (init)
|
||||
DebugWindow::DebugWindow(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(15, 460, 1280, 320);
|
||||
setFixedSize(1280, 320);
|
||||
setWindowFlag(Qt::Tool);
|
||||
setWindowTitle(tr("Debug Console"));
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setMinimumSize(600, 200);
|
||||
resize(1000, 300);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(10, 10, 10, 10);
|
||||
|
||||
text_view = new QTextEdit(this);
|
||||
text_view->setGeometry(10, 10, 1280-20, 320-20);
|
||||
text_view->setReadOnly(true);
|
||||
text_view->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255); font-size: 20px;");
|
||||
mainLayout->addWidget(text_view);
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
QString text;
|
||||
QTextStream stream(&text);
|
||||
stream << "gui: glitch.gui v" << APP_VERSION << " Loaded\n";
|
||||
stream << "gui: " << APP_YEAR << " LostSideDead Software\n";
|
||||
Log(text);
|
||||
//setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
}
|
||||
|
||||
// clear the debug window
|
||||
|
||||
@@ -14,7 +14,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(700, 0, 640, 480);
|
||||
setWindowTitle("Display Window");
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
|
||||
setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint);
|
||||
|
||||
image_label = new QLabel(this);
|
||||
image_label->setGeometry(0, 0, 640, 480);
|
||||
|
||||
@@ -7,35 +7,43 @@
|
||||
#include"pref_window.hpp"
|
||||
#include"filters/layer_filter.hpp"
|
||||
#include"debug_window.hpp"
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
|
||||
LayersWindow::LayersWindow(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(500, 250, 385, 240);
|
||||
setFixedSize(385, 240);
|
||||
setWindowTitle("Layers Window");
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
|
||||
layer_set = new QPushButton(tr("Select"), this);
|
||||
layer_set->setGeometry(215, 10, 75, 25);
|
||||
|
||||
connect(layer_set, SIGNAL(clicked()), this, SLOT(setLayer()));
|
||||
|
||||
layer_clear = new QPushButton(tr("Clear"), this);
|
||||
layer_clear->setGeometry(295, 10, 75, 25);
|
||||
|
||||
connect(layer_clear, SIGNAL(clicked()), this, SLOT(clearLayer()));
|
||||
|
||||
layer_text = new QTextEdit(this);
|
||||
layer_text->setGeometry(10,40, width()-20, 180);
|
||||
layer_text->setReadOnly(true);
|
||||
|
||||
setMinimumSize(350, 220);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(10, 10, 10, 10);
|
||||
mainLayout->setSpacing(8);
|
||||
|
||||
QHBoxLayout *selectRow = new QHBoxLayout();
|
||||
selectRow->setSpacing(8);
|
||||
layer_index = new QComboBox(this);
|
||||
layer_index->setGeometry(10, 10, 200, 25);
|
||||
|
||||
layer_index->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
layer_index->addItem("0: Clear");
|
||||
layer_index->addItem("1: Clear");
|
||||
layer_index->addItem("2: Clear");
|
||||
|
||||
layer_index->setCurrentIndex(0);
|
||||
layer_set = new QPushButton(tr("Select"), this);
|
||||
layer_set->setMinimumWidth(75);
|
||||
connect(layer_set, SIGNAL(clicked()), this, SLOT(setLayer()));
|
||||
layer_clear = new QPushButton(tr("Clear"), this);
|
||||
layer_clear->setMinimumWidth(75);
|
||||
connect(layer_clear, SIGNAL(clicked()), this, SLOT(clearLayer()));
|
||||
selectRow->addWidget(layer_index);
|
||||
selectRow->addWidget(layer_set);
|
||||
selectRow->addWidget(layer_clear);
|
||||
mainLayout->addLayout(selectRow);
|
||||
|
||||
layer_text = new QTextEdit(this);
|
||||
layer_text->setReadOnly(true);
|
||||
layer_text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
mainLayout->addWidget(layer_text, 1);
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
layers.push_back(&layer1);
|
||||
layers.push_back(&layer2);
|
||||
|
||||
@@ -63,6 +63,7 @@ int main(int argc, char **argv) {
|
||||
styleFile.close();
|
||||
}
|
||||
main_window.show();
|
||||
main_window.setWindowPositions();
|
||||
app.exec();
|
||||
std::cout << "glitch-gui: Shutdown Successful...\n";
|
||||
return 0;
|
||||
|
||||
+89
-54
@@ -26,6 +26,11 @@
|
||||
#include"layers_window.hpp"
|
||||
#include"about_window.hpp"
|
||||
#include<QCoreApplication>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
#include<QGridLayout>
|
||||
#include<QGroupBox>
|
||||
#include<QSplitter>
|
||||
|
||||
cv::Mat QImage2Mat(QImage const& src) {
|
||||
cv::Mat tmp(src.height(),src.width(),CV_8UC3,(uchar*)src.bits(),src.bytesPerLine());
|
||||
@@ -66,14 +71,10 @@ MainWindow::MainWindow() {
|
||||
pref_window->setMainWindow(this);
|
||||
pref_window->hide();
|
||||
//build_lists(pref_window->custom_path_lbl->text().toStdString());
|
||||
debug_window = new DebugWindow(this);
|
||||
if(settings.value("chk_dbg", true).toBool() == true)
|
||||
debug_window->show();
|
||||
debug_window = new DebugWindow(nullptr);
|
||||
|
||||
toolbox_window = new ToolboxWindow(this);
|
||||
toolbox_window->setGeometry(25,25,250,400);
|
||||
toolbox_window = new ToolboxWindow(nullptr);
|
||||
toolbox_window->setMainWindow(this);
|
||||
toolbox_window->show();
|
||||
|
||||
display_window = new DisplayWindow(this);
|
||||
display_window->setMainWindow(this);
|
||||
@@ -120,7 +121,8 @@ MainWindow::MainWindow() {
|
||||
about_window = new AboutWindow(this);
|
||||
about_window->hide();
|
||||
|
||||
setFixedSize(655, 390);
|
||||
setMinimumSize(700, 420);
|
||||
resize(750, 450);
|
||||
setWindowTitle(tr(APP_NAME));
|
||||
menuBar()->setNativeMenuBar(false);
|
||||
file_menu = menuBar()->addMenu(tr("&File"));
|
||||
@@ -301,11 +303,20 @@ MainWindow::MainWindow() {
|
||||
connect(help_about, SIGNAL(triggered()), this, SLOT(helpAbout()));
|
||||
help_menu->addAction(help_about);
|
||||
|
||||
setGeometry(30+toolbox_window->width(),25,640,480);
|
||||
QWidget *centralWidget = new QWidget(this);
|
||||
setCentralWidget(centralWidget);
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget);
|
||||
mainLayout->setContentsMargins(10, 10, 10, 10);
|
||||
mainLayout->setSpacing(8);
|
||||
|
||||
QHBoxLayout *topSection = new QHBoxLayout();
|
||||
topSection->setSpacing(15);
|
||||
|
||||
QVBoxLayout *leftColumn = new QVBoxLayout();
|
||||
leftColumn->setSpacing(8);
|
||||
|
||||
filter_cat = new QComboBox(this);
|
||||
filter_cat->setToolTip(tr("Filter Categories"));
|
||||
filter_cat->setGeometry(15, 35, 300, 25);
|
||||
|
||||
filter_cat->addItem(tr("In order"));
|
||||
filter_cat->addItem(tr("Sorted"));
|
||||
@@ -318,71 +329,92 @@ MainWindow::MainWindow() {
|
||||
filter_cat->addItem(tr("Playlist"));
|
||||
|
||||
connect(filter_cat, SIGNAL(currentIndexChanged(int)), this, SLOT(catIndexChanged(int)));
|
||||
leftColumn->addWidget(filter_cat);
|
||||
|
||||
filter_list = new QComboBox(this);
|
||||
filter_list->setToolTip(tr("List of Filters"));
|
||||
filter_list->setGeometry(15, 35+35, 300, 25);
|
||||
connect(filter_list, SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)));
|
||||
filter_list->setEnabled(true);
|
||||
leftColumn->addWidget(filter_list);
|
||||
|
||||
content_data = new QTextEdit(this);
|
||||
content_data->setToolTip(tr("Current Information for Process"));
|
||||
content_data->setReadOnly(true);
|
||||
content_data->setText("Content-Data");
|
||||
content_data->setStyleSheet("font-size: 13px;");
|
||||
content_data->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
leftColumn->addWidget(content_data, 1);
|
||||
|
||||
topSection->addLayout(leftColumn, 1);
|
||||
|
||||
QVBoxLayout *rightColumn = new QVBoxLayout();
|
||||
rightColumn->setSpacing(8);
|
||||
|
||||
QHBoxLayout *searchRow = new QHBoxLayout();
|
||||
searchRow->setSpacing(8);
|
||||
filter_search = new QLineEdit(this);
|
||||
filter_search->setToolTip(tr("Search for a filter"));
|
||||
connect(filter_search, SIGNAL(returnPressed()), this, SLOT(searchFilter()));
|
||||
filter_search_button = new QPushButton(tr("Search"), this);
|
||||
filter_search_button->setToolTip(tr("Search for a Filter"));
|
||||
filter_search_button->setMinimumWidth(70);
|
||||
connect(filter_search_button, SIGNAL(clicked()), this, SLOT(searchFilter()));
|
||||
searchRow->addWidget(filter_search);
|
||||
searchRow->addWidget(filter_search_button);
|
||||
rightColumn->addLayout(searchRow);
|
||||
|
||||
filter_first = new QLabel(tr("First: None"), this);
|
||||
rightColumn->addWidget(filter_first);
|
||||
|
||||
filter_list_view = new QListWidget(this);
|
||||
filter_list_view->setToolTip(tr("Filter List View"));
|
||||
filter_list_view->setGeometry(315+10,105,300,200);
|
||||
|
||||
filter_list_view->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
connect(filter_list_view, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(listDoubleClicked(QListWidgetItem *)));
|
||||
|
||||
filter_search = new QLineEdit(this);
|
||||
filter_search->setToolTip(tr("Search for a filter"));
|
||||
filter_search->setGeometry(300+15+10, 35, 300-75, 30);
|
||||
connect(filter_search, SIGNAL(returnPressed()), this, SLOT(searchFilter()));
|
||||
rightColumn->addWidget(filter_list_view, 1);
|
||||
|
||||
filter_search_button = new QPushButton(tr("Search"), this);
|
||||
filter_search_button->setToolTip(tr("Search for a Filter"));
|
||||
filter_search_button->setGeometry(300+15+10+225+10, 35, 70, 30);
|
||||
topSection->addLayout(rightColumn, 1);
|
||||
mainLayout->addLayout(topSection, 1);
|
||||
|
||||
connect(filter_search_button, SIGNAL(clicked()), this, SLOT(searchFilter()));
|
||||
QHBoxLayout *buttonRow = new QHBoxLayout();
|
||||
buttonRow->setSpacing(8);
|
||||
|
||||
filter_search_set = new QPushButton(tr("Select"), this);
|
||||
filter_search_set->setToolTip(tr("Set Current Filter"));
|
||||
filter_search_set->setGeometry(15, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_search_set, SIGNAL(clicked()), this, SLOT(setSearch()));
|
||||
buttonRow->addWidget(filter_search_set);
|
||||
|
||||
filter_first_set = new QPushButton(tr("&First"), this);
|
||||
filter_first_set = new QPushButton(tr("First"), this);
|
||||
filter_first_set->setToolTip(tr("Set as First called Filter"));
|
||||
filter_first_set->setGeometry(15+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_first_set, SIGNAL(clicked()), this, SLOT(firstSet()));
|
||||
buttonRow->addWidget(filter_first_set);
|
||||
|
||||
filter_first_clear = new QPushButton(tr("&Clear"), this);
|
||||
filter_first_clear = new QPushButton(tr("Clear"), this);
|
||||
filter_first_clear->setToolTip(tr("Clear first called Filter"));
|
||||
filter_first_clear->setGeometry(15+70+10+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_first_clear, SIGNAL(clicked()), this, SLOT(firstClear()));
|
||||
|
||||
filter_set_custom = new QPushButton(tr("Custom"), this);
|
||||
filter_set_custom->setToolTip(tr("Set current select search item to Custom Filter"));
|
||||
filter_set_custom->setGeometry(15+70+10+70+10+70+10+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_set_custom, SIGNAL(clicked()), this, SLOT(custom_Add()));
|
||||
buttonRow->addWidget(filter_first_clear);
|
||||
|
||||
filter_add_custom = new QPushButton(tr("Add"), this);
|
||||
filter_add_custom->setToolTip(tr("Add Current Select Filter to Custom Filter"));
|
||||
filter_add_custom->setGeometry(15+70+10+70+10+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_add_custom, SIGNAL(clicked()), this, SLOT(custom_filter_add()));
|
||||
buttonRow->addWidget(filter_add_custom);
|
||||
|
||||
filter_set_custom = new QPushButton(tr("Custom"), this);
|
||||
filter_set_custom->setToolTip(tr("Set current select search item to Custom Filter"));
|
||||
connect(filter_set_custom, SIGNAL(clicked()), this, SLOT(custom_Add()));
|
||||
buttonRow->addWidget(filter_set_custom);
|
||||
|
||||
filter_release = new QPushButton(tr("Release"), this);
|
||||
filter_release->setToolTip(tr("Release Stored Frames"));
|
||||
filter_release->setGeometry(15+70+10+70+10+70+10+70+10+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_release, SIGNAL(clicked()), this, SLOT(filterRelease()));
|
||||
buttonRow->addWidget(filter_release);
|
||||
|
||||
filter_btn_exit = new QPushButton(tr("Exit"), this);
|
||||
filter_btn_exit->setToolTip(tr("Exit the program"));
|
||||
filter_btn_exit->setGeometry(15+70+10+70+10+70+10+70+10+70+10+70+10, 35+25+10+200+10+35, 70, 30);
|
||||
|
||||
connect(filter_btn_exit, SIGNAL(clicked()), this, SLOT(quitProgram()));
|
||||
buttonRow->addWidget(filter_btn_exit);
|
||||
|
||||
buttonRow->addStretch();
|
||||
mainLayout->addLayout(buttonRow);
|
||||
|
||||
filter_list_view->setEnabled(true);
|
||||
filter_search->setEnabled(true);
|
||||
@@ -392,15 +424,10 @@ MainWindow::MainWindow() {
|
||||
filter_first_set->setEnabled(true);
|
||||
filter_first_clear->setEnabled(true);
|
||||
|
||||
filter_first = new QLabel(tr("First: None"), this);
|
||||
filter_first->setGeometry(315+10, 35+25+10, 300, 30);
|
||||
|
||||
content_data = new QTextEdit(this);
|
||||
content_data->setToolTip(tr("Current Information for Process"));
|
||||
content_data->setGeometry(15, 35+25+10+35, 300, 200);
|
||||
content_data->setReadOnly(true);
|
||||
content_data->setText("Content-Data");
|
||||
content_data->setStyleSheet("font-size: 13px;");
|
||||
// Progress bar at bottom
|
||||
bar_position = new QProgressBar(this);
|
||||
bar_position->setEnabled(false);
|
||||
mainLayout->addWidget(bar_position);
|
||||
|
||||
init_filter_list();
|
||||
init_filters_local();
|
||||
@@ -430,10 +457,18 @@ MainWindow::MainWindow() {
|
||||
plug_out = "";
|
||||
ps << "gui: Loaded " << count_filters() << " total filter(s).\n";
|
||||
debug_window->Log(plug_out);
|
||||
bar_position = new QProgressBar(this);
|
||||
bar_position->setGeometry(10, 355, width()-20, 20);
|
||||
bar_position->show();
|
||||
bar_position->setEnabled(false);
|
||||
}
|
||||
|
||||
void MainWindow::setWindowPositions() {
|
||||
move(20, 20);
|
||||
resize(500, 310);
|
||||
debug_window->move(20, 400);
|
||||
debug_window->resize(1000, 180);
|
||||
toolbox_window->move(540, 20);
|
||||
toolbox_window->resize(280, 310);
|
||||
show();
|
||||
debug_window->show();
|
||||
toolbox_window->show();
|
||||
}
|
||||
|
||||
void MainWindow::setMinMax(int min, int max) {
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void keyShiftUp();
|
||||
void keyShiftDown();
|
||||
void setWindowPositions();
|
||||
void startNewAnimation(const QString &filename, const QString &outdir, const QString &prefix, float fps);
|
||||
void loadCategory(int index);
|
||||
void disableUndo();
|
||||
@@ -59,6 +60,7 @@ public:
|
||||
void setMinMax(int min, int max);
|
||||
void setImageDelay(int delay);
|
||||
void initPlaylist();
|
||||
|
||||
DebugWindow *debug_window;
|
||||
ToolboxWindow *toolbox_window;
|
||||
RecordWindow *record_window;
|
||||
|
||||
+51
-22
@@ -4,33 +4,62 @@
|
||||
#include"ffmpeg_write.h"
|
||||
#include<QMessageBox>
|
||||
#include"version_info.hpp"
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
|
||||
MuxWindow::MuxWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(480, 160);
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setWindowTitle("Copy Audio");
|
||||
file_source = new QLabel("[ Source File ]", this);
|
||||
file_source->setGeometry(25, 25, 300, 25);
|
||||
file_copy = new QLabel("[ Audio to Copy ]", this);
|
||||
file_copy->setGeometry(25, 60, 300, 25);
|
||||
file_dest = new QLabel("[ Destination File ]", this);
|
||||
file_dest->setGeometry(25, 60+25+5, 300, 25);
|
||||
|
||||
select_source = new QPushButton(tr("Select File"), this);
|
||||
select_source->setGeometry(340,25,100,25);
|
||||
select_copy = new QPushButton(tr("Select File"), this);
|
||||
select_copy->setGeometry(340, 60, 100, 25);
|
||||
select_dest = new QPushButton(tr("Select File"), this);
|
||||
select_dest->setGeometry(340, 60+25+5,100,25);
|
||||
|
||||
mux_files = new QPushButton(tr("Mux Files"), this);
|
||||
mux_files->setGeometry(340, 60+25+5+25+5, 100, 25);
|
||||
|
||||
connect(select_source, SIGNAL(clicked()), this, SLOT(select_Source()));
|
||||
connect(select_copy, SIGNAL(clicked()), this, SLOT(select_Copy()));
|
||||
connect(select_dest, SIGNAL(clicked()), this, SLOT(select_Dest()));
|
||||
connect(mux_files, SIGNAL(clicked()), this, SLOT(mux_Files()));
|
||||
setMinimumSize(450, 180);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(10);
|
||||
|
||||
QHBoxLayout *srcRow = new QHBoxLayout();
|
||||
srcRow->setSpacing(8);
|
||||
file_source = new QLabel("[ Source File ]", this);
|
||||
file_source->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
select_source = new QPushButton(tr("Select File"), this);
|
||||
select_source->setMinimumWidth(100);
|
||||
connect(select_source, SIGNAL(clicked()), this, SLOT(select_Source()));
|
||||
srcRow->addWidget(file_source);
|
||||
srcRow->addWidget(select_source);
|
||||
mainLayout->addLayout(srcRow);
|
||||
|
||||
QHBoxLayout *copyRow = new QHBoxLayout();
|
||||
copyRow->setSpacing(8);
|
||||
file_copy = new QLabel("[ Audio to Copy ]", this);
|
||||
file_copy->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
select_copy = new QPushButton(tr("Select File"), this);
|
||||
select_copy->setMinimumWidth(100);
|
||||
connect(select_copy, SIGNAL(clicked()), this, SLOT(select_Copy()));
|
||||
copyRow->addWidget(file_copy);
|
||||
copyRow->addWidget(select_copy);
|
||||
mainLayout->addLayout(copyRow);
|
||||
|
||||
QHBoxLayout *destRow = new QHBoxLayout();
|
||||
destRow->setSpacing(8);
|
||||
file_dest = new QLabel("[ Destination File ]", this);
|
||||
file_dest->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
select_dest = new QPushButton(tr("Select File"), this);
|
||||
select_dest->setMinimumWidth(100);
|
||||
connect(select_dest, SIGNAL(clicked()), this, SLOT(select_Dest()));
|
||||
destRow->addWidget(file_dest);
|
||||
destRow->addWidget(select_dest);
|
||||
mainLayout->addLayout(destRow);
|
||||
|
||||
mainLayout->addStretch();
|
||||
|
||||
QHBoxLayout *btnRow = new QHBoxLayout();
|
||||
btnRow->addStretch();
|
||||
mux_files = new QPushButton(tr("Mux Files"), this);
|
||||
mux_files->setMinimumWidth(100);
|
||||
connect(mux_files, SIGNAL(clicked()), this, SLOT(mux_Files()));
|
||||
btnRow->addWidget(mux_files);
|
||||
mainLayout->addLayout(btnRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
void MuxWindow::select_Source() {
|
||||
|
||||
+67
-26
@@ -7,59 +7,100 @@
|
||||
#include<QIcon>
|
||||
#include<QMessageBox>
|
||||
#include<QTextStream>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
#include<QGridLayout>
|
||||
|
||||
NewImageWindow::NewImageWindow(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle("Start new Animation");
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setFixedSize(320, 240);
|
||||
setMinimumSize(400, 250);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(10);
|
||||
|
||||
QHBoxLayout *fileLayout = new QHBoxLayout();
|
||||
fileLayout->setSpacing(8);
|
||||
input_file = new QLabel(tr("Select File Location"), this);
|
||||
input_file->setGeometry(10, 10, 240, 25);
|
||||
input_file->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
input_file_select = new QPushButton("...", this);
|
||||
input_file_select->setToolTip(tr("Select File Location on Drive"));
|
||||
input_file_select->setGeometry(260, 10, 50, 25);
|
||||
input_file_select->setFixedWidth(50);
|
||||
connect(input_file_select, SIGNAL(clicked()), this, SLOT(openFile()));
|
||||
fileLayout->addWidget(input_file);
|
||||
fileLayout->addWidget(input_file_select);
|
||||
mainLayout->addLayout(fileLayout);
|
||||
|
||||
QHBoxLayout *outputLayout = new QHBoxLayout();
|
||||
outputLayout->setSpacing(8);
|
||||
output_location = new QLabel(tr("Select Output Location"), this);
|
||||
output_location->setGeometry(10, 35, 240, 25);
|
||||
output_location->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
output_location_select = new QPushButton("...", this);
|
||||
output_location_select->setToolTip(tr("Select Output Location"));
|
||||
output_location_select->setGeometry(260, 35, 50, 25);
|
||||
output_location_select->setFixedWidth(50);
|
||||
connect(output_location_select, SIGNAL(clicked()), this, SLOT(selectDir()));
|
||||
QLabel *cap = new QLabel(tr("FPS"), this);
|
||||
cap->setGeometry(10, 75, 50, 25);
|
||||
outputLayout->addWidget(output_location);
|
||||
outputLayout->addWidget(output_location_select);
|
||||
mainLayout->addLayout(outputLayout);
|
||||
|
||||
QHBoxLayout *fpsLayout = new QHBoxLayout();
|
||||
fpsLayout->setSpacing(8);
|
||||
QLabel *cap = new QLabel(tr("FPS:"), this);
|
||||
video_fps = new QLineEdit("24", this);
|
||||
video_fps->setToolTip(tr("Video Frames Per Second"));
|
||||
video_fps->setGeometry(65, 75, 100, 25);
|
||||
video_start = new QPushButton(tr("Start"), this);
|
||||
video_start->setToolTip(tr("Start Animation"));
|
||||
video_start->setGeometry(320-100-10, 240-35, 100, 30);
|
||||
connect(video_start, SIGNAL(clicked()), this, SLOT(videoStart()));
|
||||
video_start->setEnabled(false);
|
||||
filename_set = false;
|
||||
outdir_set = false;
|
||||
video_fps->setMaximumWidth(100);
|
||||
fpsLayout->addWidget(cap);
|
||||
fpsLayout->addWidget(video_fps);
|
||||
fpsLayout->addStretch();
|
||||
mainLayout->addLayout(fpsLayout);
|
||||
|
||||
QHBoxLayout *prefixLayout = new QHBoxLayout();
|
||||
prefixLayout->setSpacing(8);
|
||||
QLabel *prefix = new QLabel(tr("Filename Prefix:"), this);
|
||||
prefix->setGeometry(10, 110, 100, 30);
|
||||
video_filename = new QLineEdit(this);
|
||||
video_filename->setText(tr("Glitch1"));
|
||||
video_filename->setGeometry(110, 110, 195, 30);
|
||||
video_filename->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
prefixLayout->addWidget(prefix);
|
||||
prefixLayout->addWidget(video_filename);
|
||||
mainLayout->addLayout(prefixLayout);
|
||||
|
||||
video_record = new QCheckBox(tr("Record on Start"), this);
|
||||
video_record->setToolTip(tr("Record on Start of video"));
|
||||
video_record->setGeometry(10, 140, 150, 25);
|
||||
video_record->setChecked(Qt::Unchecked);
|
||||
connect(video_record, SIGNAL(clicked()), this, SLOT(openRecordOptions()));
|
||||
mainLayout->addWidget(video_record);
|
||||
|
||||
QHBoxLayout *delayLayout = new QHBoxLayout();
|
||||
delayLayout->setSpacing(8);
|
||||
num_label = new QLabel("Image Delay: 1", this);
|
||||
num_label->setMinimumWidth(100);
|
||||
video_image_delay = new QScrollBar(Qt::Horizontal, this);
|
||||
video_image_delay->setToolTip(tr("Slow speed of video in Image mode"));
|
||||
num_label = new QLabel("Image Delay: 1", this);
|
||||
num_label->setGeometry(10, 172, 100, 25);
|
||||
video_image_delay->setGeometry(110, 170, 200, 25);
|
||||
video_image_delay->setMinimum(1);
|
||||
video_image_delay->setMaximum(10);
|
||||
video_image_delay->setValue(1);
|
||||
|
||||
video_image_delay->setEnabled(false);
|
||||
|
||||
connect(video_record, SIGNAL(clicked()), this, SLOT(openRecordOptions()));
|
||||
connect(video_image_delay, SIGNAL(valueChanged(int)), this, SLOT(changedPos(int)));
|
||||
//setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
|
||||
delayLayout->addWidget(num_label);
|
||||
delayLayout->addWidget(video_image_delay);
|
||||
mainLayout->addLayout(delayLayout);
|
||||
|
||||
mainLayout->addStretch();
|
||||
|
||||
QHBoxLayout *buttonLayout = new QHBoxLayout();
|
||||
buttonLayout->addStretch();
|
||||
video_start = new QPushButton(tr("Start"), this);
|
||||
video_start->setToolTip(tr("Start Animation"));
|
||||
video_start->setMinimumWidth(80);
|
||||
video_start->setEnabled(false);
|
||||
connect(video_start, SIGNAL(clicked()), this, SLOT(videoStart()));
|
||||
buttonLayout->addWidget(video_start);
|
||||
mainLayout->addLayout(buttonLayout);
|
||||
|
||||
setLayout(mainLayout);
|
||||
filename_set = false;
|
||||
outdir_set = false;
|
||||
}
|
||||
|
||||
void NewImageWindow::changedPos(int) {
|
||||
|
||||
+107
-70
@@ -7,108 +7,145 @@
|
||||
#include"filters/layer_filter.hpp"
|
||||
#include<QFileDialog>
|
||||
#include<QColorDialog>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
#include<QGridLayout>
|
||||
#include<QGroupBox>
|
||||
|
||||
PrefWindow::PrefWindow(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 480);
|
||||
setWindowTitle("Preferences");
|
||||
|
||||
chk_path = new QCheckBox(tr("Save Directory Paths"), this);
|
||||
chk_path->setGeometry(25,25,200,25);
|
||||
|
||||
pref_save = new QPushButton(tr("Save"), this);
|
||||
pref_save->setGeometry(25,height()-40,75,25);
|
||||
|
||||
pref_cancel = new QPushButton(tr("Cancel"), this);
|
||||
pref_cancel->setGeometry(120, height()-40, 75, 25);
|
||||
|
||||
connect(pref_save, SIGNAL(clicked()), this, SLOT(pref_Save()));
|
||||
connect(pref_cancel, SIGNAL(clicked()), this, SLOT(pref_Cancel()));
|
||||
|
||||
QLabel *title = new QLabel(tr("Save Filters: "), this);
|
||||
title->setGeometry(25,60,100,25);
|
||||
|
||||
custom_path_lbl = new QLabel(tr("Custom Path"), this);
|
||||
custom_path_lbl->setGeometry(125,60,200,25);
|
||||
|
||||
pref_custom = new QPushButton(tr("..."), this);
|
||||
pref_custom->setGeometry(350, 60, 70, 25);
|
||||
|
||||
connect(pref_custom, SIGNAL(clicked()), this, SLOT(pref_setPath()));
|
||||
setMinimumSize(550, 400);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(12);
|
||||
|
||||
chk_path = new QCheckBox(tr("Save Directory Paths"), this);
|
||||
chk_path->setChecked(settings.value("chk_path").toBool());
|
||||
|
||||
mainLayout->addWidget(chk_path);
|
||||
|
||||
QHBoxLayout *pathRow = new QHBoxLayout();
|
||||
pathRow->setSpacing(8);
|
||||
QLabel *title = new QLabel(tr("Save Filters:"), this);
|
||||
custom_path_lbl = new QLabel(tr("Custom Path"), this);
|
||||
custom_path_lbl->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
pref_custom = new QPushButton(tr("..."), this);
|
||||
pref_custom->setFixedWidth(50);
|
||||
connect(pref_custom, SIGNAL(clicked()), this, SLOT(pref_setPath()));
|
||||
pathRow->addWidget(title);
|
||||
pathRow->addWidget(custom_path_lbl);
|
||||
pathRow->addWidget(pref_custom);
|
||||
mainLayout->addLayout(pathRow);
|
||||
|
||||
QString fname = settings.value("chk_filename").toString();
|
||||
if(fname != "") {
|
||||
custom_path_lbl->setText(fname);
|
||||
loaded = true;
|
||||
}
|
||||
QLabel *lbl_1 = new QLabel(tr("Fractal Real: "), this);
|
||||
lbl_1->setGeometry(25, 100, 100, 25);
|
||||
|
||||
QGroupBox *fracGroup = new QGroupBox(tr("Fractal Settings"), this);
|
||||
QGridLayout *fracLayout = new QGridLayout(fracGroup);
|
||||
fracLayout->setSpacing(8);
|
||||
|
||||
QLabel *lbl_1 = new QLabel(tr("Real:"), this);
|
||||
frac_real = new QLineEdit(this);
|
||||
frac_real->setGeometry(125, 100, 100, 25);
|
||||
QLabel *lbl_2 = new QLabel(tr("Fractal Imag: "), this);
|
||||
lbl_2->setGeometry(250, 100, 100, 25);
|
||||
frac_imag = new QLineEdit(this);
|
||||
frac_imag->setGeometry(400, 100, 100, 25);
|
||||
QLabel *lbl_3 =new QLabel(tr("Fractal Zoom: "), this);
|
||||
lbl_3->setGeometry(25, 130, 100, 25);
|
||||
frac_zoom = new QLineEdit(this);
|
||||
frac_zoom->setGeometry(125, 130, 100, 25);
|
||||
QLabel *lbl_4 = new QLabel(tr("Iterations: "), this);
|
||||
lbl_4->setGeometry(250, 130, 100, 25);
|
||||
frac_iter = new QLineEdit(this);
|
||||
frac_iter->setGeometry(400, 130, 100,25);
|
||||
QLabel *lbl_5 = new QLabel(tr("Zoom Speed"), this);
|
||||
lbl_5->setGeometry(25, 160, 100, 25);
|
||||
frac_speed = new QLineEdit(this);
|
||||
frac_speed->setGeometry(125, 160, 100, 25);
|
||||
QLabel *lbl_6 = new QLabel(tr("Max Zoom"), this);
|
||||
lbl_6->setGeometry(250, 160, 100, 25);
|
||||
frac_max = new QLineEdit(this);
|
||||
frac_max->setGeometry(400, 160, 100, 25);
|
||||
|
||||
|
||||
frac_real->setText("-0.743643887032151");
|
||||
frac_real->setToolTip(tr("Center Real"));
|
||||
|
||||
QLabel *lbl_2 = new QLabel(tr("Imag:"), this);
|
||||
frac_imag = new QLineEdit(this);
|
||||
frac_imag->setText("0.142625924205330");
|
||||
frac_imag->setToolTip(tr("Center Imag:"));
|
||||
|
||||
QLabel *lbl_3 = new QLabel(tr("Zoom:"), this);
|
||||
frac_zoom = new QLineEdit(this);
|
||||
frac_zoom->setText("1");
|
||||
frac_zoom->setToolTip(tr("Fractal Zoom"));
|
||||
|
||||
QLabel *lbl_4 = new QLabel(tr("Iterations:"), this);
|
||||
frac_iter = new QLineEdit(this);
|
||||
frac_iter->setText("100");
|
||||
frac_iter->setToolTip(tr("Fractal Iterations"));
|
||||
|
||||
QLabel *lbl_5 = new QLabel(tr("Zoom Speed:"), this);
|
||||
frac_speed = new QLineEdit(this);
|
||||
frac_speed->setText("100");
|
||||
frac_speed->setToolTip(tr("Speed of Zoom for animation"));
|
||||
|
||||
QLabel *lbl_6 = new QLabel(tr("Max Zoom:"), this);
|
||||
frac_max = new QLineEdit(this);
|
||||
frac_max->setText("250000");
|
||||
frac_max->setToolTip(tr("Max depth of zoom"));
|
||||
//cv::Scalar lowerGreen(35, 50, 50);
|
||||
///cv::Scalar upperGreen(85, 255, 255);
|
||||
|
||||
fracLayout->addWidget(lbl_1, 0, 0);
|
||||
fracLayout->addWidget(frac_real, 0, 1);
|
||||
fracLayout->addWidget(lbl_2, 0, 2);
|
||||
fracLayout->addWidget(frac_imag, 0, 3);
|
||||
fracLayout->addWidget(lbl_3, 1, 0);
|
||||
fracLayout->addWidget(frac_zoom, 1, 1);
|
||||
fracLayout->addWidget(lbl_4, 1, 2);
|
||||
fracLayout->addWidget(frac_iter, 1, 3);
|
||||
fracLayout->addWidget(lbl_5, 2, 0);
|
||||
fracLayout->addWidget(frac_speed, 2, 1);
|
||||
fracLayout->addWidget(lbl_6, 2, 2);
|
||||
fracLayout->addWidget(frac_max, 2, 3);
|
||||
mainLayout->addWidget(fracGroup);
|
||||
|
||||
QHBoxLayout *chromaRow = new QHBoxLayout();
|
||||
chromaRow->setSpacing(8);
|
||||
QLabel *tmp_lbl2 = new QLabel(tr("Chroma Key:"), this);
|
||||
|
||||
QColor color(50,50,35);
|
||||
QVariant variant = color;
|
||||
QString color_var = variant.toString();
|
||||
QColor color2(255, 255, 85);
|
||||
variant = color2;
|
||||
QString color_var2 = variant.toString();
|
||||
color_start = new QLabel(this);
|
||||
color_start->setGeometry(25,250, 50, 25);
|
||||
color_start->setFixedSize(50, 25);
|
||||
color_start->setStyleSheet("QLabel { background-color :" + color_var + " ; }");
|
||||
color_start_btn = new QPushButton("...", this);
|
||||
color_start_btn->setGeometry(80,250,25,25);
|
||||
QLabel *tmp_lbl = new QLabel(tr(" to "), this);
|
||||
tmp_lbl->setGeometry(110,250,25,25);
|
||||
color_stop = new QLabel(this);
|
||||
color_stop->setStyleSheet("QLabel { background-color: " + color_var2 + "; }");
|
||||
color_stop->setGeometry(140,250,50,25);
|
||||
color_stop_btn = new QPushButton("...", this);
|
||||
color_stop_btn->setGeometry(140+50+5, 250, 25, 25);
|
||||
QLabel *tmp_lbl2 = new QLabel(tr("Chroma Key: "), this);
|
||||
tmp_lbl2->setGeometry(25, 215, 100, 25);
|
||||
|
||||
color_start_btn->setFixedWidth(30);
|
||||
connect(color_start_btn, SIGNAL(clicked()), this, SLOT(grab_color1()));
|
||||
|
||||
QLabel *tmp_lbl = new QLabel(tr("to"), this);
|
||||
|
||||
QColor color2(255, 255, 85);
|
||||
variant = color2;
|
||||
QString color_var2 = variant.toString();
|
||||
color_stop = new QLabel(this);
|
||||
color_stop->setFixedSize(50, 25);
|
||||
color_stop->setStyleSheet("QLabel { background-color: " + color_var2 + "; }");
|
||||
color_stop_btn = new QPushButton("...", this);
|
||||
color_stop_btn->setFixedWidth(30);
|
||||
connect(color_stop_btn, SIGNAL(clicked()), this, SLOT(grab_color2()));
|
||||
|
||||
show_debug = new QCheckBox(tr("SHow Debug on Startup"), this);
|
||||
show_debug->setGeometry(15, 300, 200, 25);
|
||||
|
||||
chromaRow->addWidget(tmp_lbl2);
|
||||
chromaRow->addWidget(color_start);
|
||||
chromaRow->addWidget(color_start_btn);
|
||||
chromaRow->addWidget(tmp_lbl);
|
||||
chromaRow->addWidget(color_stop);
|
||||
chromaRow->addWidget(color_stop_btn);
|
||||
chromaRow->addStretch();
|
||||
mainLayout->addLayout(chromaRow);
|
||||
|
||||
show_debug = new QCheckBox(tr("Show Debug on Startup"), this);
|
||||
show_debug->setChecked(settings.value("chk_dbg", true).toBool());
|
||||
mainLayout->addWidget(show_debug);
|
||||
|
||||
mainLayout->addStretch();
|
||||
|
||||
QHBoxLayout *btnRow = new QHBoxLayout();
|
||||
btnRow->setSpacing(8);
|
||||
pref_save = new QPushButton(tr("Save"), this);
|
||||
pref_save->setMinimumWidth(75);
|
||||
connect(pref_save, SIGNAL(clicked()), this, SLOT(pref_Save()));
|
||||
pref_cancel = new QPushButton(tr("Cancel"), this);
|
||||
pref_cancel->setMinimumWidth(75);
|
||||
connect(pref_cancel, SIGNAL(clicked()), this, SLOT(pref_Cancel()));
|
||||
btnRow->addWidget(pref_save);
|
||||
btnRow->addWidget(pref_cancel);
|
||||
btnRow->addStretch();
|
||||
mainLayout->addLayout(btnRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
int PrefWindow::findIn(const std::string &n) {
|
||||
|
||||
@@ -141,8 +141,7 @@ RecordWindow::RecordWindow(QWidget *parent) : QDialog(parent) {
|
||||
mainLayout->addLayout(buttonLayout);
|
||||
|
||||
setLayout(mainLayout);
|
||||
setMinimumWidth(550);
|
||||
setMinimumHeight(320);
|
||||
setFixedSize(550, 320);
|
||||
|
||||
centerOnScreen();
|
||||
}
|
||||
|
||||
@@ -5,38 +5,59 @@
|
||||
#include<QFileDialog>
|
||||
#include"ffmpeg_write.h"
|
||||
#include<QMessageBox>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
|
||||
RotateWindow::RotateWindow(QWidget *parent) : QDialog(parent) {
|
||||
setGeometry(400, 100, 315, 135);
|
||||
setFixedSize(315, 135);
|
||||
setWindowTitle(tr("Rotate Video"));
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
|
||||
setMinimumSize(350, 150);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(15, 15, 15, 15);
|
||||
mainLayout->setSpacing(10);
|
||||
|
||||
QHBoxLayout *srcRow = new QHBoxLayout();
|
||||
srcRow->setSpacing(8);
|
||||
item_src = new QLabel(tr("File to Rotate"), this);
|
||||
item_src->setGeometry(10,10,200, 25);
|
||||
item_src->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
src_select = new QPushButton(tr("Select"), this);
|
||||
src_select->setGeometry(10+200+10, 10, 75, 25);
|
||||
|
||||
item_out = new QLabel(tr("File Output"), this);
|
||||
item_out->setGeometry(10,45,200,25);
|
||||
|
||||
item_select = new QPushButton(tr("Select"), this);
|
||||
item_select->setGeometry(10+200+10, 45, 75, 25);
|
||||
|
||||
btn_rotate = new QPushButton(tr("Rotate"), this);
|
||||
btn_rotate->setGeometry(10+200+10, 100, 75, 25);
|
||||
|
||||
src_select->setMinimumWidth(75);
|
||||
connect(src_select, SIGNAL(clicked()), this, SLOT(selectSrc()));
|
||||
srcRow->addWidget(item_src);
|
||||
srcRow->addWidget(src_select);
|
||||
mainLayout->addLayout(srcRow);
|
||||
|
||||
QHBoxLayout *outRow = new QHBoxLayout();
|
||||
outRow->setSpacing(8);
|
||||
item_out = new QLabel(tr("File Output"), this);
|
||||
item_out->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
item_select = new QPushButton(tr("Select"), this);
|
||||
item_select->setMinimumWidth(75);
|
||||
connect(item_select, SIGNAL(clicked()), this, SLOT(selectDst()));
|
||||
connect(btn_rotate, SIGNAL(clicked()), this, SLOT(rotateVideo()));
|
||||
|
||||
outRow->addWidget(item_out);
|
||||
outRow->addWidget(item_select);
|
||||
mainLayout->addLayout(outRow);
|
||||
|
||||
mainLayout->addStretch();
|
||||
|
||||
QHBoxLayout *rotateRow = new QHBoxLayout();
|
||||
rotateRow->setSpacing(8);
|
||||
deg_rotate = new QComboBox(this);
|
||||
deg_rotate->setGeometry(10, 100, 100, 25);
|
||||
|
||||
deg_rotate->setMinimumWidth(100);
|
||||
deg_rotate->addItem("90");
|
||||
deg_rotate->addItem("-90");
|
||||
deg_rotate->addItem("180");
|
||||
deg_rotate->setCurrentIndex(0);
|
||||
btn_rotate = new QPushButton(tr("Rotate"), this);
|
||||
btn_rotate->setMinimumWidth(75);
|
||||
connect(btn_rotate, SIGNAL(clicked()), this, SLOT(rotateVideo()));
|
||||
rotateRow->addWidget(deg_rotate);
|
||||
rotateRow->addStretch();
|
||||
rotateRow->addWidget(btn_rotate);
|
||||
mainLayout->addLayout(rotateRow);
|
||||
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
void RotateWindow::selectSrc() {
|
||||
|
||||
@@ -4,69 +4,93 @@
|
||||
#include"main_window.hpp"
|
||||
#include"debug_window.hpp"
|
||||
#include<QColorDialog>
|
||||
#include<QVBoxLayout>
|
||||
#include<QHBoxLayout>
|
||||
#include<QGridLayout>
|
||||
|
||||
ToolboxWindow::ToolboxWindow(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle("Toolbox");
|
||||
setWindowFlags(Qt::WindowType::Tool);
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
setMinimumSize(250, 220);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(10, 10, 10, 10);
|
||||
mainLayout->setSpacing(8);
|
||||
|
||||
QHBoxLayout *row1 = new QHBoxLayout();
|
||||
row1->setSpacing(8);
|
||||
save_snapshot = new QPushButton(tr("Save"), this);
|
||||
save_snapshot->setToolTip(tr("Save Snapshot Image"));
|
||||
setWindowIcon(QIcon(":/images/icon.png"));
|
||||
save_snapshot->setGeometry(10, 10, 100, 25);
|
||||
connect(save_snapshot, SIGNAL(clicked()), this, SLOT(saveSnapshot()));
|
||||
|
||||
setsource_action = new QPushButton(tr("Source"), this);
|
||||
setsource_action->setToolTip(tr("Set current Image as Source image"));
|
||||
|
||||
setsource_action->setGeometry(120, 10, 100, 25);
|
||||
connect(setsource_action, SIGNAL(clicked()), this, SLOT(setSource()));
|
||||
row1->addWidget(save_snapshot);
|
||||
row1->addWidget(setsource_action);
|
||||
mainLayout->addLayout(row1);
|
||||
|
||||
QHBoxLayout *row2 = new QHBoxLayout();
|
||||
row2->setSpacing(8);
|
||||
stop_action = new QPushButton(tr("Stop"), this);
|
||||
stop_action->setToolTip(tr("Stop Animation"));
|
||||
stop_action->setGeometry(10, 40, 100, 25);
|
||||
connect(stop_action, SIGNAL(clicked()), this, SLOT(stopAction()));
|
||||
|
||||
step_action = new QPushButton(tr("Step"), this);
|
||||
step_action->setToolTip(tr("Step forward one frame"));
|
||||
step_action->setGeometry(120, 40, 100, 25);
|
||||
connect(step_action, SIGNAL(clicked()), this, SLOT(stepAction()));
|
||||
row2->addWidget(stop_action);
|
||||
row2->addWidget(step_action);
|
||||
mainLayout->addLayout(row2);
|
||||
|
||||
QHBoxLayout *row3 = new QHBoxLayout();
|
||||
row3->setSpacing(8);
|
||||
color_lbl = new QLabel(this);
|
||||
color_lbl->setGeometry(10, 40+25+10, 75, 25);
|
||||
color_lbl->setFixedSize(50, 25);
|
||||
QString color_var = "#000000";
|
||||
color_lbl->setStyleSheet("QLabel { background-color :" + color_var + " ; }");
|
||||
sel_color = new QPushButton("...", this);
|
||||
sel_color->setFixedWidth(30);
|
||||
connect(sel_color, SIGNAL(clicked()), this, SLOT(selectColor()));
|
||||
use_color = new QCheckBox(tr("Offset Color"), this);
|
||||
use_color->setToolTip(tr("Offset color values"));
|
||||
use_color->setGeometry(120,40+25+10, 100, 25);
|
||||
use_color->setChecked(false);
|
||||
connect(use_color, SIGNAL(toggled(bool)), this, SLOT(clickOffset(bool)));
|
||||
row3->addWidget(color_lbl);
|
||||
row3->addWidget(sel_color);
|
||||
row3->addWidget(use_color);
|
||||
row3->addStretch();
|
||||
mainLayout->addLayout(row3);
|
||||
|
||||
QHBoxLayout *row4 = new QHBoxLayout();
|
||||
row4->setSpacing(8);
|
||||
use_fade = new QCheckBox(tr("Fade"), this);
|
||||
use_fade->setToolTip(tr("Fade turn on?"));
|
||||
use_fade->setGeometry(120,40+25+10+30, 100, 25);
|
||||
use_fade->setChecked(false);
|
||||
sel_color = new QPushButton("...", this);
|
||||
sel_color->setGeometry(10+75, 40+25+10, 25, 25);
|
||||
connect(sel_color, SIGNAL(clicked()), this, SLOT(selectColor()));
|
||||
connect(use_color, SIGNAL(toggled(bool)), this, SLOT(clickOffset(bool)));
|
||||
connect(use_fade, SIGNAL(toggled(bool)), this, SLOT(clickFade(bool)));
|
||||
|
||||
show_disp = new QPushButton(tr("Show"), this);
|
||||
show_disp->setToolTip(tr("Show/Hide Display Window"));
|
||||
show_disp->setGeometry(10,45+25+10+25,100,25);
|
||||
connect(show_disp, SIGNAL(clicked()), this, SLOT(showDisplay()));
|
||||
|
||||
row4->addWidget(use_fade);
|
||||
row4->addWidget(show_disp);
|
||||
mainLayout->addLayout(row4);
|
||||
|
||||
QHBoxLayout *row5 = new QHBoxLayout();
|
||||
row5->setSpacing(8);
|
||||
record_btn = new QPushButton(tr("Rec Settings"), this);
|
||||
record_btn->setToolTip(tr("Record Settings"));
|
||||
record_btn->setGeometry(10, 45+25+10+25+25+5,100,25);
|
||||
connect(record_btn, SIGNAL(clicked()), this, SLOT(showRecord()));
|
||||
|
||||
record_now = new QPushButton(tr("Record"), this);
|
||||
record_now->setToolTip(tr("Record Button"));
|
||||
record_now->setGeometry(120, 45+25+10+25+25+5, 100, 25);
|
||||
connect(record_now, SIGNAL(clicked()), this, SLOT(recordNow()));
|
||||
|
||||
record_now->setEnabled(false);
|
||||
|
||||
row5->addWidget(record_btn);
|
||||
row5->addWidget(record_now);
|
||||
mainLayout->addLayout(row5);
|
||||
|
||||
mainLayout->addStretch();
|
||||
setLayout(mainLayout);
|
||||
|
||||
disableButtons();
|
||||
//setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
}
|
||||
|
||||
void ToolboxWindow::enableRecord() {
|
||||
|
||||
Reference in New Issue
Block a user