working on the interface

This commit is contained in:
lostjared
2017-02-01 08:33:23 -08:00
parent 957da58e2c
commit 0222d708ba
4 changed files with 81 additions and 5 deletions

View File

@@ -4,11 +4,66 @@ void custom_filter(cv::Mat &frame) {
}
void ac::plugin(cv::Mat &frame) {
}
AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
setGeometry(0, 0, 800, 600);
setWindowTitle("Acid Cam v2 - Qt");
createControls();
createMenu();
}
void AC_MainWindow::createControls() {
filters = new QListWidget(this);
filters->setGeometry(10, 10, 390, 200);
filters->show();
custom_filters = new QListWidget(this);
custom_filters->setGeometry(400, 10, 390, 200);
custom_filters->show();
for(int i = 0; i < ac::draw_max; ++i) {
filters->addItem(ac::draw_strings[i].c_str());
}
btn_add = new QPushButton("Add", this);
btn_remove = new QPushButton("Remove", this);
btn_moveup = new QPushButton("Move Up", this);
btn_movedown = new QPushButton("Move Down", this);
btn_add->setGeometry(10, 210, 100, 20);
btn_remove->setGeometry(400, 210, 100, 20);
btn_moveup->setGeometry(500, 210, 100, 20);
btn_movedown->setGeometry(600, 210, 100, 20);
connect(btn_add, SIGNAL(clicked()), this, SLOT(addClicked()));
connect(btn_remove, SIGNAL(clicked()), this, SLOT(rmvClicked()));
connect(btn_moveup, SIGNAL(clicked()), this, SLOT(upClicked()));
connect(btn_movedown, SIGNAL(clicked()), this, SLOT(downClicked()));
}
void AC_MainWindow::createMenu() {
}
void AC_MainWindow::addClicked() {
}
void AC_MainWindow::rmvClicked() {
}
void AC_MainWindow::upClicked() {
}
void AC_MainWindow::downClicked() {
}

View File

@@ -9,6 +9,21 @@ class AC_MainWindow : public QMainWindow {
public:
AC_MainWindow(QWidget *parent = 0);
QListWidget *filters, *custom_filters;
QPushButton *btn_add, *btn_remove, *btn_moveup, *btn_movedown;
public slots:
void addClicked();
void rmvClicked();
void upClicked();
void downClicked();
private:
void createControls();
void createMenu();
};

View File

@@ -1 +1,5 @@
#include "plugin.h"
void ac::plugin(cv::Mat &frame) {
}

View File

@@ -4,6 +4,8 @@
#include<QApplication>
#include<QMainWindow>
#include<QDialog>
#include<QListWidget>
#include<QPushButton>
#include"ac.h"
#include"fractal.h"