mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 12:50:07 +01:00
adding dialog windows
This commit is contained in:
@@ -36,6 +36,10 @@ AC_MainWindow::AC_MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
setWindowTitle("Acid Cam v2 - Qt");
|
||||
createControls();
|
||||
createMenu();
|
||||
|
||||
cap_camera = new CaptureCamera(this);
|
||||
cap_video = new CaptureVideo(this);
|
||||
|
||||
statusBar()->showMessage(tr("Acid Cam v2 Loaded - Use File Menu to Start"));
|
||||
}
|
||||
|
||||
@@ -205,11 +209,11 @@ void AC_MainWindow::file_Exit() {
|
||||
}
|
||||
|
||||
void AC_MainWindow::file_NewVideo() {
|
||||
|
||||
cap_video->show();
|
||||
}
|
||||
|
||||
void AC_MainWindow::file_NewCamera() {
|
||||
|
||||
cap_camera->show();
|
||||
}
|
||||
|
||||
void AC_MainWindow::controls_Snap() {
|
||||
@@ -225,6 +229,6 @@ void AC_MainWindow::controls_Step() {
|
||||
}
|
||||
|
||||
void AC_MainWindow::help_About() {
|
||||
|
||||
QMessageBox::information(this, tr("About Acid Cam"), tr("Written by <b>Jared Bruni</b><br><br>\n\n <a href=\"http://github.com/lostjared\">GitHub</a><br>\n<a href=\"http://youtube.com/lostjared\">YouTube</a>\n"));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __MAIN_WINDOW_H__
|
||||
|
||||
#include "qtheaders.h"
|
||||
#include "new_dialog.h"
|
||||
|
||||
class AC_MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
@@ -37,6 +38,9 @@ private:
|
||||
void createControls();
|
||||
void createMenu();
|
||||
|
||||
CaptureCamera *cap_camera;
|
||||
CaptureVideo *cap_video;
|
||||
|
||||
};
|
||||
|
||||
extern const char *filer_names[];
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
#include "new_dialog.h"
|
||||
|
||||
CaptureCamera::CaptureCamera(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 480);
|
||||
setWindowTitle("Capture from Webcam");
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
}
|
||||
|
||||
CaptureVideo::CaptureVideo(QWidget *parent) : QDialog(parent) {
|
||||
setFixedSize(640, 480);
|
||||
setWindowTitle(("Capture from Video"));
|
||||
setWindowIcon(QPixmap(":/images/icon.png"));
|
||||
}
|
||||
|
||||
@@ -3,4 +3,18 @@
|
||||
|
||||
#include "qtheaders.h"
|
||||
|
||||
|
||||
class CaptureCamera : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaptureCamera(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
class CaptureVideo : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaptureVideo(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include<QMenuBar>
|
||||
#include<QAction>
|
||||
#include<QStatusBar>
|
||||
#include<QMessageBox>
|
||||
#include"ac.h"
|
||||
#include"fractal.h"
|
||||
#include<unordered_map>
|
||||
|
||||
Reference in New Issue
Block a user