From: Steinar H. Gunderson Date: Sat, 3 Oct 2015 14:34:36 +0000 (+0200) Subject: Introduce a rudimentary main GUI (not wired up yet). X-Git-Tag: 1.0.0~320 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=aaf3cfbd490d34c694422341ed9021b28619fa51;p=nageru Introduce a rudimentary main GUI (not wired up yet). --- diff --git a/Makefile b/Makefile index 9958450..2c0ed59 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CXX=g++ -CXXFLAGS := -O2 -march=native -g -std=gnu++11 -Wall -Wno-deprecated-declarations -fPIC $(shell pkg-config --cflags Qt5Core Qt5Widgets Qt5OpenGLExtensions libusb-1.0 movit) -pthread -LDFLAGS=$(shell pkg-config --libs Qt5Core Qt5Widgets Qt5OpenGLExtensions libusb-1.0 movit) -lEGL -lGL -pthread -lva -lva-drm -lva-x11 -lX11 -lavformat -lavcodec -lavutil +CXXFLAGS := -O2 -march=native -g -std=gnu++11 -Wall -Wno-deprecated-declarations -fPIC $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets Qt5OpenGLExtensions libusb-1.0 movit) -pthread +LDFLAGS=$(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets Qt5OpenGLExtensions libusb-1.0 movit) -lEGL -lGL -pthread -lva -lva-drm -lva-x11 -lX11 -lavformat -lavcodec -lavutil # Qt objects OBJS=glwidget.o main.o mainwindow.o window.o @@ -9,6 +9,9 @@ OBJS += glwidget.moc.o mainwindow.moc.o window.moc.o # Mixer objects OBJS += h264encode.o mixer.o bmusb.o pbo_frame_allocator.o context.o +%.cpp: %.ui + uic $< -o $@ + %.moc.cpp: %.h moc $< -o $@ @@ -17,4 +20,5 @@ all: nageru nageru: $(OBJS) $(CXX) $(LDFLAGS) -o $@ $^ +mainwindow.o: mainwindow.cpp ui_mainwindow.cpp diff --git a/mainwindow.cpp b/mainwindow.cpp index 4804c08..e47118c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5,9 +5,12 @@ #include "context.h" #include "mixer.h" +#include "ui_mainwindow.cpp" + using std::thread; MainWindow::MainWindow() { - setCentralWidget(new Window(this)); + Ui::MainWindow *window = new Ui::MainWindow; + window->setupUi(this); } diff --git a/ui_mainwindow.ui b/ui_mainwindow.ui new file mode 100644 index 0000000..485904e --- /dev/null +++ b/ui_mainwindow.ui @@ -0,0 +1,243 @@ + + + MainWindow + + + + 0 + 0 + 948 + 597 + + + + MainWindow + + + + true + + + + 0 + 0 + + + + + + + + + + + 0 + + + + + + 1 + 1 + + + + + + + + Preview + + + Qt::AlignCenter + + + + + + + + + + + Cut + + + + + + + Fade + + + + + + + Wipe + + + + + + + + + 0 + + + + + + 1 + 1 + + + + + 16 + 9 + + + + + 16 + 9 + + + + + + + + Live + + + Qt::AlignCenter + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + 0 + + + + + + 1 + 1 + + + + + + + + + 1 + 1 + + + + + + + + + 1 + 1 + + + + + + + + + 1 + 1 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + PushButton + + + + + + + verticalLayoutWidget + me_preview + + + + + 0 + 0 + 948 + 19 + + + + + Video + + + + + + + + Exit + + + + + + + GLWidget + QOpenGLWidget +
glwidget.h
+
+
+ + +